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);
|
vm.setCmsContent(cmsContentPromise);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.VehiclesFromApi?.length === 1) {
|
||||||
|
this.selectedVehicleVin = this.VehiclesFromApi[0].vin;
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue