From e50a8320d4b12c128feafd3a1e383d94b4c082f8 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 28 Jul 2023 09:28:53 +0700 Subject: Update popular-weekly on popular product api --- src/lib/home/api/popularProductApi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/home/api/popularProductApi.js b/src/lib/home/api/popularProductApi.js index 37e4390e..4bb5e580 100644 --- a/src/lib/home/api/popularProductApi.js +++ b/src/lib/home/api/popularProductApi.js @@ -2,7 +2,7 @@ import axios from 'axios' const popularProductApi = async () => { const dataPopularProducts = await axios( - `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/search?q=*&page=1&orderBy=popular` + `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/search?q=*&page=1&orderBy=popular-weekly` ) return dataPopularProducts.data.response } -- cgit v1.2.3 From 778dcf944561e74cb915d41aff810c3f433daa43 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 28 Jul 2023 09:57:23 +0700 Subject: Update popular weekly on popular product API --- src/lib/product/api/productSimilarApi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/product/api/productSimilarApi.js b/src/lib/product/api/productSimilarApi.js index 93c7f22c..d62077eb 100644 --- a/src/lib/product/api/productSimilarApi.js +++ b/src/lib/product/api/productSimilarApi.js @@ -2,7 +2,7 @@ import axios from 'axios' const productSimilarApi = async ({ query }) => { const dataProductSimilar = await axios( - `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/search?q=${query}&page=1&orderBy=popular&operation=OR` + `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/search?q=${query}&page=1&orderBy=popular-weekly&operation=OR` ) return dataProductSimilar.data.response } -- cgit v1.2.3 From e1c6052ffc9887e792f19f99d900189647845c69 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Mon, 31 Jul 2023 16:53:37 +0700 Subject: add product flash sale to card produk banyak dilihat dan product similar --- src/lib/product/api/productSimilarApi.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/lib') diff --git a/src/lib/product/api/productSimilarApi.js b/src/lib/product/api/productSimilarApi.js index d62077eb..2470937d 100644 --- a/src/lib/product/api/productSimilarApi.js +++ b/src/lib/product/api/productSimilarApi.js @@ -1,9 +1,24 @@ +import odooApi from '@/core/api/odooApi' import axios from 'axios' +import productSearchApi from './productSearchApi' const productSimilarApi = async ({ query }) => { + let dataFlashSale = null + const flashSale = await odooApi('GET', '/api/v1/flashsale/header') + if(flashSale){ + const dataProducts = await productSearchApi({ + query: `fq=flashsale_id_i:${flashSale[0].pricelistId}&fq=flashsale_price_f:[1 TO *]&limit=2`, + operation: 'AND' + }) + dataFlashSale = dataProducts.response.products + } const dataProductSimilar = await axios( `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/search?q=${query}&page=1&orderBy=popular-weekly&operation=OR` ) + dataProductSimilar.data.response.products = [ + ...dataFlashSale, + ...dataProductSimilar.data.response.products, + ]; return dataProductSimilar.data.response } -- cgit v1.2.3 From 942b4c3548891f25198140b80192e9190a403ee5 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Tue, 1 Aug 2023 17:07:20 +0700 Subject: flash sale --- src/lib/product/api/productSimilarApi.js | 20 ++++++++----- .../product/components/Product/ProductDesktop.jsx | 34 ++++++++++++++++++++-- src/lib/product/components/ProductCard.jsx | 7 +++++ src/lib/product/components/ProductSimilar.jsx | 3 +- src/lib/product/hooks/useProductSimilar.js | 5 ++-- 5 files changed, 55 insertions(+), 14 deletions(-) (limited to 'src/lib') diff --git a/src/lib/product/api/productSimilarApi.js b/src/lib/product/api/productSimilarApi.js index 2470937d..f9599e86 100644 --- a/src/lib/product/api/productSimilarApi.js +++ b/src/lib/product/api/productSimilarApi.js @@ -2,21 +2,27 @@ import odooApi from '@/core/api/odooApi' import axios from 'axios' import productSearchApi from './productSearchApi' -const productSimilarApi = async ({ query }) => { - let dataFlashSale = null +const productSimilarApi = async ({ query, source }) => { + let dataflashSale = null const flashSale = await odooApi('GET', '/api/v1/flashsale/header') - if(flashSale){ - const dataProducts = await productSearchApi({ - query: `fq=flashsale_id_i:${flashSale[0].pricelistId}&fq=flashsale_price_f:[1 TO *]&limit=2`, + if (flashSale && flashSale.length > 0) { + const dataFlash = await productSearchApi({ + query: `fq=flashsale_id_i:${flashSale[0].pricelistId}&fq=flashsale_price_f:[1 TO *]&limit=${ + source === 'bottom' ? '4' : '2' + }`, operation: 'AND' }) - dataFlashSale = dataProducts.response.products + if (source === 'bottom') { + dataflashSale = dataFlash.response.products.slice('2', '4') + } else { + dataflashSale = dataFlash.response.products + } } const dataProductSimilar = await axios( `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/search?q=${query}&page=1&orderBy=popular-weekly&operation=OR` ) dataProductSimilar.data.response.products = [ - ...dataFlashSale, + ...dataflashSale, ...dataProductSimilar.data.response.products, ]; return dataProductSimilar.data.response diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx index 7e1d0d3b..e13e2ab1 100644 --- a/src/lib/product/components/Product/ProductDesktop.jsx +++ b/src/lib/product/components/Product/ProductDesktop.jsx @@ -18,8 +18,10 @@ import odooApi from '@/core/api/odooApi' import { Button, Spinner } from 'flowbite-react' import PromotionType from '@/lib/promotinProgram/components/PromotionType' import useAuth from '@/core/hooks/useAuth' +import ImageNext from 'next/image' const ProductDesktop = ({ products, wishlist, toggleWishlist }) => { + console.log('ini product', products) const router = useRouter() const auth = useAuth() const { slug } = router.query @@ -96,7 +98,7 @@ const ProductDesktop = ({ products, wishlist, toggleWishlist }) => { router.push(`/login?next=/shop/product/${slug}`) return } - + const quantity = variantQuantityRefs.current[variantId].value if (!validQuantity(quantity)) return @@ -142,7 +144,8 @@ const ProductDesktop = ({ products, wishlist, toggleWishlist }) => { useEffect(() => { const loadProductSimilarInBrand = async () => { const productSimilarQuery = [product?.name, `fq=-product_id_i:${product.id}`].join('&') - const dataProductSimilar = await productSimilarApi({ query: productSimilarQuery }) + const source = 'right' + const dataProductSimilar = await productSimilarApi({ query: productSimilarQuery, source }) setProductSimilarInBrand(dataProductSimilar.products) } if (!productSimilarInBrand) loadProductSimilarInBrand() @@ -170,7 +173,22 @@ const ProductDesktop = ({ products, wishlist, toggleWishlist }) => {
-
+
+
+
+
+ 40% +
+
+ + FLASH SALE +
+
+
{product.name} {
{currencyFormat(lowestPrice?.price)}
+ {product.flashSale.remainingTime > 0 && ( +
+ + FLASH SALE +
+ )}
)}

diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index a8964310..c85a76e9 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -3,6 +3,7 @@ import Link from '@/core/components/elements/Link/Link' import currencyFormat from '@/core/utils/currencyFormat' import { createSlug } from '@/core/utils/slug' import whatsappUrl from '@/core/utils/whatsappUrl' +import ImageNext from 'next/image' const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { const callForPriceWhatsapp = whatsappUrl('product', { @@ -101,6 +102,12 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {

+ {product.flashSale.id > 0 && ( +
+ + FLASH SALE +
+ )} {product?.manufacture?.name ? ( { - const { productSimilar } = useProductSimilar({ query }) + const source = "bottom" + const { productSimilar } = useProductSimilar({ query, source }) if (productSimilar.isLoading) { return diff --git a/src/lib/product/hooks/useProductSimilar.js b/src/lib/product/hooks/useProductSimilar.js index d16e4c58..712d07ad 100644 --- a/src/lib/product/hooks/useProductSimilar.js +++ b/src/lib/product/hooks/useProductSimilar.js @@ -1,10 +1,9 @@ import productSimilarApi from '../api/productSimilarApi' import { useQuery } from 'react-query' -const useProductSimilar = ({ query }) => { - const fetchProductSimilar = async () => await productSimilarApi({ query }) +const useProductSimilar = ({ query, source }) => { + const fetchProductSimilar = async () => await productSimilarApi({ query, source }) const { data, isLoading } = useQuery(`productSimilar-${query}`, fetchProductSimilar) - return { productSimilar: { data, isLoading } } -- cgit v1.2.3 From 7f5b0518474f702b68ca459e5cb531212504472d Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Thu, 3 Aug 2023 14:22:27 +0700 Subject: flash sale --- .../product/components/Product/ProductDesktop.jsx | 55 ++++++++++++++-------- src/lib/product/components/ProductCard.jsx | 54 +++++++++++++++------ 2 files changed, 75 insertions(+), 34 deletions(-) (limited to 'src/lib') diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx index e13e2ab1..5cbe8a8a 100644 --- a/src/lib/product/components/Product/ProductDesktop.jsx +++ b/src/lib/product/components/Product/ProductDesktop.jsx @@ -19,6 +19,8 @@ import { Button, Spinner } from 'flowbite-react' import PromotionType from '@/lib/promotinProgram/components/PromotionType' import useAuth from '@/core/hooks/useAuth' import ImageNext from 'next/image' +import CountDown2 from '@/core/components/elements/CountDown/CountDown2' +import CountDown from '@/core/components/elements/CountDown/CountDown' const ProductDesktop = ({ products, wishlist, toggleWishlist }) => { console.log('ini product', products) @@ -173,27 +175,42 @@ const ProductDesktop = ({ products, wishlist, toggleWishlist }) => {
-
-
-
-
- 40% -
-
- - FLASH SALE +
+
+ {product?.flashSale?.remainingTime > 0 && ( +
+
+
+ {product.lowestPrice.discountPercentage}% +
+
+ + {product.flashSale.tag || 'FLASH SALE'} +
+
+ +
+
-
+ )} + {product.name} +
+
+

+ Keterangan : Gambar atau foto berperan + sebagai ilustrasi produk. Kadang tidak sesuai dengan kondisi terbaru dengan + berbagai perubahan dan perbaikan. Hubungi tim sales kami untuk informasi yang + lebih baik perihal gambar di 021-2933 8828. +

- {product.name}
diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index c85a76e9..b38bb43c 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -1,11 +1,14 @@ +import CountDown2 from '@/core/components/elements/CountDown/CountDown2' import Image from '@/core/components/elements/Image/Image' import Link from '@/core/components/elements/Link/Link' import currencyFormat from '@/core/utils/currencyFormat' import { createSlug } from '@/core/utils/slug' import whatsappUrl from '@/core/utils/whatsappUrl' import ImageNext from 'next/image' +import Product from './Product/Product' const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { + console.log('ini prodyct ', product) const callForPriceWhatsapp = whatsappUrl('product', { name: product.name, url: createSlug('/shop/product/', product.name, product.id, true) @@ -23,6 +26,23 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { alt={product?.name} className='w-full object-contain object-center h-36 sm:h-48' /> + {product?.flashSale?.id > 0 && ( +
+
+
+ {product?.lowestPrice.discountPercentage}% +
+
+ + {product?.flashSale?.tag} +
+
+
+ )} {product.variantTotal > 1 && (
{product.variantTotal} Varian @@ -30,20 +50,20 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { )}
- {product?.manufacture?.name ? ( - - {product.manufacture.name} - - ) : ( -
-
- )} + {product?.manufacture?.name ? ( + + {product.manufacture.name} + + ) : ( +
-
+ )} {
{product.flashSale.id > 0 && (
- + FLASH SALE
)} -- cgit v1.2.3 From a7574b1276d751824b0c16c0696133ea1517223a Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Thu, 3 Aug 2023 17:06:09 +0700 Subject: voucher --- src/lib/checkout/components/Checkout.jsx | 161 +++++++++++++++++++------------ 1 file changed, 97 insertions(+), 64 deletions(-) (limited to 'src/lib') diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index 53ac63e1..9ffac61a 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -301,7 +301,7 @@ const Checkout = () => { voucher: activeVoucher, type: 'sale_order' } - if(query){ + if (query) { data.source = 'buy' } if (poNumber.current.value) data.po_number = poNumber.current.value @@ -491,6 +491,81 @@ const Checkout = () => { )}
+ {item.canApply && ( + + )} + {!item.canApply && item.applyStatus === 'UM' && ( + + )} + + {!item.canApply && + item.applyStatus === 'MPA' && + item.manufactureNames != '' && ( + + )} + + {!item.canApply && + item.applyStatus === 'MPA' && + item.manufactureNames === '' && ( + + )} + + {!item.canApply && + item.has_flashsale_products && + item.apply_status === 'UM' && ( + + )} +
{item.name} @@ -516,7 +591,7 @@ const Checkout = () => {
-
+

Kode Voucher :{' '} @@ -528,51 +603,30 @@ const Checkout = () => { )}

+
+ + + Berakhir dalam{' '} + {item.remainingTime} lagi{' '} + +

- {!item.canApply && - item.applyStatus === 'MPA' && - item.manufactureNames != '' && ( -

- Tambah produk{' '} - {item.manufactureNames} senilai{' '} - - {currencyFormat(item.differenceToApply)} - {' '} - untuk pakai promo ini -

- )} - {!item.canApply && - item.applyStatus === 'MPA' && - item.manufactureNames === '' && ( -

- Tambah{' '} - - {currencyFormat(item.differenceToApply)} - {' '} - untuk pakai promo ini{' '} -

- )} - {!item.canApply && item.applyStatus === 'UM' && ( -

- Tambah produk{' '} - {item.manufactureNames} senilai{' '} - - {currencyFormat(item.minPurchaseAmount)} - {' '} - untuk pakai promo ini -

- )} - {item.canApply && ( -

- Potensi potongan sebesar{' '} - - {currencyFormat(item.discountVoucher)} - -

- )} {/* {item.canApply === false ? 'Tambah ' + currencyFormat(item.differenceToApply) + @@ -580,27 +634,6 @@ const Checkout = () => { : 'Potensi potongan sebesar ' + currencyFormat(hitungDiscountVoucher(item.code))} */}

-
-
- - - Berakhir dalam {item.remainingTime}{' '} - lagi{' '} - -
-- cgit v1.2.3 From ba70a6d4ca828b08be4b8a27d3abb3868d85668f Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Fri, 4 Aug 2023 09:34:45 +0700 Subject: fixing validasi variant qty --- src/lib/product/components/Product/ProductDesktop.jsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx index 7e1d0d3b..3b21db6b 100644 --- a/src/lib/product/components/Product/ProductDesktop.jsx +++ b/src/lib/product/components/Product/ProductDesktop.jsx @@ -54,9 +54,10 @@ const ProductDesktop = ({ products, wishlist, toggleWishlist }) => { const setVariantQuantityRef = (variantId) => (element) => { if (element) { let variantIndex = product.variants.findIndex((varian) => varian.id == variantId) - product.variants[variantIndex].quantity = element.value + product.variants[variantIndex].quantity = element?.value } variantQuantityRefs.current[variantId] = element + } const validQuantity = (quantity) => { @@ -106,6 +107,15 @@ const ProductDesktop = ({ products, wishlist, toggleWishlist }) => { setAddCartAlert(true) } + const handleQuantityChange = (variantId) => (event) => { + const { value } = event.target; + const variantIndex = product.variants.findIndex((variant) => variant.id === variantId); + if (variantIndex !== -1) { + product.variants[variantIndex].quantity = parseInt(value, 10); // Pastikan untuk mengubah ke tipe number jika diperlukan + // Lakukan sesuatu jika nilai quantity diubah + } + }; + const handleBuy = (variant) => { const quantity = variantQuantityRefs.current[variant].value if (!validQuantity(quantity)) return @@ -579,7 +589,7 @@ const ProductDesktop = ({ products, wishlist, toggleWishlist }) => { type='number' className='form-input w-16 py-2 text-center bg-gray_r-1' ref={setVariantQuantityRef(variant.id)} - onChange={setVariantQuantityRef(variant.id)} + onChange={handleQuantityChange(variant.id)} defaultValue={1} /> -- cgit v1.2.3 From 47d81f5b23a96611db07f92203d03fc761a68db9 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Fri, 4 Aug 2023 09:36:50 +0700 Subject: ketinggalan --- src/lib/product/components/Product/ProductDesktop.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx index 3b21db6b..372ad3ba 100644 --- a/src/lib/product/components/Product/ProductDesktop.jsx +++ b/src/lib/product/components/Product/ProductDesktop.jsx @@ -422,7 +422,7 @@ const ProductDesktop = ({ products, wishlist, toggleWishlist }) => { type='number' className='form-input w-16 py-2 text-center bg-gray_r-1' ref={setVariantQuantityRef(product.variants[0].id)} - onChange={setVariantQuantityRef(product.variants[0].id)} + onChange={handleQuantityChange(product.variants[0].id)} defaultValue={1} /> - ) : selectedVariant ? activeVariant?.sla?.slaDate != '-' ? ( - - ):('-') : ( + {activeVariant?.sla?.slaDate} +
+
+ +
+ + ) : ( + '-' + ) + ) : ( '-' )} diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index 9e559358..d33516dd 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -7,14 +7,25 @@ import whatsappUrl from '@/core/utils/whatsappUrl' import ImageNext from 'next/image' import Product from './Product/Product' import { useRouter } from 'next/router' +import { useEffect, useState } from 'react' +import odooApi from '@/core/api/odooApi' const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { const router = useRouter() - console.log('ini route', router) + + const [backgorundFlashSale, setBackgorundFlashSale] = useState(null) + const callForPriceWhatsapp = whatsappUrl('product', { name: product.name, url: createSlug('/shop/product/', product.name, product.id, true) }) + useEffect(() => { + const getBackgound = async () => { + const get = await odooApi('GET', '/api/v1/banner?type=flash-sale-background-banner') + setBackgorundFlashSale(get[0].image) + } + getBackgound() + }, []) if (variant == 'vertical') { return ( @@ -29,18 +40,27 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { className='w-full object-contain object-center h-36 sm:h-48' /> {router.pathname != '/' && product?.flashSale?.id > 0 && ( -
-
-
- {product?.lowestPrice.discountPercentage}% -
-
- - {product?.flashSale?.tag} +
+
+ +
+
+
+
+ + {product?.lowestPrice.discountPercentage}% + +
+
+ + + {product?.flashSale?.tag} + +
@@ -52,20 +72,20 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { )}
- {product?.manufacture?.name ? ( - - {product.manufacture.name} - - ) : ( -
-
- )} + {product?.manufacture?.name ? ( + + {product.manufacture.name} + + ) : ( +
-
+ )} Date: Fri, 4 Aug 2023 13:31:19 +0700 Subject: bugs fix voucher --- src/lib/checkout/api/getVoucher.js | 18 ++++++++++++++---- src/lib/checkout/components/Checkout.jsx | 6 +++--- 2 files changed, 17 insertions(+), 7 deletions(-) (limited to 'src/lib') diff --git a/src/lib/checkout/api/getVoucher.js b/src/lib/checkout/api/getVoucher.js index 57d8acf5..07cf376e 100644 --- a/src/lib/checkout/api/getVoucher.js +++ b/src/lib/checkout/api/getVoucher.js @@ -1,11 +1,21 @@ import odooApi from '@/core/api/odooApi' -export const getVoucher = async (id) => { - const dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher`) +export const getVoucher = async (id, source) => { + let dataVoucher = null + if(source){ + dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher?source=${source}`) + }else { + dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher`) + } return dataVoucher } -export const findVoucher = async (code, id) => { - const dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher?code=${code}`) +export const findVoucher = async (code, id, source) => { + let dataVoucher = null + if(source){ + dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher?code=${code}&source=${source}`) + }else{ + dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher?code=${code}`) + } return dataVoucher } diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index 53ac63e1..c6ea73f2 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -107,7 +107,7 @@ const Checkout = () => { const voucher = async () => { if (!listVouchers) { try { - let dataVoucher = await getVoucher(auth?.id) + let dataVoucher = await getVoucher(auth?.id, query) SetListVoucher(dataVoucher) } finally { setLoadingVoucher(false) @@ -115,7 +115,7 @@ const Checkout = () => { } } const VoucherCode = async (code) => { - let dataVoucher = await findVoucher(code, auth.id) + let dataVoucher = await findVoucher(code, auth.id, query) if (dataVoucher.length <= 0) { SetFindVoucher(1) return @@ -427,7 +427,7 @@ const Checkout = () => {
- {!loadingVoucher && listVouchers.length === 0 ? ( + {!loadingVoucher && listVouchers?.length === 0 ? (

Tidak ada voucher tersedia

-- cgit v1.2.3 From 9595223471946520f5c156e24eceb577fae4c901 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Fri, 4 Aug 2023 13:36:47 +0700 Subject: add backgorund image mobile --- src/lib/product/components/Product/ProductMobile.jsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/product/components/Product/ProductMobile.jsx b/src/lib/product/components/Product/ProductMobile.jsx index f0264542..d25d0861 100644 --- a/src/lib/product/components/Product/ProductMobile.jsx +++ b/src/lib/product/components/Product/ProductMobile.jsx @@ -45,7 +45,9 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { useEffect(() => { const getBackgound = async () => { const get = await odooApi('GET', '/api/v1/banner?type=flash-sale-background-banner') - setBackgorundFlashSale(get[0].image) + if (get.length > 0) { + setBackgorundFlashSale(get[0].image) + } } getBackgound() }, []) @@ -171,7 +173,11 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { {product?.flashSale?.remainingTime > 0 && (
- +
-- cgit v1.2.3 From 71748842100e833472c56194e57c309539478dd3 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Fri, 4 Aug 2023 14:30:21 +0700 Subject: cr voucher --- src/lib/checkout/components/Checkout.jsx | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'src/lib') diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index 9ffac61a..5265a794 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -490,7 +490,7 @@ const Checkout = () => {
)} -
+
{item.canApply && (
{

)} + {!item.canApply && item.applyStatus === 'MPA-HF' && ( + + )} {!item.canApply && item.applyStatus === 'UM' && ( )} - - {!item.canApply && - item.has_flashsale_products && - item.apply_status === 'UM' && ( - - )} -
{item.name} -- cgit v1.2.3 From 1de62313819b801c81c50d30e60f728257656ffa Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Sat, 5 Aug 2023 09:30:12 +0700 Subject: change text alert --- src/lib/checkout/components/Checkout.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index cfd95a89..a6d26b6d 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -509,7 +509,7 @@ const Checkout = () => { class='p-2 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400' role='alert' > -

Voucher tidak bisa digabung dengan promo lainya

+

Voucher tidak bisa digabung dengan promo lainya

)} {!item.canApply && item.applyStatus === 'UM' && ( @@ -517,7 +517,7 @@ const Checkout = () => { class='p-2 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400' role='alert' > -

+

Tambah produk{' '} {item.manufactureNames} senilai{' '} @@ -535,7 +535,7 @@ const Checkout = () => { class='p-2 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400' role='alert' > -

+

Tambah produk{' '} {item.manufactureNames} senilai{' '} @@ -553,7 +553,7 @@ const Checkout = () => { class='p-2 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400' role='alert' > -

+

Tambah{' '} {currencyFormat(item.differenceToApply)} -- cgit v1.2.3 From 01ea505bd5b51b8596740cd6c9d2e055b63c9936 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Sat, 5 Aug 2023 09:36:07 +0700 Subject: change text font --- src/lib/checkout/components/Checkout.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib') diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index a6d26b6d..afb94c10 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -498,7 +498,7 @@ const Checkout = () => { >

Potensi potongan sebesar{' '} - + {currencyFormat(item.discountVoucher)}

@@ -519,8 +519,8 @@ const Checkout = () => { >

Tambah produk{' '} - {item.manufactureNames} senilai{' '} - + {item.manufactureNames} senilai{' '} + {currencyFormat(item.minPurchaseAmount)} {' '} untuk pakai promo ini @@ -537,8 +537,8 @@ const Checkout = () => { >

Tambah produk{' '} - {item.manufactureNames} senilai{' '} - + {item.manufactureNames} senilai{' '} + {currencyFormat(item.differenceToApply)} {' '} untuk pakai promo ini @@ -555,7 +555,7 @@ const Checkout = () => { >

Tambah{' '} - + {currencyFormat(item.differenceToApply)} {' '} untuk pakai promo ini{' '} -- cgit v1.2.3 From 3793e021ad7d9eb301befc8cc2b7fd19a30aa3e7 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Mon, 7 Aug 2023 16:31:10 +0700 Subject: Add pengiriman on detail transaction page --- src/lib/transaction/api/airwayBillApi.js | 13 ++ src/lib/transaction/components/Transaction.jsx | 180 +++++++++++++++++++----- src/lib/transaction/components/Transactions.jsx | 2 +- src/lib/transaction/hooks/useAirwayBill.js | 11 ++ 4 files changed, 167 insertions(+), 39 deletions(-) create mode 100644 src/lib/transaction/api/airwayBillApi.js create mode 100644 src/lib/transaction/hooks/useAirwayBill.js (limited to 'src/lib') diff --git a/src/lib/transaction/api/airwayBillApi.js b/src/lib/transaction/api/airwayBillApi.js new file mode 100644 index 00000000..1ef579c7 --- /dev/null +++ b/src/lib/transaction/api/airwayBillApi.js @@ -0,0 +1,13 @@ +import odooApi from '@/core/api/odooApi' +import { getAuth } from '@/core/utils/auth' + +const airwayBillApi = async ({ orderId }) => { + const auth = getAuth() + const dataAirwayBill = await odooApi( + 'GET', + `/api/v1/partner/${auth.partnerId}/sale-order/${orderId}/awb` + ) + return dataAirwayBill +} + +export default airwayBillApi diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx index dca85f0c..8ad7351d 100644 --- a/src/lib/transaction/components/Transaction.jsx +++ b/src/lib/transaction/components/Transaction.jsx @@ -12,7 +12,6 @@ import currencyFormat from '@/core/utils/currencyFormat' import VariantGroupCard from '@/lib/variant/components/VariantGroupCard' import { ChevronDownIcon, ChevronRightIcon, ChevronUpIcon } from '@heroicons/react/24/outline' import Link from '@/core/components/elements/Link/Link' -import Alert from '@/core/components/elements/Alert/Alert' import checkoutPoApi from '../api/checkoutPoApi' import cancelTransactionApi from '../api/cancelTransactionApi' import MobileView from '@/core/components/views/MobileView' @@ -21,9 +20,13 @@ import Menu from '@/lib/auth/components/Menu' import Image from '@/core/components/elements/Image/Image' import { createSlug } from '@/core/utils/slug' import toTitleCase from '@/core/utils/toTitleCase' +import useAirwayBill from '../hooks/useAirwayBill' const Transaction = ({ id }) => { const { transaction } = useTransaction({ id }) + const { queryAirwayBill } = useAirwayBill({ orderId: id }) + + const [airwayBillPopup, setAirwayBillPopup] = useState(null) const poNumber = useRef(null) const poFile = useRef(null) @@ -173,6 +176,35 @@ const Transaction = ({ id }) => { +

+
Pengiriman
+
+ {queryAirwayBill.data?.airways?.map((airway) => ( + + ))} +
+ {!queryAirwayBill?.data?.airways && ( +
Belum ada pengiriman
+ )} +
+ + +
{transaction.data?.purchaseOrderName || '-'} @@ -229,9 +261,7 @@ const Transaction = ({ id }) => { ))} {transaction.data?.invoices?.length === 0 && ( - - Belum ada Invoice - +
Belum ada invoice
)}
@@ -268,20 +298,36 @@ const Transaction = ({ id }) => {
-
+

Detail Transaksi

{transaction?.data?.name}
- +
+ + {transaction.data?.status == 'draft' && ( + + )} + {transaction.data?.status != 'draft' && ( + + )} +
@@ -313,7 +359,7 @@ const Transaction = ({ id }) => {
-
Informasi Pelanggan
+
Informasi Pelanggan
Detail Pelanggan
@@ -321,7 +367,32 @@ const Transaction = ({ id }) => {
-
Rincian Pembelian
+
Pengiriman
+
+ {queryAirwayBill.data?.airways?.map((airway) => ( + + ))} +
+ {!queryAirwayBill.data?.airways && ( +
Belum ada pengiriman
+ )} + +
Rincian Pembelian
@@ -401,7 +472,7 @@ const Transaction = ({ id }) => { {currencyFormat(transaction.data?.amountTax)} -
Biaya Pengiriman
+
Biaya Pengiriman
{currencyFormat(transaction.data?.deliveryAmount)}
@@ -413,8 +484,8 @@ const Transaction = ({ id }) => { -
Invoice
-
+
Invoice
+
{transaction.data?.invoices?.map((invoice, index) => (
@@ -437,30 +508,63 @@ const Transaction = ({ id }) => { ))}
{transaction.data?.invoices?.length === 0 && ( - - Belum ada Invoice - +
Belum ada pengiriman
)} - -
- {transaction.data?.status == 'draft' && ( - - )} - {transaction.data?.status != 'draft' && ( - - )} -
+ + {queryAirwayBill.data?.airways?.map((airway) => ( + setAirwayBillPopup(null)} + > +
+
+
No Pengiriman
+
{airway?.deliveryOrder?.name}
+
+
+
Kurir
+
{airway?.deliveryOrder?.carrier}
+
+
+
No Resi
+
{airway?.waybillNumber}
+
+
+ +
+
Status Pengiriman
+
    + {airway?.manifests?.map((manifest, index) => ( +
  1. +
    + +

    + {manifest.manifestDescription} +

    +
  2. + ))} + {(!airway?.manifests || airway?.manifests?.length == 0) && ( +
    Belum ada pengiriman
    + )} +
+
+
+ ))} ) ) @@ -536,7 +640,7 @@ const SectionContent = ({ address }) => { const DescriptionRow = ({ children, label }) => (
{label} - {children} + {children}
) diff --git a/src/lib/transaction/components/Transactions.jsx b/src/lib/transaction/components/Transactions.jsx index 642881a6..be63effd 100644 --- a/src/lib/transaction/components/Transactions.jsx +++ b/src/lib/transaction/components/Transactions.jsx @@ -252,7 +252,7 @@ const Transactions = ({ context = '' }) => { {transactions.data?.saleOrders?.map((saleOrder) => ( diff --git a/src/lib/transaction/hooks/useAirwayBill.js b/src/lib/transaction/hooks/useAirwayBill.js new file mode 100644 index 00000000..c711ab77 --- /dev/null +++ b/src/lib/transaction/hooks/useAirwayBill.js @@ -0,0 +1,11 @@ +import { useQuery } from 'react-query' +import airwayBillApi from '../api/airwayBillApi' + +const useAirwayBill = ({ orderId }) => { + const fetchAirwayBill = async () => await airwayBillApi({ orderId }) + const queryAirwayBill = useQuery(`airwayBill-${orderId}`, fetchAirwayBill) + + return { queryAirwayBill } +} + +export default useAirwayBill -- cgit v1.2.3 From 8fafa2d7c274b499c9a9c040cf98ac236823b714 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 8 Aug 2023 09:12:34 +0700 Subject: Fix tracking on detail transactions --- src/lib/transaction/components/Transaction.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx index 8ad7351d..7160021f 100644 --- a/src/lib/transaction/components/Transaction.jsx +++ b/src/lib/transaction/components/Transaction.jsx @@ -547,14 +547,14 @@ const Transaction = ({ id }) => { }`} />

- {manifest.manifestDescription} + {manifest.description}

))} -- cgit v1.2.3 From eb5c023f81ed5cbe585c55566bb493ca5c3604fc Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 8 Aug 2023 09:22:18 +0700 Subject: Update transaction no invoice text message --- src/lib/transaction/components/Transaction.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx index 7160021f..74f3dbd5 100644 --- a/src/lib/transaction/components/Transaction.jsx +++ b/src/lib/transaction/components/Transaction.jsx @@ -508,7 +508,7 @@ const Transaction = ({ id }) => { ))} {transaction.data?.invoices?.length === 0 && ( -
Belum ada pengiriman
+
Belum ada invoice
)} -- cgit v1.2.3 From 16fed2e7d00252f5df3f9b5bdf0a5a2b2a094f76 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 8 Aug 2023 10:39:34 +0700 Subject: Improve home page performance --- src/lib/flashSale/components/FlashSale.jsx | 13 +++++++- src/lib/flashSale/skeleton/FlashSaleSkeleton.jsx | 36 ++++++++++++++++++++++ .../components/Skeleton/PreferredBrandSkeleton.jsx | 22 +++++++------ src/lib/product/components/ProductCard.jsx | 2 +- 4 files changed, 62 insertions(+), 11 deletions(-) create mode 100644 src/lib/flashSale/skeleton/FlashSaleSkeleton.jsx (limited to 'src/lib') diff --git a/src/lib/flashSale/components/FlashSale.jsx b/src/lib/flashSale/components/FlashSale.jsx index e4a4a25c..87545d8d 100644 --- a/src/lib/flashSale/components/FlashSale.jsx +++ b/src/lib/flashSale/components/FlashSale.jsx @@ -1,21 +1,28 @@ import { useEffect, useState } from 'react' import flashSaleApi from '../api/flashSaleApi' -import Image from '@/core/components/elements/Image/Image' +import Image from 'next/image' import CountDown from '@/core/components/elements/CountDown/CountDown' import productSearchApi from '@/lib/product/api/productSearchApi' import ProductSlider from '@/lib/product/components/ProductSlider' +import { FlashSaleSkeleton } from '../skeleton/FlashSaleSkeleton' const FlashSale = () => { const [flashSales, setFlashSales] = useState(null) + const [isLoading, setIsLoading] = useState(true) useEffect(() => { const loadFlashSales = async () => { const dataFlashSales = await flashSaleApi() setFlashSales(dataFlashSales) + setIsLoading(false) } loadFlashSales() }, []) + if (isLoading) { + return + } + return ( flashSales?.length > 0 && (
@@ -30,11 +37,15 @@ const FlashSale = () => { diff --git a/src/lib/flashSale/skeleton/FlashSaleSkeleton.jsx b/src/lib/flashSale/skeleton/FlashSaleSkeleton.jsx new file mode 100644 index 00000000..e9a200d9 --- /dev/null +++ b/src/lib/flashSale/skeleton/FlashSaleSkeleton.jsx @@ -0,0 +1,36 @@ +import useDevice from '@/core/hooks/useDevice' +import PopularProductSkeleton from '@/lib/home/components/Skeleton/PopularProductSkeleton' +import Skeleton from 'react-loading-skeleton' + +const FlashSaleSkeleton = () => { + return ( +
+ +
+ +
+ +
+ ) +} + +const TitleSkeleton = () => { + return ( +
+ +
+ + + + +
+
+ ) +} + +const BannerSkeleton = () => { + const { isDesktop } = useDevice() + return +} + +export { FlashSaleSkeleton, TitleSkeleton, BannerSkeleton } diff --git a/src/lib/home/components/Skeleton/PreferredBrandSkeleton.jsx b/src/lib/home/components/Skeleton/PreferredBrandSkeleton.jsx index 00589342..bd783053 100644 --- a/src/lib/home/components/Skeleton/PreferredBrandSkeleton.jsx +++ b/src/lib/home/components/Skeleton/PreferredBrandSkeleton.jsx @@ -1,12 +1,16 @@ -import BrandSkeleton from '@/core/components/elements/Skeleton/BrandSkeleton' +import useDevice from '@/core/hooks/useDevice' +import Skeleton from 'react-loading-skeleton' -const PreferredBrandSkeleton = () => ( -
- - - - -
-) +const PreferredBrandSkeleton = () => { + const { isDesktop } = useDevice() + + return ( +
+ {Array.from({ length: isDesktop ? 8 : 4 }, (_, index) => ( + + ))} +
+ ) +} export default PreferredBrandSkeleton diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index a8964310..51a369c4 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -12,7 +12,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { if (variant == 'vertical') { return ( -
+
Date: Tue, 8 Aug 2023 10:44:25 +0700 Subject: Update product card height --- src/lib/product/components/ProductCard.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index 51a369c4..13fe07fd 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -12,7 +12,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { if (variant == 'vertical') { return ( -
+
Date: Wed, 16 Aug 2023 16:26:07 +0700 Subject: Remove get flash sale background on product card --- src/lib/product/components/ProductCard.jsx | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/lib') diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index 5b859905..36cd8d18 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -1,31 +1,18 @@ -import CountDown2 from '@/core/components/elements/CountDown/CountDown2' import Image from '@/core/components/elements/Image/Image' import Link from '@/core/components/elements/Link/Link' import currencyFormat from '@/core/utils/currencyFormat' import { createSlug } from '@/core/utils/slug' import whatsappUrl from '@/core/utils/whatsappUrl' import ImageNext from 'next/image' -import Product from './Product/Product' import { useRouter } from 'next/router' -import { useEffect, useState } from 'react' -import odooApi from '@/core/api/odooApi' const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { const router = useRouter() - const [backgorundFlashSale, setBackgorundFlashSale] = useState(null) - const callForPriceWhatsapp = whatsappUrl('product', { name: product.name, url: createSlug('/shop/product/', product.name, product.id, true) }) - useEffect(() => { - const getBackgound = async () => { - const get = await odooApi('GET', '/api/v1/banner?type=flash-sale-background-banner') - setBackgorundFlashSale(get[0].image) - } - getBackgound() - }, []) if (variant == 'vertical') { return ( -- cgit v1.2.3 From 35013fd66d8cbc78e07573112fc482fb7dec14e2 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Thu, 31 Aug 2023 14:03:04 +0700 Subject: bugs fixing flash sale tag --- src/lib/product/components/ProductCard.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index 36cd8d18..66363ff2 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -45,7 +45,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { height={5} /> - {product?.flashSale?.tag} + {product?.flashSale?.tag != "false" || product?.flashSale?.tag != product?.flashSale?.tag ? '' : 'FLASH SALE'}
@@ -138,7 +138,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { width={15} height={10} /> - FLASH SALE + {product?.flashSale?.tag != "false" || product?.flashSale?.tag != product?.flashSale?.tag ? '' : 'FLASH SALE'}
)} {product?.manufacture?.name ? ( -- cgit v1.2.3 From 4c81d351a5d4ab54f8d08a94c0046b04bbc3a373 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Thu, 31 Aug 2023 14:08:15 +0700 Subject: delete logs --- src/lib/product/components/Product/ProductDesktop.jsx | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx index 187ab3c9..3b9296a8 100644 --- a/src/lib/product/components/Product/ProductDesktop.jsx +++ b/src/lib/product/components/Product/ProductDesktop.jsx @@ -59,8 +59,6 @@ const ProductDesktop = ({ products, wishlist, toggleWishlist }) => { getBackgound() }, []) - console.log('ini set', backgorundFlashSale) - const [informationTab, setInformationTab] = useState(informationTabOptions[0].value) const variantQuantityRefs = useRef([]) -- cgit v1.2.3 From 4cfc5bf25ba20b2a1a8ca140c785557d6c00cef6 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Thu, 31 Aug 2023 14:19:58 +0700 Subject: fixing --- src/lib/product/components/ProductCard.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index 66363ff2..2c849bd6 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -45,7 +45,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { height={5} /> - {product?.flashSale?.tag != "false" || product?.flashSale?.tag != product?.flashSale?.tag ? '' : 'FLASH SALE'} + {product?.flashSale?.tag != "false" || product?.flashSale?.tag != product?.flashSale?.tag ? product?.flashSale?.tag : 'FLASH SALE'}
@@ -138,7 +138,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { width={15} height={10} /> - {product?.flashSale?.tag != "false" || product?.flashSale?.tag != product?.flashSale?.tag ? '' : 'FLASH SALE'} + {product?.flashSale?.tag != "false" || product?.flashSale?.tag != product?.flashSale?.tag ? product?.flashSale?.tag : 'FLASH SALE'} )} {product?.manufacture?.name ? ( -- cgit v1.2.3
- {saleOrder.name} + {saleOrder.name} {saleOrder.purchaseOrderName || '-'} {saleOrder.dateOrder || '-'}