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: [],
|
makeOptions: [],
|
||||||
modelOptions: [],
|
modelOptions: [],
|
||||||
styleOptions: [],
|
styleOptions: [],
|
||||||
//flag to check getVehicle action in progress
|
|
||||||
vehicleInProgress: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -279,14 +277,13 @@ export default {
|
||||||
},
|
},
|
||||||
async selectedStyle(style) {
|
async selectedStyle(style) {
|
||||||
if (style) {
|
if (style) {
|
||||||
this.vehicleInProgress = true;
|
this.carId = null;
|
||||||
const result = await this.getVehicle(
|
const result = await this.getVehicle(
|
||||||
this.selectedYear,
|
this.selectedYear,
|
||||||
this.selectedMake,
|
this.selectedMake,
|
||||||
this.selectedModel,
|
this.selectedModel,
|
||||||
style
|
style
|
||||||
);
|
);
|
||||||
this.vehicleInProgress = false;
|
|
||||||
this.carId = result?.data.carId;
|
this.carId = result?.data.carId;
|
||||||
this.category = result?.data.category;
|
this.category = result?.data.category;
|
||||||
this.imageUrl = result?.data.imageUrl;
|
this.imageUrl = result?.data.imageUrl;
|
||||||
|
|
@ -299,12 +296,12 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
unmatchedVehicleIcon() {
|
unmatchedVehicleIcon() {
|
||||||
if (this.imageUrl == null) return true;
|
if (this.imageUrl == null && this.carId !== null) return true;
|
||||||
else return false;
|
else return false;
|
||||||
},
|
},
|
||||||
displayGeneric() {
|
displayGeneric() {
|
||||||
if (!this.selectedStyle) return true;
|
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 if (this.imageUrl == null && this.carId !== null) return false;
|
||||||
else return true;
|
else return true;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue