diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 74cfc0964..7b89b7e57 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -119,12 +119,14 @@ export default { }, onModalOpened() { this.onModalOpenedCallback?.(); + this.$emit("isModalOpened", true); }, onModalClosed() { this.resetButtonStyle(); this.onModalClosedCallback?.(); if (this.suppressPageScroll) document.querySelector("body").classList.remove("prevent-modal-scroll"); + this.$emit("isModalOpened", false); }, openModal() { if (this.suppressPageScroll) diff --git a/src/digital-components/salesforce-webchat/salesforce-webchat.vue b/src/digital-components/salesforce-webchat/salesforce-webchat.vue index 9022553a7..8cffc143f 100644 --- a/src/digital-components/salesforce-webchat/salesforce-webchat.vue +++ b/src/digital-components/salesforce-webchat/salesforce-webchat.vue @@ -68,40 +68,40 @@ export default { .dockableContainer { &.showDockableContainer { font-family: AvertaRegular; - color: #4d5151; + color: $gray-600; .sidebarBody { button { - background: #0070d1; - color: #fff; + background: $blue; + color: $white; &:hover { - background: #06577c !important; + background: $blue-700 !important; } } .form-element__help { - color: #db0020; + color: $red; } .embeddedServiceSidebarFormField { .uiInput { .uiLabel-left { - color: #4d5151; + color: $gray-600; } } } .embeddedServiceSidebarButton { &.uiButton--inverse { .label { - color: #fff; + color: $white; text-decoration: underline; } &:not(:disabled):focus { - background-color: #0070d1; + background-color: $blue; } } } .embeddedServiceLiveAgentStateChatAvatar { &.isLightningOutContext { .agentIconColor0 { - background-color: #0070d1; + background-color: $blue; } } } @@ -130,11 +130,11 @@ export default { } } .chatHeaderBranding { - background-color: #0070d1; + background-color: $blue; } span { &.required { - color: #db0020; + color: $red; } } } @@ -142,7 +142,7 @@ export default { .embeddedServiceHelpButton { .helpButton { .uiButton { - background-color: #0070d1 !important; + background-color: $blue !important; } } .embeddedServiceIcon { @@ -158,8 +158,8 @@ export default { .sidebarHeader { &.minimizedContainer { .embeddedServiceSidebarMinimizedDefaultUI { - background-color: #0070d1; - border: 1px solid #0070d1; + background-color: $blue; + border: 1px solid $blue; } } } diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index b1e04a734..ae05b9358 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -375,6 +375,10 @@ export default { setTimeout(() => { this.$refs.datePicker.showAnotherMonth().then((moreSelectableDatesData) => { this.selectableDatesData = moreSelectableDatesData; + if (selectableDatesData?.days?.length > 0) { + this.selectedDate = selectableDatesData.days[0].date; + } + this.setDisplayWaitList(); }); }, 50); diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index ac597c72b..c72f7d4dd 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -97,6 +97,7 @@ export default { "updated-contains-military-base", "updated-bill-to-account-number", "setMobileLocationAndProceed", + "updated-modal-opened", ], data() { return { @@ -228,6 +229,7 @@ export default { }, setModalStatus(isOpened) { this.isModalOpened = isOpened; + this.$emit("updated-modal-opened", isOpened); }, closeModal() { this.modal.closeModal(); diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 3b20c69f0..3a499b2ca 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -343,7 +343,7 @@ describe("service-location.vue", () => { zipCode: "43054", }, isVehicleProtected: true, - isMobileSelected: true, + isMobileSelectedAndModalClosed: true, }; wrapper.vm.mobileLocationQuestions = mobileLocationQuestions; @@ -356,7 +356,7 @@ describe("service-location.vue", () => { zipCode: "61606", }, isVehicleProtected: null, - isMobileSelected: false, + isMobileSelectedAndModalClosed: false, }; // Act @@ -459,7 +459,7 @@ describe("service-location.vue", () => { zipCode: "", }, isVehicleProtected: null, - isMobileSelected: false, + isMobileSelectedAndModalClosed: false, }; wrapper.vm.mobileLocationQuestions = mobileLocationQuestions; const newMobileLocationQuestions = { @@ -471,7 +471,7 @@ describe("service-location.vue", () => { zipCode: "43054", }, isVehicleProtected: true, - isMobileSelected: true, + isMobileSelectedAndModalClosed: true, }; wrapper.vm.closeModalAction = jest.fn(); @@ -521,7 +521,7 @@ describe("service-location.vue", () => { zipCode: "", }, isVehicleProtected: null, - isMobileSelected: false, + isMobileSelectedAndModalClosed: false, mobileFeePart: null, }; wrapper.vm.mobileLocationQuestions = mobileLocationQuestions; @@ -535,7 +535,7 @@ describe("service-location.vue", () => { zipCode: "43081", }, isVehicleProtected: true, - isMobileSelected: true, + isMobileSelectedAndModalClosed: true, mobileFeePart: null, }; @@ -599,7 +599,7 @@ describe("service-location.vue", () => { zipCode: "43081", }, isVehicleProtected: "YesAnswer", - isMobileSelected: true, + isMobileSelectedAndModalClosed: true, }; wrapper.vm.closeModalAction = jest.fn(); diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 88cedcee2..ef27cbbb8 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -98,6 +98,7 @@ @updated-serviceability="setServiceabilityDetails" @updated-contains-military-base="setContainsMilitaryBase" @updated-mobile-ctu="setCtuForMobile" + @updated-modal-opened="setMobileLocationModalOpened" validationRules="mobile-location-required" ref="mobileLocationQuestions" linkWidgetName="MobileLocationLinkWidget" @@ -172,7 +173,7 @@ const MOBILE_FEE_PART_TYPE = "MOBILE FEE"; // DEFINE VALIDATION RULES defineRule("mobile-location-required", (value) => { if ( - value.isMobileSelected && + value.isMobileSelectedAndModalClosed && (!value.addressQuestions.streetAddress || !value.addressQuestions.city || !value.addressQuestions.state || @@ -211,6 +212,7 @@ export default { billToAccountNumber: null, shopProviderData: null, navigatingForward: false, + mobileLocationModalOpened: false, }; }, async beforeRouteEnter(to, from, next) { @@ -301,7 +303,9 @@ export default { zipCode: this.zipCode, }, isVehicleProtected: this.isVehicleProtected, - isMobileSelected: this.selectedAppointmentType === "Mobile", + isMobileSelectedAndModalClosed: + this.selectedAppointmentType === "Mobile" && + !this.mobileLocationModalOpened, }; }, }, @@ -502,6 +506,9 @@ export default { setRecycleFeePart(recycleFeePart) { this.recycleFeePart = recycleFeePart; }, + setMobileLocationModalOpened(isModalOpened) { + this.mobileLocationModalOpened = isModalOpened; + }, //creating async function as the computed property can not directly handle asynchronous operations or promises. async setMobileLocationQuestions(newValue) { var newZipCode = newValue.addressQuestions.zipCode;