Browse Source

feat(client): enforce encapsulation

pull/7185/head
KenTandrian 2 weeks ago
parent
commit
52afd2b102
  1. 8
      apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts

8
apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts

@ -26,11 +26,11 @@ import { RuleSettingsDialogParams } from './interfaces/interfaces';
templateUrl: './rule-settings-dialog.html' templateUrl: './rule-settings-dialog.html'
}) })
export class GfRuleSettingsDialogComponent { export class GfRuleSettingsDialogComponent {
public settingsForm: FormGroup; protected settingsForm: FormGroup;
public constructor( public constructor(
@Inject(MAT_DIALOG_DATA) public data: RuleSettingsDialogParams, @Inject(MAT_DIALOG_DATA) protected data: RuleSettingsDialogParams,
public dialogRef: MatDialogRef<GfRuleSettingsDialogComponent>, protected dialogRef: MatDialogRef<GfRuleSettingsDialogComponent>,
private formBuilder: FormBuilder private formBuilder: FormBuilder
) { ) {
this.settingsForm = this.formBuilder.group({ this.settingsForm = this.formBuilder.group({
@ -39,7 +39,7 @@ export class GfRuleSettingsDialogComponent {
}); });
} }
public onSubmit() { protected onSubmit() {
this.dialogRef.close({ this.dialogRef.close({
...this.data.settings, ...this.data.settings,
thresholdMax: this.settingsForm.get('thresholdMax')?.value, thresholdMax: this.settingsForm.get('thresholdMax')?.value,

Loading…
Cancel
Save