summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-08-14 10:02:38 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-08-14 10:02:38 +0000
commitc134e679dc9dbac4d58a46b85f155512ffe87f9e (patch)
tree356c72d57c3231468e718277097acb7af8f6bf17 /src
parent879fa756d9445c8657e9133938a25593402d1018 (diff)
parent08e5b76ba58645929ddeda1830f85f3eaf43969e (diff)
Merged in Feature/pickup-service (pull request #237)
Feature/pickup service
Diffstat (limited to 'src')
-rw-r--r--src/lib/checkout/components/Checkout.jsx2
-rw-r--r--src/lib/product/components/ProductCard.jsx28
-rw-r--r--src/utils/solrMapping.js1
3 files changed, 26 insertions, 5 deletions
diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index 09a791ee..5f771f41 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -1295,7 +1295,7 @@ const Checkout = () => {
<div className='flex flex-col gap-y-8 border-t border-gray-300 pt-8'>
{!!products &&
snakecaseKeys(products).map((item, index) => (
- <CartItem key={index} item={item} editable={false} />
+ <CartItem key={index} item={item} editable={false} selfPicking={selectedExpedisi === '1,32' ? true : false} />
))}
</div>
</div>
diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx
index 35e2a665..4b3f693c 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -147,9 +147,20 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
</Link>
<div className='p-2 sm:p-3 pb-3 text-caption-2 sm:text-body-2 leading-5'>
{product?.manufacture?.name ? (
- <Link href={URL.manufacture} className='mb-1'>
- {product.manufacture.name}
- </Link>
+ <div className='flex justify-between'>
+ <Link href={URL.manufacture} className='mb-1'>
+ <div>
+ {product.manufacture.name}
+ </div>
+ </Link>
+ {product?.is_in_bu && (
+ <div className='bg-red-500 rounded'>
+ <span className='p-[6px] text-xs text-white'>
+ Click & Pickup
+ </span>
+ </div>
+ )}
+ </div>
) : (
<div>-</div>
)}
@@ -292,9 +303,18 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
</div>
)}
{product?.manufacture?.name ? (
- <Link href={URL.manufacture} className='mb-1'>
+ <div className='flex justify-between'>
+ <Link href={URL.manufacture} className='mb-1'>
{product.manufacture.name}
</Link>
+ {/* {product?.is_in_bu && (
+ <div className='bg-red-500 rounded'>
+ <span className='p-[6px] text-xs text-white'>
+ Click & Pickup
+ </span>
+ </div>
+ )} */}
+ </div>
) : (
<div>-</div>
)}
diff --git a/src/utils/solrMapping.js b/src/utils/solrMapping.js
index d4694eb2..fee474be 100644
--- a/src/utils/solrMapping.js
+++ b/src/utils/solrMapping.js
@@ -38,6 +38,7 @@ export const productMappingSolr = (products, pricelist) => {
qtySold: product?.qty_sold_f || 0,
isTkdn:product?.tkdn_b || false,
isSni:product?.sni_b || false,
+ is_in_bu:product?.is_in_bu_b || false,
voucherPastiHemat:product?.voucher_pastihemat || []
};