From f01056853a64acf255b34f36138f26e4e3926bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Thu, 24 Mar 2022 18:58:22 +0200 Subject: [PATCH 1/2] Recommendations super type --- apps/red-ui/src/app/models/file/annotation.wrapper.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index 9d5a99980..742bb6e96 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -299,11 +299,6 @@ export class AnnotationWrapper implements Record { } private static _setSuperType(annotationWrapper: AnnotationWrapper, redactionLogEntryWrapper: RedactionLogEntry) { - if (redactionLogEntryWrapper.recommendation && !redactionLogEntryWrapper.redacted) { - annotationWrapper.superType = SuperTypes.Recommendation; - return; - } - if (redactionLogEntryWrapper.manualChanges?.length) { const lastManualChange = redactionLogEntryWrapper.manualChanges[redactionLogEntryWrapper.manualChanges.length - 1]; From 35876c353d0ad051d9ac9e017dae7911f92f05b3 Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Thu, 24 Mar 2022 19:15:37 +0200 Subject: [PATCH 2/2] add some logs --- .../app/modules/file-preview/services/file-data.service.ts | 4 ++++ apps/red-ui/src/app/services/entity-services/files.service.ts | 3 +++ apps/red-ui/src/assets/config/config.json | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts b/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts index 92df9d108..cc01efc4d 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts @@ -28,6 +28,7 @@ import { ViewModeService } from './view-mode.service'; import { Core } from '@pdftron/webviewer'; import { Router } from '@angular/router'; import dayjs from 'dayjs'; +import { NGXLogger } from 'ngx-logger'; import Annotation = Core.Annotations.Annotation; const DELTA_VIEW_TIME = 10 * 60 * 1000; // 10 minutes; @@ -56,6 +57,7 @@ export class FileDataService { private readonly _textHighlightsService: TextHighlightService, private readonly _toaster: Toaster, private readonly _router: Router, + private readonly _logger: NGXLogger, ) { this.annotations$ = this.#annotations$; this.visibleAnnotations$ = this._viewModeService.viewMode$.pipe( @@ -107,6 +109,8 @@ export class FileDataService { return; } + this._logger.debug('[ANNOTATIONS] Load annotations'); + await this.loadViewedPages(file); await this.loadRedactionLog(); } diff --git a/apps/red-ui/src/app/services/entity-services/files.service.ts b/apps/red-ui/src/app/services/entity-services/files.service.ts index 06685575a..f3c1da6b0 100644 --- a/apps/red-ui/src/app/services/entity-services/files.service.ts +++ b/apps/red-ui/src/app/services/entity-services/files.service.ts @@ -6,6 +6,7 @@ import { UserService } from '../user.service'; import { FilesMapService } from '@services/entity-services/files-map.service'; import { map, mapTo, switchMap, tap } from 'rxjs/operators'; import { DossierStatsService } from '@services/dossiers/dossier-stats.service'; +import { NGXLogger } from 'ngx-logger'; @Injectable({ providedIn: 'root', @@ -13,6 +14,7 @@ import { DossierStatsService } from '@services/dossiers/dossier-stats.service'; export class FilesService extends EntitiesService { constructor( protected readonly _injector: Injector, + protected readonly _logger: NGXLogger, private readonly _userService: UserService, private readonly _filesMapService: FilesMapService, private readonly _dossierStatsService: DossierStatsService, @@ -34,6 +36,7 @@ export class FilesService extends EntitiesService { map(_file => new File(_file, this._userService.getNameForId(_file.assignee), file.routerPath)), switchMap(_file => this._dossierStatsService.getFor([dossierId]).pipe(mapTo(_file))), map(_file => this._filesMapService.replace([_file])), + tap(() => this._logger.debug('[FILE] Loaded')), ); } diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index d8966dc0b..684210fa7 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://dev-05.iqser.cloud/redaction-gateway-v1", + "API_URL": "https://dev-08.iqser.cloud/redaction-gateway-v1", "APP_NAME": "RedactManager", "AUTO_READ_TIME": 3, "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://dev-05.iqser.cloud/auth/realms/redaction", + "OAUTH_URL": "https://dev-08.iqser.cloud/auth/realms/redaction", "RECENT_PERIOD_IN_HOURS": 24, "SELECTION_MODE": "structural", "MANUAL_BASE_URL": "https://docs.redactmanager.com/preview"