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