mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch '381-uncoherent-display-persons-acc-course-works' into 'master'
381 display previous person participation in acc course work Closes #381 See merge request Chill-Projet/chill-bundles!823
This commit is contained in:
commit
86388a63a8
7
.changes/unreleased/Fixed-20250424-163746.yaml
Normal file
7
.changes/unreleased/Fixed-20250424-163746.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
kind: Fixed
|
||||||
|
body: Display previous participation in acc course work even if the person has left
|
||||||
|
the acc course
|
||||||
|
time: 2025-04-24T16:37:46.970203594+02:00
|
||||||
|
custom:
|
||||||
|
Issue: "381"
|
||||||
|
SchemaChange: No schema change
|
@ -208,6 +208,29 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li
|
||||||
|
v-for="p in getPreviousPersons"
|
||||||
|
:key="p.id"
|
||||||
|
class="alert alert-danger"
|
||||||
|
>
|
||||||
|
<div class="form-check">
|
||||||
|
<input
|
||||||
|
v-model="personsPicked"
|
||||||
|
:value="p.id"
|
||||||
|
type="checkbox"
|
||||||
|
class="me-2 form-check-input"
|
||||||
|
:id="'person_check' + p.id"
|
||||||
|
/>
|
||||||
|
<label :for="'person_check' + p.id" class="form-check-label">
|
||||||
|
<person-text :person="p"></person-text>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
><i class="fa fa-warning"></i> {{
|
||||||
|
$t("warning_previous_persons")
|
||||||
|
}}</span
|
||||||
|
>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -497,6 +520,8 @@ const i18n = {
|
|||||||
notification_notify_referrer: "Notifier le référent",
|
notification_notify_referrer: "Notifier le référent",
|
||||||
notification_notify_any: "Notifier d'autres utilisateurs",
|
notification_notify_any: "Notifier d'autres utilisateurs",
|
||||||
notification_send: "Envoyer une notification",
|
notification_send: "Envoyer une notification",
|
||||||
|
warning_previous_persons:
|
||||||
|
"Cet usager n'est désormais plus concerné par le parcours, bien qu'il ait été associé à l'action par le passé.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -583,6 +608,7 @@ export default {
|
|||||||
"hasHandlingThirdParty",
|
"hasHandlingThirdParty",
|
||||||
"hasThirdParties",
|
"hasThirdParties",
|
||||||
"hasReferrers",
|
"hasReferrers",
|
||||||
|
"getPreviousPersons",
|
||||||
]),
|
]),
|
||||||
classicEditor: () => ClassicEditor,
|
classicEditor: () => ClassicEditor,
|
||||||
editorConfig: () => classicEditorConfig,
|
editorConfig: () => classicEditorConfig,
|
||||||
|
@ -87,6 +87,11 @@ const store = createStore({
|
|||||||
|
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
|
getPreviousPersons(state) {
|
||||||
|
return state.personsPicked.filter(
|
||||||
|
(p) => !state.personsReachables.map((pr) => pr.id).includes(p.id),
|
||||||
|
);
|
||||||
|
},
|
||||||
buildPayload(state) {
|
buildPayload(state) {
|
||||||
return {
|
return {
|
||||||
type: "accompanying_period_work",
|
type: "accompanying_period_work",
|
||||||
@ -607,8 +612,7 @@ const store = createStore({
|
|||||||
submit({ getters, state, commit }, callback) {
|
submit({ getters, state, commit }, callback) {
|
||||||
let payload = getters.buildPayload,
|
let payload = getters.buildPayload,
|
||||||
params = new URLSearchParams({ entity_version: state.version }),
|
params = new URLSearchParams({ entity_version: state.version }),
|
||||||
url = `/api/1.0/person/accompanying-course/work/${state.work.id}.json?${params}`,
|
url = `/api/1.0/person/accompanying-course/work/${state.work.id}.json?${params}`;
|
||||||
errors = [];
|
|
||||||
commit("setIsPosting", true);
|
commit("setIsPosting", true);
|
||||||
|
|
||||||
// console.log('the social action', payload);
|
// console.log('the social action', payload);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user