mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
social actions ordered in store
This commit is contained in:
parent
0a05dcd753
commit
a4baf89a6a
@ -54,19 +54,19 @@
|
|||||||
{{ $t('activity.select_first_a_social_issue') }}
|
{{ $t('activity.select_first_a_social_issue') }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<template v-else-if="socialActionsList.length > 0">
|
<template v-else-if="socialActionsList.length > 0">
|
||||||
<check-social-action
|
<check-social-action
|
||||||
v-if="socialIssuesSelected.length || socialActionsSelected.length"
|
v-if="socialIssuesSelected.length || socialActionsSelected.length"
|
||||||
v-for="action in socialActionsList"
|
v-for="action in socialActionsList"
|
||||||
:key="action.id"
|
:key="action.id"
|
||||||
:action="action"
|
:action="action"
|
||||||
:selection="socialActionsSelected"
|
:selection="socialActionsSelected"
|
||||||
@updateSelected="updateActionsSelected">
|
@updateSelected="updateActionsSelected">
|
||||||
</check-social-action>
|
</check-social-action>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<span v-else-if="actionAreLoaded && socialActionsList.length === 0" class="inline-choice chill-no-data-statement mt-3">
|
<span v-else-if="actionAreLoaded && socialActionsList.length === 0" class="inline-choice chill-no-data-statement mt-3">
|
||||||
{{ $t('activity.social_action_list_empty') }}
|
{{ $t('activity.social_action_list_empty') }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|
||||||
@ -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;
|
||||||
|
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user