Kaynağa Gözat

fix: apply payment status so atualizava quando status era paid, prendia a tela em um estado sem payment e sem as infos (pix)

Gustavo Mantovani 2 hafta önce
ebeveyn
işleme
987a2dcb7e

+ 14 - 12
src/components/dashboard/SchedulePaymentPixDialog.vue

@@ -169,22 +169,24 @@ const stopPolling = () => {
 }
 
 const applyPaymentStatus = (nextPayment) => {
- if (nextPayment.status === 'paid') {
-  processing.value = false
+  payment.value = nextPayment
 
-  $q.notify({
-    type: 'positive',
-    message: 'Pagamento confirmado!',
-    position: 'top',
-  })
+  if (nextPayment.status === 'paid') {
+    processing.value = false
 
-  paymentStore.clearPixPaymentForServicePackage(cacheKey.value)
-  stopPolling()
+    $q.notify({
+      type: 'positive',
+      message: 'Pagamento confirmado!',
+      position: 'top',
+    })
+
+    paymentStore.clearPixPaymentForServicePackage(cacheKey.value)
+    stopPolling()
 
-  onDialogOK()
+    onDialogOK()
 
-  return
-}
+    return
+  }
 
 
   if (['failed', 'cancelled'].includes(nextPayment.status)) {