From 417010ae9b65acd5bedb27e988f99e83eb72494c Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Fri, 28 Jan 2022 13:57:36 +0200 Subject: [PATCH] corrections --- .../annotations-list.component.ts | 1 + .../services/annotation-draw.service.ts | 2 +- .../services/manual-annotation.service.ts | 19 +++++++------------ 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.ts index 19877e3bc..bffbe67f4 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.ts @@ -39,6 +39,7 @@ export class AnnotationsListComponent implements OnChanges { } annotationClicked(annotation: AnnotationWrapper, $event: MouseEvent): void { + console.log(annotation); if (($event?.target as IqserEventTarget)?.localName === 'input') { return; } diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/services/annotation-draw.service.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/services/annotation-draw.service.ts index e7ce07d5f..29a8f96af 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/services/annotation-draw.service.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/services/annotation-draw.service.ts @@ -147,7 +147,7 @@ export class AnnotationDrawService { const dossierTemplateId = this._dossiersService.find(dossierId).dossierTemplateId; let annotation; - if (annotationWrapper.value === 'Rectangle' || annotationWrapper.isImage) { + if (annotationWrapper.rectangle || annotationWrapper.isImage) { annotation = new activeViewer.Core.Annotations.RectangleAnnotation(); const pageHeight = activeViewer.Core.documentViewer.getPageHeight(pageNumber); const firstPosition = annotationWrapper.positions[0]; diff --git a/apps/red-ui/src/app/modules/dossier/services/manual-annotation.service.ts b/apps/red-ui/src/app/modules/dossier/services/manual-annotation.service.ts index f474a6535..247d46473 100644 --- a/apps/red-ui/src/app/modules/dossier/services/manual-annotation.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/manual-annotation.service.ts @@ -193,18 +193,13 @@ export class ManualAnnotationService extends GenericService if (this._permissionsService.isApprover(this._dossier(file))) { // if it was something manual simply decline the existing request - if (annotationWrapper.type === 'manual') { - mode = 'undo'; - body = annotationWrapper.id; - } else { - mode = 'remove'; - body = { - annotationId: annotationWrapper.id, - removeFromDictionary, - comment: comment, - }; - removeDict = removeFromDictionary; - } + mode = 'remove'; + body = { + annotationId: annotationWrapper.id, + removeFromDictionary, + comment: comment, + }; + removeDict = removeFromDictionary; } else { mode = 'request-remove'; body = {