diff --git a/src/digital-components/text-block/text-block.vue b/src/digital-components/text-block/text-block.vue index 33854e14..d042113e 100644 --- a/src/digital-components/text-block/text-block.vue +++ b/src/digital-components/text-block/text-block.vue @@ -1,6 +1,6 @@ @@ -25,12 +25,15 @@ export default { \ No newline at end of file + diff --git a/src/layouts/capability-questions/capability-questions.vue b/src/layouts/capability-questions/capability-questions.vue index d25d958a..23ba630f 100644 --- a/src/layouts/capability-questions/capability-questions.vue +++ b/src/layouts/capability-questions/capability-questions.vue @@ -11,6 +11,7 @@ - -
-

Placeholder for coverage-statement page

- +
+ + + + + Recalibration + + + diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index cba7bf6a..404a8785 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -1,11 +1,12 @@ - + + \ No newline at end of file diff --git a/src/layouts/policy-holder-details/policy-holder-details.vue b/src/layouts/policy-holder-details/policy-holder-details.vue index 76702d8b..bacb5059 100644 --- a/src/layouts/policy-holder-details/policy-holder-details.vue +++ b/src/layouts/policy-holder-details/policy-holder-details.vue @@ -3,8 +3,8 @@
- - + +
\ No newline at end of file diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index ab07d525..01ce9443 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -3,6 +3,7 @@
@@ -123,7 +124,7 @@ export default { }, setup() { const mainStore = useMainStore(); - + return { mainStore }; }, data() { @@ -138,7 +139,7 @@ export default { selectedRearReplaceOptions: this.getRearReplaceOptionsFromStore(), }; }, - methods: { + methods: { arePagePrerequisitesValid() { if (this.mainStore.order.vehicle.carId) { return true; @@ -306,8 +307,8 @@ export default { return this.navigateForward(); }, - navigateForward() { - if (this.mainStore.damage.isRepair) { + navigateForward() { + if (this.mainStore.damage.isRepair) { this.$router.navigate( this.navigationScenarios.CLICKED_FORWARD_WITH_REPAIR, this.$route @@ -326,7 +327,7 @@ export default { this.$route ); } - } + } }, selectedGlassToReplace() { diff --git a/src/layouts/vehicle-lookup/vehicle-lookup.vue b/src/layouts/vehicle-lookup/vehicle-lookup.vue index c9064901..34124672 100644 --- a/src/layouts/vehicle-lookup/vehicle-lookup.vue +++ b/src/layouts/vehicle-lookup/vehicle-lookup.vue @@ -8,6 +8,7 @@ cms-widget-name="SiteHeaderWidget" /> diff --git a/src/layouts/vehicle-make/vehicle-make.vue b/src/layouts/vehicle-make/vehicle-make.vue index 4be988e9..2b91a3a7 100644 --- a/src/layouts/vehicle-make/vehicle-make.vue +++ b/src/layouts/vehicle-make/vehicle-make.vue @@ -3,21 +3,21 @@
- - +
-
-
@@ -45,11 +45,11 @@ }; }, - async beforeRouteEnter(to, from, next) { + async beforeRouteEnter(to, from, next) { // Call APIs const cmsContentPromise = fetchCmsContentForPage(to.query.issPage); const makeQuestionInitialDataPromise = makeQuestion.methods.loadInitialData(); - + // Settle promises and get results const promiseResultMap = [ { @@ -61,9 +61,9 @@ promise: makeQuestionInitialDataPromise, }, ]; - + let resultMap = await settleAllPromises(promiseResultMap); - + // Call the "next" function to complete the transition to this page. next((vm) => { vm.setCmsContent(resultMap.cmsContent); @@ -95,12 +95,12 @@ }, watch: { selectedMake(make) { - this.mainStore.updateVehicleMake( make ); + this.mainStore.updateVehicleMake( make ); this.$router.navigate( this.navigationScenarios.SELECTED_MAKE, this.$route ); }, - } + } }; - \ No newline at end of file + diff --git a/src/layouts/vehicle-model/vehicle-model.vue b/src/layouts/vehicle-model/vehicle-model.vue index bb3b0d40..cf34cbbd 100644 --- a/src/layouts/vehicle-model/vehicle-model.vue +++ b/src/layouts/vehicle-model/vehicle-model.vue @@ -3,7 +3,7 @@
- +
-
- + - \ No newline at end of file diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue index 7d8f4e25..051d8eb6 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.vue +++ b/src/layouts/vehicle-parts/vehicle-parts.vue @@ -3,6 +3,7 @@
diff --git a/src/layouts/vehicle-style/vehicle-style.vue b/src/layouts/vehicle-style/vehicle-style.vue index e8b3e942..893de9d0 100644 --- a/src/layouts/vehicle-style/vehicle-style.vue +++ b/src/layouts/vehicle-style/vehicle-style.vue @@ -3,7 +3,7 @@
- +
-
@@ -65,7 +65,7 @@ export default { ]; const resultMap = await settleAllPromises(promiseResultMap); - + const visitedVehicleDamage = useMainStore().pageData(issPageValues.VEHICLE_DAMAGE) ? true : false; // If we have exactly one style then navigate directly to vehicle-damage @@ -117,7 +117,7 @@ export default { }, computed: { - backButtonAccessibleText() + backButtonAccessibleText() { return this.getCmsContent(this.cmsWidgetName, "BackButtonAccessibleText") } diff --git a/src/layouts/vehicle-year/vehicle-year.vue b/src/layouts/vehicle-year/vehicle-year.vue index 598e4728..10ea7b52 100644 --- a/src/layouts/vehicle-year/vehicle-year.vue +++ b/src/layouts/vehicle-year/vehicle-year.vue @@ -3,23 +3,23 @@
- +
-
-
- + - \ No newline at end of file diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index d3751f1f..c54c2b7e 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -9,6 +9,7 @@ cmsWidgetName="SiteHeaderWidget" /> @@ -82,7 +83,7 @@ export default { activeVehicleLookupAlertType: null, needToLookupVehicle: true, vehicleFromLookup: null, - vin: null, + vin: null, }; }, provide() { @@ -130,7 +131,7 @@ export default { this.resetActiveAlert(); // Temp solution to reset the 'disabled' style on the Continue button this.$refs.siteFooter.enableForwardAction(); - + if (this.needToLookupVehicle) { const vehicleLookupResponse = await this.lookupVehicleByVin(this.vin); @@ -146,29 +147,29 @@ export default { } // Add vin bcs the response from the service doesn't contain vin - this.vehicleFromLookup = Object.assign(vehicleLookupResponse.data, { vin: this.vin }); + this.vehicleFromLookup = Object.assign(vehicleLookupResponse.data, { vin: this.vin }); } - if (this.needToLookupVehicle && this.isCarIdDifferentFromTheStore) { - this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.NOT_MATCHED; - + if (this.needToLookupVehicle && this.isCarIdDifferentFromTheStore) { + this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.NOT_MATCHED; + const vehicleYearMakeModel = `${this.vehicleFromLookup.year} ${this.vehicleFromLookup.make} ${this.vehicleFromLookup.model}`; this.$refs.siteFooter.updateButtonText(`Continue with ${vehicleYearMakeModel}`); this.$refs.siteFooter.removeLoader(); - + this.needToLookupVehicle = false; return; } - let isSelectedGlassAvailableForVehicle = true; - if (this.isCarIdDifferentFromTheStore) { - isSelectedGlassAvailableForVehicle = - await isGlassAvailableForCarId(this.vehicleFromLookup.carId); - } - + let isSelectedGlassAvailableForVehicle = true; + if (this.isCarIdDifferentFromTheStore) { + isSelectedGlassAvailableForVehicle = + await isGlassAvailableForCarId(this.vehicleFromLookup.carId); + } + // navigate back to vehicle-damage - if (this.isCarIdDifferentFromTheStore && !isSelectedGlassAvailableForVehicle) { + if (this.isCarIdDifferentFromTheStore && !isSelectedGlassAvailableForVehicle) { this.mainStore.updateVehicle(this.vehicleFromLookup); this.$router.navigate( this.navigationScenarios.SELECTED_VIN_WITH_MISMATCHED_GLASS, @@ -179,8 +180,8 @@ export default { // navigate() doesn't stop the processing flow return; - } - + } + this.mainStore.updateVehicle(this.vehicleFromLookup); const partsOrQuestionsResponse = await this.getPartsOrQuestions(); if (partsOrQuestionsResponse.error) { @@ -194,7 +195,7 @@ export default { await this.navigateForward(partsOrQuestionsResponse.data.partsOrQuestions, this); }, async getPartsOrQuestions() { - try { + try { const response = await this.mainStore.getPartsOrQuestions(); return response; @@ -209,15 +210,15 @@ export default { async lookupVehicleByVin(vin) { try { return await this.mainStore.lookupVehicleByVin(vin); - } - catch (responseError) { + } + catch (responseError) { return { error: { status: responseError.status, }, }; } - }, + }, resetActiveAlert() { this.activeVehicleLookupAlertType = null; }, diff --git a/src/layouts/welcome-page/welcome-page.vue b/src/layouts/welcome-page/welcome-page.vue index c527d65f..79aef739 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -34,7 +34,7 @@
- +
diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 95179d81..78dbb55a 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -235,7 +235,7 @@ const routingTable = function(store) { }, { scenario: navigationScenarios.CLICKED_BACK_WITH_NO_VIN_NOR_QUESTIONS, - destinationIssPageValue: issPageValues.ESTIMATE, + destinationIssPageValue: issPageValues.VEHICLE_LOOKUP, }, { scenario: navigationScenarios.CLICKED_BACK_WITH_PART_QUESTIONS, diff --git a/src/store/index.js b/src/store/index.js index abb22d83..db172dde 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -701,6 +701,34 @@ export const useMainStore = defineStore({ //Save new values this.updatePartQuestionAnswers(partQuestionAnswersArray); }, + saveMoldingQuestionAnswers(moldingQuestionAnswersArray) { + const sortedPreviousResultsArray = sortArrayOfObjectsByPropertyValue( + this.order.damage.moldingQuestionAnswers, + "result" + ); + const sortedMoldingQuestionAnswersArray = sortArrayOfObjectsByPropertyValue( + moldingQuestionAnswersArray, + "result" + ); + const haveMoldingQuestionAnswersChanged = + sortedPreviousResultsArray?.length !== sortedMoldingQuestionAnswersArray.length || + !sortedPreviousResultsArray?.every( + (x, i) => x.result === sortedMoldingQuestionAnswersArray[i].result + ); + + if (haveMoldingQuestionAnswersChanged) { + this.updateGlassParts(null); + this.updateSupportingItems(null); + this.updateCapabilityQuestionAnswers(null); + this.updatePageData({ + page: issPageValues.CAPABILITY_QUESTIONS, + data: null, + }); + } + + // Save new values + this.updateMoldingQuestionAnswers(moldingQuestionAnswersArray); + }, addEventToBus (event) { this.applicationUser.eventBus.push(event); diff --git a/src/styles/common-typography-styles.scss b/src/styles/common-typography-styles.scss index 9ee9aa28..a593092e 100644 --- a/src/styles/common-typography-styles.scss +++ b/src/styles/common-typography-styles.scss @@ -25,7 +25,7 @@ h4,.h4 { font-weight: 300; } h5,.h5 { - line-height: 1.325; + line-height: 1.6; font-weight: 400; } h6,.h6 { @@ -64,4 +64,4 @@ caption, font-size: 1rem !important; line-height: 1.4; font-weight: 500; -} \ No newline at end of file +}