diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts index 7d85260a9..bb2517e42 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts @@ -44,12 +44,9 @@ export class DossierOverviewScreenComponent implements OnInit, OnDestroy, OnDetach, OnAttach { readonly itemSize = 80; - protected readonly _primaryKey = 'filename'; readonly circleButtonTypes = CircleButtonTypes; readonly currentUser = this._userService.currentUser; readonly tableHeaderLabel = _('dossier-overview.table-header.title'); - private readonly _lastOpenedFileKey = 'Dossier-Recent-' + this.activeDossier.dossierId; - readonly actionConfigs: ActionConfig[] = [ { label: this._translateService.instant('dossier-overview.header-actions.edit'), @@ -90,9 +87,10 @@ export class DossierOverviewScreenComponent column: 'statusSort' } ]; - collapsedDetails = false; dossierAttributes: DossierAttributeWithValue[] = []; + protected readonly _primaryKey = 'filename'; + private readonly _lastOpenedFileKey = 'Dossier-Recent-' + this.activeDossier.dossierId; @ViewChild(DossierDetailsComponent, { static: false }) private readonly _dossierDetailsComponent: DossierDetailsComponent; private _lastScrollPosition: number; @@ -260,7 +258,7 @@ export class DossierOverviewScreenComponent } openDossierDictionaryDialog() { - this._dialogService.openDossierDictionaryDialog(null, this.activeDossier, () => { + this._dialogService.openDialog('dossierDictionary', null, this.activeDossier, () => { this.reloadDossiers(); }); } diff --git a/apps/red-ui/src/app/modules/dossier/services/dossiers-dialog.service.ts b/apps/red-ui/src/app/modules/dossier/services/dossiers-dialog.service.ts index f7ffb1d87..24540213a 100644 --- a/apps/red-ui/src/app/modules/dossier/services/dossiers-dialog.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/dossiers-dialog.service.ts @@ -5,7 +5,6 @@ import { RemoveAnnotationsDialogComponent } from '../dialogs/remove-annotations- import { ForceRedactionDialogComponent } from '../dialogs/force-redaction-dialog/force-redaction-dialog.component'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { ConfirmationDialogComponent } from '@shared/dialogs/confirmation-dialog/confirmation-dialog.component'; -import { DossierWrapper } from '@state/model/dossier.wrapper'; import { DocumentInfoDialogComponent } from '../dialogs/document-info-dialog/document-info-dialog.component'; import { AppStateService } from '@state/app-state.service'; import { ManualRedactionEntryWrapper } from '@models/file/manual-redaction-entry.wrapper'; @@ -28,7 +27,15 @@ const dialogConfig = { // TODO: Continue refactor -type DialogType = 'confirm' | 'documentInfo' | 'editDossier' | 'addDossier' | 'assignFile' | 'recategorizeImage' | 'changeLegalBasis'; +type DialogType = + | 'confirm' + | 'documentInfo' + | 'editDossier' + | 'addDossier' + | 'assignFile' + | 'recategorizeImage' + | 'changeLegalBasis' + | 'dossierDictionary'; type DossiersDialogConfig = { [key in DialogType]: { @@ -53,11 +60,7 @@ export class DossiersDialogService extends DialogService { }, addDossier: { component: AddDossierDialogComponent, - dialogConfig: { - ...dialogConfig, - width: '900px', - autoFocus: true - } + dialogConfig: { width: '900px', autoFocus: true } }, assignFile: { component: AssignReviewerApproverDialogComponent @@ -67,6 +70,10 @@ export class DossiersDialogService extends DialogService { }, changeLegalBasis: { component: ChangeLegalBasisDialogComponent + }, + dossierDictionary: { + component: DossierDictionaryDialogComponent, + dialogConfig: { width: '90vw', height: '90vh' } } }; @@ -126,25 +133,4 @@ export class DossiersDialogService extends DialogService { }); return ref; } - - openDossierDictionaryDialog( - $event: MouseEvent, - dossier: DossierWrapper, - cb?: Function - ): MatDialogRef { - $event?.stopPropagation(); - const ref = this._dialog.open(DossierDictionaryDialogComponent, { - ...dialogConfig, - width: '90vw', - height: '90vh', - autoFocus: false, - data: dossier - }); - ref.afterClosed().subscribe(result => { - if (cb) { - cb(result); - } - }); - return ref; - } }