commit
This commit is contained in:
parent
755627a0f5
commit
75eef92707
3 changed files with 17 additions and 11 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const routingTable = function(store) {
|
|||
destinationIssPageValue: issPageValues.VEHICLE_MAKE,
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.SELC,
|
||||
scenario: navigationScenarios.SELECTED_MODEL,
|
||||
destinationUrl: "https://www.google.com"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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: {},
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue