{{ titleService.getTitle() }}
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 4788f33e9..0ed60fa91 100644
--- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts
+++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts
@@ -494,7 +494,7 @@ export class AnnotationWrapper implements IListable, Record
{
if (lastManualChange.processed) {
switch (lastManualChange.annotationStatus) {
case LogEntryStatuses.APPROVED:
- return SuperTypes.Redaction;
+ return redactionLogEntry.recommendation ? SuperTypes.Recommendation : SuperTypes.Skipped;
case LogEntryStatuses.DECLINED:
return isHintDictionary ? SuperTypes.Hint : SuperTypes.Skipped;
case LogEntryStatuses.REQUESTED:
diff --git a/apps/red-ui/src/app/models/file/redaction-log.entry.ts b/apps/red-ui/src/app/models/file/redaction-log.entry.ts
index 091bb012f..f6972f3e5 100644
--- a/apps/red-ui/src/app/models/file/redaction-log.entry.ts
+++ b/apps/red-ui/src/app/models/file/redaction-log.entry.ts
@@ -1,5 +1,6 @@
import { IChange, IComment, ILegalBasis, IManualChange, IRectangle, IRedactionLogEntry, LogEntryEngine } from '@red/domain';
+// TODO: this should be removed. Use only AnnotationWrapper class
export class RedactionLogEntry implements IRedactionLogEntry {
readonly changes?: IChange[];
readonly imported?: boolean;
diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html
index 994434dd0..186a88e92 100644
--- a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html
+++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html
@@ -24,7 +24,7 @@
diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts
index 1fd6e3c88..ed7a6845f 100644
--- a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts
+++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts
@@ -1,6 +1,5 @@
import { Component, HostBinding, Input, OnChanges } from '@angular/core';
import { AnnotationWrapper } from '@models/file/annotation.wrapper';
-import { AnnotationsListingService } from '../../services/annotations-listing.service';
import { PdfProxyService } from '../../services/pdf-proxy.service';
import { ScrollableParentViews } from '@iqser/common-ui';
import { ActionsHelpModeKeys } from '../../utils/constants';
@@ -17,17 +16,19 @@ export class AnnotationWrapperComponent implements OnChanges {
@HostBinding('attr.annotation-id') annotationId: string;
@HostBinding('class.active') active = false;
readonly scrollableParentView = ScrollableParentViews.ANNOTATIONS_LIST;
+ actionsHelpModeKey?: string;
- constructor(readonly listingService: AnnotationsListingService, readonly pdfProxyService: PdfProxyService) {}
+ constructor(readonly pdfProxyService: PdfProxyService) {}
ngOnChanges() {
this.annotationId = this.annotation.item.id;
this.active = this.annotation.isSelected;
+ this.actionsHelpModeKey = this.#getActionsHelpModeKey();
}
- getActionsHelpModeKey(annotation: AnnotationWrapper): string {
- const type = annotation?.typeLabel?.split('.')[1];
- const typeValue = annotation?.typeValue;
+ #getActionsHelpModeKey(): string {
+ const type = this.annotation.item.typeLabel?.split('.')[1];
+ const typeValue = this.annotation.item.typeValue;
if (type === 'hint' && (typeValue === 'ocr' || typeValue === 'formula' || typeValue === 'image')) {
return ActionsHelpModeKeys[`${type}-${typeValue}`];
}
diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts
index 2f793856f..7bc381fb2 100644
--- a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts
+++ b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts
@@ -22,7 +22,6 @@ export class AnnotationsListComponent extends HasScrollbarDirective implements O
@Output() readonly pagesPanelActive = new EventEmitter();
readonly earmarkGroups$ = new BehaviorSubject([]);
- protected readonly _trackBy = (index: number, listItem: ListItem) => listItem.item.id;
constructor(
protected readonly _elementRef: ElementRef,
@@ -82,6 +81,8 @@ export class AnnotationsListComponent extends HasScrollbarDirective implements O
return this._viewModeService.isEarmarks && this.earmarkGroups$.value.find(h => h.startIdx === idx);
}
+ protected readonly _trackBy = (index: number, listItem: ListItem) => listItem.item.id;
+
private _updateEarmarksGroups(): void {
if (!this.annotations?.length) {
return;