This commit is contained in:
Jeremy Zimmerman 2022-11-09 15:50:17 -05:00
parent be1c5aa215
commit b769e74b6c
5 changed files with 6 additions and 48 deletions

View file

@ -36,14 +36,6 @@
export default {
name: 'vehicle-make',
setup()
{
const mainStore = useMainStore()
return {
mainStore,
}
},
data() {
return {
selectedMake: null,
@ -99,7 +91,7 @@
},
watch: {
selectedMake(make) {
this.mainStore.updateVehicleMake(make);
this.mainStore.order.vehicle.make = make;
this.$router.navigate(
this.navigationScenarios.SELECTED_MAKE,
this.$route

View file

@ -31,14 +31,6 @@
export default {
name: "vehicle-model",
setup()
{
const mainStore = useMainStore()
return {
mainStore,
}
},
data() {
return {
selectedModel: null,
@ -92,7 +84,7 @@
watch: {
selectedModel(model) {
this.mainStore.updateVehicleModel(model);
this.mainStore.order.vehicle.model = model;
this.$router.navigate(
this.navigationScenarios.SELECTED_MODEL,
this.$route

View file

@ -34,14 +34,6 @@ import { useMainStore } from "@/store";
export default {
name: "vehicle-style",
setup()
{
const mainStore = useMainStore()
return {
mainStore,
}
},
data() {
return {
selectedStyle: null,
@ -86,7 +78,7 @@ export default {
watch: {
selectedStyle(style) {
this.mainStore.updateVehicleStyle(style);
this.mainStore.order.vehicle.style = style;
this.$router.navigate(
this.navigationScenarios.SELECTED_STYLE,
this.$route

View file

@ -32,14 +32,6 @@
export default {
name: "vehicle-year",
setup()
{
const mainStore = useMainStore()
return {
mainStore,
}
},
data() {
return {
selectedYear: null,
@ -78,7 +70,7 @@
watch: {
selectedYear(year) {
const parsedYear = parseInt(year);
this.mainStore.updateVehicleYear(parsedYear);
this.mainStore.order.vehicle.year = parsedYear;
this.$router.navigate(
this.navigationScenarios.SELECTED_YEAR,
this.$route

View file

@ -1,7 +1,6 @@
import { mapStores } from "pinia";
import { useMainStore } from "@/store";
;
import { navigationScenarios } from "@/router/router-constants/navigation-scenarios";
import { vehicleCategories } from "@/constants/vehicle-categories.js";
import { queryStrings } from "@/constants/query-strings";
@ -45,13 +44,4 @@ export default {
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]);
});
}
}
};