diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue index ea0f2e878..6429f9a72 100644 --- a/src/layouts/vehicle/vehicle.vue +++ b/src/layouts/vehicle/vehicle.vue @@ -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; },