summaryrefslogtreecommitdiff
path: root/src/lib/checkout/components/SectionExpedition.jsx
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2025-01-18 10:37:49 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2025-01-18 10:37:49 +0700
commitbd4cdf2125f717875ba90e03893b319dd962f753 (patch)
tree3ba720e5bcd6d7350992bf8e6396724cdfc2a482 /src/lib/checkout/components/SectionExpedition.jsx
parent5559770e0b0e94b68de1e31bf2be5c978362821d (diff)
bittesip
Diffstat (limited to 'src/lib/checkout/components/SectionExpedition.jsx')
-rw-r--r--src/lib/checkout/components/SectionExpedition.jsx16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/lib/checkout/components/SectionExpedition.jsx b/src/lib/checkout/components/SectionExpedition.jsx
index 8b59d210..5b4f6bfc 100644
--- a/src/lib/checkout/components/SectionExpedition.jsx
+++ b/src/lib/checkout/components/SectionExpedition.jsx
@@ -228,13 +228,10 @@ export default function SectionExpedition({ products }) {
}
);
- console.log('ini response', data);
-
useEffect(() => {
if (data) {
const couriers = reverseMappingCourier(listExpedisi, data?.data?.pricing);
setCouriers(couriers);
- console.log('ini scourier', couriers);
}
}, [data]);
@@ -249,7 +246,15 @@ export default function SectionExpedition({ products }) {
setSelectedCourier(courier.courier.courier_code);
setServiceOptions(Object.values(courier.courier.service_type));
} else {
- toast.error('Maaf, layanan tidak tersedia. Mohon pilih expedisi lain.');
+ if ((courier.label === 'GRAB' || courier.label === 'GOJEK') && !addressMaps) {
+ toast.error(
+ 'Maaf, layanan kurir ' + courier.label + ' tidak tersedia. Karena Anda Belum Melakukan Pengaturan PinPoint Alamat Pegiriman.'
+ )
+ } else {
+ toast.error(
+ 'Maaf, layanan tidak tersedia. Mohon pilih expedisi lain.'
+ );
+ }
}
} else {
setSelectedCourier(courier === 32 ? 'SELF PICKUP' : null);
@@ -376,7 +381,8 @@ export default function SectionExpedition({ products }) {
)}
</div>
- {serviceOptions.length > 0 && selectedCourier &&
+ {serviceOptions.length > 0 &&
+ selectedCourier &&
selectedCourier !== 32 &&
selectedCourier !== 0 && (
<div className='px-4 py-2'>