From 378aa05fdefa99dcdf2e6d20492dd5073685160d Mon Sep 17 00:00:00 2001 From: Sneha Date: Fri, 7 Jul 2023 13:20:20 +0530 Subject: [PATCH 1/6] CSR-1506 --- .../address-lookup/customer-questions/customer-questions.vue | 2 +- src/layouts/license-plate-lookup/license-plate-lookup.vue | 2 +- src/layouts/vin-lookup/vin-lookup.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/layouts/address-lookup/customer-questions/customer-questions.vue b/src/layouts/address-lookup/customer-questions/customer-questions.vue index 2bb20d286..e8a1ab4d6 100644 --- a/src/layouts/address-lookup/customer-questions/customer-questions.vue +++ b/src/layouts/address-lookup/customer-questions/customer-questions.vue @@ -27,7 +27,7 @@ v-model="customerModel.emailAddress" ref="emailAddress" customInputId="emailAddress" - validationRules="email-address-format" /> + validationRules="email-address-required|email-address-format" />
diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index e1ff79cdc..cffe8248f 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -33,7 +33,7 @@ cmsWidgetName="EmailAddressQuestionWidget" v-model="email" customInputId="email" - validationRules="email-address-format" /> + validationRules="email-address-required|email-address-format" />
diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 36acfeeab..e820723bd 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -59,7 +59,7 @@ v-model="emailAddress" customInputId="emailAddress" isRequired - validationRules="email-address-format" /> + validationRules="email-address-required|email-address-format" />
From 7da696650ec6aba3a0a7915addc28a2f877219c3 Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Fri, 7 Jul 2023 10:21:03 -0400 Subject: [PATCH 2/6] CSR-1505 | Refactoring and same-day functionality --- .../time-slot-modal-question.vue | 89 +++++++++++++++---- 1 file changed, 70 insertions(+), 19 deletions(-) diff --git a/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.vue b/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.vue index 159994079..c4fbd4b50 100644 --- a/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.vue +++ b/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.vue @@ -55,6 +55,13 @@ import { PREMIUM_FEE_PART_TYPE, RouteCodeFlags, } from "@/constants/schedule-constants"; +const cmsWidgetFieldMappings = { + MODAL_CLOSE_BUTTON: "FooterText", + SUPPLEMENTAL_INFORMATION: "BodyText", + TIME_SLOT_BUTTON: "HeaderText", + DISCLAIMER: "FooterText", + DURATION: "SubheaderText", +}; // Validation for the modal button defineRule("time-slot-required", required(errorMessages.OPTION_REQUIRED)); @@ -124,30 +131,60 @@ export default { ); } } - return this.getCmsContent(appointmentTypeCmsWidgetName, "BodyText"); + return this.getCmsContent( + appointmentTypeCmsWidgetName, + cmsWidgetFieldMappings.SUPPLEMENTAL_INFORMATION + ); }, footerCloseButtonText() { - return this.getCmsContent(this.cmsWidgetName, "FooterText"); + return this.getCmsContent( + this.cmsWidgetName, + cmsWidgetFieldMappings.MODAL_CLOSE_BUTTON + ); }, premiumAppointmentButtonText() { - return this.getCmsContent(this.mobilePremiumCmsWidgetName, "HeaderText"); + return this.getCmsContent( + this.mobilePremiumCmsWidgetName, + cmsWidgetFieldMappings.TIME_SLOT_BUTTON + ); }, dropoffButtonText() { - return this.getCmsContent(this.dropoffCmsWidgetName, "HeaderText"); + return this.getCmsContent( + this.dropoffCmsWidgetName, + cmsWidgetFieldMappings.TIME_SLOT_BUTTON + ); + }, + sameDayDropoffButtonText() { + return this.getCmsContent( + this.sameDayDropOffCmsWidgetName, + cmsWidgetFieldMappings.TIME_SLOT_BUTTON + ); }, overnightDropoffButtonText() { - return this.getCmsContent(this.overnightDropOffCmsWidgetName, "HeaderText"); + return this.getCmsContent( + this.overnightDropOffCmsWidgetName, + cmsWidgetFieldMappings.TIME_SLOT_BUTTON + ); }, dropoffDisclaimerText() { - return this.getCmsContent(this.dropoffCmsWidgetName, "FooterText"); + return this.getCmsContent(this.dropoffCmsWidgetName, cmsWidgetFieldMappings.DISCLAIMER); + }, + sameDayDropOffDisclaimerText() { + return this.getCmsContent( + this.sameDayDropOffCmsWidgetName, + cmsWidgetFieldMappings.DISCLAIMER + ); }, overnightDropOffDisclaimerText() { - return this.getCmsContent(this.overnightDropOffCmsWidgetName, "FooterText"); + return this.getCmsContent( + this.overnightDropOffCmsWidgetName, + cmsWidgetFieldMappings.DISCLAIMER + ); }, disclaimerTextBlockCopy() { if (this.appointmentType === AppointmentTypeStrings.DROP_OFF) { if (this.isSameDay) { - return null; + return this.sameDayDropOffDisclaimerText; } else if (this.selectedTimeSlotId?.includes(RouteCodeFlags.ALL_DAY_DROP_OFF)) { return this.dropoffDisclaimerText; } else if (this.selectedTimeSlotId?.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) { @@ -160,15 +197,24 @@ export default { } }, dropOffDurationText() { - return this.getCmsContent(this.dropoffCmsWidgetName, "SubheaderText"); + return this.getCmsContent(this.dropoffCmsWidgetName, cmsWidgetFieldMappings.DURATION); + }, + sameDayDropoffDurationText() { + return this.getCmsContent( + this.sameDayDropOffCmsWidgetName, + cmsWidgetFieldMappings.DURATION + ); }, overnightDropoffDurationText() { - return this.getCmsContent(this.overnightDropOffCmsWidgetName, "SubheaderText"); + return this.getCmsContent( + this.overnightDropOffCmsWidgetName, + cmsWidgetFieldMappings.DURATION + ); }, inshopDurationText() { const inshopDurationTextWithoutTime = this.getCmsContent( this.cmsWidgetName, - "SubheaderText" + cmsWidgetFieldMappings.DURATION ); const inshopDurationTime = this.getDisplayTextForDurationLength( this.estimatedServiceMinutesMinimum, @@ -185,15 +231,16 @@ export default { if (this.selectedTimeSlotId?.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) { return this.overnightDropoffDurationText; } else if (this.selectedTimeSlotId?.includes(RouteCodeFlags.ALL_DAY_DROP_OFF)) { - return this.dropOffDurationText; + if (this.isSameDay) { + return this.sameDayDropoffDurationText; + } else { + return this.dropOffDurationText; + } } else { return null; } } }, - shouldShowDropoffDisclaimerText() { - return this.appointmentType === AppointmentTypeStrings.DROP_OFF && !this.isSameDay; - }, isSameDay() { if (!this.dateAndTimeSlotData) { return false; @@ -202,7 +249,6 @@ export default { const todaysDate = new Date().toISOString().split("T")[0]; return selectedDate === todaysDate; }, - dateSelectedReadableDate() { if (!this.dateAndTimeSlotData) { return null; @@ -303,9 +349,14 @@ export default { }, getAvailableTimeSlotsForDropOff(timeSlotsForSelectedDate) { const availableTimeSlots = timeSlotsForSelectedDate.map((timeSlot) => { - const buttonLabelValue = timeSlot.id.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF) - ? this.overnightDropoffButtonText - : this.dropoffButtonText; + let buttonLabelValue; + if (timeSlot.id.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) { + buttonLabelValue = this.overnightDropoffButtonText; + } else if (this.isSameDay) { + buttonLabelValue = this.sameDayDropoffButtonText; + } else { + buttonLabelValue = this.dropoffButtonText; + } return { value: timeSlot.id, buttonLabel: buttonLabelValue, From f811e76a10885c2f1f507e7ed350edd1a7e4ccc4 Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Fri, 7 Jul 2023 15:42:18 -0400 Subject: [PATCH 3/6] CSR-1146 | add in provisionalBooking info to time-slot requests --- .../shop-question/shop-question.vue | 2 +- src/store/index.js | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index 929c779af..f588f6422 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -108,7 +108,7 @@ export default { additionalButtonData() { const startDate = new Date(); const endDate = new Date(); - endDate.setDate(startDate.getDate() + 7); + endDate.setDate(startDate.getDate() + 6); const formattedStartDate = startDate.toISOString().split("T")[0]; const formattedEndDate = endDate.toISOString().split("T")[0]; diff --git a/src/store/index.js b/src/store/index.js index 3c0ea1e39..72faf237d 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1255,11 +1255,10 @@ export const actions = { additionalAuthFlag: "", }, partSelection: { - // TODO: Provisional booking will utilize these fields - hasAnsweredPartQuestions: false, - hasAnsweredMoldingQuestions: false, - hasAnsweredCapabilityQuestions: false, - hasManuallySelectedParts: false, + hasAnsweredPartQuestions: !!order.damage.partQuestionAnswers, + hasAnsweredMoldingQuestions: !!order.damage.moldingQuestionAnswers, + hasAnsweredCapabilityQuestions: !!order.damage.capabilityQuestionAnswers, + hasManuallySelectedParts: !!context.state.applicationUser.pageData["vehicle-parts"], }, vehicle: { year: vehicle.year, @@ -1308,11 +1307,10 @@ export const actions = { additionalAuthFlag: "", }, partSelection: { - // TODO: Provisional booking will utilize these fields - hasAnsweredPartQuestions: false, - hasAnsweredMoldingQuestions: false, - hasAnsweredCapabilityQuestions: false, - hasManuallySelectedParts: false, + hasAnsweredPartQuestions: !!order.damage.partQuestionAnswers, + hasAnsweredMoldingQuestions: !!order.damage.moldingQuestionAnswers, + hasAnsweredCapabilityQuestions: !!order.damage.capabilityQuestionAnswers, + hasManuallySelectedParts: !!context.state.applicationUser.pageData["vehicle-parts"], }, vehicle: { year: vehicle.year, From 17b6bd458214802f6e17bda6a2045883e8b9847b Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Mon, 10 Jul 2023 10:01:37 -0400 Subject: [PATCH 4/6] CSR-1146 | Empty arrays are inserted on refresh - fix --- src/store/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 72faf237d..8ade2e5a5 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1255,10 +1255,12 @@ export const actions = { additionalAuthFlag: "", }, partSelection: { - hasAnsweredPartQuestions: !!order.damage.partQuestionAnswers, - hasAnsweredMoldingQuestions: !!order.damage.moldingQuestionAnswers, - hasAnsweredCapabilityQuestions: !!order.damage.capabilityQuestionAnswers, - hasManuallySelectedParts: !!context.state.applicationUser.pageData["vehicle-parts"], + hasAnsweredPartQuestions: !!order.damage.partQuestionAnswers?.length, + hasAnsweredMoldingQuestions: !!order.damage.moldingQuestionAnswers?.length, + hasAnsweredCapabilityQuestions: !!order.damage.capabilityQuestionAnswers?.length, + hasManuallySelectedParts: + !!context.state.applicationUser.pageData["vehicle-parts"]?.partsOrQuestions + .length, }, vehicle: { year: vehicle.year, From 26bde84bfb6ad93e13532d1991375b7216a7ba1c Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Mon, 10 Jul 2023 10:13:41 -0400 Subject: [PATCH 5/6] CSR-1146 | Provisional flag fix for mobile slots --- src/store/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 8ade2e5a5..a40c7eaeb 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1309,10 +1309,12 @@ export const actions = { additionalAuthFlag: "", }, partSelection: { - hasAnsweredPartQuestions: !!order.damage.partQuestionAnswers, - hasAnsweredMoldingQuestions: !!order.damage.moldingQuestionAnswers, - hasAnsweredCapabilityQuestions: !!order.damage.capabilityQuestionAnswers, - hasManuallySelectedParts: !!context.state.applicationUser.pageData["vehicle-parts"], + hasAnsweredPartQuestions: !!order.damage.partQuestionAnswers?.length, + hasAnsweredMoldingQuestions: !!order.damage.moldingQuestionAnswers?.length, + hasAnsweredCapabilityQuestions: !!order.damage.capabilityQuestionAnswers?.length, + hasManuallySelectedParts: + !!context.state.applicationUser.pageData["vehicle-parts"]?.partsOrQuestions + .length, }, vehicle: { year: vehicle.year, From 901db2e4b02bbd6ac16e644fc767ac178dbf2819 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Mon, 10 Jul 2023 10:35:53 -0400 Subject: [PATCH 6/6] CSR-1478 remove perfect match alert when zip is invalid. --- src/layouts/vin-lookup/vin-lookup.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index e820723bd..709029459 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -79,7 +79,7 @@ :manualHeadline="AlertPerfectMatchInsuranceVerifiedHeader" :manualCopy="AlertPerfectMatchInsuranceVerifiedBody" v-model="customAlertData" - v-if="vinPopulatedOnPageLoad && isInsuranceVerified" + v-if="vinPopulatedOnPageLoad && isInsuranceVerified && !displayInvalidZipAlert" alertClass="alert-success" />