buildingproduct-library 6.0.6 → 6.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
@@ -9473,10 +9473,10 @@ class CustomCheckoutComponent {
|
|
|
9473
9473
|
const todayDay = this.weekDayOpeningList[date.getDay() - 1];
|
|
9474
9474
|
this.minTime = new Date(date.getFullYear(), date.getMonth(), date.getDate(), todayDay?.openingTime?.hour || 9, todayDay?.openingTime?.minute || 0, 0);
|
|
9475
9475
|
this.minToTime = new Date(date.getFullYear(), date.getMonth(), date.getDate(), todayDay?.openingTime?.hour || 11, todayDay?.openingTime?.minute || 0, 0);
|
|
9476
|
-
this.fromMaxTime = new Date(date.getFullYear(), date.getMonth(), date.getDate(), todayDay?.closingTime
|
|
9476
|
+
this.fromMaxTime = new Date(date.getFullYear(), date.getMonth(), date.getDate(), todayDay?.closingTime?.formattedHour?.split(/\s+/)[1]?.toLowerCase() == 'pm'
|
|
9477
9477
|
? todayDay?.closingTime?.hour + 10
|
|
9478
9478
|
: todayDay?.closingTime?.hour || 15, todayDay?.closingTime?.minute || 0, 0);
|
|
9479
|
-
this.maxTime = new Date(date.getFullYear(), date.getMonth(), date.getDate(), todayDay?.closingTime
|
|
9479
|
+
this.maxTime = new Date(date.getFullYear(), date.getMonth(), date.getDate(), todayDay?.closingTime?.formattedHour?.split(/\s+/)[1]?.toLowerCase() == 'pm'
|
|
9480
9480
|
? todayDay?.closingTime?.hour + 12
|
|
9481
9481
|
: todayDay?.closingTime?.hour || 17, todayDay?.closingTime?.minute || 0, 0);
|
|
9482
9482
|
}
|
|
@@ -9486,7 +9486,7 @@ class CustomCheckoutComponent {
|
|
|
9486
9486
|
this.minTime = this.getRoundMinTime(this.minTime);
|
|
9487
9487
|
//if clicking on radio button for delivery, should pick 6 am, if time does not go fine then revert it
|
|
9488
9488
|
if (this.hasTimeSpecificRequest) {
|
|
9489
|
-
const formattedMinTime = this.minTime.toLocaleTimeString(
|
|
9489
|
+
const formattedMinTime = this.minTime.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit', hour12: true });
|
|
9490
9490
|
this.checkoutFormData.deliveryPickUpFromTime = formattedMinTime;
|
|
9491
9491
|
// if(!this.hasTimeSpecificRequest){
|
|
9492
9492
|
// const formattedMinTime = this.minTime.toLocaleTimeString('en-US', {hour: '2-digit',minute: '2-digit',hour12: true });
|
|
@@ -9500,8 +9500,8 @@ class CustomCheckoutComponent {
|
|
|
9500
9500
|
// }
|
|
9501
9501
|
}
|
|
9502
9502
|
else {
|
|
9503
|
-
const formattedminToTime = this.minToTime.toLocaleTimeString(
|
|
9504
|
-
const formattedmaxTime = this.maxTime.toLocaleTimeString(
|
|
9503
|
+
const formattedminToTime = this.minToTime.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit', hour12: true });
|
|
9504
|
+
const formattedmaxTime = this.maxTime.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit', hour12: true });
|
|
9505
9505
|
this.checkoutFormData.deliveryPickUpToTime = formattedmaxTime;
|
|
9506
9506
|
this.checkoutFormData.deliveryPickUpFromTime = formattedminToTime;
|
|
9507
9507
|
}
|
|
@@ -9587,7 +9587,7 @@ class CustomCheckoutComponent {
|
|
|
9587
9587
|
//this.checkoutFormData.deliveryPickUpFromTime = this.collectTimeObj?.getText();
|
|
9588
9588
|
//this.checkoutFormData.deliveryPickUpToTime = this.checkoutToTime?.getText();
|
|
9589
9589
|
if (this.isDeliveryBox && this.hasTimeSpecificRequest) {
|
|
9590
|
-
this.checkoutFormData.deliveryPickUpToTime = this.minToTime ? this.minToTime.toLocaleTimeString(
|
|
9590
|
+
this.checkoutFormData.deliveryPickUpToTime = this.minToTime ? this.minToTime.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit', hour12: true }) : this.initialMaxTime;
|
|
9591
9591
|
}
|
|
9592
9592
|
let deliveryPickUpDate = this.checkoutFormData.deliveryPickUpDate;
|
|
9593
9593
|
this.checkoutFormData.deliveryPickUpDate = this.checkoutFormData.deliveryPickUpDate?.day + '/' + this.checkoutFormData.deliveryPickUpDate?.month + '/' + this.checkoutFormData.deliveryPickUpDate?.year;
|