diff --git a/src/app/ib-support/ib-unblock-user/ib-unblock-user.component.html b/src/app/ib-support/ib-unblock-user/ib-unblock-user.component.html index eac11e4..c408cc9 100644 --- a/src/app/ib-support/ib-unblock-user/ib-unblock-user.component.html +++ b/src/app/ib-support/ib-unblock-user/ib-unblock-user.component.html @@ -177,13 +177,13 @@ - - diff --git a/src/app/ib-support/ib-unblock-user/ib-unblock-user.component.ts b/src/app/ib-support/ib-unblock-user/ib-unblock-user.component.ts index 660a08a..3754cfa 100644 --- a/src/app/ib-support/ib-unblock-user/ib-unblock-user.component.ts +++ b/src/app/ib-support/ib-unblock-user/ib-unblock-user.component.ts @@ -4,6 +4,7 @@ import { NgSelectModule } from '@ng-select/ng-select'; import { TranslateModule } from '@ngx-translate/core'; import { pageSizeOptions } from '../../utils/app.constants'; import { CommonModule } from '@angular/common'; +import { ButtonManagementService } from '../../services/button-management.service'; @Component({ selector: 'app-ib-unblock-user', @@ -16,7 +17,21 @@ export class IbUnblockUserComponent { itemsPerPage: number = 5; pageSizeOptions = pageSizeOptions optionValue: any; + buttonPermissions: any; + + + constructor( + private buttonManagementService: ButtonManagementService + ){} + + ngOnInit(){ + this.getButtonPermissions(); + } -itemsPerPageChanged() {} + itemsPerPageChanged() {} + + getButtonPermissions() { + this.buttonPermissions = this.buttonManagementService.buttonPermissions["ibUnblockUser"]; + } } diff --git a/src/app/ib-support/tran-purpose-setup/tran-purpose-setup.component.html b/src/app/ib-support/tran-purpose-setup/tran-purpose-setup.component.html index efc60d1..9e21f2e 100644 --- a/src/app/ib-support/tran-purpose-setup/tran-purpose-setup.component.html +++ b/src/app/ib-support/tran-purpose-setup/tran-purpose-setup.component.html @@ -143,12 +143,12 @@ - - diff --git a/src/app/ib-support/tran-purpose-setup/tran-purpose-setup.component.ts b/src/app/ib-support/tran-purpose-setup/tran-purpose-setup.component.ts index 2198e25..f98d88d 100644 --- a/src/app/ib-support/tran-purpose-setup/tran-purpose-setup.component.ts +++ b/src/app/ib-support/tran-purpose-setup/tran-purpose-setup.component.ts @@ -4,6 +4,7 @@ import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { NgSelectModule } from '@ng-select/ng-select'; import { TranslateModule } from '@ngx-translate/core'; import { pageSizeOptions } from '../../utils/app.constants'; +import { ButtonManagementService } from '../../services/button-management.service'; @Component({ selector: 'app-tran-purpose-setup', @@ -15,5 +16,17 @@ export class TranPurposeSetupComponent { pageSizeOptions = pageSizeOptions renewalDataExpanded: any; itemsPerPage: number = 5; + buttonPermissions: any; + constructor( + private buttonManagementService: ButtonManagementService + ){} + + ngOnInit(){ + this.getButtonPermissions(); + } + + getButtonPermissions() { + this.buttonPermissions = this.buttonManagementService.buttonPermissions["thirdPartyRegistration"]; + } } diff --git a/src/app/shared/components/notifications/notifications.component.html b/src/app/shared/components/notifications/notifications.component.html index 09559e0..d805165 100644 --- a/src/app/shared/components/notifications/notifications.component.html +++ b/src/app/shared/components/notifications/notifications.component.html @@ -1,4 +1,4 @@
- {{ notification.message }} + {{ notification.message | translate }}
\ No newline at end of file diff --git a/src/app/shared/components/notifications/notifications.component.ts b/src/app/shared/components/notifications/notifications.component.ts index 4608fe9..661b673 100644 --- a/src/app/shared/components/notifications/notifications.component.ts +++ b/src/app/shared/components/notifications/notifications.component.ts @@ -2,10 +2,11 @@ import { Component } from '@angular/core'; import { Observable } from 'rxjs'; import { NotificationService } from '../../services/notification.service'; import { CommonModule } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'app-notifications', - imports: [CommonModule], + imports: [CommonModule, TranslateModule], templateUrl: './notifications.component.html', styleUrl: './notifications.component.scss' }) diff --git a/src/app/sms-banking/sms-banking.component.html b/src/app/sms-banking/sms-banking.component.html index 4d8400a..fbd16fd 100644 --- a/src/app/sms-banking/sms-banking.component.html +++ b/src/app/sms-banking/sms-banking.component.html @@ -127,7 +127,7 @@ {{'smsOrgaCode' | translate}} {{'smsDate' | translate}} {{'smsStatus' | translate}} - {{'action' | translate}} + @@ -139,7 +139,7 @@ - + diff --git a/src/app/sms-gateway/sms-gateway.component.html b/src/app/sms-gateway/sms-gateway.component.html index c9abc50..4f50f7a 100644 --- a/src/app/sms-gateway/sms-gateway.component.html +++ b/src/app/sms-gateway/sms-gateway.component.html @@ -22,7 +22,7 @@ class="card-header font-edit-13-child d-flex justify-content-between align-items-center"> {{(selectedGateway === selectedGatewayType.SYRIATEL ? 'syriatelCredentials' : (selectedGateway === selectedGatewayType.TWILIO ? 'twilioCredentials' : (selectedGateway === selectedGatewayType.JAZZ ? 'jazzCredentials' : ''))) | translate}} - diff --git a/src/app/user-management/setup-user/setup-user.component.html b/src/app/user-management/setup-user/setup-user.component.html index f8a8a14..ad2e749 100644 --- a/src/app/user-management/setup-user/setup-user.component.html +++ b/src/app/user-management/setup-user/setup-user.component.html @@ -75,6 +75,31 @@
+
+ +
+ + +
+ {{ 'fieldRequired' | translate }} +
+
+ {{"invalidEmail" | translate}} +
+
+ +
+
+
-
- + +
+
+
+ +
+ + + +
+ {{ 'fieldRequired' | translate }} +
+
- 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 fa10fbb..befccb4 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 { ButtonManagementService } from '../../services/button-management.service'; import { StorageService } from '../../shared/services/storage.service'; @@ -33,13 +34,24 @@ export class SetupUserComponent implements OnInit { renewalDataExpanded: boolean = true; totalCount: number = 0; mode: 'edit' | 'view' = 'view'; + buttonPermissions: any; + roleOptions = [ + { label: 'Admin', value: 'ADMIN' }, + { label: 'User', value: 'USER' } + ]; - constructor(private userService: UserSetupService, private fb: FormBuilder, private storageService: StorageService){} + constructor( + private userService: UserSetupService, + private fb: FormBuilder, + private buttonManagementService: ButtonManagementService, + private storageService: StorageService + ){} get users$(){ return this.userService.users$; } + onSearch(value: string): void { this.searchText = value; } @@ -70,7 +82,7 @@ export class SetupUserComponent implements OnInit { userId: this.userForm.value.userId, userFullname: this.userForm.value.userFullname, email: `${this.userForm.value.userId}@dummy.com`, - role: 'ADMIN', + role: this.userForm.value.userRole, porOrgacode: this.storageService.getItem('POR_ORGACODE'), password: this.userForm.value.defaultPassword } @@ -82,6 +94,7 @@ export class SetupUserComponent implements OnInit { this.userForm.reset(); this.mode = 'edit'; }, + error: (err: any) => console.error(err) }); @@ -117,10 +130,15 @@ export class SetupUserComponent implements OnInit { } ngOnInit(): void { + + this.getButtonPermissions(); + this.userForm = this.fb.group({ userId: ['', [Validators.required]], userFullname: ['', [Validators.required, Validators.maxLength(500)]], - defaultPassword: ['', Validators.required] + defaultPassword: ['', Validators.required], + email: ['', [Validators.required, Validators.email]], + userRole: ['', Validators.required] }); this.userService.loadUsers(); @@ -139,4 +157,8 @@ ngOnInit(): void { }); } + getButtonPermissions(){ + this.buttonPermissions = this.buttonManagementService.buttonPermissions["setupUser"]; + } + } diff --git a/src/app/user-management/third-party-registration/third-party-registration.component.html b/src/app/user-management/third-party-registration/third-party-registration.component.html index 804e35a..d1b352d 100644 --- a/src/app/user-management/third-party-registration/third-party-registration.component.html +++ b/src/app/user-management/third-party-registration/third-party-registration.component.html @@ -265,13 +265,13 @@ - - @@ -290,13 +290,7 @@
{{'page' | translate}} {{'of' | translate}} ( {{'totalItems' | translate}})
- - +