added checked or unchecked validation to send hide email policy subscriber (#6317)

This commit is contained in:
aj-rosado 2023-09-18 11:00:04 +01:00 committed by GitHub
parent 1f62117977
commit 16fe609867
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -154,8 +154,13 @@ export class AddEditComponent implements OnInit, OnDestroy {
.policyAppliesToActiveUser$(PolicyType.SendOptions, (p) => p.data.disableHideEmail)
.pipe(takeUntil(this.destroy$))
.subscribe((policyAppliesToActiveUser) => {
if ((this.disableHideEmail = policyAppliesToActiveUser)) {
if (
(this.disableHideEmail = policyAppliesToActiveUser) &&
!this.formGroup.controls.hideEmail.value
) {
this.formGroup.controls.hideEmail.disable();
} else {
this.formGroup.controls.hideEmail.enable();
}
});