From 9272a07644a75d201753501cfff173b1260963ea Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Wed, 5 Jul 2023 09:29:46 +0700 Subject: cart, checkout dan nav bar mobile --- src/lib/cart/components/Cart.jsx | 69 +++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 8 deletions(-) (limited to 'src/lib/cart/components') diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx index f1584f98..224d02d1 100644 --- a/src/lib/cart/components/Cart.jsx +++ b/src/lib/cart/components/Cart.jsx @@ -278,18 +278,18 @@ const Cart = () => {
{product.program ? ( <> -
+
{product.program.type.label}
-
+
{product.program.type.value == 'merchandise' ? ( <>Selamat anda mendapatkan merchandise indoteknik.com ) : ( <> - Selamat! Pembelian anda lebih hemat - + Selamat! Pembelian anda hemat + {' '} - {currencyFormat(product.program.price.priceDiscount)} + {currencyFormat(product.program?.totalSavings)} )} @@ -307,9 +307,12 @@ const Cart = () => { onClick={() => handlePopUpPromo(product.id, product.quantity, product.program?.id) } - className='ml-auto text-red-500 flex gap-x-1 cursor-pointer' + className='ml-auto text-red-500 flex gap-x-0 cursor-pointer' > -
Cek Promo
+
+ {' '} + Cek Promo +
)} -
+
+ toggleSelected(product.id)} @@ -414,6 +418,55 @@ const Cart = () => {
+ {product.program && + product.program.items && + product.program.items.map((item) => ( +
+ + + + {item?.name} + +
+ +
+
+ + {product.program.type.label} + +
+
{item.name}
+
+ + {item.price?.discountPercentage > 0 && ( +
+
+ {currencyFormat(item?.price?.price)} +
+
+ )} +
Gratis
+
+
+ ))} ))} -- cgit v1.2.3