diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/components/layouts/BasicLayout.jsx | 9 | ||||
| -rw-r--r-- | src/lib/brand/components/Brand.jsx | 17 | ||||
| -rw-r--r-- | src/lib/checkout/components/FinishCheckout.jsx | 2 | ||||
| -rw-r--r-- | src/lib/product/components/Product/ProductDesktop.jsx | 6 | ||||
| -rw-r--r-- | src/lib/product/components/Product/ProductMobile.jsx | 6 | ||||
| -rw-r--r-- | src/lib/product/components/ProductCard.jsx | 4 | ||||
| -rw-r--r-- | src/pages/api/shop/finish-checkout.js | 2 |
7 files changed, 35 insertions, 11 deletions
diff --git a/src/core/components/layouts/BasicLayout.jsx b/src/core/components/layouts/BasicLayout.jsx index 1a7185cd..c3f82ef2 100644 --- a/src/core/components/layouts/BasicLayout.jsx +++ b/src/core/components/layouts/BasicLayout.jsx @@ -1,5 +1,6 @@ import dynamic from 'next/dynamic' import BasicFooter from '../elements/Footer/BasicFooter' +import Image from 'next/image' const Navbar = dynamic(() => import('../elements/Navbar/Navbar')) const AnimationLayout = dynamic(() => import('./AnimationLayout')) @@ -8,7 +9,13 @@ const BasicLayout = ({ children }) => { return ( <> <Navbar /> - <AnimationLayout>{children}</AnimationLayout> + <AnimationLayout> + {children} + <div className='fixed bottom-4 right-4 sm:bottom-8 sm:right-8 z-50'> + <Image src='/images/socials/Whatsapp-2.png' alt='Whatsapp' className='block sm:hidden' width={48} height={48} /> + <Image src='/images/socials/Whatsapp-2.png' alt='Whatsapp' className='hidden sm:block' width={60} height={60} /> + </div> + </AnimationLayout> <BasicFooter /> </> ) diff --git a/src/lib/brand/components/Brand.jsx b/src/lib/brand/components/Brand.jsx index 6ebb8aa7..d570aa8b 100644 --- a/src/lib/brand/components/Brand.jsx +++ b/src/lib/brand/components/Brand.jsx @@ -29,6 +29,14 @@ const Brand = ({ id }) => { <> <div> {brand.isLoading && <ImageSkeleton />} + {brand.data?.banners?.length == 0 && ( + <Image + src='/images/default-banner-brand.jpg' + alt='Brand - Indoteknik' + className='w-full' + h-auto + /> + )} {brand.data && ( <> <Swiper @@ -69,10 +77,19 @@ const Brand = ({ id }) => { <Divider /> </> </MobileView> + <DesktopView> <div className='container mx-auto mt-10 mb-3'> <div className='min-h-[150px]'> {brand.isLoading && <ImageSkeleton />} + {brand.data?.banners?.length == 0 && ( + <Image + src='/images/default-banner-brand.jpg' + alt='Brand - Indoteknik' + className='w-full' + h-auto + /> + )} {brand.data && ( <> <Swiper diff --git a/src/lib/checkout/components/FinishCheckout.jsx b/src/lib/checkout/components/FinishCheckout.jsx index cd93e3a4..92245e31 100644 --- a/src/lib/checkout/components/FinishCheckout.jsx +++ b/src/lib/checkout/components/FinishCheckout.jsx @@ -14,7 +14,7 @@ const FinishCheckout = ({ query }) => { <p className='text-caption-2 text-warning-800'>No. Transaksi</p> </div> <Link - href='/my/transactions' + href='/my/quotations' className='bg-warning-400 text-warning-900 rounded-b-xl py-4 block' > Lihat detail pembelian Anda disini diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx index 9ff782ce..dc22fcae 100644 --- a/src/lib/product/components/Product/ProductDesktop.jsx +++ b/src/lib/product/components/Product/ProductDesktop.jsx @@ -141,7 +141,7 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => { <div className='w-3/4'> {product?.weight > 0 && <span>{product?.weight} KG</span>} {product?.weight == 0 && ( - <a href='https://wa.me' className='text-danger-500 font-medium'> + <a href='https://wa.me/628128080622' className='text-danger-500 font-medium'> Tanya Berat </a> )} @@ -171,7 +171,7 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => { ) : ( <span className='text-gray_r-12/90 font-normal text-h-sm'> Hubungi kami untuk dapatkan harga terbaik, - <a href='https://wa.me/' className='text-danger-500 underline'> + <a href='https://wa.me/628128080622' className='text-danger-500 underline'> klik disini </a> </span> @@ -269,7 +269,7 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => { {variant.price.priceDiscount > 0 ? ( currencyFormat(variant.price.priceDiscount) ) : ( - <a href='https://wa.me/' className='text-red_r-11'> + <a href='https://wa.me/628128080622' className='text-red_r-11'> Call for price </a> )} diff --git a/src/lib/product/components/Product/ProductMobile.jsx b/src/lib/product/components/Product/ProductMobile.jsx index b75a191b..02cf0137 100644 --- a/src/lib/product/components/Product/ProductMobile.jsx +++ b/src/lib/product/components/Product/ProductMobile.jsx @@ -152,7 +152,7 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { ) : ( <span className='text-gray_r-11 leading-6 font-normal'> Hubungi kami untuk dapatkan harga terbaik, - <a href='https://wa.me/' className='text-danger-500 underline'> + <a href='https://wa.me/628128080622' className='text-danger-500 underline'> klik disini </a> </span> @@ -236,7 +236,7 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { </span> )} {activeVariant?.stock == 0 && ( - <a href='https://wa.me' className='text-danger-500 font-medium'> + <a href='https://wa.me/628128080622' className='text-danger-500 font-medium'> Tanya Stok </a> )} @@ -244,7 +244,7 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { <SpecificationContent label='Berat Barang'> {activeVariant?.weight > 0 && <span>{activeVariant?.weight} KG</span>} {activeVariant?.weight == 0 && ( - <a href='https://wa.me' className='text-danger-500 font-medium'> + <a href='https://wa.me/628128080622' className='text-danger-500 font-medium'> Tanya Berat </a> )} diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index a1c30d00..725e6efe 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -58,7 +58,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { {product?.lowestPrice.priceDiscount > 0 ? ( currencyFormat(product?.lowestPrice.priceDiscount) ) : ( - <a href='https://wa.me/'>Call for price</a> + <a href='https://wa.me/628128080622'>Call for price</a> )} </div> @@ -130,7 +130,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { {product?.lowestPrice?.priceDiscount > 0 ? ( currencyFormat(product?.lowestPrice?.priceDiscount) ) : ( - <a href='https://wa.me/'>Call for price</a> + <a href='https://wa.me/628128080622'>Call for price</a> )} </div> diff --git a/src/pages/api/shop/finish-checkout.js b/src/pages/api/shop/finish-checkout.js index 04e82118..9eaa36db 100644 --- a/src/pages/api/shop/finish-checkout.js +++ b/src/pages/api/shop/finish-checkout.js @@ -46,7 +46,7 @@ export default async function handler(req, res) { } } - const query = `name=${orderName.replaceAll('-', '/')}&limit=1` + const query = `name=${orderName.replaceAll('-', '/')}&limit=1&context=quotation` const searchTransaction = await odooApi( 'GET', `/api/v1/partner/${auth.partnerId}/sale_order?${query}`, |
