Updates
This commit is contained in:
parent
be1c5aa215
commit
b769e74b6c
5 changed files with 6 additions and 48 deletions
|
|
@ -36,14 +36,6 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'vehicle-make',
|
name: 'vehicle-make',
|
||||||
setup()
|
|
||||||
{
|
|
||||||
const mainStore = useMainStore()
|
|
||||||
|
|
||||||
return {
|
|
||||||
mainStore,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedMake: null,
|
selectedMake: null,
|
||||||
|
|
@ -99,7 +91,7 @@
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selectedMake(make) {
|
selectedMake(make) {
|
||||||
this.mainStore.updateVehicleMake(make);
|
this.mainStore.order.vehicle.make = make;
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
this.navigationScenarios.SELECTED_MAKE,
|
this.navigationScenarios.SELECTED_MAKE,
|
||||||
this.$route
|
this.$route
|
||||||
|
|
|
||||||
|
|
@ -31,14 +31,6 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "vehicle-model",
|
name: "vehicle-model",
|
||||||
setup()
|
|
||||||
{
|
|
||||||
const mainStore = useMainStore()
|
|
||||||
|
|
||||||
return {
|
|
||||||
mainStore,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedModel: null,
|
selectedModel: null,
|
||||||
|
|
@ -92,7 +84,7 @@
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
selectedModel(model) {
|
selectedModel(model) {
|
||||||
this.mainStore.updateVehicleModel(model);
|
this.mainStore.order.vehicle.model = model;
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
this.navigationScenarios.SELECTED_MODEL,
|
this.navigationScenarios.SELECTED_MODEL,
|
||||||
this.$route
|
this.$route
|
||||||
|
|
|
||||||
|
|
@ -34,14 +34,6 @@ import { useMainStore } from "@/store";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "vehicle-style",
|
name: "vehicle-style",
|
||||||
setup()
|
|
||||||
{
|
|
||||||
const mainStore = useMainStore()
|
|
||||||
|
|
||||||
return {
|
|
||||||
mainStore,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedStyle: null,
|
selectedStyle: null,
|
||||||
|
|
@ -86,7 +78,7 @@ export default {
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
selectedStyle(style) {
|
selectedStyle(style) {
|
||||||
this.mainStore.updateVehicleStyle(style);
|
this.mainStore.order.vehicle.style = style;
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
this.navigationScenarios.SELECTED_STYLE,
|
this.navigationScenarios.SELECTED_STYLE,
|
||||||
this.$route
|
this.$route
|
||||||
|
|
|
||||||
|
|
@ -32,14 +32,6 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "vehicle-year",
|
name: "vehicle-year",
|
||||||
setup()
|
|
||||||
{
|
|
||||||
const mainStore = useMainStore()
|
|
||||||
|
|
||||||
return {
|
|
||||||
mainStore,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedYear: null,
|
selectedYear: null,
|
||||||
|
|
@ -78,7 +70,7 @@
|
||||||
watch: {
|
watch: {
|
||||||
selectedYear(year) {
|
selectedYear(year) {
|
||||||
const parsedYear = parseInt(year);
|
const parsedYear = parseInt(year);
|
||||||
this.mainStore.updateVehicleYear(parsedYear);
|
this.mainStore.order.vehicle.year = parsedYear;
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
this.navigationScenarios.SELECTED_YEAR,
|
this.navigationScenarios.SELECTED_YEAR,
|
||||||
this.$route
|
this.$route
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
import { mapStores } from "pinia";
|
import { mapStores } from "pinia";
|
||||||
import { useMainStore } from "@/store";
|
import { useMainStore } from "@/store";
|
||||||
;
|
|
||||||
import { navigationScenarios } from "@/router/router-constants/navigation-scenarios";
|
import { navigationScenarios } from "@/router/router-constants/navigation-scenarios";
|
||||||
import { vehicleCategories } from "@/constants/vehicle-categories.js";
|
import { vehicleCategories } from "@/constants/vehicle-categories.js";
|
||||||
import { queryStrings } from "@/constants/query-strings";
|
import { queryStrings } from "@/constants/query-strings";
|
||||||
|
|
@ -45,13 +44,4 @@ export default {
|
||||||
return "widget-name-" + this.cmsWidgetName;
|
return "widget-name-" + this.cmsWidgetName;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function encodeUriData(payload) {
|
|
||||||
if (payload && Object.keys(payload).length > 0) {
|
|
||||||
// Loop through the payload and encode the values
|
|
||||||
Object.keys(payload).forEach((key) => {
|
|
||||||
payload[key] = encodeURIComponent(payload[key]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in a new issue