Merge pull request #395 from Safelite/feature/digital/SSR-593
display clear vehicle image when vehicle is autoselected
This commit is contained in:
commit
cbde9e1af7
1 changed files with 7 additions and 7 deletions
|
|
@ -76,10 +76,8 @@ export default {
|
||||||
const policyVehicles = useMainStore().pageData(issPageValues.POLICY_VEHICLES);
|
const policyVehicles = useMainStore().pageData(issPageValues.POLICY_VEHICLES);
|
||||||
return {
|
return {
|
||||||
policyVehicles,
|
policyVehicles,
|
||||||
selectedVehicleVin: (policyVehicles?.length ?? 0) === 1
|
selectedVehicleVin: '',
|
||||||
? policyVehicles[0].vin
|
displayGeneric: true,
|
||||||
: '',
|
|
||||||
displayGeneric: (policyVehicles?.length ?? 0) !== 1,
|
|
||||||
bailout: false,
|
bailout: false,
|
||||||
rules: {
|
rules: {
|
||||||
optionRequired: globalRules.OPTION_REQUIRED
|
optionRequired: globalRules.OPTION_REQUIRED
|
||||||
|
|
@ -125,9 +123,6 @@ export default {
|
||||||
policyVehicle.vin === this.selectedVehicleVin);
|
policyVehicle.vin === this.selectedVehicleVin);
|
||||||
return vehicle?.endorsements?.includes(endorsementOptions.REPAIR_WAIVED) ?? false;
|
return vehicle?.endorsements?.includes(endorsementOptions.REPAIR_WAIVED) ?? false;
|
||||||
},
|
},
|
||||||
VehiclesFromApi() {
|
|
||||||
return useMainStore().pageData(issPageValues.POLICY_VEHICLES);
|
|
||||||
},
|
|
||||||
selectedVehicle() {
|
selectedVehicle() {
|
||||||
const vehicle = this.mainStore.lookupVehicleByVin(this.selectedVehicleVin);
|
const vehicle = this.mainStore.lookupVehicleByVin(this.selectedVehicleVin);
|
||||||
return vehicle;
|
return vehicle;
|
||||||
|
|
@ -157,6 +152,11 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.policyVehicles?.length === 1) {
|
||||||
|
this.selectedVehicleVin = this.policyVehicles[0].vin;
|
||||||
|
}
|
||||||
|
},
|
||||||
methods:
|
methods:
|
||||||
{
|
{
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue