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);
|
||||
return {
|
||||
policyVehicles,
|
||||
selectedVehicleVin: (policyVehicles?.length ?? 0) === 1
|
||||
? policyVehicles[0].vin
|
||||
: '',
|
||||
displayGeneric: (policyVehicles?.length ?? 0) !== 1,
|
||||
selectedVehicleVin: '',
|
||||
displayGeneric: true,
|
||||
bailout: false,
|
||||
rules: {
|
||||
optionRequired: globalRules.OPTION_REQUIRED
|
||||
|
|
@ -125,9 +123,6 @@ export default {
|
|||
policyVehicle.vin === this.selectedVehicleVin);
|
||||
return vehicle?.endorsements?.includes(endorsementOptions.REPAIR_WAIVED) ?? false;
|
||||
},
|
||||
VehiclesFromApi() {
|
||||
return useMainStore().pageData(issPageValues.POLICY_VEHICLES);
|
||||
},
|
||||
selectedVehicle() {
|
||||
const vehicle = this.mainStore.lookupVehicleByVin(this.selectedVehicleVin);
|
||||
return vehicle;
|
||||
|
|
@ -157,6 +152,11 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.policyVehicles?.length === 1) {
|
||||
this.selectedVehicleVin = this.policyVehicles[0].vin;
|
||||
}
|
||||
},
|
||||
methods:
|
||||
{
|
||||
backButtonAction() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue