diff --git a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.html b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.html
index 8c519683f..de7e54be2 100644
--- a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.html
+++ b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.html
@@ -1,8 +1,19 @@
+
+
+
@@ -13,6 +24,7 @@
*ngIf="canUndoAnnotation"
type="dark-bg"
icon="red:undo"
+ tooltipPosition="before"
tooltip="annotation-actions.undo"
>
@@ -22,6 +34,7 @@
type="dark-bg"
icon="red:close"
*ngIf="canRejectSuggestion"
+ tooltipPosition="before"
tooltip="annotation-actions.reject-suggestion"
>
@@ -31,6 +44,7 @@
type="dark-bg"
icon="red:trash"
*ngIf="canDirectlySuggestToRemoveAnnotation"
+ tooltipPosition="before"
tooltip="annotation-actions.suggest-remove-annotation"
>
@@ -40,6 +54,7 @@
(action)="openMenu($event)"
[class.active]="menuOpen"
[matMenuTriggerFor]="menu"
+ tooltipPosition="before"
tooltip="annotation-actions.suggest-remove-annotation"
type="dark-bg"
icon="red:trash"
diff --git a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.scss b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.scss
index d9aa71af1..ced12d2c4 100644
--- a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.scss
+++ b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.scss
@@ -13,6 +13,10 @@
padding-top: 8px;
background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #f9fafb, #f9fafb, #f9fafb);
+ redaction-circle-button {
+ display: block;
+ }
+
.confirm.active {
background-color: $grey-2;
}
diff --git a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.ts b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.ts
index f875544e0..0fb865b73 100644
--- a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.ts
+++ b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.ts
@@ -16,7 +16,7 @@ export class AnnotationActionsComponent implements OnInit {
@Input() annotation: AnnotationWrapper;
@Input() canPerformAnnotationActions: boolean;
- @Output() annotationsChanged = new EventEmitter();
+ @Output() annotationsChanged = new EventEmitter
();
suggestionType: TypeValue;
menuOpen: boolean;
@@ -46,11 +46,18 @@ export class AnnotationActionsComponent implements OnInit {
}
get canDirectlySuggestToRemoveAnnotation() {
- return this.annotation.isHint || (this.annotation.isManual && this.permissionsService.isManagerAndOwner() && !this.canUndoAnnotation);
+ return (
+ (this.annotation.isHint || (this.annotation.isManual && this.permissionsService.isManagerAndOwner() && !this.canUndoAnnotation)) &&
+ !this.annotation.isRecommendation
+ );
}
get requiresSuggestionRemoveMenu() {
- return this.annotation.isRedacted || this.annotation.isIgnored;
+ return (this.annotation.isRedacted || this.annotation.isIgnored) && !this.annotation.isRecommendation;
+ }
+
+ get canConvertRecommendationToAnnotation() {
+ return this.annotation.isRecommendation;
}
get canUndoAnnotation() {
@@ -84,8 +91,8 @@ export class AnnotationActionsComponent implements OnInit {
private _processObsAndEmit(obs: Observable) {
obs.subscribe(
- () => {
- this.annotationsChanged.emit();
+ (data) => {
+ this.annotationsChanged.emit(!!data?.annotationId);
},
() => {
this.annotationsChanged.emit();
@@ -109,4 +116,9 @@ export class AnnotationActionsComponent implements OnInit {
get dictionaryColor() {
return this.appStateService.getDictionaryColor('suggestion-add-dictionary');
}
+
+ convertRecommendationToAnnotation($event: any, annotation: AnnotationWrapper) {
+ $event.stopPropagation();
+ this._processObsAndEmit(this._manualAnnotationService.addRecommendation(annotation));
+ }
}
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 fb9ea1e45..7ce8378cd 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
@@ -200,7 +200,7 @@