RED-8273: fixed redacted option not pre-selected in download dialog bug.

This commit is contained in:
Nicoleta Panaghiu 2024-01-17 11:26:07 +02:00
parent 531edc547b
commit 9e0bff9e2a

View File

@ -43,7 +43,7 @@ export interface DownloadDialogResult {
export class DownloadDialogComponent extends IqserDialogComponent<DownloadDialogComponent, DownloadDialogData, DownloadDialogResult> {
readonly #logger = inject(NGXLogger);
readonly iconButtonTypes = IconButtonTypes;
readonly hasApprovedFiles: boolean;
readonly hasApprovedFiles = this.data.files.some(file => file.workflowStatus === WorkflowFileStatuses.APPROVED);
readonly downloadTypes: { key: DownloadFileType; label: string }[];
readonly availableReportTypes = this.#availableReportTypes;
readonly form = this.#getForm();
@ -56,7 +56,6 @@ export class DownloadDialogComponent extends IqserDialogComponent<DownloadDialog
private readonly _formBuilder: FormBuilder,
) {
super();
this.hasApprovedFiles = this.data.files.some(file => file.workflowStatus === WorkflowFileStatuses.APPROVED);
this.downloadTypes = this.#formDownloadTypes;
}