diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index c2bb7923d..c44691702 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -66,6 +66,7 @@ export class AnnotationWrapper implements IListable { isRemovedLocally = false; hiddenInWorkload = false; lastManualChange: ManualRedactionType; + entry: IEntityLogEntry; get isRuleBased() { return this.engines.includes(LogEntryEngines.RULE); @@ -275,10 +276,6 @@ export class AnnotationWrapper implements IListable { const lastRelevantManualChange = logEntry.manualChanges?.at(-1); annotationWrapper.lastManualChange = lastRelevantManualChange?.manualRedactionType; - if (annotationWrapper.pending) { - const removedEntry = allLogEntries.find((e: IEntityLogEntry) => e.id === annotationWrapper.id); - logEntry.oldState = removedEntry?.state; - } annotationWrapper.superType = SuperTypeMapper[logEntry.entryType][logEntry.state](logEntry); annotationWrapper.superTypeLabel = annotationTypesTranslations[annotationWrapper.superType]; @@ -295,7 +292,7 @@ export class AnnotationWrapper implements IListable { annotationWrapper.color = dictionary ? (dictionary[colorKey] as string) : (defaultColors[defaultColor] as string); } - annotationWrapper['entry'] = logEntry; + annotationWrapper.entry = logEntry; return annotationWrapper; } diff --git a/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts b/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts index 6f4db12a1..177099cd6 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts @@ -228,6 +228,12 @@ export class FileDataService extends EntitiesService= 0; i--) { + if (annotations[i].id === pendingEntry.id) { + return annotations[i]; + } + } + } } diff --git a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts index e167d6a94..b888686b6 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts +++ b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts @@ -132,7 +132,7 @@ export class AnnotationDrawService { return; } - if (annotationWrapper.pending) { + if (annotationWrapper.pending && annotationWrapper.id.includes('pending')) { const polylineAnnot = this._pdf.polyline(); polylineAnnot.ReadOnly = true; polylineAnnot.StrokeColor = this.convertColor(annotationWrapper.color); @@ -140,8 +140,6 @@ export class AnnotationDrawService { polylineAnnot.Id = annotationWrapper.id; polylineAnnot.PageNumber = pageNumber; polylineAnnot.Opacity = polylineAnnot.Id.endsWith('pending') ? 0 : 0.5; - console.log(polylineAnnot.Id); - console.log(polylineAnnot.Id.split('-')); const points = this.#computePolylinePoints(annotationWrapper.positions, annotationWrapper.pageNumber); for (let i = 0; i < points.length; i++) { @@ -190,7 +188,7 @@ export class AnnotationDrawService { annotation.setCustomData('skipped', String(annotationWrapper.isSkipped)); annotation.setCustomData('changeLog', String(annotationWrapper.isChangeLogEntry)); annotation.setCustomData('changeLogRemoved', String(annotationWrapper.isRemoved)); - annotation.setCustomData('opacity', String(!annotationWrapper.pending ? annotation.Opacity : annotation.Opacity / 2)); + annotation.setCustomData('opacity', String(annotation.Opacity)); const redactionColor = this._defaultColorsService.getColor(dossierTemplateId, 'previewColor'); annotation.setCustomData('redactionColor', String(redactionColor));