Merge pull request #1643 from Safelite/feature/CSR-1885

Update vehicle.vue
This commit is contained in:
AMSNEHA 2023-12-18 15:07:54 +05:30 committed by GitHub
commit 7b8b752a31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -225,6 +225,11 @@ export default {
watch: {
async selectedYear(year) {
this.makeOptions = [];
this.selectedMake = null;
this.selectedModel = null;
this.selectedStyle = null;
this.carId = null;
if (year) {
const result = await this.getMakeOptions(year);
if (this.selectedYear == year) {
@ -236,15 +241,13 @@ export default {
this.carId = null;
}
}
} else {
this.makeOptions = [];
this.selectedMake = null;
this.selectedModel = null;
this.selectedStyle = null;
this.carId = null;
}
},
async selectedMake(make) {
this.modelOptions = [];
this.selectedModel = null;
this.selectedStyle = null;
this.carId = null;
if (make) {
const result = await this.getModelOptions(this.selectedYear, make);
if (this.selectedMake == make) {
@ -256,14 +259,12 @@ export default {
this.carId = null;
}
}
} else {
this.modelOptions = [];
this.selectedModel = null;
this.selectedStyle = null;
this.carId = null;
}
},
async selectedModel(model) {
this.styleOptions = [];
this.selectedStyle = null;
this.carId = null;
if (model) {
const result = await this.getStyleOptions(
this.selectedYear,
@ -283,10 +284,6 @@ export default {
this.carId = null;
}
}
} else {
this.styleOptions = [];
this.selectedStyle = null;
this.carId = null;
}
},
async selectedStyle(style) {