diff --git a/apps/red-ui/src/app/modules/file-preview/components/document-info/document-info.component.html b/apps/red-ui/src/app/modules/file-preview/components/document-info/document-info.component.html index f6bd75912..8aff704ff 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/document-info/document-info.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/document-info/document-info.component.html @@ -10,7 +10,7 @@ > { protected readonly _dossierTemplate = toSignal(inject(DossierTemplatesService).getEntityChanged$(this._state.dossierTemplateId)); protected readonly _fileAttributesConfig = toSignal(inject(FileAttributesService).fileAttributesConfig$); protected readonly _attributes = toSignal( - this.documentInfoService.fileAttributes$(this._state.fileId, this._state.dossierId, this._state.dossierTemplateId), + this._documentInfoService.fileAttributes$(this._state.fileId, this._state.dossierId, this._state.dossierTemplateId), ); protected readonly _fileAttributes = computed(() => { this._fileAttributesConfig(); @@ -38,7 +39,7 @@ export class DocumentInfoComponent extends ContextComponent { constructor( readonly permissionsService: PermissionsService, - readonly documentInfoService: DocumentInfoService, + private readonly _documentInfoService: DocumentInfoService, private readonly _dialogService: FilePreviewDialogService, ) { super(); @@ -51,4 +52,9 @@ export class DocumentInfoComponent extends ContextComponent { isDate(attribute: FileAttribute) { return attribute.type === FileAttributeConfigTypes.DATE; } + + closeView() { + this._documentInfoService.hide(); + setLocalStorageDataByFileId(this._state.fileId, 'show-document-info', false); + } } diff --git a/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts b/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts index 33b7ba82e..319846ad5 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts +++ b/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts @@ -456,18 +456,18 @@ export class FileActionsComponent implements OnChanges { this._loadingService.stop(); } - async #toggleExcludePages() { + #toggleExcludePages() { this._excludedPagesService.toggle(); - const shown = await this._excludedPagesService.shown(); + const shown = this._excludedPagesService.shown(); setLocalStorageDataByFileId(this.file.id, 'show-exclude-pages', shown); if (shown) { setLocalStorageDataByFileId(this.file.id, 'show-document-info', false); } } - async #toggleDocumentInfo() { + #toggleDocumentInfo() { this._documentInfoService.toggle(); - const shown = await this._documentInfoService.shown(); + const shown = this._documentInfoService.shown(); setLocalStorageDataByFileId(this.file.id, 'show-document-info', shown); if (shown) { setLocalStorageDataByFileId(this.file.id, 'show-exclude-pages', false); diff --git a/libs/common-ui b/libs/common-ui index 04a69f5e6..a52f55b5d 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 04a69f5e689cf4d90efbd550cbf6938ae7c0a200 +Subproject commit a52f55b5d4b7a18c8e921a193b34619f85912a1b