more work on integrating backend redaction log

This commit is contained in:
Timo 2021-07-13 15:29:44 +03:00
parent 3ad82afc26
commit 7ccad5c34f

View File

@ -52,7 +52,7 @@ export class FileDataModel {
}
private _convertData(): RedactionLogEntryWrapper[] {
const result: RedactionLogEntryWrapper[] = [];
let result: RedactionLogEntryWrapper[] = [];
this.redactionChangeLog?.redactionLogEntry?.forEach(changeLogEntry => {
if (changeLogEntry.changeType === 'REMOVED') {
@ -103,19 +103,12 @@ export class FileDataModel {
result.push(redactionLogEntryWrapper);
});
this.redactionLog.redactionLogEntry = this.redactionLog.redactionLogEntry.filter(
r => reasonAnnotationIds.indexOf(r.id) < 0
);
result = result.filter(r => reasonAnnotationIds.indexOf(r.id) < 0);
result.forEach(redactionLogEntry => {
redactionLogEntry.legalBasisMapping = this.redactionLog.legalBasis;
if (redactionLogEntry.manual) {
console.log(redactionLogEntry);
}
});
console.log(result);
return result;
}
}