diff --git a/apps/red-ui/src/app/dialogs/dialog.service.ts b/apps/red-ui/src/app/dialogs/dialog.service.ts index 5a8dcf645..95af06464 100644 --- a/apps/red-ui/src/app/dialogs/dialog.service.ts +++ b/apps/red-ui/src/app/dialogs/dialog.service.ts @@ -217,4 +217,29 @@ export class DialogService { return ref; } + + openRemoveAnnotationModal( + $event: MouseEvent, + annotation: AnnotationWrapper, + callback: () => void + ) { + $event.stopPropagation(); + + const ref = this._dialog.open(ConfirmationDialogComponent, { + width: '400px', + maxWidth: '90vw' + }); + + ref.afterClosed().subscribe((result) => { + if (result) { + this._manualAnnotationService.removeAnnotation(annotation).subscribe(() => { + if (callback) { + callback(); + } + }); + } + }); + + return ref; + } } diff --git a/apps/red-ui/src/app/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts b/apps/red-ui/src/app/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts index 411e58904..942cc4609 100644 --- a/apps/red-ui/src/app/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts +++ b/apps/red-ui/src/app/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts @@ -32,7 +32,7 @@ export class ManualAnnotationDialogComponent implements OnInit { ) {} async ngOnInit() { - this.isDocumentAdmin = this._appStateService.isActiveProjectOwner; + this.isDocumentAdmin = this._appStateService.isActiveProjectOwnerAndManager; const commentField = this.isDocumentAdmin ? [null] : [null, Validators.required]; this.redactionForm = this._formBuilder.group({ reason: diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html index 60fdc9626..6c03e7761 100644 --- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html +++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html @@ -171,13 +171,15 @@
+