Commit 2aeb92a6 authored by Rémy Marronnier's avatar Rémy Marronnier

store + form validation wip

parent d97faad7
<template> <template>
<v-row> <v-row>
<v-btn @click="back">Revenir</v-btn> <v-btn @click="back">Revenir</v-btn>
<v-btn @click="submit">Continuer</v-btn> <v-btn @click="submitClick" type="submit">Continuer</v-btn>
</v-row> </v-row>
</template> </template>
...@@ -11,6 +11,9 @@ export default { ...@@ -11,6 +11,9 @@ export default {
methods: { methods: {
back() { back() {
this.$router.go(-1); this.$router.go(-1);
},
submitClick() {
this.$emit("submit");
} }
} }
}; };
......
import Vue from 'vue' import Vue from 'vue'
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
//import store from './store/' import store from './store/'
import vuetify from './plugins/vuetify'; import vuetify from './plugins/vuetify';
Vue.config.productionTip = false Vue.config.productionTip = false
...@@ -9,6 +9,6 @@ Vue.config.productionTip = false ...@@ -9,6 +9,6 @@ Vue.config.productionTip = false
new Vue({ new Vue({
vuetify, vuetify,
router, router,
//store, store,
render: h => h(App) render: h => h(App)
}).$mount('#app') }).$mount('#app')
...@@ -68,7 +68,7 @@ export default new Router({ ...@@ -68,7 +68,7 @@ export default new Router({
] ]
}, },
{ {
path: '/aides-possibles', path: '/resultats',
name: 'results', name: 'results',
component: Results component: Results
}, },
......
import ClaraService from "@/api/clara"; //import ClaraService from "@/api/clara";
export default { export default {
state: { state: {
...@@ -22,21 +22,21 @@ export default { ...@@ -22,21 +22,21 @@ export default {
} }
}, },
actions: { actions: {
getFilters({ commit }) { // getFilters({ commit }) {
// promise + fetch + API call // // promise + fetch + API call
}, // },
getResults({ commit, dispatch }) { // getResults({ commit, dispatch }) {
// promise + fetch + API call // // promise + fetch + API call
this.$store.commit("updateChanged", false) // this.$store.commit("updateChanged", false)
}, // },
}, },
getters: { getters: {
eligible: state => state.eligible, eligible: state => state.eligible,
eligible_quantity: state => state.eligible.length(), eligible_quantity: state => state.eligible.length,
non_eligible: state => state.nonEligible, non_eligible: state => state.nonEligible,
non_eligible_quantity: state => state.nonEligible.length(), non_eligible_quantity: state => state.nonEligible.length,
//uncertain: state => state.uncertain, //uncertain: state => state.uncertain,
filters: state => state.filters, filters: state => state.filters,
filters_quantity: state => state.filters.length(), filters_quantity: state => state.filters.length,
}, },
} }
\ No newline at end of file
import ClaraService from "@/api/clara"; //import ClaraService from "@/api/clara";
export default { export default {
state: { state: {
...@@ -48,9 +48,9 @@ export default { ...@@ -48,9 +48,9 @@ export default {
}, },
actions: { actions: {
submitInscription({ commit }, inscription_period) { // submitInscription({ commit }, inscription_period) {
}, // },
submitAddress({ commit, state }, location_citycode) { submitAddress({ commit, state }, location_citycode) {
if (location_citycode != state.location_citycode) { if (location_citycode != state.location_citycode) {
commit('updateLocationCitycode', location_citycode) commit('updateLocationCitycode', location_citycode)
...@@ -63,7 +63,6 @@ export default { ...@@ -63,7 +63,6 @@ export default {
commit('updateAge', age) commit('updateAge', age)
commit('updateChanged', true) commit('updateChanged', true)
} }
this.$router.push('grade')
}, },
submitAllocation({ commit, state }, allocation_type) { submitAllocation({ commit, state }, allocation_type) {