mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
Merge branch 'issue571_ordering_socialactions' into 'master'
Ordering social actions See merge request Chill-Projet/chill-bundles!412
This commit is contained in:
commit
329fb05db0
@ -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.getters.socialActionsListSorted;
|
||||||
},
|
},
|
||||||
socialActionsSelected() {
|
socialActionsSelected() {
|
||||||
return this.$store.state.activity.socialActions;
|
return this.$store.state.activity.socialActions;
|
||||||
|
@ -101,6 +101,9 @@ const store = createStore({
|
|||||||
state.activity.activityType.thirdPartiesVisible !== 0)
|
state.activity.activityType.thirdPartiesVisible !== 0)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
socialActionsListSorted(state) {
|
||||||
|
return [ ...state.socialActionsList].sort((a, b) => a.ordering - b.ordering);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
// SocialIssueAcc
|
// SocialIssueAcc
|
||||||
@ -131,7 +134,6 @@ 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);
|
||||||
},
|
},
|
||||||
updateActionsSelected(state, actions) {
|
updateActionsSelected(state, actions) {
|
||||||
|
@ -40,6 +40,7 @@ class SocialActionNormalizer implements NormalizerAwareInterface, NormalizerInte
|
|||||||
'desactivationDate' => $this->normalizer->normalize($socialAction->getDesactivationDate(), $format, $context),
|
'desactivationDate' => $this->normalizer->normalize($socialAction->getDesactivationDate(), $format, $context),
|
||||||
'title' => $socialAction->getTitle(),
|
'title' => $socialAction->getTitle(),
|
||||||
'issue' => $this->normalizer->normalize($socialAction->getIssue(), $format, $context),
|
'issue' => $this->normalizer->normalize($socialAction->getIssue(), $format, $context),
|
||||||
|
'ordering' => $socialAction->getOrdering(),
|
||||||
];
|
];
|
||||||
|
|
||||||
case 'docgen':
|
case 'docgen':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user