mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
AccompanyingCourseWorkEdit: download existing documents
This commit is contained in:
parent
82052f5d70
commit
dbc604d84a
@ -11,6 +11,8 @@ and this project adheres to
|
|||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
<!-- write down unreleased development here -->
|
<!-- write down unreleased development here -->
|
||||||
|
|
||||||
|
* [person] AccompanyingCourseWorkEdit: fix deleting evaluation documents (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/546)
|
||||||
* [person] AccompanyingCourseWorkEdit: download existing documents (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/512)
|
* [person] AccompanyingCourseWorkEdit: download existing documents (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/512)
|
||||||
* [person] AccompanyingCourseWorkEdit: replace document by a new one (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/511)
|
* [person] AccompanyingCourseWorkEdit: replace document by a new one (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/511)
|
||||||
|
|
||||||
|
@ -131,9 +131,9 @@ const store = createStore({
|
|||||||
endDate: e.endDate !== null ? ISOToDatetime(e.endDate.datetime) : null,
|
endDate: e.endDate !== null ? ISOToDatetime(e.endDate.datetime) : null,
|
||||||
maxDate: e.maxDate !== null ? ISOToDatetime(e.maxDate.datetime) : null,
|
maxDate: e.maxDate !== null ? ISOToDatetime(e.maxDate.datetime) : null,
|
||||||
warningInterval: e.warningInterval !== null ? intervalISOToDays(e.warningInterval) : null,
|
warningInterval: e.warningInterval !== null ? intervalISOToDays(e.warningInterval) : null,
|
||||||
documents: e.documents.map((d, dindex) => {
|
documents: e.documents.map((d, docIndex) => {
|
||||||
return Object.assign(d, {
|
return Object.assign(d, {
|
||||||
key: index
|
key: docIndex
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
@ -214,11 +214,9 @@ const store = createStore({
|
|||||||
},
|
},
|
||||||
removeDocument(state, {key, document}) {
|
removeDocument(state, {key, document}) {
|
||||||
let evaluation = state.evaluationsPicked.find(e => e.key === key);
|
let evaluation = state.evaluationsPicked.find(e => e.key === key);
|
||||||
|
|
||||||
if (evaluation === undefined) {
|
if (evaluation === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
evaluation.documents = evaluation.documents.filter(d => d.key !== document.key);
|
evaluation.documents = evaluation.documents.filter(d => d.key !== document.key);
|
||||||
},
|
},
|
||||||
replaceDocument(state, payload) {
|
replaceDocument(state, payload) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user