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/checkout/components') 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 From 71748842100e833472c56194e57c309539478dd3 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Fri, 4 Aug 2023 14:30:21 +0700 Subject: cr voucher --- src/lib/checkout/components/Checkout.jsx | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'src/lib/checkout/components') diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index 9ffac61a..5265a794 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -490,7 +490,7 @@ const Checkout = () => {
)} -
+
{item.canApply && (
{

)} + {!item.canApply && item.applyStatus === 'MPA-HF' && ( + + )} {!item.canApply && item.applyStatus === 'UM' && ( )} - - {!item.canApply && - item.has_flashsale_products && - item.apply_status === 'UM' && ( - - )} -
{item.name} -- cgit v1.2.3 From 1de62313819b801c81c50d30e60f728257656ffa Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Sat, 5 Aug 2023 09:30:12 +0700 Subject: change text alert --- src/lib/checkout/components/Checkout.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/checkout/components') diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index cfd95a89..a6d26b6d 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -509,7 +509,7 @@ const Checkout = () => { class='p-2 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400' role='alert' > -

Voucher tidak bisa digabung dengan promo lainya

+

Voucher tidak bisa digabung dengan promo lainya

)} {!item.canApply && item.applyStatus === 'UM' && ( @@ -517,7 +517,7 @@ const Checkout = () => { class='p-2 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400' role='alert' > -

+

Tambah produk{' '} {item.manufactureNames} senilai{' '} @@ -535,7 +535,7 @@ const Checkout = () => { class='p-2 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400' role='alert' > -

+

Tambah produk{' '} {item.manufactureNames} senilai{' '} @@ -553,7 +553,7 @@ const Checkout = () => { class='p-2 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400' role='alert' > -

+

Tambah{' '} {currencyFormat(item.differenceToApply)} -- cgit v1.2.3 From 01ea505bd5b51b8596740cd6c9d2e055b63c9936 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Sat, 5 Aug 2023 09:36:07 +0700 Subject: change text font --- src/lib/checkout/components/Checkout.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/checkout/components') diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index a6d26b6d..afb94c10 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -498,7 +498,7 @@ const Checkout = () => { >

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

@@ -519,8 +519,8 @@ const Checkout = () => { >

Tambah produk{' '} - {item.manufactureNames} senilai{' '} - + {item.manufactureNames} senilai{' '} + {currencyFormat(item.minPurchaseAmount)} {' '} untuk pakai promo ini @@ -537,8 +537,8 @@ const Checkout = () => { >

Tambah produk{' '} - {item.manufactureNames} senilai{' '} - + {item.manufactureNames} senilai{' '} + {currencyFormat(item.differenceToApply)} {' '} untuk pakai promo ini @@ -555,7 +555,7 @@ const Checkout = () => { >

Tambah{' '} - + {currencyFormat(item.differenceToApply)} {' '} untuk pakai promo ini{' '} -- cgit v1.2.3