From b89f4a3f7879cfeb3481e8dbf04760cd04ba8227 Mon Sep 17 00:00:00 2001 From: Edi Cziszter Date: Mon, 10 Jan 2022 17:16:37 +0200 Subject: [PATCH] separate annotation card component in list --- .../annotation-card.component.html | 22 +++++++++++++ .../annotation-card.component.scss | 13 ++++++++ .../annotation-card.component.ts | 17 ++++++++++ ...nnotation-references-dialog.component.html | 2 +- ...nnotation-references-dialog.component.scss | 5 ++- .../annotations-list.component.html | 32 ++++--------------- .../annotations-list.component.scss | 14 -------- .../file-preview.module.ts | 2 ++ 8 files changed, 66 insertions(+), 41 deletions(-) create mode 100644 apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-card/annotation-card.component.html create mode 100644 apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-card/annotation-card.component.scss create mode 100644 apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-card/annotation-card.component.ts diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-card/annotation-card.component.html b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-card/annotation-card.component.html new file mode 100644 index 000000000..a23949aed --- /dev/null +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-card/annotation-card.component.html @@ -0,0 +1,22 @@ +
+ + +
+
+ {{ annotation.typeLabel | translate }} +
+
+ + {{ annotation.descriptor | translate }}: {{ annotation.type | humanize: false }} +
+
+ : {{ annotation.shortContent }} +
+
+ +
+ +
+
diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-card/annotation-card.component.scss b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-card/annotation-card.component.scss new file mode 100644 index 000000000..2da4583a7 --- /dev/null +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-card/annotation-card.component.scss @@ -0,0 +1,13 @@ +.details { + display: flex; + position: relative; +} + +.active-icon-marker-container { + min-width: 20px; +} + +redaction-type-annotation-icon { + margin-top: 6px; + margin-right: 10px; +} diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-card/annotation-card.component.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-card/annotation-card.component.ts new file mode 100644 index 000000000..a0b18557d --- /dev/null +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-card/annotation-card.component.ts @@ -0,0 +1,17 @@ +import { Component, Input } from '@angular/core'; +import { AnnotationWrapper } from '../../../../../../models/file/annotation.wrapper'; +import { File } from '@red/domain'; +import { MultiSelectService } from '../../services/multi-select.service'; + +@Component({ + selector: 'redaction-annotation-card', + templateUrl: './annotation-card.component.html', + styleUrls: ['./annotation-card.component.scss'], +}) +export class AnnotationCardComponent { + @Input() annotation: AnnotationWrapper; + @Input() file: File; + @Input() isSelected = false; + + constructor(readonly multiSelectService: MultiSelectService) {} +} diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-references-dialog/annotation-references-dialog.component.html b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-references-dialog/annotation-references-dialog.component.html index 0234943e1..79479c853 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-references-dialog/annotation-references-dialog.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-references-dialog/annotation-references-dialog.component.html @@ -1,6 +1,6 @@
-
+
X REFERENCES
diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-references-dialog/annotation-references-dialog.component.scss b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-references-dialog/annotation-references-dialog.component.scss index 045ba5b10..2e6925b09 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-references-dialog/annotation-references-dialog.component.scss +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-references-dialog/annotation-references-dialog.component.scss @@ -1,8 +1,11 @@ .references-dialog { position: fixed; - right: 350px; + margin: 0; + right: 370px; + top: 165px; .references-header { padding: 13px 13px 0 13px; + align-items: center; } } diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.html b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.html index f50ea272a..ee7df1598 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.html @@ -11,31 +11,13 @@
-
- - -
-
- {{ annotation.typeLabel | translate }} -
-
- - {{ annotation.descriptor | translate }}: {{ annotation.type | humanize: false }} -
-
- : {{ annotation.shortContent }} -
-
- -
- -
-
+