From 5955ad90a56c1064b43d44f5f1dc61d73daa6f0b Mon Sep 17 00:00:00 2001 From: Mazdak Gibran <141390141+mazdakgibran@users.noreply.github.com> Date: Wed, 7 Jan 2026 11:31:36 +0500 Subject: [PATCH 1/4] reset user password api reset user password api integration --- .../change-password/change-password.component.ts | 3 ++- .../reset-password/reset-password.component.ts | 12 ++++++++---- src/assets/data/app.uri.json | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/app/user-management/change-password/change-password.component.ts b/src/app/user-management/change-password/change-password.component.ts index b79f669..2b74034 100644 --- a/src/app/user-management/change-password/change-password.component.ts +++ b/src/app/user-management/change-password/change-password.component.ts @@ -122,7 +122,8 @@ constructor(private fb: FormBuilder, private httpURIService: HttpURIService, pri oldPassword: form.get('oldPassword')?.value || null, // confirmPassword: form.get('confirmPassword')?.value || null, newPassword: form.get('newPassword')?.value, - userId: this.storageService.getItem('USER_ID') + userId: this.storageService.getItem('USER_ID'), + porOrgaCode: this.storageService.getItem('POR_ORGACODE') }; } onSubmit(){ diff --git a/src/app/user-management/reset-password/reset-password.component.ts b/src/app/user-management/reset-password/reset-password.component.ts index c810314..88eb407 100644 --- a/src/app/user-management/reset-password/reset-password.component.ts +++ b/src/app/user-management/reset-password/reset-password.component.ts @@ -5,6 +5,7 @@ import { CommonModule } from '@angular/common'; import { PasswordHideShowComponent } from '../../shared/components/password-hide-show/password-hide-show.component'; import { URIKey } from '../../utils/uri-enums'; import { HttpURIService } from '../../app.http.uri.service'; +import { StorageService } from '../../shared/services/storage.service'; @Component({ selector: 'app-reset-password', @@ -20,11 +21,13 @@ export class ResetPasswordComponent implements OnInit{ @ViewChild('psh1') passwordHideShow1?: PasswordHideShowComponent; @ViewChild('psh2') passwordHideShow2?: PasswordHideShowComponent; - constructor(private fb: FormBuilder, private httpURIService: HttpURIService){} - + constructor(private fb: FormBuilder, private httpURIService: HttpURIService, private storageService: StorageService){} + ngOnInit(): void { + const userIdValue = this.storageService.getItem('USER_ID') this.resetPasswordForm = this.fb.group({ - userId: ['', Validators.required], + + userId: [userIdValue || '', Validators.required], newPassword: ['', [Validators.required, Validators.minLength(6)]], confirmPassword: ['', [Validators.required, Validators.minLength(6)]] }, @@ -76,7 +79,8 @@ export class ResetPasswordComponent implements OnInit{ const payload = { userId: this.resetPasswordForm.value.userId, - newPassword: this.resetPasswordForm.value.newPassword + newPassword: this.resetPasswordForm.value.newPassword, + porOrgaCode: this.storageService.getItem('POR_ORGACODE') }; this.httpURIService.requestPOST(URIKey.RESET_PASSWORD_URI, payload) .subscribe(); diff --git a/src/assets/data/app.uri.json b/src/assets/data/app.uri.json index 17fbb50..3efbf11 100644 --- a/src/assets/data/app.uri.json +++ b/src/assets/data/app.uri.json @@ -49,7 +49,7 @@ }, { "Id" : "ENTITY_RESET_PASSWORD_URI", - "URI": "/user/resetPassword", + "URI": "/authentication/reset-password", "UUID": "RESET_PASSWORD_URI" }, { From 0163c1c469013a8740d0acf698c076f7d377a731 Mon Sep 17 00:00:00 2001 From: Mazdak Gibran <141390141+mazdakgibran@users.noreply.github.com> Date: Wed, 7 Jan 2026 12:48:30 +0500 Subject: [PATCH 2/4] fixing setup-user component added porOrgacode to payload for createUser --- src/app/models/user.ts | 3 ++- .../user-management/setup-user/setup-user.component.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/models/user.ts b/src/app/models/user.ts index 9844065..6a18b8a 100644 --- a/src/app/models/user.ts +++ b/src/app/models/user.ts @@ -7,7 +7,8 @@ export class User { export interface SetupUser { userId: string; userFullname: string; - defaultPassword: string; + password: string; + porOrgacode: string | null; email: string; role: string; } 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 01b3097..c5f8c44 100644 --- a/src/app/user-management/setup-user/setup-user.component.ts +++ b/src/app/user-management/setup-user/setup-user.component.ts @@ -8,6 +8,7 @@ import { SetupUser } from '../../models/user'; import { UserSetupService } from '../../services/user-setup.service'; import { UserFilterPipe } from '../../shared/pipes/userFilterPipe'; import { FormBuilder, Validators, FormGroup } from '@angular/forms'; +import { StorageService } from '../../shared/services/storage.service'; @Component({ @@ -34,7 +35,7 @@ export class SetupUserComponent implements OnInit { mode: 'edit' | 'view' = 'view'; - constructor(private userService: UserSetupService, private fb: FormBuilder){} + constructor(private userService: UserSetupService, private fb: FormBuilder, private storageService: StorageService){} get users$(){ return this.userService.users$; @@ -70,8 +71,11 @@ export class SetupUserComponent implements OnInit { userFullname: this.userForm.value.userFullname, email: `${this.userForm.value.userId}@dummy.com`, role: 'ADMIN', - defaultPassword: this.userForm.value.defaultPassword + porOrgacode: this.storageService.getItem('POR_ORGACODE'), + password: this.userForm.value.defaultPassword } + console.log('Payload:', newUser); // 👈 Debug + this.userService.addUser(newUser).subscribe({ next: () => { this.userService.loadUsers(); From 37f0489f05d9aa5c6441e30b3e44ac6cddd590df Mon Sep 17 00:00:00 2001 From: Mazdak Gibran <141390141+mazdakgibran@users.noreply.github.com> Date: Wed, 7 Jan 2026 12:52:14 +0500 Subject: [PATCH 3/4] Update setup-user.component.ts --- src/app/user-management/setup-user/setup-user.component.ts | 1 - 1 file changed, 1 deletion(-) 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 c5f8c44..fa10fbb 100644 --- a/src/app/user-management/setup-user/setup-user.component.ts +++ b/src/app/user-management/setup-user/setup-user.component.ts @@ -74,7 +74,6 @@ export class SetupUserComponent implements OnInit { porOrgacode: this.storageService.getItem('POR_ORGACODE'), password: this.userForm.value.defaultPassword } - console.log('Payload:', newUser); // 👈 Debug this.userService.addUser(newUser).subscribe({ next: () => { From 921b28f27b368cb9f99ea37e07656eacecf314c0 Mon Sep 17 00:00:00 2001 From: Mazdak Gibran <141390141+mazdakgibran@users.noreply.github.com> Date: Thu, 8 Jan 2026 11:50:01 +0500 Subject: [PATCH 4/4] transaction log Api integration transaction log Api integration and showing the data in tabular form. --- src/app/app.routes.ts | 8 ++ .../side-nav/side-nav.component.html | 6 ++ .../services/transaction-log.service.ts | 24 ++++++ .../transaction-logs.component.html | 81 +++++++++++++++++++ .../transaction-logs.component.scss | 0 .../transaction-logs.component.spec.ts | 23 ++++++ .../transaction-logs.component.ts | 56 +++++++++++++ src/app/utils/uri-enums.ts | 3 +- src/assets/data/app.uri.json | 5 ++ src/assets/i18n/Arabic.json | 13 +++ src/assets/i18n/English.json | 13 +++ src/styles.scss | 7 ++ 12 files changed, 238 insertions(+), 1 deletion(-) create mode 100644 src/app/shared/services/transaction-log.service.ts create mode 100644 src/app/transaction-logs/transaction-logs.component.html create mode 100644 src/app/transaction-logs/transaction-logs.component.scss create mode 100644 src/app/transaction-logs/transaction-logs.component.spec.ts create mode 100644 src/app/transaction-logs/transaction-logs.component.ts diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 62937a2..262adc0 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -68,6 +68,14 @@ export const routes: Routes = [ m => m.LoggingComponent ) }, + { + path: 'transactionLogs', + canActivate: [ActivityGuard], + loadComponent: () => + import('./transaction-logs/transaction-logs.component').then( + m => m.TransactionLogsComponent + ) + }, { path: 'analysis', canActivate: [ActivityGuard], diff --git a/src/app/shared/components/side-nav/side-nav.component.html b/src/app/shared/components/side-nav/side-nav.component.html index 87ece28..66e0cfc 100644 --- a/src/app/shared/components/side-nav/side-nav.component.html +++ b/src/app/shared/components/side-nav/side-nav.component.html @@ -47,7 +47,13 @@ {{ 'loggerManager' | translate }} +
{{'loadingTransactionLogs' | translate}}
+{{'noTransactionLogsFound' | translate}}
+| {{'logID' | translate}} | +{{'organization' | translate}} | +{{'transactionID' | translate}} | +{{'drAccount' | translate}} | +{{'crAccount' | translate}} | +{{'paymentMode' | translate}} | +{{'date' | translate}} | +{{'channel' | translate}} | +{{'createdAt' | translate}} | +
|---|---|---|---|---|---|---|---|---|
| {{ log.logId }} | +{{ log.porOrgacode }} | +{{ log.transactionID }} | +{{ log.drMbmbkmsnumber || '-' }} | +{{ log.crMbmbkmsnumber || '-' }} | +{{ log.ppmPymdcode }} | +{{ log.sgtGntrdate | date: 'MMM dd, yyyy' }} | +{{ log.channelCode }} | +{{ log.createdAt | date: 'MMM dd, yyyy HH:mm' }} | +