From 703136862dc3d41d0a276c17fa7f4ecebd471527 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 1 Jul 2024 09:07:59 +0700
Subject: <iman> add flash sales to sales order

---
 src/lib/checkout/components/Checkout.jsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/lib/checkout/components/Checkout.jsx')

diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index df1768fb..4aafdece 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -227,6 +227,7 @@ const Checkout = () => {
     setTotalWeight(cartCheckout?.totalWeight.g);
     setHasFlashSale(cartCheckout?.products[0]?.hasFlashsale ? cartCheckout.products[0].hasFlashsale : false);
   }, [cartCheckout]);
+  
 
   useEffect(() => {
     setCheckoutValidation(false);
@@ -345,7 +346,7 @@ const Checkout = () => {
       carrier_id: selectedCarrierId,
       estimated_arrival_days: splitDuration(etd),
       delivery_service_type: selectedExpedisiService,
-      flash_sale : !hasFlashSale, // dibuat negasi untuk ngetest kebalikan nilai false
+      flash_sale : hasFlashSale, // dibuat negasi untuk ngetest kebalikan nilai false
       voucher: activeVoucher,
       type: 'sale_order',
     };
@@ -361,7 +362,7 @@ const Checkout = () => {
       toast.error('Gagal melakukan transaksi, terjadi kesalahan internal');
       return;
     }
-    console.log("isCheckouted",isCheckouted)
+    
     gtagPurchase(products, biayaKirim, isCheckouted.name);
 
     const midtrans = async () => {
-- 
cgit v1.2.3

