From f3685ba94278bfeebb1355d71f3b04e876471d45 Mon Sep 17 00:00:00 2001 From: Mazdak Gibran <141390141+mazdakgibran@users.noreply.github.com> Date: Wed, 21 Jan 2026 12:52:35 +0500 Subject: [PATCH] user management bugs fixed bugs resolved: Setup User: No validation applied; the form saves with empty inputs. User ID length validation is not implemented. The role column is not displayed in the table. Reset Password: No success message is shown after password update. Strong password validation is not applied. Change Password: No success message is shown after password update. Strong password validation is not applied. Validation to prevent using the same value for old and new passwords is not implemented. --- .../change-password.component.html | 58 ++++++++-- .../change-password.component.ts | 105 ++++++++++-------- .../reset-password.component.html | 59 ++++++---- .../reset-password.component.ts | 63 ++++++----- .../setup-user/setup-user.component.html | 63 +++++++++-- .../setup-user/setup-user.component.ts | 55 ++++++--- src/app/utils/enums.ts | 5 +- src/assets/i18n/Arabic.json | 8 +- src/assets/i18n/English.json | 9 +- 9 files changed, 285 insertions(+), 140 deletions(-) diff --git a/src/app/user-management/change-password/change-password.component.html b/src/app/user-management/change-password/change-password.component.html index 7b66156..36762c2 100644 --- a/src/app/user-management/change-password/change-password.component.html +++ b/src/app/user-management/change-password/change-password.component.html @@ -16,7 +16,19 @@
| {{'userID' | translate}} | -{{'Name' | translate}} | -{{'action' | translate}} | +{{'userID' | translate}} | +{{'Name' | translate}} | +{{'Role' | translate}} | +{{'action' | translate}} | {{ item.userId }} | {{ item.userFullname }} | +{{item.role}} |
diff --git a/src/app/user-management/setup-user/setup-user.component.ts b/src/app/user-management/setup-user/setup-user.component.ts
index 48202df..28bf7fd 100644
--- a/src/app/user-management/setup-user/setup-user.component.ts
+++ b/src/app/user-management/setup-user/setup-user.component.ts
@@ -10,8 +10,10 @@ import { ButtonManagementService } from '../../services/button-management.servic
import { StorageService } from '../../shared/services/storage.service';
import { TableFilterPipe } from '../../shared/pipes/table-filter.pipe';
import { URIKey } from '../../utils/uri-enums';
-import { HttpParams } from '@angular/common/http';
+import { HttpErrorResponse, HttpParams } from '@angular/common/http';
import { HttpURIService } from '../../app.http.uri.service';
+import { I18NService } from '../../services/i18n.service';
+import { SuccessMessages } from '../../utils/enums';
@@ -52,7 +54,8 @@ export class SetupUserComponent implements OnInit {
private fb: FormBuilder,
private buttonManagementService: ButtonManagementService,
private storageService: StorageService,
- private httpService: HttpURIService
+ private httpService: HttpURIService,
+ private i18nService: I18NService
){}
onSearch(value: string): void {
@@ -95,13 +98,14 @@ export class SetupUserComponent implements OnInit {
}
this.httpService.requestPOST |
|---|