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
|
||||
);
|
||||
this.styleOptions = result?.data;
|
||||
if (this.styleOptions.length === 1) this.selectedStyle = this.styleOptions[0];
|
||||
else this.selectedStyle = null;
|
||||
if (this.styleOptions.length === 1) {
|
||||
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 {
|
||||
this.styleOptions = [];
|
||||
this.selectedStyle = null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue