mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
AccompanyingCourseWorkEdit: download existing documents
This commit is contained in:
@@ -131,9 +131,9 @@ const store = createStore({
|
||||
endDate: e.endDate !== null ? ISOToDatetime(e.endDate.datetime) : null,
|
||||
maxDate: e.maxDate !== null ? ISOToDatetime(e.maxDate.datetime) : 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, {
|
||||
key: index
|
||||
key: docIndex
|
||||
});
|
||||
}),
|
||||
});
|
||||
@@ -214,11 +214,9 @@ const store = createStore({
|
||||
},
|
||||
removeDocument(state, {key, document}) {
|
||||
let evaluation = state.evaluationsPicked.find(e => e.key === key);
|
||||
|
||||
if (evaluation === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
evaluation.documents = evaluation.documents.filter(d => d.key !== document.key);
|
||||
},
|
||||
replaceDocument(state, payload) {
|
||||
|
Reference in New Issue
Block a user