From 7ccad5c34f8fba16ca63fb3db6608653af0fab2e Mon Sep 17 00:00:00 2001 From: Timo Date: Tue, 13 Jul 2021 15:29:44 +0300 Subject: [PATCH] more work on integrating backend redaction log --- apps/red-ui/src/app/models/file/file-data.model.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/apps/red-ui/src/app/models/file/file-data.model.ts b/apps/red-ui/src/app/models/file/file-data.model.ts index 40607a165..d68331fb9 100644 --- a/apps/red-ui/src/app/models/file/file-data.model.ts +++ b/apps/red-ui/src/app/models/file/file-data.model.ts @@ -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; } }