diff --git a/apps/red-ui/src/app/app.component.ts b/apps/red-ui/src/app/app.component.ts index 4ae15811d..05dec74fc 100644 --- a/apps/red-ui/src/app/app.component.ts +++ b/apps/red-ui/src/app/app.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewContainerRef } from '@angular/core'; +import { Component, ViewContainerRef } from '@angular/core'; import { RouterHistoryService } from '@services/router-history.service'; import { UserService } from '@services/user.service'; diff --git a/apps/red-ui/src/app/app.module.ts b/apps/red-ui/src/app/app.module.ts index 7d728eaa8..083976f28 100644 --- a/apps/red-ui/src/app/app.module.ts +++ b/apps/red-ui/src/app/app.module.ts @@ -120,7 +120,10 @@ const components = [AppComponent, AuthErrorComponent, NotificationsComponent, Sp level: NgxLoggerLevel.DEBUG, }, FILTERS: { - enabled: true, + enabled: false, + }, + PDF: { + enabled: false, }, }, } as ILoggerConfig, diff --git a/apps/red-ui/src/app/models/file/manual-annotation-response.ts b/apps/red-ui/src/app/models/file/manual-annotation-response.ts deleted file mode 100644 index d7f4c623d..000000000 --- a/apps/red-ui/src/app/models/file/manual-annotation-response.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ManualRedactionEntryWrapper } from './manual-redaction-entry.wrapper'; -import { IManualAddResponse } from '@red/domain'; - -export class ManualAnnotationResponse { - annotationId; - commentId; - - constructor(public manualRedactionEntryWrapper: ManualRedactionEntryWrapper, public manualAddResponse: IManualAddResponse) { - this.annotationId = manualAddResponse?.annotationId ? manualAddResponse.annotationId : new Date().getTime(); - this.commentId = manualAddResponse?.commentId ? manualAddResponse.commentId : new Date().getTime(); - } - - get dictionary() { - return this.manualRedactionEntryWrapper.manualRedactionEntry.type; - } -} diff --git a/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts b/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts index 345b7c4e4..b197144fe 100644 --- a/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts +++ b/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts @@ -8,11 +8,7 @@ export const ManualRedactionEntryTypes = { export type ManualRedactionEntryType = keyof typeof ManualRedactionEntryTypes; -export class ManualRedactionEntryWrapper { - constructor( - readonly quads: any, - readonly manualRedactionEntry: IManualRedactionEntry, - readonly type: ManualRedactionEntryType, - readonly rectId?: string, - ) {} +export interface ManualRedactionEntryWrapper { + readonly manualRedactionEntry: IManualRedactionEntry; + readonly type: ManualRedactionEntryType; } diff --git a/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts b/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts index 8b119a486..43a4a559f 100644 --- a/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts @@ -286,9 +286,7 @@ export class FileActionsComponent implements OnChanges { : null, denyText: this.file.analysisRequired ? _('confirmation-dialog.approve-file-without-analysis.denyText') : null, }), - async () => { - await this._setFileApproved(); - }, + () => this._setFileApproved(), ); } @@ -300,12 +298,8 @@ export class FileActionsComponent implements OnChanges { return; } - await firstValueFrom(this._redactionImportService.importRedactions(this.file.dossierId, this.file.fileId, fileToImport)).catch( - error => { - this._toaster.error(_('error.http.generic'), { params: error }); - }, - ); - // reload file + const import$ = this._redactionImportService.importRedactions(this.file.dossierId, this.file.fileId, fileToImport); + await firstValueFrom(import$).catch(error => this._toaster.error(_('error.http.generic'), { params: error })); } forceReanalysisAction($event: LongPressEvent) { diff --git a/apps/red-ui/src/app/modules/file-preview/components/pdf-viewer/pdf-viewer.component.ts b/apps/red-ui/src/app/modules/file-preview/components/pdf-viewer/pdf-viewer.component.ts index cf3e6c4fb..870a8d3a0 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/pdf-viewer/pdf-viewer.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/pdf-viewer/pdf-viewer.component.ts @@ -415,11 +415,11 @@ export class PdfViewerComponent extends AutoUnsubscribe implements OnInit, OnCha const activeAnnotation = this.annotationManager.getSelectedAnnotations()[0]; const activePage = activeAnnotation.getPageNumber(); const quads = [this._annotationDrawService.annotationToQuads(activeAnnotation)]; - const manualRedaction = this._getManualRedaction({ [activePage]: quads }); + const manualRedactionEntry = this._getManualRedaction({ [activePage]: quads }); this._cleanUpSelectionAndButtonState(); this.pdfViewer.deleteAnnotations([activeAnnotation.Id]); - this.manualAnnotationRequested.emit(new ManualRedactionEntryWrapper(quads, manualRedaction, 'REDACTION', activeAnnotation.Id)); + this.manualAnnotationRequested.emit({ manualRedactionEntry, type: 'REDACTION' }); } private _cleanUpSelectionAndButtonState() { @@ -487,8 +487,8 @@ export class PdfViewerComponent extends AutoUnsubscribe implements OnInit, OnCha private _addManualRedactionOfType(type: ManualRedactionEntryType) { const selectedQuads: Readonly> = this.documentViewer.getSelectedTextQuads(); const text = this.documentViewer.getSelectedText(); - const manualRedaction = this._getManualRedaction(selectedQuads, text, true); - this.manualAnnotationRequested.emit(new ManualRedactionEntryWrapper(selectedQuads, manualRedaction, type)); + const manualRedactionEntry = this._getManualRedaction(selectedQuads, text, true); + this.manualAnnotationRequested.emit({ manualRedactionEntry, type }); } private async _handleCustomActions() { diff --git a/apps/red-ui/src/app/modules/file-preview/components/view-switch/view-switch.component.html b/apps/red-ui/src/app/modules/file-preview/components/view-switch/view-switch.component.html index 82cf94ca2..8b9919a48 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/view-switch/view-switch.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/view-switch/view-switch.component.html @@ -39,7 +39,6 @@ class="red-tab" iqserHelpMode="highlights_view" > - {{ 'file-preview.text-highlights' | translate }} diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html index 6086e7a64..d44e439b8 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html @@ -1,4 +1,6 @@ - + + +