From 2d99c50da37c2e68ed33a4bc20e9b2ff06578bbe Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 7 Nov 2024 15:55:15 +0700
Subject: <iman> update code

---
 src/lib/transaction/components/Transaction.jsx | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

(limited to 'src/lib/transaction/components/Transaction.jsx')

diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx
index 777dd771..f64945f5 100644
--- a/src/lib/transaction/components/Transaction.jsx
+++ b/src/lib/transaction/components/Transaction.jsx
@@ -117,11 +117,12 @@ const Transaction = ({ id }) => {
     }
     closeCancelTransaction();
   };
+  console.log('transaction', transaction);
   const checkout = async () => {
-    if (!transaction.data?.purchaseOrderFile) {
-      toast.error('Mohon upload dokumen PO anda sebelum melanjutkan pesanan');
-      return;
-    }
+    // if (!transaction.data?.purchaseOrderFile) {
+    //   toast.error('Mohon upload dokumen PO anda sebelum melanjutkan pesanan');
+    //   return;
+    // }
     await checkoutPoApi({ id });
     toast.success('Berhasil melanjutkan pesanan');
     transaction.refetch();
@@ -161,6 +162,8 @@ const Transaction = ({ id }) => {
         '-'
       )}`;
     }
+    toast.success('Berhasil melanjutkan pesanan');
+    transaction.refetch();
 
     /* const midtrans = async () => {
         for (const product of products) deleteItemCart({ productId: product.id });
@@ -179,9 +182,6 @@ const Transaction = ({ id }) => {
           )}`;
         }
       };*/
-    toast.success('Berhasil melanjutkan pesanan');
-    transaction.refetch();
-    y;
   };
 
   const handleApproval = async () => {
-- 
cgit v1.2.3

