From 029d65ae44c6176a436ada39de3101dbe2792216 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 17 Jul 2023 08:44:43 -0400 Subject: [PATCH 01/21] Moved Page Interaction Blocking class stuff into a prop --- .../shop-list-button/shop-list-button.vue | 15 +++++++++------ src/ux-components/loader/loader.vue | 16 +++++++++++++--- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue b/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue index 3006c8f25..510d9bbbf 100644 --- a/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue +++ b/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue @@ -25,8 +25,10 @@ {{ badgeText }} - - +
@@ -74,10 +76,11 @@ export default { }, computed: { displayAvailabilityIndicators() { - return experimentMixin.methods.hasSettingEqualTo( - experimentSettings.DISPLAY_AVAILABILITY_INDICATORS, - "true" - ); + return true; + // return experimentMixin.methods.hasSettingEqualTo( + // experimentSettings.DISPLAY_AVAILABILITY_INDICATORS, + // "true" + // ); }, isLoaderDisplayed() { return this.availabilityRating == null; diff --git a/src/ux-components/loader/loader.vue b/src/ux-components/loader/loader.vue index 0de04da27..eb244c796 100644 --- a/src/ux-components/loader/loader.vue +++ b/src/ux-components/loader/loader.vue @@ -3,7 +3,11 @@ class="loader" role="alert" aria-label="Loading new page" - v-bind:class="[this.loaderColor, this.loaderPosition]">
+ v-bind:class="[ + this.loaderColor, + this.loaderPosition, + this.allowPageInteraction ? 'allow-ui-interaction' : '', + ]"> @@ -83,8 +93,8 @@ export default { &.black:after { background-color: $black; } - //no-block to enable clicking on certain buttons with loaders while the loader is actives - &.no-block::before { + &.allow-ui-interaction::before { + //no-block to enable clicking on certain buttons with loaders while the loader is actives z-index: -1; } } From 1a1e97485cee4288a27beedc82d330bf8f431d49 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 17 Jul 2023 08:52:25 -0400 Subject: [PATCH 02/21] Removed commented test code --- .../shop-question/shop-list-button/shop-list-button.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue b/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue index 510d9bbbf..31c415a2d 100644 --- a/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue +++ b/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue @@ -76,11 +76,10 @@ export default { }, computed: { displayAvailabilityIndicators() { - return true; - // return experimentMixin.methods.hasSettingEqualTo( - // experimentSettings.DISPLAY_AVAILABILITY_INDICATORS, - // "true" - // ); + return experimentMixin.methods.hasSettingEqualTo( + experimentSettings.DISPLAY_AVAILABILITY_INDICATORS, + "true" + ); }, isLoaderDisplayed() { return this.availabilityRating == null; From 5b5d03097cdb1ff6218ee189bd0aa4e585f19f50 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Mon, 17 Jul 2023 09:46:16 -0400 Subject: [PATCH 03/21] CSR-1530 fix multi-error displaying. --- 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 709029459..41583308e 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 && !displayInvalidZipAlert" + v-if="vinPopulatedOnPageLoad && isInsuranceVerified && !displayInvalidZipAlert && !displayNonServiceableZipAlert" alertClass="alert-success" /> Date: Mon, 17 Jul 2023 09:49:03 -0400 Subject: [PATCH 04/21] Code format. --- src/layouts/vin-lookup/vin-lookup.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 41583308e..a6b902c09 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -79,7 +79,12 @@ :manualHeadline="AlertPerfectMatchInsuranceVerifiedHeader" :manualCopy="AlertPerfectMatchInsuranceVerifiedBody" v-model="customAlertData" - v-if="vinPopulatedOnPageLoad && isInsuranceVerified && !displayInvalidZipAlert && !displayNonServiceableZipAlert" + v-if=" + vinPopulatedOnPageLoad && + isInsuranceVerified && + !displayInvalidZipAlert && + !displayNonServiceableZipAlert + " alertClass="alert-success" /> Date: Mon, 17 Jul 2023 10:45:51 -0400 Subject: [PATCH 05/21] CSR-1483: styling fixes --- .../date-picker/date-picker.vue | 31 ++++++++----------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index a20884d40..2149a9cd5 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -56,15 +56,15 @@ :class="[!isLoading ? 'date-picker-hidden' : '']" loaderColor="blue" loaderPosition="center" /> + - @@ -660,27 +660,22 @@ export default { max-height: 0; } .date-picker { - overflow: hidden; position: relative; flex-grow: 1; display: flex; flex-direction: column; fieldset { - overflow-y: auto; flex-grow: 1; position: relative; - padding-bottom: 6rem; // arbitrary amount to provide enough spacing for scroll animation - max-height: 21.25rem; // 340px... arbitrary amount to not push View More link out of view on iphones } .loader { - position: absolute; height: 2rem; - width: 2rem; + width: calc(100% - 1.5rem); &::after { - width: 100%; - height: 100%; + width: 1.5rem; + height: 1.5rem; } } .calendar-grid-container { @@ -813,9 +808,9 @@ export default { display: flex; justify-content: center; align-items: center; - width: 3rem; + min-width: 2.5rem; + width: 2.5rem; height: 2.5rem; - min-width: 3rem; span { &.small { From 4e975f008d6eae06b8f1f95ee3efcf8c39937e20 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Mon, 17 Jul 2023 12:53:15 -0400 Subject: [PATCH 06/21] CSR-1541 fix spacing in funnel-sub-header. --- src/fmg-components/funnel-sub-header/funnel-sub-header.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fmg-components/funnel-sub-header/funnel-sub-header.vue b/src/fmg-components/funnel-sub-header/funnel-sub-header.vue index 6beeaf321..a5cdf5c0b 100644 --- a/src/fmg-components/funnel-sub-header/funnel-sub-header.vue +++ b/src/fmg-components/funnel-sub-header/funnel-sub-header.vue @@ -2,7 +2,7 @@
-
+
{{ text }} From 3455c685cfb6eb97d5d5b77f7ef620cd2052c33d Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Mon, 17 Jul 2023 13:59:47 -0400 Subject: [PATCH 07/21] CSR-1483: updates to scroll animation --- .../date-picker/date-picker.vue | 57 ++++++++----------- 1 file changed, 23 insertions(+), 34 deletions(-) diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index 2149a9cd5..8cd4faaac 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -60,6 +60,7 @@ v-if="calendarViewDirection === 'future' && !disableViewMoreDatesButton" type="button" class="btn btn-link" + id="viewMoreDates" :disabled="isLoading" @click="showAnotherMonth"> View more dates @@ -615,37 +616,27 @@ export default { }); }); }, - scrollToElement(elementId, speed, easing) { - // TODO - needs to be cleaned up & refactored - function scrollTopSmooth(wrapper, target, duration = 300, timingName = "linear") { - const initY = wrapper.scrollTop; - const wrapperRect = wrapper.getBoundingClientRect(); - const targetRect = target.getBoundingClientRect(); - const targetY = targetRect.top - wrapperRect.top - BUFFER_OFFSET; - const timingFunc = TIMINGFUNC_MAP[timingName]; - let start = null; - - const step = (timestamp) => { - start = start || timestamp; - const progress = timestamp - start, - // Growing from 0 to 1 - time = Math.min(1, (timestamp - start) / duration); - const percentageNew = timingFunc(time); - const distanceToGo = targetY; - const thisDistance = percentageNew * distanceToGo; - - wrapper.scrollTo(0, initY + thisDistance); - if (percentageNew < 1) { - window.requestAnimationFrame(step); - } - }; - window.requestAnimationFrame(step); - } - - const wrapper = document.getElementById("date-picker-fieldset"); - const targetMonth = document.getElementById(elementId); - - scrollTopSmooth(wrapper, targetMonth, 800, "ease-in-out"); + scrollToElement(elementId, duration = 800, easing = "ease-in-out") { + const wrapper = document.querySelector(".page-container-grouped-styles"); + const target = document.getElementById(elementId); + const initY = wrapper.scrollTop; + const wrapperRect = wrapper.getBoundingClientRect(); + const targetRect = target.getBoundingClientRect(); + const targetY = targetRect.top - wrapperRect.top - BUFFER_OFFSET; + const timingFunc = TIMINGFUNC_MAP[easing]; + let start = null; + const step = (timestamp) => { + start = start || timestamp; + const time = Math.min(1, (timestamp - start) / duration); + const percentageNew = timingFunc(time); + const distanceToGo = targetY; + const thisDistance = percentageNew * distanceToGo; + wrapper.scrollTo(0, initY + thisDistance); + if (percentageNew < 1) { + window.requestAnimationFrame(step); + } + }; + window.requestAnimationFrame(step); }, }, components: { @@ -655,6 +646,7 @@ export default { diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index e40dd13ba..d14a3345f 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -18,6 +18,7 @@ v-model="selectedDate" class="text-link-small" :customSelectableDatesCallback="getAvailableDatesMethod" + validationRules="date-required" @date-clicked="openInshopTimeSlotsModal" /> Date: Tue, 18 Jul 2023 15:16:25 -0400 Subject: [PATCH 10/21] CSR-1553 changed insurance threshold value from 500 to 300. --- src/layouts/quote/quote.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 1e78647dc..99d824af5 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -166,7 +166,7 @@ export default { return availableLineItems ? baseMixin.methods.getTierOnePackagePrice( baseMixin.methods.filterOutFees(availableLineItems) - ) > 500 + ) > 300 : null; } }, From 4518e78745ebf998cce83e3da0fe3be9a03fc821 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Tue, 18 Jul 2023 17:09:45 -0400 Subject: [PATCH 11/21] CSR-1538: CSS tweak to keep text in place regardless of image load on list-card --- src/ux-components/list-card/list-card.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ux-components/list-card/list-card.vue b/src/ux-components/list-card/list-card.vue index ee8785022..eaa72e477 100644 --- a/src/ux-components/list-card/list-card.vue +++ b/src/ux-components/list-card/list-card.vue @@ -96,6 +96,7 @@ export default { outline: none; display: flex; position: relative; + justify-content: space-between; p { color: $gray-600; From 8a3fc2457dcd3911fcf77348a0526c424c3430bd Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Wed, 19 Jul 2023 10:06:49 -0400 Subject: [PATCH 12/21] CSR-1551 set focus state to eliminate outline on button click. Update margin on error to avoid pushing button partially off of page. --- src/digital-components/date-picker/date-picker.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index 2f42ebd16..0224f7136 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -450,7 +450,7 @@ export default { monthsAfterToLoadOffset (number), hideSecondMonth (boolean), preSelectedDate (string) - + data used: todayDate (date object) this.hideSomeDaysForInitialView (string) @@ -946,6 +946,9 @@ export default { font-weight: 500; text-underline-offset: 4px; flex-grow: 0; + &:focus { + box-shadow: none; + } } .past { @@ -1019,7 +1022,7 @@ export default { } .form-test-error { - margin: 0 auto 2rem auto; + margin: 0 auto; max-width: 414px; text-align: left; } From 517e79d62dce477cfb23aa84a9144038bdfe54c1 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Wed, 19 Jul 2023 10:51:44 -0400 Subject: [PATCH 13/21] CSR-1552 allow unverified insurance to return to quote page. set a variable indicating switching from insurance to cash to pass to heritage so referral properties can be reset. --- src/constants/store-actions.js | 1 + src/constants/store-mutations.js | 1 + .../heritage-integration/navigation-helper.js | 1 + src/layouts/quote/quote.vue | 23 ++++++++++++++++++- src/mixins/vehicle-questions-mixin.js | 4 +--- src/store/index.js | 8 +++++++ 6 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 392e7b59e..9020ae2db 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -84,6 +84,7 @@ const storeActions = { SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING: "saveSupportingItemsSuppressingStateResetting", SAVE_VAPS: "saveVaps", + SAVE_SWITCH_INSURANCE_TO_CASH: "saveSwitchInsuranceToCash", }; export { storeActions }; diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index d4e07cf0a..66a0f5047 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -22,6 +22,7 @@ const storeMutations = { UPDATE_VAPS: "updateVaps", UPDATE_SUPPORTING_ITEMS: "updateSupportingItems", UPDATE_LINE_ITEMS_SERVER_DATA: "updateLineItemsServerData", + UPDATE_SWITCH_INSURANCE_TO_CASH: "updateSwitchInsuranceToCash", UPDATE_REGISTRATION_LICENSE_PLATE: "updateRegistrationLicensePlate", UPDATE_REGISTRATION_ADDRESS: "updateRegistrationAddress", diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index 913fbcb1b..c8f320b1f 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -63,6 +63,7 @@ export async function navigateToHeritageFunnel({ shouldSaveSession = true, loadi src: "concept-funnel", conceptsqid: store.getters.applicationUser.savedSessionId, isInsurance: store.getters.payment.isInsurance, + switchInsuranceToCash: store.getters.order.switchInsuranceToCash, }); } diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 1e78647dc..c05495339 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -150,7 +150,7 @@ export default { (store.getters.order.damage.isRepair || (store.getters.order.lineItems?.glassParts != null && store.getters.order.lineItems.glassParts.length > 0)) && - store.getters.order.referralNumber?.length !== 6 + !store.getters.payment.insuranceCoverage.isVerified ); }, getDefaultIsInsuranceSelectedValue(availableLineItems) { @@ -177,6 +177,27 @@ export default { vehicleQuestionsMixin.methods.navigateBack(this); }, forwardButtonAction() { + // if referral is 6 digits unverified it indicates they were previously insurance and been to heritage + // need to set an indicator for heritage if they switched from insurance to cash. many things to reset on the referral in heritage if so + const prevPayment = this.$store.getters.payment; + if ( + this.$store.getters.order.referralNumber?.length === 6 && + !prevPayment.insuranceCoverage.isVerified && + prevPayment.isInsurance + ) { + this.dispatchStoreAction( + this.storeActions.SAVE_SWITCH_INSURANCE_TO_CASH, + true, + false + ); + } else { + this.dispatchStoreAction( + this.storeActions.SAVE_SWITCH_INSURANCE_TO_CASH, + false, + false + ); + } + this.dispatchStoreAction( this.storeActions.SAVE_PAYMENT_TYPE, this.isInsuranceSelected, diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index 4b05067ea..4a0c49c81 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -446,9 +446,7 @@ export default { const payment = store.getters.payment; - if (store.getters.order.referralNumber?.length === 6) { - navigateToHeritageFunnel({ loadingModal: self.$refs.loadingModal }); - } else if (payment.isInsurance && payment.insuranceCoverage.isVerified) { + if (payment.isInsurance && payment.insuranceCoverage.isVerified) { navigateToHeritageFunnel({ loadingModal: self.$refs.loadingModal }); } else { self.$router.navigateWithSaving( diff --git a/src/store/index.js b/src/store/index.js index c3c9fc8a0..23e7e14df 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -95,6 +95,7 @@ const getDefaultState = () => { referralDate: null, referralCorrelationId: null, eon: null, + switchInsuranceToCash: false, }, applicationUser: { eventBus: [], @@ -280,6 +281,9 @@ export const mutations = { state.order.schedule.jobMaxMinutes = scheduleInfo.jobMaxMinutes; } }, + updateSwitchInsuranceToCash(state, switchValue) { + state.order.switchInsuranceToCash = switchValue; + }, // applicationUser MUTATIONS updateSaveSessionPromise(state, saveSessionPromise) { @@ -1867,6 +1871,10 @@ export const actions = { context.commit(storeMutations.UPDATE_VAPS, vaps); }, + saveSwitchInsuranceToCash(context, switchValue) { + context.commit(storeMutations.UPDATE_SWITCH_INSURANCE_TO_CASH, switchValue); + }, + // Price order actions async priceOrderItemsAndSaveServerData( context, From 1870abcb5efacb91dc1646592e20b2395fe6e66d Mon Sep 17 00:00:00 2001 From: CarlNation Date: Wed, 19 Jul 2023 11:18:11 -0400 Subject: [PATCH 14/21] CSR-1552 add payment to test --- src/layouts/quote/quote.spec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/layouts/quote/quote.spec.js b/src/layouts/quote/quote.spec.js index 099a3778e..807f8171b 100644 --- a/src/layouts/quote/quote.spec.js +++ b/src/layouts/quote/quote.spec.js @@ -162,6 +162,11 @@ describe("quote.vue", () => { }, referralNumber: "1234567", }, + payment: { + insuranceCoverage: { + isVerified: false + } + }, }; let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); @@ -185,6 +190,11 @@ describe("quote.vue", () => { glassParts: ["item", "item2"], }, }, + payment: { + insuranceCoverage: { + isVerified: false + } + }, }; let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); From b8f0c8ea7aa48d6003e4c8c9e4d273a016f79f5b Mon Sep 17 00:00:00 2001 From: CarlNation Date: Wed, 19 Jul 2023 11:21:34 -0400 Subject: [PATCH 15/21] CSR-1552 prettier --- src/layouts/quote/quote.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layouts/quote/quote.spec.js b/src/layouts/quote/quote.spec.js index 807f8171b..6895b5d0b 100644 --- a/src/layouts/quote/quote.spec.js +++ b/src/layouts/quote/quote.spec.js @@ -164,8 +164,8 @@ describe("quote.vue", () => { }, payment: { insuranceCoverage: { - isVerified: false - } + isVerified: false, + }, }, }; @@ -192,8 +192,8 @@ describe("quote.vue", () => { }, payment: { insuranceCoverage: { - isVerified: false - } + isVerified: false, + }, }, }; From 8623a3c0fca335d46fb7e8e60723dc1228a82394 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Wed, 19 Jul 2023 13:29:25 -0400 Subject: [PATCH 16/21] CSR-1558: fix date ranges for API calls --- src/layouts/schedule/schedule.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index d14a3345f..1ff1c18e7 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -94,7 +94,7 @@ const getAvailableDates = async ( const timeSlotsData = {}; timeSlotsData.days = []; let apiStartDate = startDateString; - let apiEndDate = apiEndDateLimit; + let apiEndDate = endDateString; for (let i = 1; i <= apiCallsCount; i++) { let storeActionConfig; @@ -106,6 +106,10 @@ const getAvailableDates = async ( if (i === apiCallsCount) { apiEndDate = endDateString; } + } else { + if (apiEndDate > apiEndDateLimit) { + apiEndDate = apiEndDateLimit; + } } if (appointmentType === AppointmentTypeStrings.MOBILE) { @@ -127,13 +131,13 @@ const getAvailableDates = async ( }, }; } - storeActionConfigs.push(storeActionConfig); + if (apiStartDate < apiEndDate) storeActionConfigs.push(storeActionConfig); } - // ASYNC METHOD const timeSlotsResponsesData = { days: [], }; + function compareDayStrings(a, b) { if (a.date < b.date) return -1; if (a.date > b.date) return 1; From 689b27ff9621b22b7228629a7f106c31ca0cf194 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 19 Jul 2023 16:30:43 -0400 Subject: [PATCH 17/21] Initial fix --- .../time-slot-modal-question.vue | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 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 eff2358f0..b278578be 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 @@ -319,15 +319,19 @@ export default { return `${hours}:${minutes} ${meridianNotation}`; }, getDisplayTextForDurationLength(durationMinimum, durationMaximum) { - let displayTextForDurationLength; - if (durationMaximum >= 120) { - displayTextForDurationLength = `${durationMinimum / 60} - ${ - durationMaximum / 60 - } hours`; - } else { - displayTextForDurationLength = `${durationMinimum} - ${durationMaximum} minutes`; - } - return displayTextForDurationLength; + const isLongAppointment = durationMaximum >= 120; + const isDurationRange = durationMinimum !== durationMaximum; + + const adjustedMinimum = isLongAppointment ? durationMinimum / 60 : durationMinimum; + const adjustedMaximum = isLongAppointment ? durationMaximum / 60 : durationMaximum; + + const durationText = isDurationRange + ? `${adjustedMinimum} - ${adjustedMaximum}` + : adjustedMinimum; + + const unitText = isLongAppointment ? "hours" : "minutes"; + + return `${durationText} ${unitText}`; }, getRelevantDropOffCmsWidgetNameForSelectedTimeSlot( selectedTimeSlotId, From 209977b389119e623b36ba511cedb8e87791dc9c Mon Sep 17 00:00:00 2001 From: CarlNation Date: Wed, 19 Jul 2023 10:51:44 -0400 Subject: [PATCH 18/21] Revert "CSR-1552" This reverts commit 517e79d62dce477cfb23aa84a9144038bdfe54c1. --- src/constants/store-actions.js | 1 - src/constants/store-mutations.js | 1 - .../heritage-integration/navigation-helper.js | 1 - src/layouts/quote/quote.vue | 23 +------------------ src/mixins/vehicle-questions-mixin.js | 4 +++- src/store/index.js | 8 ------- 6 files changed, 4 insertions(+), 34 deletions(-) diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 9020ae2db..392e7b59e 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -84,7 +84,6 @@ const storeActions = { SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING: "saveSupportingItemsSuppressingStateResetting", SAVE_VAPS: "saveVaps", - SAVE_SWITCH_INSURANCE_TO_CASH: "saveSwitchInsuranceToCash", }; export { storeActions }; diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index 66a0f5047..d4e07cf0a 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -22,7 +22,6 @@ const storeMutations = { UPDATE_VAPS: "updateVaps", UPDATE_SUPPORTING_ITEMS: "updateSupportingItems", UPDATE_LINE_ITEMS_SERVER_DATA: "updateLineItemsServerData", - UPDATE_SWITCH_INSURANCE_TO_CASH: "updateSwitchInsuranceToCash", UPDATE_REGISTRATION_LICENSE_PLATE: "updateRegistrationLicensePlate", UPDATE_REGISTRATION_ADDRESS: "updateRegistrationAddress", diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index c8f320b1f..913fbcb1b 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -63,7 +63,6 @@ export async function navigateToHeritageFunnel({ shouldSaveSession = true, loadi src: "concept-funnel", conceptsqid: store.getters.applicationUser.savedSessionId, isInsurance: store.getters.payment.isInsurance, - switchInsuranceToCash: store.getters.order.switchInsuranceToCash, }); } diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index c05495339..1e78647dc 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -150,7 +150,7 @@ export default { (store.getters.order.damage.isRepair || (store.getters.order.lineItems?.glassParts != null && store.getters.order.lineItems.glassParts.length > 0)) && - !store.getters.payment.insuranceCoverage.isVerified + store.getters.order.referralNumber?.length !== 6 ); }, getDefaultIsInsuranceSelectedValue(availableLineItems) { @@ -177,27 +177,6 @@ export default { vehicleQuestionsMixin.methods.navigateBack(this); }, forwardButtonAction() { - // if referral is 6 digits unverified it indicates they were previously insurance and been to heritage - // need to set an indicator for heritage if they switched from insurance to cash. many things to reset on the referral in heritage if so - const prevPayment = this.$store.getters.payment; - if ( - this.$store.getters.order.referralNumber?.length === 6 && - !prevPayment.insuranceCoverage.isVerified && - prevPayment.isInsurance - ) { - this.dispatchStoreAction( - this.storeActions.SAVE_SWITCH_INSURANCE_TO_CASH, - true, - false - ); - } else { - this.dispatchStoreAction( - this.storeActions.SAVE_SWITCH_INSURANCE_TO_CASH, - false, - false - ); - } - this.dispatchStoreAction( this.storeActions.SAVE_PAYMENT_TYPE, this.isInsuranceSelected, diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index 4a0c49c81..4b05067ea 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -446,7 +446,9 @@ export default { const payment = store.getters.payment; - if (payment.isInsurance && payment.insuranceCoverage.isVerified) { + if (store.getters.order.referralNumber?.length === 6) { + navigateToHeritageFunnel({ loadingModal: self.$refs.loadingModal }); + } else if (payment.isInsurance && payment.insuranceCoverage.isVerified) { navigateToHeritageFunnel({ loadingModal: self.$refs.loadingModal }); } else { self.$router.navigateWithSaving( diff --git a/src/store/index.js b/src/store/index.js index 23e7e14df..c3c9fc8a0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -95,7 +95,6 @@ const getDefaultState = () => { referralDate: null, referralCorrelationId: null, eon: null, - switchInsuranceToCash: false, }, applicationUser: { eventBus: [], @@ -281,9 +280,6 @@ export const mutations = { state.order.schedule.jobMaxMinutes = scheduleInfo.jobMaxMinutes; } }, - updateSwitchInsuranceToCash(state, switchValue) { - state.order.switchInsuranceToCash = switchValue; - }, // applicationUser MUTATIONS updateSaveSessionPromise(state, saveSessionPromise) { @@ -1871,10 +1867,6 @@ export const actions = { context.commit(storeMutations.UPDATE_VAPS, vaps); }, - saveSwitchInsuranceToCash(context, switchValue) { - context.commit(storeMutations.UPDATE_SWITCH_INSURANCE_TO_CASH, switchValue); - }, - // Price order actions async priceOrderItemsAndSaveServerData( context, From 6def6b8cf78c173d0e31ef885b4a3310d930d883 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 20 Jul 2023 07:10:50 -0400 Subject: [PATCH 19/21] Revert "CSR-1552" This reverts commit 1870abcb5efacb91dc1646592e20b2395fe6e66d. --- src/layouts/quote/quote.spec.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/layouts/quote/quote.spec.js b/src/layouts/quote/quote.spec.js index 6895b5d0b..099a3778e 100644 --- a/src/layouts/quote/quote.spec.js +++ b/src/layouts/quote/quote.spec.js @@ -162,11 +162,6 @@ describe("quote.vue", () => { }, referralNumber: "1234567", }, - payment: { - insuranceCoverage: { - isVerified: false, - }, - }, }; let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); @@ -190,11 +185,6 @@ describe("quote.vue", () => { glassParts: ["item", "item2"], }, }, - payment: { - insuranceCoverage: { - isVerified: false, - }, - }, }; let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); From 7c316acb7c50b56c6a63e975167433e8977e94a4 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 20 Jul 2023 07:15:59 -0400 Subject: [PATCH 20/21] CSR-1552 treat referral 6 digits and isverified differently. unverified is allowed to return to quote page and switch to cash while verified is not. both have 6 digit referral numbers. --- src/layouts/quote/quote.vue | 2 +- src/mixins/vehicle-questions-mixin.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 1e78647dc..b2cd74cd5 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -150,7 +150,7 @@ export default { (store.getters.order.damage.isRepair || (store.getters.order.lineItems?.glassParts != null && store.getters.order.lineItems.glassParts.length > 0)) && - store.getters.order.referralNumber?.length !== 6 + !store.getters.payment.insuranceCoverage.isVerified ); }, getDefaultIsInsuranceSelectedValue(availableLineItems) { diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index 4b05067ea..4a0c49c81 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -446,9 +446,7 @@ export default { const payment = store.getters.payment; - if (store.getters.order.referralNumber?.length === 6) { - navigateToHeritageFunnel({ loadingModal: self.$refs.loadingModal }); - } else if (payment.isInsurance && payment.insuranceCoverage.isVerified) { + if (payment.isInsurance && payment.insuranceCoverage.isVerified) { navigateToHeritageFunnel({ loadingModal: self.$refs.loadingModal }); } else { self.$router.navigateWithSaving( From 1a1ee19786cf83a4975ee77c071081b15c21eddd Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 20 Jul 2023 07:46:01 -0400 Subject: [PATCH 21/21] CSR-1552 fix tests --- src/layouts/quote/quote.spec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/layouts/quote/quote.spec.js b/src/layouts/quote/quote.spec.js index 099a3778e..6895b5d0b 100644 --- a/src/layouts/quote/quote.spec.js +++ b/src/layouts/quote/quote.spec.js @@ -162,6 +162,11 @@ describe("quote.vue", () => { }, referralNumber: "1234567", }, + payment: { + insuranceCoverage: { + isVerified: false, + }, + }, }; let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); @@ -185,6 +190,11 @@ describe("quote.vue", () => { glassParts: ["item", "item2"], }, }, + payment: { + insuranceCoverage: { + isVerified: false, + }, + }, }; let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid();