Merge branch 'dev-pending-01-01-2026' into aconnect-UX/1576

aconnect-UX/1576
atif118-mfsys 3 weeks ago
commit bf8ac0b2ed

@ -177,13 +177,13 @@
<i class="mdi mdi-eye-outline"></i> <i class="mdi mdi-eye-outline"></i>
</button> </button>
<button class="btn btn-secondary btn-sm" <button *ngIf="buttonPermissions?.edit" class="btn btn-secondary btn-sm"
title="Edit"> title="Edit">
<i class="fas fa-pen"></i> <i class="fas fa-pen"></i>
</button> </button>
<button class="btn btn-danger btn-sm" <button *ngIf="buttonPermissions?.delete" class="btn btn-danger btn-sm"
title="Delete"> title="Delete">
<i class="fas fa-trash-alt"></i> <i class="fas fa-trash-alt"></i>
</button> </button>

@ -4,6 +4,7 @@ import { NgSelectModule } from '@ng-select/ng-select';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { pageSizeOptions } from '../../utils/app.constants'; import { pageSizeOptions } from '../../utils/app.constants';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { ButtonManagementService } from '../../services/button-management.service';
@Component({ @Component({
selector: 'app-ib-unblock-user', selector: 'app-ib-unblock-user',
@ -16,7 +17,21 @@ export class IbUnblockUserComponent {
itemsPerPage: number = 5; itemsPerPage: number = 5;
pageSizeOptions = pageSizeOptions pageSizeOptions = pageSizeOptions
optionValue: any; optionValue: any;
buttonPermissions: any;
itemsPerPageChanged() {}
constructor(
private buttonManagementService: ButtonManagementService
){}
ngOnInit(){
this.getButtonPermissions();
}
itemsPerPageChanged() {}
getButtonPermissions() {
this.buttonPermissions = this.buttonManagementService.buttonPermissions["ibUnblockUser"];
}
} }

@ -143,12 +143,12 @@
<i class="mdi mdi-eye-outline"></i> <i class="mdi mdi-eye-outline"></i>
</button> </button>
<button class="btn btn-secondary btn-sm" title="Edit"> <button *ngIf="buttonPermissions?.edit" class="btn btn-secondary btn-sm" title="Edit">
<i class="fas fa-pen"></i> <i class="fas fa-pen"></i>
</button> </button>
<button class="btn btn-danger btn-sm" title="Delete"> <button *ngIf="buttonPermissions?.delete" class="btn btn-danger btn-sm" title="Delete">
<i class="fas fa-trash-alt"></i> <i class="fas fa-trash-alt"></i>
</button> </button>
</div> </div>

@ -4,6 +4,7 @@ import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgSelectModule } from '@ng-select/ng-select'; import { NgSelectModule } from '@ng-select/ng-select';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { pageSizeOptions } from '../../utils/app.constants'; import { pageSizeOptions } from '../../utils/app.constants';
import { ButtonManagementService } from '../../services/button-management.service';
@Component({ @Component({
selector: 'app-tran-purpose-setup', selector: 'app-tran-purpose-setup',
@ -15,5 +16,17 @@ export class TranPurposeSetupComponent {
pageSizeOptions = pageSizeOptions pageSizeOptions = pageSizeOptions
renewalDataExpanded: any; renewalDataExpanded: any;
itemsPerPage: number = 5; itemsPerPage: number = 5;
buttonPermissions: any;
constructor(
private buttonManagementService: ButtonManagementService
){}
ngOnInit(){
this.getButtonPermissions();
}
getButtonPermissions() {
this.buttonPermissions = this.buttonManagementService.buttonPermissions["thirdPartyRegistration"];
}
} }

@ -1,4 +1,4 @@
<div *ngIf="notifications$ | async as notification" class="notification" [ngClass]="notification.type"> <div *ngIf="notifications$ | async as notification" class="notification" [ngClass]="notification.type">
{{ notification.message }} {{ notification.message | translate }}
<button class="close-btn" (click)="clearNotification()">×</button> <button class="close-btn" (click)="clearNotification()">×</button>
</div> </div>

@ -2,10 +2,11 @@ import { Component } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { NotificationService } from '../../services/notification.service'; import { NotificationService } from '../../services/notification.service';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
@Component({ @Component({
selector: 'app-notifications', selector: 'app-notifications',
imports: [CommonModule], imports: [CommonModule, TranslateModule],
templateUrl: './notifications.component.html', templateUrl: './notifications.component.html',
styleUrl: './notifications.component.scss' styleUrl: './notifications.component.scss'
}) })

@ -127,7 +127,7 @@
<th>{{'smsOrgaCode' | translate}}</th> <th>{{'smsOrgaCode' | translate}}</th>
<th>{{'smsDate' | translate}}</th> <th>{{'smsDate' | translate}}</th>
<th>{{'smsStatus' | translate}}</th> <th>{{'smsStatus' | translate}}</th>
<th>{{'action' | translate}}</th> <!-- <th>{{'action' | translate}}</th> -->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -139,7 +139,7 @@
<td></td> <td></td>
<td></td> <td></td>
<td> <!-- <td>
<div <div
class="d-flex justify-content-center gap-2"> class="d-flex justify-content-center gap-2">
@ -147,19 +147,18 @@
title="View"> title="View">
<i class="mdi mdi-eye-outline"></i> <i class="mdi mdi-eye-outline"></i>
</button> </button>
<button *ngIf="buttonPermissions?.edit" class="btn btn-secondary btn-sm"
<button class="btn btn-secondary btn-sm"
title="Edit"> title="Edit">
<i class="fas fa-pen"></i> <i class="fas fa-pen"></i>
</button> </button>
<button class="btn btn-danger btn-sm" <button *ngIf="buttonPermissions?.delete" class="btn btn-danger btn-sm"
title="Delete"> title="Delete">
<i class="fas fa-trash-alt"></i> <i class="fas fa-trash-alt"></i>
</button> </button>
</div> </div>
</td> </td> -->
</tr> </tr>
</tbody> </tbody>
</table> </table>

@ -22,7 +22,7 @@
class="card-header font-edit-13-child d-flex justify-content-between align-items-center"> class="card-header font-edit-13-child d-flex justify-content-between align-items-center">
<span *ngIf="!selectedGateway"></span> <span *ngIf="!selectedGateway"></span>
<span *ngIf="selectedGateway">{{(selectedGateway === selectedGatewayType.SYRIATEL ? 'syriatelCredentials' : (selectedGateway === selectedGatewayType.TWILIO ? 'twilioCredentials' : (selectedGateway === selectedGatewayType.JAZZ ? 'jazzCredentials' : ''))) | translate}}</span> <span *ngIf="selectedGateway">{{(selectedGateway === selectedGatewayType.SYRIATEL ? 'syriatelCredentials' : (selectedGateway === selectedGatewayType.TWILIO ? 'twilioCredentials' : (selectedGateway === selectedGatewayType.JAZZ ? 'jazzCredentials' : ''))) | translate}}</span>
<select class="form-select"style="min-width: 200px; width: auto;" [(ngModel)]="selectedGateway"> <select class="form-select-sms-gateway"style="min-width: 200px; width: auto;" [(ngModel)]="selectedGateway">
<option value="">{{'SMSGatewaySelect' | translate}}</option> <option value="">{{'SMSGatewaySelect' | translate}}</option>
<option [value]="selectedGatewayType.SYRIATEL">{{'SMSGatewaySyriatel' | translate}}</option> <option [value]="selectedGatewayType.SYRIATEL">{{'SMSGatewaySyriatel' | translate}}</option>
<option [value]="selectedGatewayType.TWILIO">{{'SMSGatewayTwillio' | translate}}</option> <option [value]="selectedGatewayType.TWILIO">{{'SMSGatewayTwillio' | translate}}</option>

@ -74,6 +74,31 @@
</div> </div>
<div class="row g-3 mb-3"> <div class="row g-3 mb-3">
<div class="col-md-6">
<div class="d-flex align-items-center gap-2">
<label for="email" class="text-nowrap">
{{ 'email' | translate }}<span
class="mandatory">*</span>
</label>
<div class="password-wrapper position-relative w-100">
<input id="email"
class="form-control"
formControlName="email"
name="email"
placeholder="{{ 'email' | translate }}" appNoWhitespaces/>
<div class="text-danger" *ngIf="userForm.get('email')?.errors?.['required']
&& userForm.get('email')?.touched">
{{ 'fieldRequired' | translate }}
</div>
<div class="text-danger" *ngIf="userForm.get('email')?.errors?.['email']
&& userForm.get('email')?.touched">
{{"invalidEmail" | translate}}
</div>
</div>
</div>
</div>
<div class="col-md-6"> <div class="col-md-6">
<div class="d-flex align-items-center gap-2"> <div class="d-flex align-items-center gap-2">
<label for="defaultPassword" class="text-nowrap"> <label for="defaultPassword" class="text-nowrap">
@ -94,8 +119,22 @@
</div> </div>
</div> </div>
</div>
<div class="col-md-6"> <div class="col-md-6">
<div class="d-flex align-items-center gap-2">
<label for="userRole" class="text-nowrap">
{{ 'SelectRole' | translate }}<span class="mandatory">*</span>
</label>
<div class="password-wrapper position-relative w-100">
<ng-select id="userRole" class="form-select" formControlName="userRole" [items]="roleOptions" bindLabel="label"
bindValue="value" placeholder="{{ 'SelectRole' | translate }}" >
</ng-select>
<div class="text-danger" *ngIf="userForm.get('userRole')?.touched && userForm.get('userRole')?.invalid">
{{ 'fieldRequired' | translate }}
</div>
</div>
</div> </div>
</div> </div>
<div class="row g-3 mb-3"> <div class="row g-3 mb-3">
@ -179,7 +218,7 @@
<i class="mdi mdi-eye-outline"></i> <i class="mdi mdi-eye-outline"></i>
</button> </button>
<button class="btn btn-danger btn-sm" title="Delete" (click)="onDelete(item.userId)"> <button *ngIf="buttonPermissions?.delete" class="btn btn-danger btn-sm" title="Delete" (click)="onDelete(item.userId)">
<i class="fas fa-trash-alt"></i> <i class="fas fa-trash-alt"></i>
</button> </button>

@ -8,6 +8,7 @@ import { SetupUser } from '../../models/user';
import { UserSetupService } from '../../services/user-setup.service'; import { UserSetupService } from '../../services/user-setup.service';
import { UserFilterPipe } from '../../shared/pipes/userFilterPipe'; import { UserFilterPipe } from '../../shared/pipes/userFilterPipe';
import { FormBuilder, Validators, FormGroup } from '@angular/forms'; import { FormBuilder, Validators, FormGroup } from '@angular/forms';
import { ButtonManagementService } from '../../services/button-management.service';
import { StorageService } from '../../shared/services/storage.service'; import { StorageService } from '../../shared/services/storage.service';
@ -33,13 +34,24 @@ export class SetupUserComponent implements OnInit {
renewalDataExpanded: boolean = true; renewalDataExpanded: boolean = true;
totalCount: number = 0; totalCount: number = 0;
mode: 'edit' | 'view' = 'view'; 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$(){ get users$(){
return this.userService.users$; return this.userService.users$;
} }
onSearch(value: string): void { onSearch(value: string): void {
this.searchText = value; this.searchText = value;
} }
@ -70,7 +82,7 @@ export class SetupUserComponent implements OnInit {
userId: this.userForm.value.userId, userId: this.userForm.value.userId,
userFullname: this.userForm.value.userFullname, userFullname: this.userForm.value.userFullname,
email: `${this.userForm.value.userId}@dummy.com`, email: `${this.userForm.value.userId}@dummy.com`,
role: 'ADMIN', role: this.userForm.value.userRole,
porOrgacode: this.storageService.getItem('POR_ORGACODE'), porOrgacode: this.storageService.getItem('POR_ORGACODE'),
password: this.userForm.value.defaultPassword password: this.userForm.value.defaultPassword
} }
@ -82,6 +94,7 @@ export class SetupUserComponent implements OnInit {
this.userForm.reset(); this.userForm.reset();
this.mode = 'edit'; this.mode = 'edit';
}, },
error: (err: any) => console.error(err) error: (err: any) => console.error(err)
}); });
@ -117,10 +130,15 @@ export class SetupUserComponent implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
this.getButtonPermissions();
this.userForm = this.fb.group({ this.userForm = this.fb.group({
userId: ['', [Validators.required]], userId: ['', [Validators.required]],
userFullname: ['', [Validators.required, Validators.maxLength(500)]], userFullname: ['', [Validators.required, Validators.maxLength(500)]],
defaultPassword: ['', Validators.required] defaultPassword: ['', Validators.required],
email: ['', [Validators.required, Validators.email]],
userRole: ['', Validators.required]
}); });
this.userService.loadUsers(); this.userService.loadUsers();
@ -139,4 +157,8 @@ ngOnInit(): void {
}); });
} }
getButtonPermissions(){
this.buttonPermissions = this.buttonManagementService.buttonPermissions["setupUser"];
}
} }

