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 8aeb14511..c207e6656 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 @@ -146,7 +146,10 @@ export class FileDataModel { // a redaction-log entry is marked as a reason for another entry - hide it if (markedAsReasonRedactionLogEntry) { - if (!(this._hasAlreadyBeenProcessed(manual) && manual.status === 'APPROVED')) { + if ( + !this._hasBeenProcessed(manual) || + !['APPROVED', 'DECLINED'].includes(manual.status) + ) { markedAsReasonRedactionLogEntry.hidden = true; } } @@ -169,7 +172,7 @@ export class FileDataModel { } else { // dictionary modifying requests that have been processed already updated // the dictionary and should not be drawn - if (manual.addToDictionary && this._hasAlreadyBeenProcessed(manual)) { + if (manual.addToDictionary && this._hasBeenProcessed(manual)) { return; } @@ -219,7 +222,7 @@ export class FileDataModel { relevantRedactionLogEntry.status = idToRemove.status; } - if (this._hasAlreadyBeenProcessed(idToRemove)) { + if (this._hasBeenProcessed(idToRemove)) { if (idToRemove.status === 'DECLINED') { relevantRedactionLogEntry.status = null; } @@ -242,7 +245,7 @@ export class FileDataModel { relevantRedactionLogEntry.status = legalBasisChange.status; } - if (this._hasAlreadyBeenProcessed(legalBasisChange)) { + if (this._hasBeenProcessed(legalBasisChange)) { if (legalBasisChange.status === 'DECLINED') { relevantRedactionLogEntry.status = null; } @@ -295,7 +298,7 @@ export class FileDataModel { return result; } - private _hasAlreadyBeenProcessed(entry: ManualRedactionEntry | IdRemoval): boolean { + private _hasBeenProcessed(entry: ManualRedactionEntry | IdRemoval): boolean { return !entry.processedDate ? false : new Date(entry.processedDate).getTime() <