From d1592286eef165533c21d52aec70dbb703cdcfd3 Mon Sep 17 00:00:00 2001 From: trisusilo48 Date: Wed, 18 Dec 2024 15:03:52 +0700 Subject: feedback uat --- src/lib/checkout/components/Checkout.jsx | 2 +- src/lib/checkout/components/SectionExpedition.jsx | 24 ++++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) (limited to 'src/lib/checkout') diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index 38e11038..0471dc6c 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -430,7 +430,7 @@ const Checkout = () => { available_quantity: product?.availableQuantity, })); let data = { - // partner_shipping_id: auth.partnerId, + // partner_shipping_id: auth.partnerId,, // partner_invoice_id: auth.partnerId, partner_shipping_id: selectedAddress?.shipping?.id || auth.partnerId, partner_invoice_id: selectedAddress?.invoicing?.id || auth.partnerId, diff --git a/src/lib/checkout/components/SectionExpedition.jsx b/src/lib/checkout/components/SectionExpedition.jsx index be40a577..2098d5b5 100644 --- a/src/lib/checkout/components/SectionExpedition.jsx +++ b/src/lib/checkout/components/SectionExpedition.jsx @@ -8,6 +8,7 @@ import { useAddress } from '../stores/useAdress'; import currencyFormat from '@/core/utils/currencyFormat'; import { useCheckout } from '../stores/stateCheckout'; +import { formatShipmentRange } from '../utils/functionCheckouit'; function mappingItems(products) { return products?.map((item) => ({ @@ -32,7 +33,6 @@ function mappingCourier(couriersOdoo, couriers, notIncludeInstant = false) { return result; // Jika tidak ada, lewati item ini } - if ( notIncludeInstant && ['hours'].includes(item.shipment_duration_unit.toLowerCase()) @@ -47,7 +47,7 @@ function mappingCourier(couriersOdoo, couriers, notIncludeInstant = false) { result[courier_code] = { courier_name: item.courier_name, courier_code: courier_code, - courier_id_odoo : carrierId, + courier_id_odoo: carrierId, service_type: { [courier_service_code]: { service_name: item.courier_service_name, @@ -177,7 +177,7 @@ export default function SectionExpedition({ products }) { mappingCourier(listExpedisi, data?.data?.pricing, notIncludeInstant) || null; - console.log('ini scourier', data?.data?.pricing) + console.log('ini scourier', data?.data?.pricing); const onCourierChange = (e) => { setIsOpen(false); @@ -193,7 +193,8 @@ export default function SectionExpedition({ products }) { } }; - const onSubmit = (data) => {1 + const onSubmit = (data) => { + 1; console.log(data); }; @@ -292,7 +293,10 @@ export default function SectionExpedition({ products }) {
{selectedService.service_name} - {currencyFormat(selectedService.price)} + {currencyFormat( + Math.round(parseInt(selectedService?.price * 1.1) / 1000) * + 1000 + )}
) : ( @@ -316,11 +320,17 @@ export default function SectionExpedition({ products }) { {service.service_name}

- Estimasi Tiba {service.duration} + {formatShipmentRange( + service.shipment_range, + service.shipment_unit + )}

- {currencyFormat(service.price)} + {currencyFormat( + Math.round(parseInt(service?.price * 1.1) / 1000) * + 1000 + )} ))} -- cgit v1.2.3