@ -265,13 +265,13 @@
<i class="mdi mdi-eye-outline"></i> <i class="mdi mdi-eye-outline"></i>
</button> </button>
<button class="btn btn-secondary btn-sm" <button *ngIf="buttonPermissions?.edit" class="btn btn-secondary btn-sm"
title="Edit"> title="Edit">
<i class="fas fa-pen"></i> <i class="fas fa-pen"></i>
</button> </button>
<button class="btn btn-danger btn-sm" <button *ngIf="buttonPermissions?.delete" class="btn btn-danger btn-sm"
title="Delete"> title="Delete">
<i class="fas fa-trash-alt"></i> <i class="fas fa-trash-alt"></i>
</button> </button>
@ -290,12 +290,6 @@
<div class="text-muted"> <div class="text-muted">
{{'page' | translate}} {{'of' | translate}} ( {{'totalItems' | translate}}) {{'page' | translate}} {{'of' | translate}} ( {{'totalItems' | translate}})
</div> </div>
<!-- <div class="text-muted">
{{'no_record' | translate}}
</div>
<div class="text-muted">
{{'page' | translate}} {{'of' | translate}} ( {{'record' | translate}})
</div> -->
<div class="btn-group"> <div class="btn-group">
<button class="btn btn-primary waves-effect waves-light"> <button class="btn btn-primary waves-effect waves-light">

