Update vehicle.vue
vehicleInProgress
This commit is contained in:
parent
0d5a8d1564
commit
b43191257e
1 changed files with 10 additions and 20 deletions
|
|
@ -59,8 +59,8 @@
|
|||
cmsWidgetName="VehicleBannerWidget"
|
||||
:displayGenericVehicleImage="displayGeneric"
|
||||
:displayVehicleImage="imageUrl"
|
||||
:vehicleCategory="category"
|
||||
:displayUnmatchedVehicleIcon="unmatchedVehicleIcon"
|
||||
:vehicleCategory="category"
|
||||
:displayUnmatchedVehicleIcon="unmatchedVehicleIcon"
|
||||
class="mt-5 mb-3"
|
||||
ref="banner" />
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ export default {
|
|||
makeOptions: [],
|
||||
modelOptions: [],
|
||||
styleOptions: [],
|
||||
//displayGeneric: this.displayGenericFromStore(),
|
||||
vehicleInProgress:false,
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -280,22 +280,22 @@ export default {
|
|||
},
|
||||
async selectedStyle(style) {
|
||||
if (style) {
|
||||
this.imageUrl = "";
|
||||
this.vehicleInProgress = true;
|
||||
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;
|
||||
this.imageVifNumber = result?.data.imageVifNumber;
|
||||
this.imageVifColor = result?.data.imageVifColor;
|
||||
//if (this.imageUrl == null) this.displayGeneric = false;
|
||||
|
||||
} else {
|
||||
this.imageUrl = null;
|
||||
// this.displayGeneric = true;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -305,10 +305,9 @@ export default {
|
|||
else return false;
|
||||
},
|
||||
displayGeneric() {
|
||||
if (this.imageUrl !== null && this.imageUrl !== "") return false;
|
||||
else if(!this.selectedStyle) return true;
|
||||
else if (this.imageUrl == null && this.carId !== null)
|
||||
return false;
|
||||
if (!this.selectedStyle) return true;
|
||||
else if(this.getVehicleInProgress) return true;
|
||||
else if (this.imageUrl == null && this.carId !== null) return false;
|
||||
else return true;
|
||||
},
|
||||
},
|
||||
|
|
@ -320,16 +319,7 @@ export default {
|
|||
model: model,
|
||||
style: style,
|
||||
});
|
||||
},
|
||||
// displayGenericFromStore() {
|
||||
// if (store.getters.vehicle.imageUrl !== null) return false;
|
||||
// else if (
|
||||
// store.getters.vehicle.imageUrl === null &&
|
||||
// store.getters.vehicle.carId !== null
|
||||
// )
|
||||
// return false;
|
||||
// else return true;
|
||||
// },
|
||||
},
|
||||
arePagePrerequisitesValid() {
|
||||
return true;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue