Skip to content
This repository was archived by the owner on Jul 11, 2019. It is now read-only.

Commit 587a202

Browse files
committedMay 27, 2018
Add selectedAssociation to vuex store
1 parent 15e8837 commit 587a202

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed
 

‎src/vuex/actions.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@ export default {
99

1010
setUserAssociations(context, associations) {
1111
context.commit("SET_USER_ASSOCIATIONS", associations);
12+
},
13+
14+
setSelectedAssociation(context, association) {
15+
context.commit("SET_SELECTED_ASSOCIATION", association);
1216
}
1317
};

‎src/vuex/mutations.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@ export default {
99

1010
SET_USER_ASSOCIATIONS(state, userAssociations) {
1111
state.userAssociations = userAssociations;
12+
},
13+
14+
SET_SELECTED_ASSOCIATION(state, association) {
15+
state.selectedAssociation = association;
1216
}
1317
};

‎src/vuex/state.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export default {
22
user: null,
3-
userAssociations: []
3+
userAssociations: [],
4+
selectedAssociation: null
45
};

0 commit comments

Comments
 (0)
This repository has been archived.