From 412b2bebb6e651c09874cd972b36e0bb34213e2e Mon Sep 17 00:00:00 2001 From: brydon1 Date: Wed, 6 Sep 2023 12:06:20 -0400 Subject: [PATCH] Swapping store call --- src/layouts/address-lookup/address-lookup.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index 5f913011..9f86be4e 100644 --- a/src/layouts/address-lookup/address-lookup.vue +++ b/src/layouts/address-lookup/address-lookup.vue @@ -92,7 +92,7 @@ import routerParams from '@/router/router-constants/router-params'; import { getDamageString, isGlassAvailableForCarId } from '@/helpers/damage-helper'; import vinPagesMixin from '@/mixins/vin-pages-mixin'; -import { useMainStore } from '@/store'; +import { useMainStore } from '@/store/index.js'; export default { name: 'address-lookup', @@ -152,7 +152,7 @@ export default { // eslint-disable-next-line max-len `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`; const vinYmmExpected = - `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make} ${this.mainStore.order.vehicle.model}`; + `${useMainStore().order.vehicle.year} ${useMainStore().order.vehicle.make} ${useMainStore().order.vehicle.model}`; return this.getCmsContent('AlertMatchedDifferentVehicleWidget', 'BodyText') .replaceAll('{custom:damage}', getDamageString()) @@ -171,7 +171,7 @@ export default { `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model} ${this.customAlertData?.vehicleInfo?.style}`; const vinYmmsExpected = // eslint-disable-next-line max-len - `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make} ${this.mainStore.order.vehicle.model} ${this.mainStore.order.vehicle.style}`; + `${useMainStore().order.vehicle.year} ${useMainStore().order.vehicle.make} ${useMainStore().order.vehicle.model} ${useMainStore().order.vehicle.style}`; return this.getCmsContent('AlertMatchedTwoIdenticalYMMVehicleWidget', 'BodyText') .replaceAll('{custom:damage}', getDamageString()) @@ -183,7 +183,7 @@ export default { // eslint-disable-next-line max-len `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`; const vinYmmExpected = - `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make} ${this.mainStore.order.vehicle.model}`; + `${useMainStore().order.vehicle.year} ${useMainStore().order.vehicle.make} ${useMainStore().order.vehicle.model}`; return (vinYmmFound.toLowerCase() === vinYmmExpected.toLowerCase()); } }, @@ -203,7 +203,7 @@ export default { }, methods: { arePagePrerequisitesValid() { - return this.mainStore.order.vehicle.carId !== null; + return useMainStore().order.vehicle.carId !== null; }, backButtonAction() { @@ -283,7 +283,7 @@ export default { vehicleInfoToCommit = Object.assign(carFound, { vin: carsFound[0].vin }); } else if (carsFound.length > 1) { // If multiple cars were found and one and only one of them matches the carId entered, save the vehicle info - const matchingCars = carsFound.filter((vin) => vin.vehicle.carId === this.mainStore.order.vehicle.carId); + const matchingCars = carsFound.filter((vin) => vin.vehicle.carId === useMainStore().order.vehicle.carId); if (matchingCars.length === 1) { vehicleInfoToCommit = Object.assign(matchingCars[0].vehicle, {