diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-08-23 09:32:03 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-08-23 09:32:03 +0700 |
| commit | bb2763a47ae15b718b9ed532b4b3bdd68d0d8867 (patch) | |
| tree | fee5348db6a4d3f530816e64178ac8cbd7f7935b /src-migrate/modules/product-detail/components/PriceAction.tsx | |
| parent | 47cc09c7f74b2c37f0fc1a98e50f7d76774ea4a4 (diff) | |
<Miqdad> Button Position
Diffstat (limited to 'src-migrate/modules/product-detail/components/PriceAction.tsx')
| -rw-r--r-- | src-migrate/modules/product-detail/components/PriceAction.tsx | 68 |
1 files changed, 50 insertions, 18 deletions
diff --git a/src-migrate/modules/product-detail/components/PriceAction.tsx b/src-migrate/modules/product-detail/components/PriceAction.tsx index 7548e016..9d45a7c3 100644 --- a/src-migrate/modules/product-detail/components/PriceAction.tsx +++ b/src-migrate/modules/product-detail/components/PriceAction.tsx @@ -12,6 +12,8 @@ import { getAuth } from '~/libs/auth'; import useDevice from '@/core/hooks/useDevice'; import odooApi from '~/libs/odooApi'; import { Button, Skeleton } from '@chakra-ui/react'; +import DesktopView from '@/core/components/views/DesktopView'; +import MobileView from '@/core/components/views/MobileView'; type Props = { product: IProductDetail; @@ -201,30 +203,60 @@ const PriceAction = ({ product }: Props) => { </div> )} <div className='h-4' /> - - <div className={`${style['action-wrapper']}`}> - <AddToCart - products={product} - variantId={activeVariantId} - quantity={Number(quantityInput)} - /> - {!isApproval && ( + <DesktopView> + <div className={`${style['action-wrapper']}`}> <AddToCart + products={product} + variantId={activeVariantId} + quantity={Number(quantityInput)} + /> + {!isApproval && ( + <AddToCart + source='buy' + products={product} + variantId={activeVariantId} + quantity={Number(quantityInput)} + /> + )} + </div> + <div className='mt-4'> + <AddToQuotation source='buy' products={product} variantId={activeVariantId} quantity={Number(quantityInput)} /> - )} - </div> - <div className='mt-4'> - <AddToQuotation - source='buy' - products={product} - variantId={activeVariantId} - quantity={Number(quantityInput)} - /> - </div> + </div> + </DesktopView> + <MobileView> + <div className='grid grid-cols-12 gap-2'> + <div className='col-span-2'> + <AddToQuotation + source='buy' + products={product} + variantId={activeVariantId} + quantity={Number(quantityInput)} + /> + </div> + <div className='col-span-5'> + {!isApproval && ( + <AddToCart + source='buy' + products={product} + variantId={activeVariantId} + quantity={Number(quantityInput)} + /> + )} + </div> + <div className='col-span-5'> + <AddToCart + products={product} + variantId={activeVariantId} + quantity={Number(quantityInput)} + /> + </div> + </div> + </MobileView> </div> ); }; |
