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 a5af43e45..a08479fa6 100644
--- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts
+++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts
@@ -10,7 +10,6 @@ import {
Dictionary,
Earmark,
FalsePositiveSuperTypes,
- IComment,
ILegalBasis,
IManualChange,
IPoint,
@@ -38,7 +37,7 @@ export class AnnotationWrapper implements IListable {
recategorizationType: string;
color: string;
entity: Dictionary;
- comments: IComment[] = [];
+ numberOfComments = 0;
firstTopLeftPoint: IPoint;
id: string;
shortContent: string;
@@ -327,7 +326,6 @@ export class AnnotationWrapper implements IListable {
annotationWrapper.image = redactionLogEntry.image;
annotationWrapper.imported = redactionLogEntry.imported;
annotationWrapper.legalBasisValue = redactionLogEntry.legalBasis;
- annotationWrapper.comments = redactionLogEntry.comments || [];
annotationWrapper.manual = redactionLogEntry.manualChanges?.length > 0;
annotationWrapper.engines = redactionLogEntry.engines;
annotationWrapper.section = redactionLogEntry.section;
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 7482014ca..beba7304b 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
@@ -10,14 +10,14 @@
-
+
+
+
+
+
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 ce271befd..0bd7abc1c 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
@@ -5,6 +5,8 @@ import { ListItem } from '@models/file/list-item';
import { MultiSelectService } from '../../services/multi-select.service';
import { PdfProxyService } from '../../services/pdf-proxy.service';
import { ActionsHelpModeKeys } from '../../utils/constants';
+import { CommentsApiService } from '@services/comments-api.service';
+import { FilePreviewStateService } from '../../services/file-preview-state.service';
@Component({
selector: 'redaction-annotation-wrapper',
@@ -13,15 +15,22 @@ import { ActionsHelpModeKeys } from '../../utils/constants';
})
export class AnnotationWrapperComponent implements OnChanges {
readonly #isDocumine = getConfig().IS_DOCUMINE;
+ readonly #commentsApiService = inject(CommentsApiService);
protected readonly _pdfProxyService = inject(PdfProxyService);
protected readonly _multiSelectService = inject(MultiSelectService);
+ readonly state = inject(FilePreviewStateService);
+ actionsHelpModeKey?: string;
+ showComments = false;
@Input({ required: true }) annotation!: ListItem;
@HostBinding('attr.annotation-id') annotationId: string;
@HostBinding('class.active') active = false;
- actionsHelpModeKey?: string;
ngOnChanges() {
this.annotationId = this.annotation.item.id;
+ const request = this.#commentsApiService.fetch(this.state.dossierId, this.state.fileId, this.annotationId);
+ request.then(comments => {
+ this.annotation.item.numberOfComments = comments.length;
+ });
this.active = this.annotation.isSelected;
this.actionsHelpModeKey = this.#getActionsHelpModeKey();
}
diff --git a/apps/red-ui/src/app/modules/file-preview/components/comments/comments.component.html b/apps/red-ui/src/app/modules/file-preview/components/comments/comments.component.html
index 3b7c4a0a2..06601b714 100644
--- a/apps/red-ui/src/app/modules/file-preview/components/comments/comments.component.html
+++ b/apps/red-ui/src/app/modules/file-preview/components/comments/comments.component.html
@@ -1,39 +1,30 @@
-
-