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

View file

@ -38,7 +38,7 @@ const routingTable = function(store) {
destinationIssPageValue: issPageValues.VEHICLE_MAKE, destinationIssPageValue: issPageValues.VEHICLE_MAKE,
}, },
{ {
scenario: navigationScenarios.SELC, scenario: navigationScenarios.SELECTED_MODEL,
destinationUrl: "https://www.google.com" 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 { endpoints } from "@/constants/endpoints.js";
import globalMethods from "@/global-methods"; import globalMethods from "@/global-methods";
import { applicationConfig } from "@/constants/application-config"; import { applicationConfig } from "@/constants/application-config";
@ -94,7 +94,7 @@ export const useMainStore = defineStore({
getVehicleModels() { getVehicleModels() {
return globalMethods.callHttpClient({ return globalMethods.callHttpClient({
method: endpoints.GetVehicleModels.method, 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: {}, payload: {},
}); });
}, },