mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix ordering of social actions
This commit is contained in:
parent
e5209ca6d9
commit
75250402c8
@ -111,7 +111,7 @@ export default {
|
||||
return this.$store.state.socialIssuesOther;
|
||||
},
|
||||
socialActionsList() {
|
||||
return this.$store.state.socialActionsList
|
||||
return this.$store.getters.socialActionsListSorted;
|
||||
},
|
||||
socialActionsSelected() {
|
||||
return this.$store.state.activity.socialActions;
|
||||
|
@ -101,6 +101,9 @@ const store = createStore({
|
||||
state.activity.activityType.thirdPartiesVisible !== 0)
|
||||
);
|
||||
},
|
||||
socialActionsListSorted(state) {
|
||||
return [ ...state.socialActionsList].sort((a, b) => a.ordering - b.ordering);
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
// SocialIssueAcc
|
||||
@ -132,7 +135,6 @@ const store = createStore({
|
||||
},
|
||||
addActionInList(state, action) {
|
||||
state.socialActionsList.push(action);
|
||||
state.socialActionsList = state.socialActionsList.sort((a, b) => a.ordering-b.ordering);
|
||||
},
|
||||
updateActionsSelected(state, actions) {
|
||||
//console.log('update actions selected', actions);
|
||||
|
Loading…
x
Reference in New Issue
Block a user