DigitalConsumer.FixMyGlass/src/layouts/FMG/Vehicle/SelectMake.vue
2021-10-26 13:31:55 -04:00

40 lines
No EOL
883 B
Vue

<template>
<div>
<baseTemplate
:currentCarInfo="year"
neededCarInfo="What make is your vehicle?"
:backFunction="goBack"
>
<CarAttributes
:attritbutes="makes"
:selectAttribute="selectMake"
/>
</baseTemplate>
</div>
</template>
<script>
import baseTemplate from '../BaseTemplate';
import CarAttributes from './CarAttributes'
import { mapState } from 'vuex';
export default {
name: 'SelectCar',
computed: {
...mapState(['year', 'makes'])
},
methods: {
selectMake(make){
this.$store.dispatch('selectMake', make);
},
goBack(){
this.$store.state.slideTransition = 'slide_reverse';
this.$router.push('/select-year');
}
},
components: {
baseTemplate,
CarAttributes
}
}
</script>