This commit is contained in:
Kulbhushan Kaushik 2022-11-02 09:01:53 -04:00
parent 755627a0f5
commit 75eef92707
3 changed files with 17 additions and 11 deletions

View file

@ -8,6 +8,7 @@
cmsWidgetName="SiteSubHeaderWidget"
:hasBackButton="true"
@click-event="backButtonAction"
backButtonAccessibleText = "Change vehicle make"
/>
<div class="fade-on-route-transition">
<modelQuestion v-model="selectedModel" ref="modelQuestion" cmsWidgetName="VehicleModelQuestion" />
@ -35,8 +36,6 @@
selectedModel: null,
};
},
computed: {},
async beforeRouteEnter(to, from, next) {
// Call APIs
const cmsContentPromise = fetchCmsContentForPage(to.query.issPage);
@ -67,13 +66,20 @@
},
methods: {
backButtonAction() {
backButtonAction() {
// route to move backwards
this.$router.navigate(
this.navigationScenarios.CLICKED_BACK,
this.$route
);
},
this.$router.navigate(
this.navigationScenarios.CLICKED_BACK,
this.$route
);
},
arePagePrerequisitesValid()
{
if(this.mainStore.order.vehicle.make){
return true;
}
return false;
},
},
watch: {

View file

@ -38,7 +38,7 @@ const routingTable = function(store) {
destinationIssPageValue: issPageValues.VEHICLE_MAKE,
},
{
scenario: navigationScenarios.SELC,
scenario: navigationScenarios.SELECTED_MODEL,
destinationUrl: "https://www.google.com"
}
]

View file

@ -1,4 +1,4 @@
import { defineStore, createPinia } from "pinia";
import { defineStore } from "pinia";
import { endpoints } from "@/constants/endpoints.js";
import globalMethods from "@/global-methods";
import { applicationConfig } from "@/constants/application-config";
@ -94,7 +94,7 @@ export const useMainStore = defineStore({
getVehicleModels() {
return globalMethods.callHttpClient({
method: endpoints.GetVehicleModels.method,
endpoint: endpoints.GetVehicleModels.url + this.order.vehicle.year + this.order.vehicle.make,
endpoint: `${endpoints.GetVehicleModels.url}/${this.order.vehicle.year}/${this.order.vehicle.make}`,
payload: {},
});
},