fixed backend issue

This commit is contained in:
Timo 2021-02-07 22:29:23 +02:00
parent f5ca60b036
commit ef83c5b22a

View File

@ -43,7 +43,7 @@ export class FileDataModel {
});
}
let visibleAnnotations = allAnnotations.filter((annotation) => {
const visibleAnnotations = allAnnotations.filter((annotation) => {
if (viewMode === 'STANDARD') {
return !annotation.isChangeLogRemoved;
} else if (viewMode === 'DELTA') {
@ -63,11 +63,15 @@ export class FileDataModel {
let result: RedactionLogEntryWrapper[] = [];
this.redactionChangeLog?.redactionLogEntry?.forEach((changeLogEntry) => {
if (changeLogEntry.id === '48a8c973d0ef86bda58bf9722b931fc2') {
console.log(changeLogEntry);
// const existingChangeLogEntry = this.redactionChangeLog.redactionLogEntry.find((rle) => rle.id === redactionLogEntry.id);
}
if (changeLogEntry.changeType === 'REMOVED') {
// Fix backend issue where some annotations are both added and removed
const sameEntryExistsAsAdd = !!this.redactionChangeLog.redactionLogEntry.find(
(rle) => rle.id === changeLogEntry.id && rle.changeType === 'ADDED'
);
if (sameEntryExistsAsAdd) {
return;
}
const redactionLogEntryWrapper: RedactionLogEntryWrapper = { actionPendingReanalysis: false };
Object.assign(redactionLogEntryWrapper, changeLogEntry);