diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-10-25 15:03:53 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-10-25 15:03:53 +0700 |
| commit | c64472c479ec282af9b606a76358922b25752be0 (patch) | |
| tree | 67f75933c4d9a93c00a39b8852ad76fa32e4534d | |
| parent | fc77794a015f8fed5e8af4c9a320ca8b0fbb7d23 (diff) | |
<iman> update revisi CR
| -rw-r--r-- | src-migrate/modules/product-detail/components/PriceAction.tsx | 20 | ||||
| -rw-r--r-- | src/lib/product/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) => { </div> <div> - <span className={sla?.qty < 10 ? 'text-red-600 font-medium' : ''}> - {' '} + <Skeleton + isLoaded={sla} + h='21px' + // w={16} + className={sla?.qty < 10 ? 'text-red-600 font-medium' : ''} + > Stock : {sla?.qty}{' '} - </span> + </Skeleton> + {/* <span className={sla?.qty < 10 ? 'text-red-600 font-medium' : ''}> + {' '} + </span> */} </div> <div> {product?.is_in_bu && ( @@ -157,7 +169,7 @@ const PriceAction = ({ product }: Props) => { </div> </div> {qtyPickUp > 0 && ( - <div className='text-[10px] mt-1 text-red-500 italic'> + <div className='text-[12px] mt-1 text-red-500 italic'> * {qtyPickUp} barang bisa di pickup </div> )} 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 = ({ </button> </div> <div> - <span + <Skeleton + isLoaded={sla} + h='21px' + // w={16} className={ product?.sla?.qty < 10 ? 'text-red-600 font-medium' : '' } > - {' '} Stock : {product?.sla?.qty}{' '} - </span> + </Skeleton> </div> <div> {product?.sla?.qty > 0 && ( |
