From c64472c479ec282af9b606a76358922b25752be0 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Fri, 25 Oct 2024 15:03:53 +0700 Subject: update revisi CR --- .../product-detail/components/PriceAction.tsx | 20 ++++++++++++++++---- .../components/Product/ProductDesktopVariant.jsx | 8 +++++--- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src-migrate/modules/product-detail/components/PriceAction.tsx b/src-migrate/modules/product-detail/components/PriceAction.tsx index 5171308c..a87f8ae0 100644 --- a/src-migrate/modules/product-detail/components/PriceAction.tsx +++ b/src-migrate/modules/product-detail/components/PriceAction.tsx @@ -8,6 +8,7 @@ import { IProductDetail } from '~/types/product'; import { useProductDetail } from '../stores/useProductDetail'; import AddToCart from './AddToCart'; import odooApi from '~/libs/odooApi'; +import { Button, Skeleton } from '@chakra-ui/react'; type Props = { product: IProductDetail; @@ -52,6 +53,10 @@ const PriceAction = ({ product }: Props) => { fetchData(); }, [selectedVariant]); + useEffect(() => { + setQuantityInput('1'); + }, [selectedVariant]); + let voucherPastiHemat = 0; if ( @@ -137,10 +142,17 @@ const PriceAction = ({ product }: Props) => {
- - {' '} + Stock : {sla?.qty}{' '} - + + {/* + {' '} + */}
{product?.is_in_bu && ( @@ -157,7 +169,7 @@ const PriceAction = ({ product }: Props) => {
{qtyPickUp > 0 && ( -
+
* {qtyPickUp} barang bisa di pickup
)} diff --git a/src/lib/product/components/Product/ProductDesktopVariant.jsx b/src/lib/product/components/Product/ProductDesktopVariant.jsx index 2e005eea..32ce345e 100644 --- a/src/lib/product/components/Product/ProductDesktopVariant.jsx +++ b/src/lib/product/components/Product/ProductDesktopVariant.jsx @@ -364,14 +364,16 @@ const ProductDesktopVariant = ({
- - {' '} Stock : {product?.sla?.qty}{' '} - +
{product?.sla?.qty > 0 && ( -- cgit v1.2.3