From 82bcfbeab8a79b74caad00a57f4aeb3591d838b2 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Wed, 12 Nov 2025 12:12:16 +0700 Subject: cart smentara --- src-migrate/modules/cart/components/Item.tsx | 8 ++++++++ src-migrate/pages/shop/cart/index.tsx | 22 +++++++++++++++------- src-migrate/types/cart.ts | 3 ++- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src-migrate/modules/cart/components/Item.tsx b/src-migrate/modules/cart/components/Item.tsx index a3aa2ac2..3a02d37c 100644 --- a/src-migrate/modules/cart/components/Item.tsx +++ b/src-migrate/modules/cart/components/Item.tsx @@ -15,6 +15,8 @@ import CartItemAction from './ItemAction'; import CartItemPromo from './ItemPromo'; import CartItemSelect from './ItemSelect'; +import { BadgePercent } from 'lucide-react'; + type Props = { item: CartItemProps; editable?: boolean; @@ -80,6 +82,12 @@ const CartItem = ({ item, editable = true, selfPicking }: Props) => { )} + {item.cart_type === 'product' && item.voucher_pasti_hemat && ( + + + Bisa pakai voucher pasti hemat + + )}
diff --git a/src-migrate/pages/shop/cart/index.tsx b/src-migrate/pages/shop/cart/index.tsx index 031aa45b..5121c732 100644 --- a/src-migrate/pages/shop/cart/index.tsx +++ b/src-migrate/pages/shop/cart/index.tsx @@ -301,14 +301,19 @@ const CartPage: React.FC = () => { <> {/* Sticky Header */}

Keranjang Belanja

-
+
+ + Gunakan Voucher `VoucherPastiHemat` untuk belanja lebih hemat. + +
{
{/* Cart Summary */}
{device.isMobile ? ( diff --git a/src-migrate/types/cart.ts b/src-migrate/types/cart.ts index 05fdcadb..fbf7c3f5 100644 --- a/src-migrate/types/cart.ts +++ b/src-migrate/types/cart.ts @@ -1,4 +1,4 @@ -import { CategoryPromo } from "./promotion"; +import { CategoryPromo } from './promotion'; type Price = { price: number; @@ -37,6 +37,7 @@ export type CartItem = { available_quantity: number; weight: number; attributes: string[]; + voucher_pasti_hemat?: boolean; parent: { id: number; name: string; -- cgit v1.2.3