From 8aa614524a2bfcb4ef4e56f5204dae5ce47444a5 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 26 Aug 2024 13:51:05 -0400 Subject: [PATCH] #305 - Fix roles saving issue --- .../adf-roles/df-role-details/df-role-details.component.ts | 5 +++-- .../adf-roles/df-roles-access/df-roles-access.component.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/adf-roles/df-role-details/df-role-details.component.ts b/src/app/adf-roles/df-role-details/df-role-details.component.ts index 008b95a0..236f8e06 100644 --- a/src/app/adf-roles/df-role-details/df-role-details.component.ts +++ b/src/app/adf-roles/df-role-details/df-role-details.component.ts @@ -119,7 +119,8 @@ export class DfRoleDetailsComponent implements OnInit { ), component: new FormControl(item.component), access: new FormControl( - this.handleAccessValue(item.verbMask) + this.handleAccessValue(item.verbMask), + [Validators.required] ), requester: new FormControl( this.handleRequesterValue(item.requestorMask) @@ -257,7 +258,7 @@ export class DfRoleDetailsComponent implements OnInit { } onSubmit() { - // if (this.roleForm.invalid) return; + if (this.roleForm.invalid) return; const formValue = this.roleForm.getRawValue(); if (formValue.name === '' || formValue.name === null) return; const payload: RolePayload = { diff --git a/src/app/adf-roles/df-roles-access/df-roles-access.component.ts b/src/app/adf-roles/df-roles-access/df-roles-access.component.ts index 2f61d67a..7882624f 100644 --- a/src/app/adf-roles/df-roles-access/df-roles-access.component.ts +++ b/src/app/adf-roles/df-roles-access/df-roles-access.component.ts @@ -184,7 +184,7 @@ export class DfRolesAccessComponent implements OnInit { this.initializeFilteredComponents(); this.updateDataSource(); - this.add(); + // this.add(); } get cFormArray(): FormArray { return this.form.get('formArray') as FormArray;