Update vehicle-damage.vue

formatting
This commit is contained in:
hiteshkumar87 2023-07-24 11:57:54 +05:30
parent 62eda36f75
commit a244865c5e

View file

@ -91,11 +91,11 @@ export default {
// Call APIs
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const lowerCaseParams = new URLSearchParams();
for (const [name, value] of urlParams) {
lowerCaseParams.append(name.toLowerCase(), value);
}
const urlParams = new URLSearchParams(queryString);
const lowerCaseParams = new URLSearchParams();
for (const [name, value] of urlParams) {
lowerCaseParams.append(name.toLowerCase(), value);
}
const zip = lowerCaseParams.get(queryStrings.ZIP_CODE)
? lowerCaseParams.get(queryStrings.ZIP_CODE)
@ -103,9 +103,7 @@ export default {
const damageOptionsPromise = baseMixin.methods.dispatchStoreAction(
storeActions.GET_DAMAGE_OPTIONS,
{ carId: store.getters.vehicle.carId,
zipCode:zip,
}
{ carId: store.getters.vehicle.carId, zipCode: zip }
);
// Settle promises and get results
@ -135,7 +133,7 @@ export default {
);
vm.$refs.backGlassOptions.initializeComponent(
resultMap.damageOptions.backGlassOptions.availableReplacementOptions
);
);
});
},
data() {
@ -147,8 +145,8 @@ export default {
selectedPassengerSideReplaceOptions: this.getPassengerSideReplaceOptionsFromStore(),
},
selectedWindshieldOptions: this.getWindshieldOptionsFromStore(),
selectedRearReplaceOptions: this.getRearReplaceOptionsFromStore(),
serviceZipCode: this.getZipFromStore() ?? this.$route.query.zipcode,
selectedRearReplaceOptions: this.getRearReplaceOptionsFromStore(),
serviceZipCode: this.getZipFromStore() ?? this.$route.query.zipcode,
};
},
mounted() {
@ -170,8 +168,8 @@ export default {
this.$store.getters.vehicle.carId,
true
);
}
if(this.serviceZipCode){
}
if (this.serviceZipCode) {
this.pushEventToGA(
this.GaCategories.FUNNEL_ENTRY,
this.GaActions.ZIP_CODE_PROVIDED,
@ -441,7 +439,6 @@ export default {
return selectedGlassToReplace;
},
},
computed: {
isWindshieldDamageLocation() {