From 4d51e8475d09fa9f641e91bf53570c8369a6befa Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Thu, 30 Sep 2021 09:37:22 +0300 Subject: [PATCH] type refactor and sql compatibility --- .../annotations-list/annotations-list.component.ts | 8 ++++++-- .../components/file-workload/file-workload.component.html | 3 +-- .../components/file-workload/file-workload.component.ts | 3 +++ .../file-preview-screen.component.html | 4 ++-- .../file-preview-screen/file-preview-screen.component.ts | 3 +++ apps/red-ui/src/assets/config/config.json | 4 ++-- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/apps/red-ui/src/app/modules/dossier/components/file-workload/components/annotations-list/annotations-list.component.ts b/apps/red-ui/src/app/modules/dossier/components/file-workload/components/annotations-list/annotations-list.component.ts index 391e02415..3fd072640 100644 --- a/apps/red-ui/src/app/modules/dossier/components/file-workload/components/annotations-list/annotations-list.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/file-workload/components/annotations-list/annotations-list.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, TemplateRef } from '@angular/core'; +import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output, TemplateRef } from '@angular/core'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { IqserEventTarget } from '@iqser/common-ui'; @@ -8,7 +8,7 @@ import { IqserEventTarget } from '@iqser/common-ui'; styleUrls: ['./annotations-list.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush }) -export class AnnotationsListComponent { +export class AnnotationsListComponent implements OnChanges { @Input() annotations: AnnotationWrapper[]; @Input() selectedAnnotations: AnnotationWrapper[]; @Input() annotationActionsTemplate: TemplateRef; @@ -45,4 +45,8 @@ export class AnnotationsListComponent { isSelected(annotationId: string): boolean { return !!this.selectedAnnotations?.find(a => a?.annotationId === annotationId); } + + ngOnChanges(changes: any): void { + console.log('changeeees', changes); + } } diff --git a/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.html b/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.html index 31e2e95ba..806818f86 100644 --- a/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.html @@ -173,7 +173,6 @@ diff --git a/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.ts index a0fc2b05a..73fbe26a0 100644 --- a/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.ts @@ -57,6 +57,7 @@ export class FileWorkloadComponent { @Input() set annotations(value: AnnotationWrapper[]) { + console.log(value); this._annotations$.next(value); } @@ -95,6 +96,7 @@ export class FileWorkloadComponent { private get _displayedAnnotations$(): Observable> { const primary$ = this._filterService.getFilterModels$('primaryFilters'); const secondary$ = this._filterService.getFilterModels$('secondaryFilters'); + console.log('============', primary$, secondary$); return combineLatest([this._annotations$, primary$, secondary$]).pipe( map(([annotations, primary, secondary]) => this._filterAnnotations(annotations, primary, secondary)) ); @@ -231,6 +233,7 @@ export class FileWorkloadComponent { primary: INestedFilter[], secondary: INestedFilter[] = [] ): Map { + console.log(this.displayedAnnotations, this.displayedPages, this.annotations); if (!primary) { return; } diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.html b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.html index 583a45ec0..d611abff6 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.html @@ -198,7 +198,7 @@ - - {{ filter.key | humanize: false }} + + {{ filter.id | humanize: false }} 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 c87e48f9c..39ee44aa1 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 @@ -289,6 +289,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni this.annotationData = newAnnotationsData; const annotationFilters = this._annotationProcessingService.getAnnotationFilter(this.annotations); const primaryFilters = this._filterService.getGroup('primaryFilters')?.filters; + console.log(annotationFilters); this._filterService.addFilterGroup({ slug: 'primaryFilters', filterTemplate: this._filterTemplate, @@ -300,6 +301,8 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni filterTemplate: this._filterTemplate, filters: processFilters(secondaryFilters, AnnotationProcessingService.secondaryAnnotationFilters) }); + console.log(this.annotations); + console.log(this.appStateService.activeFile); console.log('[REDACTION] Process time: ' + (new Date().getTime() - processStartTime) + 'ms'); console.log( '[REDACTION] Annotation Redraw and filter rebuild time: ' + diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index ada134004..4b4441fbb 100644 --- a/apps/red-ui/src/assets/config/config.json +++ b/apps/red-ui/src/assets/config/config.json @@ -1,7 +1,7 @@ { "ADMIN_CONTACT_NAME": null, "ADMIN_CONTACT_URL": null, - "API_URL": "https://dom1.iqser.cloud/redaction-gateway-v1", + "API_URL": "https://dev-06.iqser.cloud/redaction-gateway-v1", "APP_NAME": "RedactManager", "AUTO_READ_TIME": 1.5, "BACKEND_APP_VERSION": "4.4.40", @@ -17,7 +17,7 @@ "MAX_RETRIES_ON_SERVER_ERROR": 3, "OAUTH_CLIENT_ID": "redaction", "OAUTH_IDP_HINT": null, - "OAUTH_URL": "https://dom1.iqser.cloud/auth/realms/redaction", + "OAUTH_URL": "https://dev-06.iqser.cloud/auth/realms/redaction", "RECENT_PERIOD_IN_HOURS": 24, "SELECTION_MODE": "structural" }