35 lines
931 B
TypeScript
35 lines
931 B
TypeScript
import { Component, Inject } from "@angular/core";
|
|
import { UntypedFormGroup } from "@angular/forms";
|
|
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
|
import { DescriptionTemplateFieldSet } from "@app/core/model/description-template/description-template";
|
|
|
|
@Component({
|
|
selector: 'app-description-form-fieldset-editor-dialog',
|
|
templateUrl: 'form-fieldset-editor-dialog.component.html'
|
|
})
|
|
export class FormFieldSetEditorDialogComponent {
|
|
|
|
fieldSet: DescriptionTemplateFieldSet;
|
|
propertiesFormGroup: UntypedFormGroup;
|
|
|
|
constructor(
|
|
private dialogRef: MatDialogRef<FormFieldSetEditorDialogComponent>,
|
|
@Inject(MAT_DIALOG_DATA) public data: any
|
|
) {
|
|
this.fieldSet = data.fieldSet;
|
|
this.propertiesFormGroup = data.propertiesFormGroup;
|
|
}
|
|
|
|
cancel() {
|
|
this.dialogRef.close();
|
|
}
|
|
|
|
save() {
|
|
this.dialogRef.close(this.propertiesFormGroup);
|
|
}
|
|
|
|
public close() {
|
|
this.dialogRef.close(false);
|
|
}
|
|
}
|