From a7574b1276d751824b0c16c0696133ea1517223a Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Thu, 3 Aug 2023 17:06:09 +0700 Subject: voucher --- src/lib/checkout/components/Checkout.jsx | 161 +++++++++++++++++++------------ 1 file changed, 97 insertions(+), 64 deletions(-) (limited to 'src/lib') diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index 53ac63e1..9ffac61a 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -301,7 +301,7 @@ const Checkout = () => { voucher: activeVoucher, type: 'sale_order' } - if(query){ + if (query) { data.source = 'buy' } if (poNumber.current.value) data.po_number = poNumber.current.value @@ -491,6 +491,81 @@ const Checkout = () => { )}
+ {item.canApply && ( + + )} + {!item.canApply && item.applyStatus === 'UM' && ( + + )} + + {!item.canApply && + item.applyStatus === 'MPA' && + item.manufactureNames != '' && ( + + )} + + {!item.canApply && + item.applyStatus === 'MPA' && + item.manufactureNames === '' && ( + + )} + + {!item.canApply && + item.has_flashsale_products && + item.apply_status === 'UM' && ( + + )} +
{item.name} @@ -516,7 +591,7 @@ const Checkout = () => {
-
+

Kode Voucher :{' '} @@ -528,51 +603,30 @@ const Checkout = () => { )}

+
+ + + Berakhir dalam{' '} + {item.remainingTime} lagi{' '} + +

- {!item.canApply && - item.applyStatus === 'MPA' && - item.manufactureNames != '' && ( -

- Tambah produk{' '} - {item.manufactureNames} senilai{' '} - - {currencyFormat(item.differenceToApply)} - {' '} - untuk pakai promo ini -

- )} - {!item.canApply && - item.applyStatus === 'MPA' && - item.manufactureNames === '' && ( -

- Tambah{' '} - - {currencyFormat(item.differenceToApply)} - {' '} - untuk pakai promo ini{' '} -

- )} - {!item.canApply && item.applyStatus === 'UM' && ( -

- Tambah produk{' '} - {item.manufactureNames} senilai{' '} - - {currencyFormat(item.minPurchaseAmount)} - {' '} - untuk pakai promo ini -

- )} - {item.canApply && ( -

- Potensi potongan sebesar{' '} - - {currencyFormat(item.discountVoucher)} - -

- )} {/* {item.canApply === false ? 'Tambah ' + currencyFormat(item.differenceToApply) + @@ -580,27 +634,6 @@ const Checkout = () => { : 'Potensi potongan sebesar ' + currencyFormat(hitungDiscountVoucher(item.code))} */}

-
-
- - - Berakhir dalam {item.remainingTime}{' '} - lagi{' '} - -
-- cgit v1.2.3