annotate client/src/morphtool/store.js @ 991:a301d240905f

Decoupled import job creation and job execution with a factory function. This is needed for persistence purposes.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 22 Oct 2018 10:45:17 +0200
parents 3da707172772
children ca628dce90dd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
975
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 const MorphStore = {
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
2 namespaced: true,
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
3 state: {
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
4 selectedMorph: null
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
5 },
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
6 getters: {
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
7 selectedMorph: state => {
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
8 return state.selectedMorph;
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
9 }
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
10 },
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
11 mutations: {
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
12 setSelectedMorph: (state, selectedMorph) => {
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
13 state.selectedMorph = selectedMorph;
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
14 }
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
15 }
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
16 };
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
17
3da707172772 refac: removed technical debt
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
18 export default MorphStore;