From 1bb3f91f27db4db6a16a1ed3fe59016268ba3d44 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Wed, 8 May 2024 13:23:10 +0700
Subject: change wa number

---
 src/lib/checkout/components/Checkout.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(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 7a456d70..0090acee 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -1454,7 +1454,7 @@ const SectionExpedisi = ({
           dengan menghubungi admin melalui{' '}
           <a
             className='text-danger-500 inline'
-            href='https://api.whatsapp.com/send?phone=628128080622'
+            href='https://api.whatsapp.com/send?phone=6281717181922'
           >
             tautan ini
           </a>
-- 
cgit v1.2.3


From da80b7e00e2ee6aaa3a81902cd51ff556d4d7ef0 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Wed, 5 Jun 2024 15:01:12 +0700
Subject: fixing shipping address and invoice address

---
 src/lib/checkout/components/Checkout.jsx | 6 ++++--
 1 file changed, 4 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 0090acee..5ca3611f 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -333,8 +333,10 @@ const Checkout = () => {
       quantity: product.quantity,
     }));
     let data = {
-      partner_shipping_id: auth.partnerId,
-      partner_invoice_id: auth.partnerId,
+      // partner_shipping_id: auth.partnerId,
+      // partner_invoice_id: auth.partnerId,
+      partner_shipping_id: selectedAddress?.shipping?.id || auth.partnerId,
+      partner_invoice_id: selectedAddress?.invoicing?.id || auth.partnerId,
       user_id: auth.id,
       order_line: JSON.stringify(productOrder),
       delivery_amount: biayaKirim,
-- 
cgit v1.2.3


From b992edcc7f1b7395dea0c8562ddf272df9fc6b7f Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Sat, 29 Jun 2024 10:08:16 +0700
Subject: <iman> add parameter flag flash sale

---
 src/lib/checkout/components/Checkout.jsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(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 5ca3611f..df1768fb 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -112,6 +112,7 @@ const Checkout = () => {
   const [loadingVoucher, setLoadingVoucher] = useState(true);
   const [loadingRajaOngkir, setLoadingRajaOngkir] = useState(false);
   const [grandTotal, setGrandTotal] = useState(0);
+  const [hasFlashSale, setHasFlashSale] = useState(false);
 
   const expedisiValidation = useRef(null);
 
@@ -224,6 +225,7 @@ const Checkout = () => {
     setProducts(cartCheckout?.products);
     setCheckWeight(cartCheckout?.hasProductWithoutWeight);
     setTotalWeight(cartCheckout?.totalWeight.g);
+    setHasFlashSale(cartCheckout?.products[0]?.hasFlashsale ? cartCheckout.products[0].hasFlashsale : false);
   }, [cartCheckout]);
 
   useEffect(() => {
@@ -343,6 +345,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
       voucher: activeVoucher,
       type: 'sale_order',
     };
@@ -358,7 +361,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


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

