From da4a2c7ff7c3289dae6b34843f65d41225682c70 Mon Sep 17 00:00:00 2001 From: Oleksandr Kitsera Date: Mon, 6 Oct 2025 16:29:40 +0300 Subject: [PATCH 1/2] set username length to 6 --- .../df-user-details/df-user-details-base.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/components/df-user-details/df-user-details-base.component.ts b/src/app/shared/components/df-user-details/df-user-details-base.component.ts index c3bcc2268..61b6a320e 100644 --- a/src/app/shared/components/df-user-details/df-user-details-base.component.ts +++ b/src/app/shared/components/df-user-details/df-user-details-base.component.ts @@ -66,7 +66,7 @@ export abstract class DfUserDetailsBaseComponent implements OnInit { ) { this.userForm = this.fb.group({ profileDetailsGroup: this.fb.group({ - username: ['', Validators.minLength(16)], + username: ['', Validators.minLength(6)], email: ['', Validators.email], firstName: [''], lastName: [''], From c5fedb496690626852569a744b39101ef2981830 Mon Sep 17 00:00:00 2001 From: Oleksandr Kitsera Date: Mon, 6 Oct 2025 19:19:25 +0300 Subject: [PATCH 2/2] lint updates --- .github/workflows/node.js.yml | 1 - .../df-role-details.component.ts | 1 - .../df-roles-access.component.html | 47 +++++++++++++++---- .../df-roles-access.component.ts | 17 +++++-- 4 files changed, 50 insertions(+), 16 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9662cd3f6..ff1329d4e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -26,4 +26,3 @@ jobs: cache: 'npm' - run: npm ci - run: npm run build --if-present - 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 e27a5d42f..9175d842a 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 @@ -289,7 +289,6 @@ export class DfRoleDetailsComponent implements OnInit { }); serviceAccess.controls.forEach((control, index) => { - console.log(`ServiceAccess[${index}] valid:`, control.valid, 'visibility:', this.visibilityArray[index]); if (control.invalid) { console.log(`ServiceAccess[${index}] errors:`, control.errors); console.log(`ServiceAccess[${index}] controls errors:`, { diff --git a/src/app/adf-roles/df-roles-access/df-roles-access.component.html b/src/app/adf-roles/df-roles-access/df-roles-access.component.html index c755ea6de..bb7519f29 100644 --- a/src/app/adf-roles/df-roles-access/df-roles-access.component.html +++ b/src/app/adf-roles/df-roles-access/df-roles-access.component.html @@ -38,7 +38,12 @@ >{{ option.name }} - + Service is required @@ -57,14 +62,24 @@ {{ 'roles.accessOverview.tableHeadings.component' | transloco }} - + {{ option }} - + Component is required @@ -87,7 +102,9 @@ formControlName="access" multiple panelWidth="null" - (selectionChange)="accessChange(getFormArrayIndex(i), $event.value)" + (selectionChange)=" + accessChange(getFormArrayIndex(i), $event.value) + " required> (+{{ - (formArray.controls[getFormArrayIndex(i)]?.value.access.length || 0) - 1 + (formArray.controls[getFormArrayIndex(i)]?.value.access + .length || 0) - 1 }} {{ - formArray.controls[getFormArrayIndex(i)]?.value.access.length === 2 + formArray.controls[getFormArrayIndex(i)]?.value.access + .length === 2 ? 'other' : 'others' }}) - + Access is required @@ -197,7 +222,9 @@ ">
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 88f78c961..182c5d8f0 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 @@ -307,7 +307,6 @@ export class DfRolesAccessComponent implements OnInit { }) ); this.visible.push(true); - console.log('FormArray after add:', this.formArray.value, 'Visible:', this.visible); this.updateDataSource(); } @@ -337,7 +336,9 @@ export class DfRolesAccessComponent implements OnInit { } remove(index: number) { - console.log('Remove called with index:', index, 'Visible array before:', [...this.visible]); + console.log('Remove called with index:', index, 'Visible array before:', [ + ...this.visible, + ]); if (index >= 0 && index < this.formArray.length) { // Find the actual form array index for the nth visible item BEFORE updating visible array let visibleCount = 0; @@ -358,7 +359,10 @@ export class DfRolesAccessComponent implements OnInit { // Clear validators for the hidden item if (actualIndex !== -1 && actualIndex < this.formArray.length) { const formGroup = this.formArray.at(actualIndex); - console.log('Clearing validators for form group at index:', actualIndex); + console.log( + 'Clearing validators for form group at index:', + actualIndex + ); formGroup.get('service')?.clearValidators(); formGroup.get('component')?.clearValidators(); formGroup.get('access')?.clearValidators(); @@ -370,7 +374,12 @@ export class DfRolesAccessComponent implements OnInit { console.log('Form group validity after clearing:', formGroup.valid); } } - console.log('FormArray after remove:', this.formArray.value, 'Visible:', this.visible); + console.log( + 'FormArray after remove:', + this.formArray.value, + 'Visible:', + this.visible + ); this.updateDataSource(); }