From 33b09e49d0550f9868ef0646bba20b0f408563a1 Mon Sep 17 00:00:00 2001 From: Florian Eisenmenger Date: Thu, 7 Apr 2022 08:59:14 +0200 Subject: [PATCH] changes --- .../dist/storefront/js/zenit-platform-atmos-set1.js | 13 +++++++++---- .../app/storefront/src/scss/overrides.scss | 2 +- .../dist/storefront/js/zenit-platform-atmos-set2.js | 13 +++++++++---- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/zenitPlatformAtmosSet1/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set1.js b/zenitPlatformAtmosSet1/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set1.js index ea167fa..946bfdf 100644 --- a/zenitPlatformAtmosSet1/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set1.js +++ b/zenitPlatformAtmosSet1/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set1.js @@ -111,7 +111,10 @@ function manipulateDateInputValue() { } if (inputSameDayDelivery.is(':checked')) { // If same day delivery is checked, select time - $("#spwn-delivery .spwn-delivery--time span.active").trigger("click"); + // $("#spwn-delivery .spwn-delivery--time span.active").trigger("click"); + $(".confirm-delivery-date #spwn-dp-input").val(spawnDateInputValue + " " + $("#spwn-delivery .spwn-delivery--time span.active").text()); + $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $("#spwn-delivery .spwn-delivery--time span.active").attr('data-time')); + $(".flatpickr-hour").val($("#spwn-delivery .spwn-delivery--time span.active").attr('data-hour')); } else { $("#spwn-dp-input").val(spawnDateInputValue); } @@ -140,8 +143,10 @@ function changeDelivery(fp) { $("#spwn-delivery .spwn-delivery--time span").removeClass("active"); $(this).addClass("active"); $(".confirm-delivery-date #spwn-dp-input").val(spawnDateInputValue + " " + $(this).text()); - $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $(this).attr('data-time')); + let spawnDateTime = spawnDateInputValue + " " + $(this).attr('data-time'); + $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateTime); $(".flatpickr-hour").val($(this).attr('data-hour')); + fp.setDate(spawnDateInputValue, true, "d.m.Y H:i"); }); let daysToAdd = 0; @@ -202,7 +207,7 @@ function changeDelivery(fp) { // If Abendzustellung date is not in DPD range setDateSelected(); } - $(".flatpickr-hour").val('00'); + $(".flatpickr-hour").val('01'); } } else { console.log("DPD AT"); @@ -217,7 +222,7 @@ function changeDelivery(fp) { // If Abendzustellung or DPD DE date is not in DPD AT range setDateSelected(); } - $(".flatpickr-hour").val('00'); + $(".flatpickr-hour").val('01'); } } diff --git a/zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss b/zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss index c2c24aa..825d7c6 100644 --- a/zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss +++ b/zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss @@ -181,7 +181,7 @@ input.custom-number[type=number] { transition: all .15s ease-in-out; &:hover, &.active { - background: #86b04b; + background: #33548c; color: #fff; } } diff --git a/zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js b/zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js index 3493f03..01f1875 100644 --- a/zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js +++ b/zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js @@ -111,7 +111,10 @@ function manipulateDateInputValue() { } if (inputSameDayDelivery.is(':checked')) { // If same day delivery is checked, select time - $("#spwn-delivery .spwn-delivery--time span.active").trigger("click"); + // $("#spwn-delivery .spwn-delivery--time span.active").trigger("click"); + $(".confirm-delivery-date #spwn-dp-input").val(spawnDateInputValue + " " + $("#spwn-delivery .spwn-delivery--time span.active").text()); + $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $("#spwn-delivery .spwn-delivery--time span.active").attr('data-time')); + $(".flatpickr-hour").val($("#spwn-delivery .spwn-delivery--time span.active").attr('data-hour')); } else { $("#spwn-dp-input").val(spawnDateInputValue); } @@ -140,8 +143,10 @@ function changeDelivery(fp) { $("#spwn-delivery .spwn-delivery--time span").removeClass("active"); $(this).addClass("active"); $(".confirm-delivery-date #spwn-dp-input").val(spawnDateInputValue + " " + $(this).text()); - $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $(this).attr('data-time')); + let spawnDateTime = spawnDateInputValue + " " + $(this).attr('data-time'); + $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateTime); $(".flatpickr-hour").val($(this).attr('data-hour')); + fp.setDate(spawnDateInputValue, true, "d.m.Y H:i"); }); let daysToAdd = 0; @@ -202,7 +207,7 @@ function changeDelivery(fp) { // If Abendzustellung date is not in DPD range setDateSelected(); } - $(".flatpickr-hour").val('00'); + $(".flatpickr-hour").val('01'); } } else { console.log("DPD AT"); @@ -217,7 +222,7 @@ function changeDelivery(fp) { // If Abendzustellung or DPD DE date is not in DPD AT range setDateSelected(); } - $(".flatpickr-hour").val('00'); + $(".flatpickr-hour").val('01'); } }