40 lines
760 B
JavaScript
40 lines
760 B
JavaScript
import Vue from "vue";
|
|
import Vuex from "vuex";
|
|
|
|
Vue.use(Vuex);
|
|
|
|
export default new Vuex.Store({
|
|
state: {
|
|
site: null,
|
|
tutors: [],
|
|
description: null,
|
|
type: null,
|
|
whom: null
|
|
},
|
|
mutations: {
|
|
setSite(state, newSite) {
|
|
state.site = newSite;
|
|
},
|
|
setTutors(state, newTutors) {
|
|
state.tutors = newTutors;
|
|
},
|
|
setDescription(state, newDescription) {
|
|
state.description = newDescription;
|
|
},
|
|
setType(state, newType) {
|
|
state.type = newType;
|
|
},
|
|
setWhom(state, newWhom) {
|
|
state.whom = newWhom;
|
|
},
|
|
resetStore(state) {
|
|
state.site = null;
|
|
state.tutors = [];
|
|
state.description = null;
|
|
state.type = null;
|
|
state.whom = null;
|
|
}
|
|
},
|
|
actions: {}
|
|
});
|