social actions ordered in store

This commit is contained in:
Julie Lenaerts 2022-04-21 21:05:08 +02:00
parent 0a05dcd753
commit a4baf89a6a
2 changed files with 13 additions and 13 deletions

View File

@ -111,7 +111,7 @@ export default {
return this.$store.state.socialIssuesOther; return this.$store.state.socialIssuesOther;
}, },
socialActionsList() { socialActionsList() {
return this.$store.state.socialActionsList; return this.$store.state.socialActionsList
}, },
socialActionsSelected() { socialActionsSelected() {
return this.$store.state.activity.socialActions; return this.$store.state.activity.socialActions;

View File

@ -131,8 +131,8 @@ const store = createStore({
state.socialActionsList = []; state.socialActionsList = [];
}, },
addActionInList(state, action) { addActionInList(state, action) {
//console.log('add action list', action.id);
state.socialActionsList.push(action); state.socialActionsList.push(action);
state.socialActionsList = state.socialActionsList.sort((a, b) => a.ordering-b.ordering);
}, },
updateActionsSelected(state, actions) { updateActionsSelected(state, actions) {
//console.log('update actions selected', actions); //console.log('update actions selected', actions);