@ -8,6 +8,7 @@ import { PasswordHideShowComponent } from '../../shared/components/password-hide
import { pageSizeOptions } from '../../utils/app.constants'; import { pageSizeOptions } from '../../utils/app.constants';
import { URIKey } from '../../utils/uri-enums'; import { URIKey } from '../../utils/uri-enums';
import { HttpURIService } from '../../app.http.uri.service'; import { HttpURIService } from '../../app.http.uri.service';
import { ButtonManagementService } from '../../services/button-management.service';
@Component({ @Component({
selector: 'app-third-party-registration', selector: 'app-third-party-registration',
@ -22,14 +23,23 @@ export class ThirdPartyRegistrationComponent implements OnInit {
renewalDataExpanded = true; renewalDataExpanded = true;
pageSizeOptions = pageSizeOptions; pageSizeOptions = pageSizeOptions;
itemsPerPage: number = 5; itemsPerPage: number = 5;
constructor(private fb: FormBuilder, private httpURIService: HttpURIService){} buttonPermissions: any;
@ViewChild(PasswordHideShowComponent) passwordHideShow?: PasswordHideShowComponent; @ViewChild(PasswordHideShowComponent) passwordHideShow?: PasswordHideShowComponent;
constructor(
private fb: FormBuilder,
private httpURIService: HttpURIService,
private buttonManagementService: ButtonManagementService
){}
togglePasswordType() { togglePasswordType() {
this.passwordType = this.passwordHideShow?.showPassword ? 'password' : 'text'; this.passwordType = this.passwordHideShow?.showPassword ? 'password' : 'text';
} }
ngOnInit(): void{ ngOnInit(): void{
this.getButtonPermissions();
this.thirdPartyRegForm = this.fb.group({ this.thirdPartyRegForm = this.fb.group({
thirdPartyId: ['', [Validators.required]], thirdPartyId: ['', [Validators.required]],
thirdPartyName: ['',[Validators.required]], thirdPartyName: ['',[Validators.required]],
@ -67,4 +77,8 @@ export class ThirdPartyRegistrationComponent implements OnInit {
this.httpURIService.requestPOST(URIKey.THIRD_PARTY_REGISTER_URI, payload) this.httpURIService.requestPOST(URIKey.THIRD_PARTY_REGISTER_URI, payload)
.subscribe(); .subscribe();
} }
getButtonPermissions() {
this.buttonPermissions = this.buttonManagementService.buttonPermissions["thirdPartyRegistration"];
}
} }

@ -495,7 +495,8 @@ margin-bottom:.5rem;
padding-right: var(--bs-gutter-x, 12px); padding-right: var(--bs-gutter-x, 12px);
padding-left: var(--bs-gutter-x, 12px); padding-left: var(--bs-gutter-x, 12px);
margin-right: auto; margin-right: auto;
margin-left: auto margin-left: auto;
margin-bottom: 4.2rem
} }
@media (min-width:576px) { @media (min-width:576px) {
.container, .container-sm { .container, .container-sm {
@ -2183,7 +2184,7 @@ border-radius:.25rem
.form-select { .form-select {
display: block; display: block;
width: 100%; width: 100%;
padding:.47rem; /* padding:.47rem;*/
-moz-padding-start:calc(.75rem - 3px); -moz-padding-start:calc(.75rem - 3px);
font-size:.8125rem; font-size:.8125rem;
font-weight: 400; font-weight: 400;
@ -2194,7 +2195,7 @@ font-size:.8125rem;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position:right .75rem center; background-position:right .75rem center;
background-size: 16px 12px; background-size: 16px 12px;
border: 1px solid #ced4da; /* border: 1px solid #ced4da; */
border-radius:.25rem; border-radius:.25rem;
-webkit-transition: border-color .15s ease-in-out, -webkit-box-shadow .15s ease-in-out; -webkit-transition: border-color .15s ease-in-out, -webkit-box-shadow .15s ease-in-out;
transition: border-color .15s ease-in-out, -webkit-box-shadow .15s ease-in-out; transition: border-color .15s ease-in-out, -webkit-box-shadow .15s ease-in-out;
@ -2204,6 +2205,22 @@ border-radius:.25rem;
-moz-appearance: none; -moz-appearance: none;
appearance: none appearance: none
} }
.form-select-sms-gateway {
padding: .15rem;
border: 1px solid #ced4da;
border-radius: .25rem;
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.form-select-sms-gateway:focus {
outline: none;
box-shadow: none;
border-color: #0d6efd;
}
@media (prefers-reduced-motion:reduce) { @media (prefers-reduced-motion:reduce) {
.form-select { .form-select {
-webkit-transition: none; -webkit-transition: none;
@ -4411,6 +4428,7 @@ border-bottom-left-radius:calc(.25rem - 0)
-ms-flex: 1 1 auto; -ms-flex: 1 1 auto;
flex: 1 1 auto; flex: 1 1 auto;
padding: 1rem 1rem; padding: 1rem 1rem;
padding-bottom: 1.5rem;
} }
.card-title { .card-title {
margin-bottom:.5rem margin-bottom:.5rem

@ -248,5 +248,8 @@
"choose" : "يختار", "choose" : "يختار",
"allow": "يسمح", "allow": "يسمح",
"toDateInvalidError": "يجب أن يكون تاريخ اليوم أكبر من أو يساوي تاريخ البداية", "toDateInvalidError": "يجب أن يكون تاريخ اليوم أكبر من أو يساوي تاريخ البداية",
"noLoggingDetailsFound": "لم يتم العثور على تفاصيل التسجيل" "noLoggingDetailsFound": "لم يتم العثور على تفاصيل التسجيل",
"ERR_SEC_0001": "البريد الإلكتروني موجود بالفعل",
"ERR_SEC_0002": "اسم المستخدم موجود بالفعل",
"ERR_SEC_0003": "كلمة المرور القديمة غير صحيحة"
} }

@ -84,6 +84,7 @@
"name":"Name", "name":"Name",
"EnterThirdPartyName":"Enter Third Party Name", "EnterThirdPartyName":"Enter Third Party Name",
"Email":"Email", "Email":"Email",
"email":"Email",
"Address":"Address", "Address":"Address",
"phoneNumber":"Phone Number", "phoneNumber":"Phone Number",
"PhoneNumberPlaceHolder":"Enter Phone Number", "PhoneNumberPlaceHolder":"Enter Phone Number",
@ -247,5 +248,8 @@
"choose" : "Choose", "choose" : "Choose",
"allow": "Allow", "allow": "Allow",
"toDateInvalidError": "To Date must be greater than or equal to From Date", "toDateInvalidError": "To Date must be greater than or equal to From Date",
"noLoggingDetailsFound": "No Logging Details found" "noLoggingDetailsFound": "No Logging Details found",
"ERR_SEC_0001": "Email already exists",
"ERR_SEC_0002": "Username already exists",
"ERR_SEC_0003": "Old Password is not correct"
} }

@ -165,4 +165,7 @@ ng-select.form-select-sm {
.card-header{ .card-header{
border: none !important; border: none !important;
} }
.ng-select .ng-select-container{
width: 98% !important;
}

Loading…
Cancel
Save