From 383772db87ff264510aac45ede801fe74bcb65b6 Mon Sep 17 00:00:00 2001 From: atif118-mfsys Date: Wed, 10 Dec 2025 11:35:49 +0500 Subject: [PATCH] added design for third party registration screen --- angular.json | 1 + package.json | 1 + .../password-hide-show.component.html | 2 +- src/app/shared/services/http.service.ts | 8 +- .../third-party-registration.component.html | 295 +++++++++++++++++- .../third-party-registration.component.ts | 21 +- src/app/utils/app.constants.ts | 8 +- src/assets/i18n/Arabic.json | 16 +- src/assets/i18n/English.json | 16 +- src/styles.scss | 159 +++++++++- 10 files changed, 514 insertions(+), 13 deletions(-) diff --git a/angular.json b/angular.json index 3e041c1..ab0275f 100644 --- a/angular.json +++ b/angular.json @@ -31,6 +31,7 @@ ], "styles": [ "src/styles.scss", + "node_modules/@ng-select/ng-select/themes/default.theme.css", "node_modules/ngx-toastr/toastr.css", "src/assets/css/owl.carousel.min.css", "src/assets/css/bootstrap.min.css", diff --git a/package.json b/package.json index cc6f3c5..dab2037 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@angular/platform-server": "^19.1.0", "@angular/router": "^19.1.0", "@angular/ssr": "^19.1.6", + "@ng-select/ng-select": "^14.8.0", "@ngx-translate/core": "^17.0.0", "@ngx-translate/http-loader": "^16.0.1", "bootstrap": "^5.3.8", diff --git a/src/app/shared/components/password-hide-show/password-hide-show.component.html b/src/app/shared/components/password-hide-show/password-hide-show.component.html index f298067..cc1405a 100644 --- a/src/app/shared/components/password-hide-show/password-hide-show.component.html +++ b/src/app/shared/components/password-hide-show/password-hide-show.component.html @@ -1 +1 @@ - + diff --git a/src/app/shared/services/http.service.ts b/src/app/shared/services/http.service.ts index 7cbb681..99f0ee7 100644 --- a/src/app/shared/services/http.service.ts +++ b/src/app/shared/services/http.service.ts @@ -25,7 +25,7 @@ export class HttpService { const authorization = "Bearer " + localStorage.getItem('token'); headers = headers.set("Authorization", authorization); headers = headers.set("cmpUserId", custId); - let apiUrl = CONSTANTS.API_PATH + url; + let apiUrl = this.API_PATH + url; this.miscService.showLoader(); apiUrl = this.replaceParamsWithValues(apiUrl, pathParams); @@ -52,7 +52,7 @@ export class HttpService { postRequest(url: string, data?: any, pathParams?: any, isMultipart = false, showLoader = true) { const custId = localStorage.getItem("USERKEY"); let headers = new HttpHeaders().set("Content-Type", "application/json"); - let apiUrl = CONSTANTS.API_PATH + url; + let apiUrl = this.API_PATH + url; this.miscService.showLoader(); headers = headers.set("Authorization", "Bearer " + localStorage.getItem('token')); if (custId != null) { @@ -90,7 +90,7 @@ export class HttpService { let headers = new HttpHeaders().set("Content-Type", "application/json"); headers = headers.set("cmpUserId", custId); headers = headers.set("Authorization", "Bearer " + localStorage.getItem('token')); - let apiUrl = CONSTANTS.API_PATH + url; + let apiUrl = this.API_PATH + url; apiUrl = this.replaceParamsWithValues(apiUrl, pathParams); this.miscService.showLoader(); let formData = data; @@ -123,7 +123,7 @@ export class HttpService { deleteRequest(url: any, data: any, pathParams?: any, isMultipart = false, showLoader = true) { const custId: any = localStorage.getItem("USERKEY"); - let apiUrl = CONSTANTS.API_PATH + url; + let apiUrl = this.API_PATH + url; let headers = new HttpHeaders().set("Content-Type", "application/json"); headers = headers.set("Authorization", "Bearer " + localStorage.getItem('token')); headers = headers.set("cmpUserId", custId); 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 b41522d..f3036ce 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 @@ -1 +1,294 @@ -

third-party-registration works!

+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ {{'thirdPartyRegistration' | translate}} +
+
+
+
+
+
+ +
+ + +
+
+
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+ + +
+
+
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+ + +
+
+
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+ + + + +
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{'thirdPartyRegistrationDetails' | translate}} +
+ + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
{{'ThirdPartyID' | translate}}{{'Name' | translate}}{{'Email' | translate}}{{'Address' | translate}}{{'PhoneNumber' | translate}}{{'TotalNoOfAccounts' | translate}}{{'action' | translate}}
+
+ + + + + + + +
+
+
+
+ + +
+ +
+ {{'page' | translate}} {{'of' | translate}} ( {{'totalItems' | translate}}) +
+ + +
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/src/app/user-management/third-party-registration/third-party-registration.component.ts b/src/app/user-management/third-party-registration/third-party-registration.component.ts index 625ec4d..75cf93b 100644 --- a/src/app/user-management/third-party-registration/third-party-registration.component.ts +++ b/src/app/user-management/third-party-registration/third-party-registration.component.ts @@ -1,11 +1,28 @@ -import { Component } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { Component, ViewChild } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgSelectModule } from '@ng-select/ng-select'; + +import { PasswordHideShowComponent } from '../../shared/components/password-hide-show/password-hide-show.component'; +import { pageSizeOptions } from '../../utils/app.constants'; @Component({ selector: 'app-third-party-registration', - imports: [], + imports: [TranslateModule, CommonModule, FormsModule, PasswordHideShowComponent, NgSelectModule ], templateUrl: './third-party-registration.component.html', styleUrl: './third-party-registration.component.scss' }) export class ThirdPartyRegistrationComponent { + searchText: string = ''; + passwordType: string = 'password'; + renewalDataExpanded = true; + pageSizeOptions = pageSizeOptions; + itemsPerPage: number = 5; + + @ViewChild(PasswordHideShowComponent) passwordHideShow?: PasswordHideShowComponent; + togglePasswordType() { + this.passwordType = this.passwordHideShow?.showPassword ? 'password' : 'text'; + } } diff --git a/src/app/utils/app.constants.ts b/src/app/utils/app.constants.ts index dfeff5e..cab96e5 100644 --- a/src/app/utils/app.constants.ts +++ b/src/app/utils/app.constants.ts @@ -1,5 +1,9 @@ export const CONSTANTS = { - API_PATH: 'http://localhost:8090/MCONNECT', POR_ORGACODE: '0005', - VERSION_NUMBER:'Version 1.0.0.0 Build-1.0' }; + +export const pageSizeOptions = [ + { label: '5 items', value: 5 }, + { label: '10 items', value: 10 }, + { label: '20 items', value: 20 } +]; diff --git a/src/assets/i18n/Arabic.json b/src/assets/i18n/Arabic.json index 39464bc..4b3ac72 100644 --- a/src/assets/i18n/Arabic.json +++ b/src/assets/i18n/Arabic.json @@ -186,5 +186,19 @@ "versionBuildDate": "+ تاريخ البناء {{date}}", "dashboard":"لوحة القيادة", "date" : "تاريخ", - "logout": "تسجيل الخروج" + "logout": "تسجيل الخروج", + "save": "يحفظ", + "update": "تحديث", + "cancel": "يلغي", + "thirdPartyRegistrationDetails": "تفاصيل تسجيل الطرف الثالث", + "search": "يبحث", + "thirdPartyNamePlaceholder": "أدخل اسم الطرف الثالث", + "phoneNumberPlaceholder": "أدخل رقم الهاتف", + "newNoOfAccountsPlaceholder": "أدخل عدد الحسابات الجديد", + "page": "صفحة", + "of": "ل", + "totalItems": "السجلات", + "record": "سِجِلّ", + "previous": "سابق", + "next": "التالي" } \ No newline at end of file diff --git a/src/assets/i18n/English.json b/src/assets/i18n/English.json index a274d2b..a1b5baf 100644 --- a/src/assets/i18n/English.json +++ b/src/assets/i18n/English.json @@ -189,5 +189,19 @@ "versionAndBuildNumber": "Version {{versionNumber}} Build {{buildNumber}}", "versionBuildDate": "+ Build Date {{date}}", "date" : "Date", - "logout": "Log Out" + "logout": "Log Out", + "save": "Save", + "update": "Update", + "cancel": "Cancel", + "thirdPartyRegistrationDetails": "Third Party Registration Details", + "search": "Search", + "thirdPartyNamePlaceholder": "Enter Third Party Name", + "phoneNumberPlaceholder": "Enter Phone Number", + "newNoOfAccountsPlaceholder": "Enter New Number of Accounts", + "page": "Page", + "of": "of", + "totalItems": "Records", + "record": "Record", + "previous": "Previous", + "next": "Next" } \ No newline at end of file diff --git a/src/styles.scss b/src/styles.scss index 90d4ee0..7c3cb16 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -1 +1,158 @@ -/* You can add global styles to this file, and also import other style files */ +.vertical-collapsed .main-content { + margin-left: 80px; + } + + .main-content.extended { + margin-left: 15%; + } + .table th input[type="text"] { + box-sizing: border-box; + background-color: rgb(255, 255, 255); + text-align: center; + border-style: dotted; + opacity: 0.5; + } + + table { + width: 100% !important; + border-collapse: collapse !important; + } + th, td { + border: 1px solid #ddd !important; + padding: 8px !important; + text-align: center !important; + } + th { + background-color: #2A7BC3 !important; /* Green background for headers */ + color: white !important; + } + .sub-header { + background-color: #E2F0D9 !important; /* Light blue background for sub-headers */ + color: black !important; + } + .data-row { + background-color: #f9f9f9 !important; /* Light gray background for data rows */ + } + .mandatory + { + color: red; + } + .text-nowrap + { + min-width:160px; + } + .custom-ng-select { + width: 100%; + +} +.search-box { + position: relative; + width: 200px; +} + +.search-box .search-icon { + position: absolute; + right: 10px; + top: 50%; + transform: translateY(-14%); + color: #6c757d; + pointer-events: none; +} + +.search-box input { + padding-right: 30px; +} +.custom-popup-overlay { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.5); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; +} + +.custom-popup-container { + background-color: white; + border-radius: 8px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); + width: 400px; + max-width: 90%; +} + +.custom-popup-header { + padding: 16px; + border-bottom: 1px solid #eee; + display: flex; + justify-content: space-between; + align-items: center; +} + +.custom-popup-close { + background: none; + border: none; + font-size: 24px; + cursor: pointer; + color: #666; + &:hover { + color: #000; + } +} + +.custom-popup-body { + padding: 20px; +} + +.custom-popup-footer { + padding: 16px; + border-top: 1px solid #eee; + display: flex; + justify-content: flex-end; + gap: 10px; +} +.pagination-controls { + margin-top: 15px; + display: flex; + gap: 10px; + align-items: center; +} + +.pagination-controls button { + padding: 5px 10px; + cursor: pointer; +} + +.pagination-controls button:disabled { + opacity: 0.5; + cursor: not-allowed; +} +ng-select.form-select-sm { + width: 120px; + display: inline-block; +} +.password-wrapper { + position: relative; +} + +.password-eye { + position: absolute; + top: 50%; + right: 0.5px; + transform: translateY(-50%); + cursor: pointer; + display: flex; + align-items: center; + background: transparent !important; + padding: 0 !important; + margin: 0; + height: 100%; + z-index: 5; +} + +.password-eye * { + font-size: 18px; +} +