Commit 4f5e49ec authored by Julien BOUYER's avatar Julien BOUYER
Browse files

Merge branch 'feature/UNOTOPLYS-214_update_stores' into 'develop'

UNOTOPLYS-214 feat : refonte des stores

See merge request !52
parents ad911116 3e909962
......@@ -6,10 +6,11 @@ import { setupAxiosInterceptors } from '@/shared/config/axios-interceptor';
import VueCookie from 'vue-cookie';
import Vue2Filters from 'vue2-filters';
import { accountStore } from '@/shared/config/store/account-store';
import { alertStore } from '@/shared/config/store/alert-store';
import { translationStore } from '@/shared/config/store/translation-store';
import { formStore } from '@/shared/config/store/form.store';
import { formStore } from '@/shared/config/store/admin/form-store';
import { accountStore } from '@/shared/config/store/common/account-store';
import { alertStore } from '@/shared/config/store/common/alert-store';
import { translationStore } from '@/shared/config/store/common/translation-store';
import { frontFormStore } from '@/shared/config/store/front/front-form.store';
const dateTimeFormats: DateTimeFormats = {
fr: {
......@@ -59,10 +60,11 @@ export function initVueXStore(vue) {
vue.use(Vuex);
return new Vuex.Store({
modules: {
formStore,
accountStore,
alertStore,
translationStore,
formStore,
frontFormStore,
},
});
}
import { Module } from 'vuex';
export const formStore: Module<any, any> = {
state: {
form: null,
screen: null,
screenList: [],
},
getters: {
form: state => state.form,
screen: state => state.screen,
screenList: state => state.screenList,
},
actions: {},
mutations: {
setForm(state, form) {
state.form = form;
},
setScreen(state, screen) {
state.screen = screen;
},
setScreenList(state, screenList) {
state.screenList = screenList;
},
},
};
import {Module} from 'vuex';
import { Module } from 'vuex';
export const alertStore: Module<any, any> = {
state: {
......
import { Module } from 'vuex';
import { IAnswerFront } from '@/front/model/answer-front.model';
export const formStore: Module<any, any> = {
export const frontFormStore: Module<any, any> = {
state: {
sessionId: '',
referenceForm: '',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment