diff --git a/src/api/pargar.ts b/src/api/pargar.ts index 680140a..4875f4b 100644 --- a/src/api/pargar.ts +++ b/src/api/pargar.ts @@ -44,8 +44,11 @@ export interface PargarSyncWalletResult { } } -export const syncCustomerWalletFromPargar = async (customerId: number) => - await useAxios.post(`/admin/customer/${customerId}/pargar/sync-wallet`) +export const syncCustomerWalletFromPargar = async (customerId: number, force = false) => + await useAxios.post( + `/admin/customer/${customerId}/pargar/sync-wallet`, + { force } + ) export interface PanelOnlyCustomer { id: number diff --git a/src/components/customer/CustomerWalletBalancePanel.vue b/src/components/customer/CustomerWalletBalancePanel.vue index 017cddc..73c13cb 100644 --- a/src/components/customer/CustomerWalletBalancePanel.vue +++ b/src/components/customer/CustomerWalletBalancePanel.vue @@ -333,7 +333,9 @@ function linesForMetal(metalId: number) { return lines } -defineExpose({ reload: () => props.customerId && load(props.customerId) }) +defineExpose({ + reload: () => (props.customerId ? load(props.customerId) : Promise.resolve()) +}) diff --git a/src/pages/menuPages/customers/base/index.vue b/src/pages/menuPages/customers/base/index.vue index 6a5feab..d730c0d 100644 --- a/src/pages/menuPages/customers/base/index.vue +++ b/src/pages/menuPages/customers/base/index.vue @@ -158,20 +158,6 @@ title="کد حسابداری" :value="accountingCodeValue" /> -
- - دریافت مانده از پرگار - -
- +
+ + +