display clear vehicle image when vehicle is autoselected
This commit is contained in:
parent
6caff3c296
commit
302ddf3090
1 changed files with 7 additions and 4 deletions
|
|
@ -72,14 +72,17 @@ export default {
|
|||
vm.setCmsContent(cmsContentPromise);
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
if (this.VehiclesFromApi?.length === 1) {
|
||||
this.selectedVehicleVin = this.VehiclesFromApi[0].vin;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue