RED-6375 - Close "download options"-window if user click anywhere outside of the window
This commit is contained in:
parent
3722a0d110
commit
569fbf6b13
@ -2,10 +2,10 @@ import { Component, Inject } from '@angular/core';
|
||||
import { Dossier, DownloadFileType, DownloadFileTypes, IReportTemplate, File, WorkflowFileStatuses } from '@red/domain';
|
||||
import { downloadTypesForDownloadTranslations } from '@translations/download-types-translations';
|
||||
import { ReportTemplateService } from '@services/report-template.service';
|
||||
import { AbstractControl, FormBuilder } from '@angular/forms';
|
||||
import { AbstractControl } from '@angular/forms';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { DefaultColorsService } from '@services/entity-services/default-colors.service';
|
||||
import { IconButtonTypes, List } from '@iqser/common-ui';
|
||||
import { BaseDialogComponent, IconButtonTypes, List } from '@iqser/common-ui';
|
||||
|
||||
export interface DownloadDialogData {
|
||||
readonly dossier: Dossier;
|
||||
@ -23,19 +23,21 @@ export interface DownloadDialogResult {
|
||||
templateUrl: './download-dialog.component.html',
|
||||
styleUrls: ['./download-dialog.component.scss'],
|
||||
})
|
||||
export class DownloadDialogComponent {
|
||||
export class DownloadDialogComponent extends BaseDialogComponent {
|
||||
readonly iconButtonTypes = IconButtonTypes;
|
||||
readonly downloadTypes: { key: DownloadFileType; label: string }[] = this._formDownloadTypes;
|
||||
readonly availableReportTypes = this._availableReportTypes;
|
||||
readonly form = this._getForm();
|
||||
|
||||
constructor(
|
||||
private readonly _defaultColorsService: DefaultColorsService,
|
||||
private readonly _reportTemplateController: ReportTemplateService,
|
||||
private readonly _formBuilder: FormBuilder,
|
||||
private readonly _dialogRef: MatDialogRef<DownloadDialogComponent, DownloadDialogResult>,
|
||||
protected readonly _dialogRef: MatDialogRef<DownloadDialogComponent, DownloadDialogResult>,
|
||||
@Inject(MAT_DIALOG_DATA) readonly data: DownloadDialogData,
|
||||
) {}
|
||||
) {
|
||||
super(_dialogRef);
|
||||
|
||||
this.form = this._getForm();
|
||||
}
|
||||
|
||||
get reportTypesLength() {
|
||||
return this.form.controls.reportTemplateIds?.value?.length || 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user