chore: Minor fix
This commit is contained in:
@@ -22,7 +22,6 @@ const v2BillingUIFlags = useMapGetter('accounts/getV2BillingUIFlags');
|
||||
const isLoading = computed(() => {
|
||||
return (
|
||||
uiFlags.value.isFetchingItem ||
|
||||
v2BillingUIFlags.value.isFetchingBalance ||
|
||||
v2BillingUIFlags.value.isFetchingGrants ||
|
||||
v2BillingUIFlags.value.isFetchingPlans ||
|
||||
v2BillingUIFlags.value.isFetchingTopupOptions
|
||||
|
||||
+2
-2
@@ -56,8 +56,8 @@ defineExpose({ dialogRef });
|
||||
auto-height
|
||||
/>
|
||||
|
||||
<div class="flex gap-1.5 items-center">
|
||||
<Icon icon="i-lucide-info" class="flex-shrink-0" />
|
||||
<div class="flex gap-1 items-center">
|
||||
<Icon icon="i-lucide-info" class="flex-shrink-0 size-3.5" />
|
||||
<p class="text-xs text-n-slate-12">
|
||||
{{ t('BILLING_SETTINGS_V2.CANCEL_MODAL.INFO') }}
|
||||
</p>
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ const getCategoryConfig = category =>
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="mt-4 max-h-96 overflow-y-auto">
|
||||
<div class="mt-4 max-h-60 overflow-y-auto px-3 mx-2">
|
||||
<h6 class="text-base font-semibold mb-2">
|
||||
{{ t('BILLING_SETTINGS_V2.CREDIT_GRANTS.TITLE') }}
|
||||
</h6>
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ const handleRefresh = () => {
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="transition-all duration-300 ease-out grid overflow-hidden mx-5 !mt-0"
|
||||
class="transition-all duration-300 ease-out grid overflow-hidden !mt-0"
|
||||
:class="
|
||||
showCreditHistory
|
||||
? 'grid-rows-[1fr] opacity-100'
|
||||
|
||||
+3
@@ -50,6 +50,9 @@ const handleTopup = async data => {
|
||||
|
||||
if (result.success) {
|
||||
topupDialogRef.value?.close();
|
||||
setTimeout(async () => {
|
||||
await store.dispatch('accounts/fetchCreditsBalance');
|
||||
}, 2000);
|
||||
useAlert(t('BILLING_SETTINGS_V2.TOPUP_OPTIONS.TOPUP_SUCCESS'));
|
||||
} else if (result.error) {
|
||||
topupDialogRef.value?.close();
|
||||
|
||||
@@ -237,15 +237,10 @@ export const actions = {
|
||||
}
|
||||
},
|
||||
|
||||
v2Topup: async ({ commit, dispatch }, data) => {
|
||||
v2Topup: async ({ commit }, data) => {
|
||||
commit(types.default.SET_V2_BILLING_UI_FLAG, { isTopupInProcess: true });
|
||||
try {
|
||||
await EnterpriseAccountAPI.v2Topup(data);
|
||||
// Wait for backend to process, then refresh balance
|
||||
await new Promise(resolve => {
|
||||
setTimeout(resolve, 2000);
|
||||
});
|
||||
await dispatch('fetchCreditsBalance');
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
const errorMessage = error.response?.data?.error || error.message;
|
||||
|
||||
Reference in New Issue
Block a user