From 6bbf300168f4d69d0d32beb6bae83bccd22f630c Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Sun, 8 Nov 2020 19:30:06 +0200 Subject: [PATCH] fixed bugs --- apps/red-ui/src/app/dialogs/dialog.service.ts | 4 +- .../manual-annotation-dialog.component.ts | 40 ++++++------------- .../annotation-actions.component.html | 8 +--- .../annotation-actions.component.ts | 8 ---- 4 files changed, 16 insertions(+), 44 deletions(-) diff --git a/apps/red-ui/src/app/dialogs/dialog.service.ts b/apps/red-ui/src/app/dialogs/dialog.service.ts index 4fcb1aed4..182759fda 100644 --- a/apps/red-ui/src/app/dialogs/dialog.service.ts +++ b/apps/red-ui/src/app/dialogs/dialog.service.ts @@ -110,7 +110,7 @@ export class DialogService { ref.afterClosed().subscribe((result) => { if (result) { this._manualAnnotationService - .acceptSuggestion(annotation.id) + .approveRequest(annotation.id) .subscribe((acceptResult) => { if (callback) { callback(acceptResult); @@ -136,7 +136,7 @@ export class DialogService { ref.afterClosed().subscribe((result) => { if (result) { - this._manualAnnotationService.rejectSuggestion(annotation).subscribe(() => { + this._manualAnnotationService.declineOrRemoveRequest(annotation).subscribe(() => { rejectCallback(); }); } 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 643b12a66..d1b57c1c4 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 @@ -60,34 +60,18 @@ export class ManualAnnotationDialogComponent implements OnInit { handleAddRedaction() { this._enhanceManualRedaction(this.manualRedactionEntryWrapper.manualRedactionEntry); - - if (this.isDictionaryRequest) { - this._manualAnnotationService - .makeDictionaryEntry(this.manualRedactionEntryWrapper.manualRedactionEntry) - .subscribe( - (response) => { - this.dialogRef.close( - new ManualAnnotationResponse(this.manualRedactionEntryWrapper, response) - ); - }, - () => { - this.dialogRef.close(); - } - ); - } else { - this._manualAnnotationService - .makeRedaction(this.manualRedactionEntryWrapper.manualRedactionEntry) - .subscribe( - (response) => { - this.dialogRef.close( - new ManualAnnotationResponse(this.manualRedactionEntryWrapper, response) - ); - }, - () => { - this.dialogRef.close(); - } - ); - } + this._manualAnnotationService + .addAnnotation(this.manualRedactionEntryWrapper.manualRedactionEntry) + .subscribe( + (response) => { + this.dialogRef.close( + new ManualAnnotationResponse(this.manualRedactionEntryWrapper, response) + ); + }, + () => { + this.dialogRef.close(); + } + ); } get title() { 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 278d669a3..f27c78cf4 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,12 +1,8 @@ -
+