fix creating a new AccompanyingPeriodWorkEvaluationDocument when replacing the document (the workflow was lost)

This commit is contained in:
2022-05-30 22:43:50 +02:00
parent a4e3ffbe27
commit f92cef02cf
5 changed files with 158 additions and 17 deletions

View File

@@ -232,6 +232,14 @@ const store = createStore({
return;
}
let doc = evaluation.documents.find(d => d.key === payload.oldDocument.key);
if (typeof doc === 'undefined') {
console.error('doc not found');
}
doc.storedObject = payload.document.storedObject;
return;
let newDocument = Object.assign(
payload.document, {
key: evaluation.documents.length + 1,