diff --git a/src/app/features/deposit/components/routables/deposit-file/deposit-file.routable.ts b/src/app/features/deposit/components/routables/deposit-file/deposit-file.routable.ts index 3b819601663132532953ff71c89a22a70334e1d0..a6cc76f66800d31c7b1c986de2fbe5982f0c672d 100644 --- a/src/app/features/deposit/components/routables/deposit-file/deposit-file.routable.ts +++ b/src/app/features/deposit/components/routables/deposit-file/deposit-file.routable.ts @@ -46,6 +46,8 @@ import { SharedFileDetailDialogData, } from "@shared/components/dialogs/shared-file-detail/shared-file-detail.dialog"; import {SharedHistoryDialog} from "@shared/components/dialogs/shared-history/shared-history.dialog"; +import {SharedPreviewDialogData} from "@shared/components/dialogs/shared-preview/shared-preview-dialog-data.model"; +import {SharedPreviewDialog} from "@shared/components/dialogs/shared-preview/shared-preview.dialog"; import {SharedDataTablePresentational} from "@shared/components/presentationals/shared-data-table/shared-data-table.presentational"; import {SharedAbstractDetailEditRoutable} from "@shared/components/routables/shared-abstract-detail-edit/shared-abstract-detail-edit.routable"; import {ComplianceLevelEnumHelper} from "@shared/enums/business/compliance-level.enum"; @@ -141,6 +143,11 @@ export class DepositFileRoutable extends SharedAbstractDetailEditRoutable<Deposi placeholder: TRANSLATE("crud.list.action.delete"), displayOnCondition: (depositDataFile: DepositDataFile) => MemoizedUtil.selectSnapshot(this._store, DepositState, state => state.canEdit), }, + { + logo: "remove_red_eye", + callback: (depositDataFile: DepositDataFile) => this.showPreview(depositDataFile), + placeholder: TRANSLATE("deposit.file.button.showPreview"), + }, { logo: "redo", callback: (depositDataFile: DepositDataFile) => this.moveDataFileWithDialog(depositDataFile), @@ -391,6 +398,19 @@ export class DepositFileRoutable extends SharedAbstractDetailEditRoutable<Deposi } } + showPreview(dataFile: DepositDataFile): void { + const previewDialogRef = this._dialog.open(SharedPreviewDialog, { + width: "min-content", + height: "min-content", + data: { + fileInput: { + dataFile: dataFile, + }, + + } as SharedPreviewDialogData, + }); + } + moveDataFile(dataFile: DepositDataFile): void { this._store.dispatch(new DepositDataFileAction.Move(this._resId, { resId: dataFile.resId,