Merge pull request #1333 from Safelite/feature/CSR-1418.03
Update vehicle.vue
This commit is contained in:
commit
a0aa596094
1 changed files with 3 additions and 6 deletions
|
|
@ -121,8 +121,6 @@ export default {
|
|||
makeOptions: [],
|
||||
modelOptions: [],
|
||||
styleOptions: [],
|
||||
//flag to check getVehicle action in progress
|
||||
vehicleInProgress: false,
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -279,14 +277,13 @@ export default {
|
|||
},
|
||||
async selectedStyle(style) {
|
||||
if (style) {
|
||||
this.vehicleInProgress = true;
|
||||
this.carId = null;
|
||||
const result = await this.getVehicle(
|
||||
this.selectedYear,
|
||||
this.selectedMake,
|
||||
this.selectedModel,
|
||||
style
|
||||
);
|
||||
this.vehicleInProgress = false;
|
||||
this.carId = result?.data.carId;
|
||||
this.category = result?.data.category;
|
||||
this.imageUrl = result?.data.imageUrl;
|
||||
|
|
@ -299,12 +296,12 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
unmatchedVehicleIcon() {
|
||||
if (this.imageUrl == null) return true;
|
||||
if (this.imageUrl == null && this.carId !== null) return true;
|
||||
else return false;
|
||||
},
|
||||
displayGeneric() {
|
||||
if (!this.selectedStyle) return true;
|
||||
else if (this.vehicleInProgress) return true;
|
||||
else if (this.carId == null) return true;
|
||||
else if (this.imageUrl == null && this.carId !== null) return false;
|
||||
else return true;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue