summaryrefslogtreecommitdiff
path: root/src/lib/checkout/components
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2025-02-01 11:04:29 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2025-02-01 11:04:29 +0700
commitfdb488651e864cf30f09fe2337187241ef649177 (patch)
treeda5f75c5d2748382bbcadbdacdcef4007a19610a /src/lib/checkout/components
parentc26a0d026886e6f70ea3487b9d83a54d20b9c1e4 (diff)
function check holidays
Diffstat (limited to 'src/lib/checkout/components')
-rw-r--r--src/lib/checkout/components/SectionExpedition.jsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/checkout/components/SectionExpedition.jsx b/src/lib/checkout/components/SectionExpedition.jsx
index d1844204..a00858e5 100644
--- a/src/lib/checkout/components/SectionExpedition.jsx
+++ b/src/lib/checkout/components/SectionExpedition.jsx
@@ -80,6 +80,14 @@ function reverseMappingCourier(couriersOdoo, couriers, includeInstant = false) {
});
}
+
+function isHiloday(){
+ const today = new Date();
+ const day = today.getDay();
+
+ return day === 6 || day === 7
+}
+
function mappingCourier(couriersOdoo, couriers, notIncludeInstant = false) {
const validCourierMap = couriersOdoo.reduce((acc, courier) => {
acc[courier.label.toLowerCase()] = courier.carrierId;