updated to clear other areas of the vehicle when previous areas are changed
This commit is contained in:
parent
7789d19fbf
commit
b0d91b0224
4 changed files with 19 additions and 5 deletions
|
|
@ -90,7 +90,10 @@
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selectedMake(make) {
|
selectedMake(make) {
|
||||||
this.mainStore.updateVehicleMake(make);
|
if(make != this.mainStore.order.vehicle.make)
|
||||||
|
{
|
||||||
|
this.mainStore.updateVehicle({make, model: null, style: null});
|
||||||
|
}
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
this.navigationScenarios.SELECTED_MAKE,
|
this.navigationScenarios.SELECTED_MAKE,
|
||||||
this.$route
|
this.$route
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,10 @@
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
selectedModel(model) {
|
selectedModel(model) {
|
||||||
this.mainStore.updateVehicleModel(model);
|
if(model != this.mainStore.order.vehicle.model)
|
||||||
|
{
|
||||||
|
this.mainStore.updateVehicle({model, style: null});
|
||||||
|
}
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
this.navigationScenarios.SELECTED_MODEL,
|
this.navigationScenarios.SELECTED_MODEL,
|
||||||
this.$route
|
this.$route
|
||||||
|
|
|
||||||
|
|
@ -77,8 +77,12 @@ export default {
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
selectedStyle(style) {
|
selectedStyle(style) {
|
||||||
this.mainStore.updateVehicle({style})
|
if(style != this.mainStore.order.vehicle.style)
|
||||||
this.mainStore.setVehicle(style).then(() => {
|
{
|
||||||
|
this.mainStore.updateVehicle({style});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.mainStore.setVehicle().then(() => {
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
this.navigationScenarios.SELECTED_STYLE,
|
this.navigationScenarios.SELECTED_STYLE,
|
||||||
this.$route
|
this.$route
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,11 @@
|
||||||
watch: {
|
watch: {
|
||||||
selectedYear(year) {
|
selectedYear(year) {
|
||||||
const parsedYear = parseInt(year);
|
const parsedYear = parseInt(year);
|
||||||
this.mainStore.updateVehicleYear(parsedYear);
|
if(parsedYear != this.mainStore.order.vehicle.year)
|
||||||
|
{
|
||||||
|
this.mainStore.updateVehicle({year: parsedYear, make: null, model: null, style: null});
|
||||||
|
}
|
||||||
|
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
this.navigationScenarios.SELECTED_YEAR,
|
this.navigationScenarios.SELECTED_YEAR,
|
||||||
this.$route
|
this.$route
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue