diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html index 5bcf080fb..ef03f9bd4 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html @@ -88,7 +88,7 @@ > a !== undefined); - this.annotationReferencesService.setAnnotation(this._annotations); } get viewerAnnotations() { 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 index a23949aed..aef4b4107 100644 --- 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 @@ -20,3 +20,13 @@ + + + + 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 index 0ce73621e..7a796d819 100644 --- 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 @@ -2,17 +2,31 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { AnnotationWrapper } from '../../../../../../models/file/annotation.wrapper'; import { File } from '@red/domain'; import { MultiSelectService } from '../../services/multi-select.service'; +import { AnnotationReferencesService } from '../../services/annotation-references.service'; @Component({ selector: 'redaction-annotation-card', templateUrl: './annotation-card.component.html', styleUrls: ['./annotation-card.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, + providers: [AnnotationReferencesService], }) export class AnnotationCardComponent { @Input() annotation: AnnotationWrapper; @Input() file: File; @Input() isSelected = false; - constructor(readonly multiSelectService: MultiSelectService) {} + constructor( + readonly multiSelectService: MultiSelectService, + private readonly _annotationReferenceService: AnnotationReferencesService, + ) { + this._annotationReferenceService.setAnnotation([this.annotation]); + } + + /*referenceClicked(annotation: AnnotationWrapper): void { + this.annotationClicked(annotation, null); + if (this._filterService.filtersEnabled('primaryFilters')) { + this._filterService.toggleFilter('primaryFilters', annotation.superType, true); + } + }*/ } 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 291ab7cd0..5a17cc189 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 @@ -43,13 +43,3 @@ - - - - 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..57e31df57 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 @@ -53,13 +53,6 @@ export class AnnotationsListComponent implements OnChanges { } } - referenceClicked(annotation: AnnotationWrapper): void { - this.annotationClicked(annotation, null); - if (this._filterService.filtersEnabled('primaryFilters')) { - this._filterService.toggleFilter('primaryFilters', annotation.superType, true); - } - } - isSelected(annotationId: string): boolean { return !!this.selectedAnnotations?.find(a => a?.annotationId === annotationId); } diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/file-workload/file-workload.component.ts index 584a25e84..2420dba07 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/file-workload/file-workload.component.ts @@ -33,6 +33,7 @@ import { ExcludedPagesService } from '../../services/excluded-pages.service'; import { MultiSelectService } from '../../services/multi-select.service'; import { DocumentInfoService } from '../../services/document-info.service'; import { SkippedService } from '../../services/skipped.service'; +import { FileDataModel } from '../../../../../../models/file/file-data.model'; const COMMAND_KEY_ARRAY = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Escape']; const ALL_HOTKEY_ARRAY = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown']; @@ -55,6 +56,7 @@ export class FileWorkloadComponent { @Input() file!: File; @Input() annotationActionsTemplate: TemplateRef; @Input() viewer: WebViewerInstance; + @Input() fileData: FileDataModel; @Output() readonly shouldDeselectAnnotationsOnPageChangeChange = new EventEmitter(); @Output() readonly selectAnnotations = new EventEmitter(); @Output() readonly deselectAnnotations = new EventEmitter(); diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts index 77b752277..77cfc792e 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts @@ -51,7 +51,6 @@ import { FilePreviewStateService } from './services/file-preview-state.service'; import { FileDataModel } from '../../../../models/file/file-data.model'; import Annotation = Core.Annotations.Annotation; import PDFNet = Core.PDFNet; -import { AnnotationReferencesService } from './services/annotation-references.service'; const ALL_HOTKEY_ARRAY = ['Escape', 'F', 'f', 'ArrowUp', 'ArrowDown'];