fix some bugs
This commit is contained in:
@@ -596,12 +596,13 @@ async function refreshWalletPanels() {
|
||||
}
|
||||
|
||||
async function syncPargarWallet() {
|
||||
if (!userInfo.value?.id || !pargarWalletCanSync.value) return
|
||||
if (!userInfo.value?.id || !pargarWalletCanSync.value || pargarSyncLoading.value) return
|
||||
pargarSyncLoading.value = true
|
||||
try {
|
||||
const res = await syncCustomerWalletFromPargar(userInfo.value.id)
|
||||
const applied =
|
||||
res.ok ||
|
||||
(res.result?.documents?.acknowledged ?? 0) > 0 ||
|
||||
(res.result?.documents?.applied ?? 0) > 0 ||
|
||||
Boolean(res.result?.mande?.applied)
|
||||
|
||||
@@ -620,6 +621,7 @@ async function syncPargarWallet() {
|
||||
const status = (e as { response?: { status?: number } })?.response?.status
|
||||
const applied =
|
||||
Boolean(data?.ok) ||
|
||||
(data?.result?.documents?.acknowledged ?? 0) > 0 ||
|
||||
(data?.result?.documents?.applied ?? 0) > 0 ||
|
||||
Boolean(data?.result?.mande?.applied)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user