CSR-1652
This commit is contained in:
parent
9ec4c2aef5
commit
92b62768f1
1 changed files with 18 additions and 2 deletions
|
|
@ -264,8 +264,24 @@ export default {
|
||||||
model
|
model
|
||||||
);
|
);
|
||||||
this.styleOptions = result?.data;
|
this.styleOptions = result?.data;
|
||||||
if (this.styleOptions.length === 1) this.selectedStyle = this.styleOptions[0];
|
if (this.styleOptions.length === 1) {
|
||||||
else this.selectedStyle = null;
|
const sameStyle = this.selectedStyle === this.styleOptions[0];
|
||||||
|
this.selectedStyle = this.styleOptions[0];
|
||||||
|
if (sameStyle) {
|
||||||
|
this.carId = null;
|
||||||
|
const result = await this.getVehicle(
|
||||||
|
this.selectedYear,
|
||||||
|
this.selectedMake,
|
||||||
|
this.selectedModel,
|
||||||
|
this.selectedStyle
|
||||||
|
);
|
||||||
|
this.carId = result?.data.carId;
|
||||||
|
this.category = result?.data.category;
|
||||||
|
this.imageUrl = result?.data.imageUrl;
|
||||||
|
this.imageVifNumber = result?.data.imageVifNumber;
|
||||||
|
this.imageVifColor = result?.data.imageVifColor;
|
||||||
|
}
|
||||||
|
} else this.selectedStyle = null;
|
||||||
} else {
|
} else {
|
||||||
this.styleOptions = [];
|
this.styleOptions = [];
|
||||||
this.selectedStyle = null;
|
this.selectedStyle = null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue