feat: complete UI redesign — client creation tabs, footer, home page, CIF & occupation fields

- Client creation: replaced vertical stepper with 3-tab layout (General, KYC & Nominee, Preview)
- All form fields redesigned with appearance="outline" and section grouping
- Preview tab with profile card, info tables, KYC details, family members
- Footer redesigned: security bar, LincShield certifications, regulatory & legal, quick navigation, support & contact, LincPay branding
- Home page redesigned: welcome banner, quick action cards, info row
- Client view header redesigned: ID chips row (Account No, CIF Number, External Id), 4-column details grid
- Added CIF Number column to clients list table
- Added CIF Number display to client view sidebar and personal data tab
- Added occupationCategoryId and occupationId dropdowns to client creation form
- Added occupation fields to client view sidebar, personal data tab, and preview
- Added 51+ missing translation keys to en-US.json
- Toolbar: added Last login chip
- Registered faUserPlus icon

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Aditya
2026-03-20 19:19:47 +05:30
co-authored by Claude Opus 4.6
parent b3a4cce0cf
commit 7b1f2e8ad7
81 changed files with 8384 additions and 3923 deletions
@@ -7,87 +7,115 @@
-->
<div class="mat-typography">
<h3>{{ 'labels.heading.Address' | translate }}</h3>
<div class="section-block">
<div class="section-header">
<h4 class="section-title">
<fa-icon icon="location-arrow" class="section-icon"></fa-icon>
{{ 'labels.heading.Address' | translate }}
</h4>
<button mat-stroked-button color="primary" (click)="addAddress()" class="add-btn">
<fa-icon icon="plus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Add' | translate }}
</button>
</div>
<div class="layout-row align-end m-b-20">
<button mat-raised-button color="primary" (click)="addAddress()">
<fa-icon icon="plus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Add' | translate }}
</button>
</div>
@if (clientAddressData.length === 0) {
<div class="empty-state">
<fa-icon icon="location-arrow" class="empty-icon"></fa-icon>
<span>No address added yet. Click Add to add an address.</span>
</div>
}
@if (clientAddressData.length > 0) {
<mat-accordion>
@for (address of clientAddressData; track address; let i = $index) {
<mat-expansion-panel class="address">
<mat-expansion-panel-header>
<mat-panel-title>
{{ getSelectedValue('addressTypeIdOptions', address.addressTypeId)?.name }}
</mat-panel-title>
<mat-panel-description>
{{ address.relationship }}
</mat-panel-description>
</mat-expansion-panel-header>
<mat-divider></mat-divider>
<div class="address-actions layout-row align-end align-items-center">
<button mat-button color="primary" (click)="editAddress(address, i)">
<fa-icon icon="edit"></fa-icon>
</button>
<button mat-button color="warn" (click)="deleteAddress(address, i)">
<fa-icon icon="trash"></fa-icon>
</button>
<mat-slide-toggle [checked]="address.isActive" (change)="toggleAddress(address)"></mat-slide-toggle>
</div>
<p>
@if (isFieldEnabled('street')) {
<span>{{ 'labels.inputs.Street' | translate }} : {{ address.street }}<br /></span>
}
@if (isFieldEnabled('addressLine1')) {
<span>{{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }}<br /></span>
}
@if (isFieldEnabled('addressLine2')) {
<span>{{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }}<br /></span>
}
@if (isFieldEnabled('addressLine3')) {
<span>{{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }}<br /></span>
}
@if (isFieldEnabled('townVillage')) {
<span>{{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }}<br /></span>
}
@if (isFieldEnabled('city')) {
<span>{{ 'labels.inputs.City' | translate }} : {{ address.city }}<br /></span>
}
@if (isFieldEnabled('stateProvinceId')) {
<span
>{{ 'labels.inputs.State / Province' | translate }} :
{{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }}<br
/></span>
}
@if (isFieldEnabled('countryId')) {
<span
>{{ 'labels.inputs.Country' | translate }} :
{{ getSelectedValue('countryIdOptions', address.countryId)?.name }}<br
/></span>
}
@if (isFieldEnabled('postalCode')) {
<span>{{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }}<br /></span>
}
@if (isFieldEnabled('isActive')) {
<span>{{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }}<br /></span>
}
</p>
</mat-expansion-panel>
}
</mat-accordion>
}
@if (clientAddressData.length > 0) {
<mat-accordion>
@for (address of clientAddressData; track address; let i = $index) {
<mat-expansion-panel class="address-panel">
<mat-expansion-panel-header>
<mat-panel-title>
<fa-icon icon="location-arrow" class="panel-icon"></fa-icon>
{{ getSelectedValue('addressTypeIdOptions', address.addressTypeId)?.name }}
</mat-panel-title>
<mat-panel-description>
{{ address.relationship }}
</mat-panel-description>
</mat-expansion-panel-header>
<div class="layout-row align-center gap-2percent margin-t responsive-column">
<button mat-raised-button matStepperPrevious>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button matStepperNext>
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
<mat-divider></mat-divider>
<div class="address-actions">
<button mat-button color="primary" (click)="editAddress(address, i)">
<fa-icon icon="edit"></fa-icon>
</button>
<button mat-button color="warn" (click)="deleteAddress(address, i)">
<fa-icon icon="trash"></fa-icon>
</button>
<mat-slide-toggle [checked]="address.isActive" (change)="toggleAddress(address)"></mat-slide-toggle>
</div>
<div class="address-details">
@if (isFieldEnabled('street')) {
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Street' | translate }}</span>
<span class="detail-value">{{ address.street }}</span>
</div>
}
@if (isFieldEnabled('addressLine1')) {
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Address Line' | translate }} 1</span>
<span class="detail-value">{{ address.addressLine1 }}</span>
</div>
}
@if (isFieldEnabled('addressLine2')) {
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Address Line' | translate }} 2</span>
<span class="detail-value">{{ address.addressLine2 }}</span>
</div>
}
@if (isFieldEnabled('addressLine3')) {
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Address Line' | translate }} 3</span>
<span class="detail-value">{{ address.addressLine3 }}</span>
</div>
}
@if (isFieldEnabled('townVillage')) {
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Town / Village' | translate }}</span>
<span class="detail-value">{{ address.townVillage }}</span>
</div>
}
@if (isFieldEnabled('city')) {
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.City' | translate }}</span>
<span class="detail-value">{{ address.city }}</span>
</div>
}
@if (isFieldEnabled('stateProvinceId')) {
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.State / Province' | translate }}</span>
<span class="detail-value">{{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }}</span>
</div>
}
@if (isFieldEnabled('countryId')) {
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Country' | translate }}</span>
<span class="detail-value">{{ getSelectedValue('countryIdOptions', address.countryId)?.name }}</span>
</div>
}
@if (isFieldEnabled('postalCode')) {
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Postal Code' | translate }}</span>
<span class="detail-value">{{ address.postalCode }}</span>
</div>
}
@if (isFieldEnabled('isActive')) {
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Active Status' | translate }}</span>
<span class="detail-value">{{ address.isActive ? 'Active' : 'Inactive' }}</span>
</div>
}
</div>
</mat-expansion-panel>
}
</mat-accordion>
}
</div>
</div>
@@ -6,25 +6,102 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
.address {
.address-actions {
margin-top: 1%;
.section-block {
margin-bottom: 8px;
}
button {
margin-right: 1%;
}
}
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
}
h3 {
margin: 1% auto;
}
.section-title {
display: flex;
align-items: center;
gap: 8px;
font-size: 15px;
font-weight: 600;
color: #333;
margin: 0;
p {
line-height: 30px;
margin-left: 2%;
.section-icon {
color: var(--md-sys-color-primary, #1074b9);
font-size: 14px;
}
}
.margin-t {
margin-top: 2em;
.add-btn {
font-size: 13px;
}
.empty-state {
display: flex;
align-items: center;
gap: 10px;
padding: 24px 16px;
color: rgba(0, 0, 0, 0.45);
font-size: 14px;
background: rgba(0, 0, 0, 0.02);
border-radius: 6px;
border: 1px dashed rgba(0, 0, 0, 0.12);
.empty-icon {
font-size: 18px;
}
}
.address-panel {
margin-bottom: 8px;
.panel-icon {
margin-right: 8px;
font-size: 13px;
color: rgba(0, 0, 0, 0.45);
}
}
.address-actions {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 4px;
margin: 8px 0 4px;
}
.address-details {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px 24px;
padding: 8px 0;
}
.detail-row {
display: flex;
flex-direction: column;
gap: 2px;
}
.detail-label {
font-size: 12px;
color: rgba(0, 0, 0, 0.5);
font-weight: 500;
}
.detail-value {
font-size: 14px;
color: #333;
}
@media (max-width: 768px) {
.section-header {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
.address-details {
grid-template-columns: 1fr;
}
}
@@ -29,7 +29,7 @@ import {
} from '@angular/material/expansion';
import { MatDivider } from '@angular/material/divider';
import { MatSlideToggle } from '@angular/material/slide-toggle';
import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
/**
@@ -48,9 +48,7 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
MatExpansionPanelTitle,
MatExpansionPanelDescription,
MatDivider,
MatSlideToggle,
MatStepperPrevious,
MatStepperNext
MatSlideToggle
]
})
export class ClientAddressStepComponent {
@@ -53,15 +53,4 @@
</div>
}
</div>
<div class="layout-row align-center gap-2percent margin-t responsive-column">
<button mat-raised-button matStepperPrevious disabled>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button matStepperNext>
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
</div>
</form>
@@ -17,7 +17,7 @@ import {
import { Datatables } from 'app/core/utils/datatables';
import { SettingsService } from 'app/settings/settings.service';
import { MatCheckbox } from '@angular/material/checkbox';
import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
@@ -28,9 +28,7 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
imports: [
...STANDALONE_SHARED_IMPORTS,
MatCheckbox,
MatStepperPrevious,
FaIconComponent,
MatStepperNext
FaIconComponent
]
})
export class ClientDatatableStepComponent implements OnInit {
@@ -7,63 +7,92 @@
-->
<div class="mat-typography">
<h3>{{ 'labels.heading.Family Members' | translate }}</h3>
<div class="section-block">
<div class="section-header">
<h4 class="section-title">
<fa-icon icon="users" class="section-icon"></fa-icon>
{{ 'labels.heading.Family Members' | translate }}
</h4>
<button mat-stroked-button color="primary" (click)="addFamilyMember()" class="add-btn">
<fa-icon icon="plus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Add' | translate }}
</button>
</div>
<div class="layout-row align-end m-b-20">
<button mat-raised-button color="primary" (click)="addFamilyMember()">
<fa-icon icon="plus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Add' | translate }}
</button>
</div>
<mat-accordion>
@for (member of clientFamilyMembers; track member; let i = $index) {
<mat-expansion-panel class="family-member">
<mat-expansion-panel-header>
<mat-panel-title>
{{ member.firstName }}
</mat-panel-title>
<mat-panel-description>
{{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name' }}
</mat-panel-description>
</mat-expansion-panel-header>
<mat-divider></mat-divider>
<div class="family-member-actions layout-row align-end">
<button mat-button color="primary">
<fa-icon icon="edit" (click)="editFamilyMember(member, i)"></fa-icon>
</button>
<button mat-button color="warn" (click)="deleteFamilyMember(member.firstName, i)">
<fa-icon icon="trash"></fa-icon>
</button>
</div>
<p>
{{ 'labels.inputs.Nomination Type' | translate }} : {{ member.nominationType }}<br />
{{ 'labels.inputs.Nominee Name' | translate }} : {{ member.firstName }}<br />
{{ 'labels.inputs.Relationship' | translate }} :
{{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name'
}}<br />
{{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }}<br />
{{ 'labels.inputs.Percentage Share' | translate }} : {{ member.percentageShare }}%<br />
{{ 'labels.inputs.Nominee is Minor' | translate }} : {{ member.isDependent ? 'Yes' : 'No' }}<br />
@if (member.isDependent) {
{{ 'labels.inputs.Guardian Name' | translate }} : {{ member.guardianName }}<br />
{{ 'labels.inputs.Relationship with Minor' | translate }} : {{ member.guardianRelationship }}<br />
}
@if (member.remarks) {
{{ 'labels.inputs.Remarks' | translate }} : {{ member.remarks }}<br />
}
</p>
</mat-expansion-panel>
@if (clientFamilyMembers.length === 0) {
<div class="empty-state">
<fa-icon icon="users" class="empty-icon"></fa-icon>
<span>No family members / nominees added yet.</span>
</div>
}
</mat-accordion>
<div class="layout-row align-center gap-2percent margin-t responsive-column">
<button mat-raised-button matStepperPrevious>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button matStepperNext>
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
<mat-accordion>
@for (member of clientFamilyMembers; track member; let i = $index) {
<mat-expansion-panel class="member-panel">
<mat-expansion-panel-header>
<mat-panel-title>
<fa-icon icon="user" class="panel-icon"></fa-icon>
{{ member.firstName }}
</mat-panel-title>
<mat-panel-description>
{{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name' }}
</mat-panel-description>
</mat-expansion-panel-header>
<mat-divider></mat-divider>
<div class="member-actions">
<button mat-button color="primary" (click)="editFamilyMember(member, i)">
<fa-icon icon="edit"></fa-icon>
</button>
<button mat-button color="warn" (click)="deleteFamilyMember(member.firstName, i)">
<fa-icon icon="trash"></fa-icon>
</button>
</div>
<div class="member-details">
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Nomination Type' | translate }}</span>
<span class="detail-value">{{ member.nominationType }}</span>
</div>
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Nominee Name' | translate }}</span>
<span class="detail-value">{{ member.firstName }}</span>
</div>
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Relationship' | translate }}</span>
<span class="detail-value">{{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name' }}</span>
</div>
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Date Of Birth' | translate }}</span>
<span class="detail-value">{{ member.dateOfBirth | dateFormat }}</span>
</div>
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Percentage Share' | translate }}</span>
<span class="detail-value">{{ member.percentageShare }}%</span>
</div>
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Nominee is Minor' | translate }}</span>
<span class="detail-value">{{ member.isDependent ? 'Yes' : 'No' }}</span>
</div>
@if (member.isDependent) {
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Guardian Name' | translate }}</span>
<span class="detail-value">{{ member.guardianName }}</span>
</div>
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Relationship with Minor' | translate }}</span>
<span class="detail-value">{{ member.guardianRelationship }}</span>
</div>
}
@if (member.remarks) {
<div class="detail-row">
<span class="detail-label">{{ 'labels.inputs.Remarks' | translate }}</span>
<span class="detail-value">{{ member.remarks }}</span>
</div>
}
</div>
</mat-expansion-panel>
}
</mat-accordion>
</div>
</div>
@@ -6,25 +6,101 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
.family-member {
.family-member-actions {
margin-top: 1%;
.section-block {
margin-bottom: 8px;
}
button {
margin-right: 1%;
}
}
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
}
h3 {
margin: 1% auto;
}
.section-title {
display: flex;
align-items: center;
gap: 8px;
font-size: 15px;
font-weight: 600;
color: #333;
margin: 0;
p {
line-height: 30px;
margin-left: 2%;
.section-icon {
color: var(--md-sys-color-primary, #1074b9);
font-size: 14px;
}
}
.margin-t {
margin-top: 2em;
.add-btn {
font-size: 13px;
}
.empty-state {
display: flex;
align-items: center;
gap: 10px;
padding: 24px 16px;
color: rgba(0, 0, 0, 0.45);
font-size: 14px;
background: rgba(0, 0, 0, 0.02);
border-radius: 6px;
border: 1px dashed rgba(0, 0, 0, 0.12);
.empty-icon {
font-size: 18px;
}
}
.member-panel {
margin-bottom: 8px;
.panel-icon {
margin-right: 8px;
font-size: 13px;
color: rgba(0, 0, 0, 0.45);
}
}
.member-actions {
display: flex;
justify-content: flex-end;
gap: 4px;
margin: 8px 0 4px;
}
.member-details {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px 24px;
padding: 8px 0;
}
.detail-row {
display: flex;
flex-direction: column;
gap: 2px;
}
.detail-label {
font-size: 12px;
color: rgba(0, 0, 0, 0.5);
font-weight: 500;
}
.detail-value {
font-size: 14px;
color: #333;
}
@media (max-width: 768px) {
.section-header {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
.member-details {
grid-template-columns: 1fr;
}
}
@@ -23,7 +23,7 @@ import {
MatExpansionPanelDescription
} from '@angular/material/expansion';
import { MatDivider } from '@angular/material/divider';
import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper';
import { FindPipe } from '../../../pipes/find.pipe';
import { DateFormatPipe } from '../../../pipes/date-format.pipe';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
@@ -44,8 +44,6 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
MatExpansionPanelTitle,
MatExpansionPanelDescription,
MatDivider,
MatStepperPrevious,
MatStepperNext,
FindPipe,
DateFormatPipe
]
@@ -7,230 +7,228 @@
-->
<form [formGroup]="createClientForm">
<div class="layout-row-wrap gap-2px responsive-column">
<mat-form-field class="flex-fill flex-23">
<mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
<mat-select required formControlName="officeId">
@for (office of officeOptions; track office) {
<mat-option [value]="office.id">
{{ office.name }}
</mat-option>
}
</mat-select>
@if (createClientForm.controls.officeId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-fill flex-23">
<mat-label>{{ 'labels.inputs.Legal Form' | translate }}</mat-label>
<mat-select required formControlName="legalFormId">
@for (legalForm of legalFormOptions; track legalForm) {
<mat-option [value]="legalForm.id">
{{ legalForm.value | translateKey: 'inputs' }}
</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field class="flex-fill flex-23">
<mat-label>{{ 'labels.inputs.External Id' | translate }}</mat-label>
<input matInput formControlName="externalId" />
@if (!externalNationalIdService.isLoading && externalNationalIdService.statusMessageKey) {
<mat-hint>
<span
class="external-id-status"
[ngClass]="{
success: externalNationalIdService.statusMessageKey === 'External ID verified successfully',
error: externalNationalIdService.statusMessageKey !== 'External ID verified successfully'
}"
>
{{ 'labels.inputs.' + externalNationalIdService.statusMessageKey | translate }}
</span>
</mat-hint>
}
</mat-form-field>
@if (createClientForm.get('fullname')) {
<mat-form-field class="flex-48">
<mat-label>
{{ 'labels.inputs.' + getDateLabel(createClientForm.value.legalFormId, ['Name', 'Entity Name']) | translate }}
</mat-label>
<input matInput required formControlName="fullname" />
@if (createClientForm.controls.fullname.hasError('required')) {
<!-- Section: Basic Information -->
<div class="section-block">
<h4 class="section-title">
<fa-icon icon="briefcase" class="section-icon"></fa-icon>
{{ 'labels.inputs.Basic Information' | translate }}
</h4>
<div class="form-grid">
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
<mat-select required formControlName="officeId">
@for (office of officeOptions; track office) {
<mat-option [value]="office.id">{{ office.name }}</mat-option>
}
</mat-select>
@if (createClientForm.controls.officeId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Client name' | translate }} {{ 'labels.commons.is' | translate }}
{{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
@if (createClientForm.controls.fullname.hasError('pattern')) {
<mat-error>
{{ 'labels.inputs.Client name' | translate }} <strong>{{ 'labels.inputs.cannot' | translate }}</strong>
{{ 'labels.commons.begin with a special character or number' | translate }}
</mat-error>
</mat-form-field>
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Legal Form' | translate }}</mat-label>
<mat-select required formControlName="legalFormId">
@for (legalForm of legalFormOptions; track legalForm) {
<mat-option [value]="legalForm.id">{{ legalForm.value | translateKey: 'inputs' }}</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.External Id' | translate }}</mat-label>
<input matInput formControlName="externalId" />
@if (!externalNationalIdService.isLoading && externalNationalIdService.statusMessageKey) {
<mat-hint>
<span class="external-id-status"
[ngClass]="{
success: externalNationalIdService.statusMessageKey === 'External ID verified successfully',
error: externalNationalIdService.statusMessageKey !== 'External ID verified successfully'
}">
{{ 'labels.inputs.' + externalNationalIdService.statusMessageKey | translate }}
</span>
</mat-hint>
}
</mat-form-field>
}
@if (createClientForm.get('firstname') || createClientForm.get('middlename') || createClientForm.get('lastname')) {
<div class="name-fields-row">
@if (createClientForm.get('firstname')) {
<mat-form-field class="name-field first-name">
<mat-label>{{ 'labels.inputs.First Name' | translate }}</mat-label>
<input matInput required formControlName="firstname" />
@if (createClientForm.controls.firstname.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Client first name' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
@if (createClientForm.controls.firstname.hasError('pattern')) {
<mat-error>
{{ 'labels.inputs.Client first name' | translate }}
<strong>{{ 'labels.inputs.cannot' | translate }}</strong>
{{ 'labels.commons.begin with a special character or number' | translate }}
</mat-error>
}
</mat-form-field>
}
@if (createClientForm.get('middlename')) {
<mat-form-field class="name-field middle-name">
<mat-label>{{ 'labels.inputs.Middle Name' | translate }}</mat-label>
<input matInput formControlName="middlename" />
@if (createClientForm.controls.middlename.hasError('pattern')) {
<mat-error>
{{ 'labels.inputs.Client middle name' | translate }}
<strong>{{ 'labels.inputs.cannot' | translate }}</strong>
{{ 'labels.commons.begin with a special character or number' | translate }}
</mat-error>
}
</mat-form-field>
}
@if (createClientForm.get('lastname')) {
<mat-form-field class="name-field last-name">
<mat-label>{{ 'labels.inputs.Last Name' | translate }}</mat-label>
<input matInput required formControlName="lastname" />
@if (createClientForm.controls.lastname.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Client last name' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
@if (createClientForm.controls.lastname.hasError('pattern')) {
<mat-error>
{{ 'labels.inputs.Client last name' | translate }}
<strong>{{ 'labels.inputs.cannot' | translate }}</strong>
{{ 'labels.commons.begin with a special character or number' | translate }}
</mat-error>
}
</mat-form-field>
}
</div>
}
</div>
</div>
<mat-divider></mat-divider>
<!-- Section: Client Name -->
<div class="section-block">
<h4 class="section-title">
<fa-icon icon="user" class="section-icon"></fa-icon>
{{ 'labels.inputs.Client Details' | translate }}
</h4>
<div class="form-grid">
@if (createClientForm.get('fullname')) {
<mat-form-field appearance="outline" class="form-field full-width">
<mat-label>
{{ 'labels.inputs.' + getDateLabel(createClientForm.value.legalFormId, ['Name', 'Entity Name']) | translate }}
</mat-label>
<input matInput required formControlName="fullname" />
@if (createClientForm.controls.fullname.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Client name' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
@if (createClientForm.controls.fullname.hasError('pattern')) {
<mat-error>
{{ 'labels.inputs.Client name' | translate }} <strong>{{ 'labels.inputs.cannot' | translate }}</strong>
{{ 'labels.commons.begin with a special character or number' | translate }}
</mat-error>
}
</mat-form-field>
}
<mat-form-field class="flex-48" (click)="dateOfBirthDatePicker.open()">
<mat-label>
{{
'labels.inputs.' + getDateLabel(createClientForm.value.legalFormId, ['Date of Birth', 'Incorporation Date'])
| translate
}}
</mat-label>
<input matInput [max]="maxDate" [matDatepicker]="dateOfBirthDatePicker" formControlName="dateOfBirth" />
<mat-datepicker-toggle matSuffix [for]="dateOfBirthDatePicker"></mat-datepicker-toggle>
<mat-datepicker #dateOfBirthDatePicker></mat-datepicker>
</mat-form-field>
@if (createClientForm.get('firstname') || createClientForm.get('middlename') || createClientForm.get('lastname')) {
<div class="name-fields-row">
@if (createClientForm.get('firstname')) {
<mat-form-field appearance="outline" class="name-field first-name">
<mat-label>{{ 'labels.inputs.First Name' | translate }}</mat-label>
<input matInput required formControlName="firstname" />
@if (createClientForm.controls.firstname.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Client first name' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
@if (createClientForm.controls.firstname.hasError('pattern')) {
<mat-error>
{{ 'labels.inputs.Client first name' | translate }}
<strong>{{ 'labels.inputs.cannot' | translate }}</strong>
{{ 'labels.commons.begin with a special character or number' | translate }}
</mat-error>
}
</mat-form-field>
}
@if (createClientForm.get('middlename')) {
<mat-form-field appearance="outline" class="name-field middle-name">
<mat-label>{{ 'labels.inputs.Middle Name' | translate }}</mat-label>
<input matInput formControlName="middlename" />
@if (createClientForm.controls.middlename.hasError('pattern')) {
<mat-error>
{{ 'labels.inputs.Client middle name' | translate }}
<strong>{{ 'labels.inputs.cannot' | translate }}</strong>
{{ 'labels.commons.begin with a special character or number' | translate }}
</mat-error>
}
</mat-form-field>
}
@if (createClientForm.get('lastname')) {
<mat-form-field appearance="outline" class="name-field last-name">
<mat-label>{{ 'labels.inputs.Last Name' | translate }}</mat-label>
<input matInput required formControlName="lastname" />
@if (createClientForm.controls.lastname.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Client last name' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
@if (createClientForm.controls.lastname.hasError('pattern')) {
<mat-error>
{{ 'labels.inputs.Client last name' | translate }}
<strong>{{ 'labels.inputs.cannot' | translate }}</strong>
{{ 'labels.commons.begin with a special character or number' | translate }}
</mat-error>
}
</mat-form-field>
}
</div>
}
<mat-form-field appearance="outline" class="form-field" (click)="dateOfBirthDatePicker.open()">
<mat-label>
{{ 'labels.inputs.' + getDateLabel(createClientForm.value.legalFormId, ['Date of Birth', 'Incorporation Date']) | translate }}
</mat-label>
<input matInput [max]="maxDate" [matDatepicker]="dateOfBirthDatePicker" formControlName="dateOfBirth" />
<mat-datepicker-toggle matSuffix [for]="dateOfBirthDatePicker"></mat-datepicker-toggle>
<mat-datepicker #dateOfBirthDatePicker></mat-datepicker>
</mat-form-field>
@if (createClientForm.value.legalFormId === LegalFormId.PERSON) {
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Gender' | translate }}</mat-label>
<mat-select formControlName="genderId">
@for (gender of genderOptions; track gender) {
<mat-option [value]="gender.id">{{ gender.name }}</mat-option>
}
</mat-select>
</mat-form-field>
}
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Staff' | translate }}</mat-label>
<mat-select formControlName="staffId">
@for (staff of staffOptions; track staff) {
<mat-option [value]="staff.id">{{ staff.displayName }}</mat-option>
}
</mat-select>
</mat-form-field>
@if (createClientForm.value.legalFormId === LegalFormId.PERSON) {
<div class="form-field checkbox-field">
<mat-checkbox labelPosition="after" formControlName="isStaff">
{{ 'labels.inputs.Is staff' | translate }}?
</mat-checkbox>
</div>
}
</div>
<!-- Entity Non-Person Details -->
@if (createClientForm.get('clientNonPersonDetails')) {
<div class="flex-100 layout-row-wrap responsive-column gap-4percent" formGroupName="clientNonPersonDetails">
<mat-form-field class="flex-48">
<div class="form-grid" formGroupName="clientNonPersonDetails">
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Constitution' | translate }}</mat-label>
<mat-select formControlName="constitutionId" required>
@for (constitution of constitutionOptions; track constitution) {
<mat-option [value]="constitution.id">
{{ constitution.name }}
</mat-option>
<mat-option [value]="constitution.id">{{ constitution.name }}</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field class="flex-48">
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Main Business Line' | translate }}</mat-label>
<mat-select formControlName="mainBusinessLineId">
@for (business of businessLineOptions; track business) {
<mat-option [value]="business.id">
{{ business.name }}
</mat-option>
<mat-option [value]="business.id">{{ business.name }}</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field class="flex-48" (click)="incorpValidityTillDateDatePicker.open()">
<mat-form-field appearance="outline" class="form-field" (click)="incorpValidityTillDateDatePicker.open()">
<mat-label>{{ 'labels.inputs.Incorporation Validity Till Date' | translate }}</mat-label>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="incorpValidityTillDateDatePicker"
formControlName="incorpValidityTillDate"
/>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="incorpValidityTillDateDatePicker" formControlName="incorpValidityTillDate" />
<mat-datepicker-toggle matSuffix [for]="incorpValidityTillDateDatePicker"></mat-datepicker-toggle>
<mat-datepicker #incorpValidityTillDateDatePicker></mat-datepicker>
</mat-form-field>
<mat-form-field class="flex-48">
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Incorporation Number' | translate }}</mat-label>
<input matInput formControlName="incorpNumber" />
</mat-form-field>
<mat-form-field class="flex-98">
<mat-form-field appearance="outline" class="form-field full-width">
<mat-label>{{ 'labels.inputs.Remarks' | translate }}</mat-label>
<textarea matInput formControlName="remarks" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
</mat-form-field>
</div>
}
</div>
@if (createClientForm.value.legalFormId === LegalFormId.PERSON) {
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Gender' | translate }}</mat-label>
<mat-select formControlName="genderId">
@for (gender of genderOptions; track gender) {
<mat-option [value]="gender.id">
{{ gender.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
}
<!-- Section: Verification -->
<div class="section-block">
<h4 class="section-title">
<fa-icon icon="shield-alt" class="section-icon"></fa-icon>
{{ 'labels.inputs.Verification' | translate }}
</h4>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Staff' | translate }}</mat-label>
<mat-select formControlName="staffId">
@for (staff of staffOptions; track staff) {
<mat-option [value]="staff.id">
{{ staff.displayName }}
</mat-option>
}
</mat-select>
</mat-form-field>
@if (createClientForm.value.legalFormId === LegalFormId.PERSON) {
<mat-checkbox class="flex-48 margin-v" labelPosition="before" formControlName="isStaff">
{{ 'labels.inputs.Is staff' | translate }}?
</mat-checkbox>
}
<div class="sanctions-verify-section flex-98">
<div class="sanctions-verify-section">
@if (!sanctionsVerified && !sanctionsBlocked) {
<button
mat-raised-button
color="primary"
type="button"
class="verify-client-btn"
<button mat-stroked-button color="primary" type="button" class="verify-client-btn"
[disabled]="!createClientForm.get('firstname')?.value && !createClientForm.get('fullname')?.value"
(click)="verifySanctions()"
>
<fa-icon icon="shield-alt" class="mr-05"></fa-icon>
(click)="verifySanctions()">
<fa-icon icon="shield-alt" class="m-r-10"></fa-icon>
Verify Client
</button>
}
@@ -253,145 +251,132 @@
}
</div>
<mat-divider class="flex-98"></mat-divider>
<div class="dip-info flex-98">
<mat-icon
class="dip-info-icon"
<div class="dip-info">
<mat-icon class="dip-info-icon"
matTooltip="Digital Intelligence Platform (DIP) refers to the fraud-monitoring and intelligence ecosystem created by the Department of Telecommunications (DoT)"
matTooltipPosition="above"
>info</mat-icon
>
matTooltipPosition="above">info</mat-icon>
<span class="dip-info-text">DIP Verification</span>
</div>
<div class="mobile-verify-row flex-48">
<mat-form-field class="mobile-field">
<div class="mobile-verify-row">
<mat-form-field appearance="outline" class="mobile-field">
<mat-label>{{ 'labels.inputs.Mobile No' | translate }}</mat-label>
<input matInput type="text" formControlName="mobileNo" />
</mat-form-field>
@if (!mobileVerified) {
<button
mat-raised-button
color="primary"
type="button"
class="verify-btn"
<button mat-stroked-button color="primary" type="button" class="verify-btn"
[disabled]="!createClientForm.get('mobileNo').value"
(click)="verifyWithDIP()"
>
(click)="verifyWithDIP()">
Verify with DIP
</button>
} @else {
<span class="text-success verified-label">&#10004; Verified</span>
}
</div>
</div>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Email Address' | translate }}</mat-label>
<input matInput formControlName="emailAddress" />
@if (createClientForm.controls.emailAddress.errors?.email) {
<mat-error>
{{ 'error.Email not valid' | translate }}
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Client Type' | translate }}</mat-label>
<mat-select formControlName="clientTypeId">
@for (clientType of clientTypeOptions; track clientType) {
<mat-option [value]="clientType.id">
{{ clientType.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Client Classification' | translate }}</mat-label>
<mat-select formControlName="clientClassificationId">
@for (clientClassification of clientClassificationTypeOptions; track clientClassification) {
<mat-option [value]="clientClassification.id">
{{ clientClassification.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field class="flex-48" (click)="submittedOnDatePicker.open()">
<mat-label>{{ 'labels.inputs.Submitted On' | translate }}</mat-label>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="submittedOnDatePicker"
formControlName="submittedOnDate"
required
/>
<mat-datepicker-toggle matSuffix [for]="submittedOnDatePicker"></mat-datepicker-toggle>
<mat-datepicker #submittedOnDatePicker></mat-datepicker>
</mat-form-field>
<br />
<mat-checkbox labelPosition="before" formControlName="active" class="margin-v flex-48">
{{ 'labels.inputs.Active' | translate }}?
</mat-checkbox>
@if (createClientForm.contains('activationDate')) {
<mat-form-field class="flex-48" (click)="activatedOnDatePicker.open()">
<mat-label>{{ 'labels.inputs.Activation Date' | translate }}</mat-label>
<input
matInput
[min]="createClientForm.value.submittedOnDate"
[max]="maxDate"
[matDatepicker]="activatedOnDatePicker"
required
formControlName="activationDate"
/>
<mat-datepicker-toggle matSuffix [for]="activatedOnDatePicker"></mat-datepicker-toggle>
<mat-datepicker #activatedOnDatePicker></mat-datepicker>
@if (createClientForm.controls.activationDate.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
<!-- Section: Contact & Classification -->
<div class="section-block">
<h4 class="section-title">
<fa-icon icon="envelope" class="section-icon"></fa-icon>
{{ 'labels.inputs.Contact & Classification' | translate }}
</h4>
<div class="form-grid">
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Email Address' | translate }}</mat-label>
<input matInput formControlName="emailAddress" />
@if (createClientForm.controls.emailAddress.errors?.email) {
<mat-error>{{ 'error.Email not valid' | translate }}</mat-error>
}
</mat-form-field>
}
<mat-checkbox labelPosition="before" formControlName="addSavings" class="margin-v flex-48">
{{ 'labels.inputs.Open Savings Account' | translate }}?
</mat-checkbox>
@if (createClientForm.contains('savingsProductId')) {
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Savings Product' | translate }}</mat-label>
<mat-select required formControlName="savingsProductId">
@for (product of savingProductOptions; track product) {
<mat-option [value]="product.id">
{{ product.name }}
</mat-option>
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Client Type' | translate }}</mat-label>
<mat-select formControlName="clientTypeId">
@for (clientType of clientTypeOptions; track clientType) {
<mat-option [value]="clientType.id">{{ clientType.name }}</mat-option>
}
</mat-select>
@if (createClientForm.controls.savingsProductId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Savings Product' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
}
</div>
<div class="layout-row align-center gap-2percent margin-t responsive-column">
<button mat-raised-button matStepperPrevious disabled>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button matStepperNext [disabled]="sanctionsBlocked">
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Client Classification' | translate }}</mat-label>
<mat-select formControlName="clientClassificationId">
@for (clientClassification of clientClassificationTypeOptions; track clientClassification) {
<mat-option [value]="clientClassification.id">{{ clientClassification.name }}</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Occupation Category' | translate }}</mat-label>
<mat-select formControlName="occupationCategoryId">
@for (cat of occupationCategoryOptions; track cat) {
<mat-option [value]="cat.id">{{ cat.name }}</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Occupation' | translate }}</mat-label>
<mat-select formControlName="occupationId">
@for (occ of occupationOptions; track occ) {
<mat-option [value]="occ.id">{{ occ.name }}</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline" class="form-field" (click)="submittedOnDatePicker.open()">
<mat-label>{{ 'labels.inputs.Submitted On' | translate }}</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="submittedOnDatePicker" formControlName="submittedOnDate" required />
<mat-datepicker-toggle matSuffix [for]="submittedOnDatePicker"></mat-datepicker-toggle>
<mat-datepicker #submittedOnDatePicker></mat-datepicker>
</mat-form-field>
<div class="form-field checkbox-field">
<mat-checkbox labelPosition="after" formControlName="active">
{{ 'labels.inputs.Active' | translate }}?
</mat-checkbox>
</div>
@if (createClientForm.contains('activationDate')) {
<mat-form-field appearance="outline" class="form-field" (click)="activatedOnDatePicker.open()">
<mat-label>{{ 'labels.inputs.Activation Date' | translate }}</mat-label>
<input matInput [min]="createClientForm.value.submittedOnDate" [max]="maxDate"
[matDatepicker]="activatedOnDatePicker" required formControlName="activationDate" />
<mat-datepicker-toggle matSuffix [for]="activatedOnDatePicker"></mat-datepicker-toggle>
<mat-datepicker #activatedOnDatePicker></mat-datepicker>
@if (createClientForm.controls.activationDate.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Activation Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
}
<div class="form-field checkbox-field">
<mat-checkbox labelPosition="after" formControlName="addSavings">
{{ 'labels.inputs.Open Savings Account' | translate }}?
</mat-checkbox>
</div>
@if (createClientForm.contains('savingsProductId')) {
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Savings Product' | translate }}</mat-label>
<mat-select required formControlName="savingsProductId">
@for (product of savingProductOptions; track product) {
<mat-option [value]="product.id">{{ product.name }}</mat-option>
}
</mat-select>
@if (createClientForm.controls.savingsProductId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Savings Product' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
}
</div>
</div>
</form>
@@ -7,191 +7,80 @@
*/
form {
padding: 16px 0;
padding: 0;
}
.layout-row-wrap {
gap: 8px !important;
.section-block {
margin-bottom: 24px;
padding-bottom: 16px;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
&:last-child {
border-bottom: none;
margin-bottom: 0;
}
}
mat-form-field {
margin-bottom: 8px;
.section-title {
display: flex;
align-items: center;
gap: 8px;
font-size: 15px;
font-weight: 600;
color: #333;
margin: 0 0 16px 0;
.section-icon {
color: var(--md-sys-color-primary, #1074b9);
font-size: 14px;
}
}
mat-divider {
margin: 16px 0;
.form-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 4px 16px;
}
.margin-v {
margin: 2em 0 0;
.form-field {
width: 100%;
}
.margin-t {
margin-top: 2em;
.full-width {
grid-column: 1 / -1;
}
.checkbox-field {
display: flex;
align-items: center;
padding: 8px 0;
}
.name-fields-row {
display: flex;
gap: 8px;
gap: 12px;
flex-wrap: wrap;
width: 100%;
margin-bottom: 8px;
grid-column: 1 / -1;
.name-field {
flex: 1;
min-width: 200px;
min-width: 180px;
&.first-name,
&.last-name {
flex: 1.2;
}
&.middle-name {
flex: 1;
}
}
}
@media (width <= 768px) {
.name-fields-row {
flex-direction: column;
gap: 4px;
.name-field {
width: 100%;
min-width: unset;
flex: none;
}
}
}
.name-fields-row + mat-form-field,
.name-fields-row + mat-divider,
.name-fields-row + div {
margin-top: 8px;
}
.layout-row.align-center {
padding-top: 16px;
margin-top: 12px;
button {
margin: 0 6px;
}
}
.flex-100 {
margin: 16px 0;
padding: 8px 0;
}
mat-checkbox {
margin: 8px 0;
&.margin-v {
margin-top: 12px;
}
}
@media (width <= 768px) {
form {
padding: 12px 0;
.layout-row-wrap {
gap: 6px !important;
}
}
mat-form-field {
margin-bottom: 6px;
}
mat-divider {
margin: 12px 0;
}
.layout-row.align-center {
padding-top: 12px;
margin-top: 8px;
flex-direction: column;
gap: 8px;
button {
width: 100%;
margin: 2px 0;
}
}
}
.dip-info {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 4px;
.dip-info-icon {
font-size: 18px;
width: 18px;
height: 18px;
color: #1976d2;
cursor: pointer;
}
.dip-info-text {
font-size: 13px;
font-weight: 500;
color: #555;
}
}
.mobile-verify-row {
display: flex;
align-items: center;
gap: 10px;
.mobile-field {
flex: 1;
}
.verify-btn {
height: 40px;
white-space: nowrap;
font-size: 13px;
margin-bottom: 18px;
}
.verified-label {
white-space: nowrap;
margin-bottom: 18px;
}
.text-success {
color: #388e3c;
font-size: 14px;
font-weight: 600;
}
}
/* Verification Section */
.sanctions-verify-section {
margin: 12px 0;
margin-bottom: 16px;
.verify-client-btn {
height: 40px;
font-size: 13px;
white-space: nowrap;
}
.sanctions-progress {
mat-progress-bar {
margin-bottom: 8px;
}
.sanctions-msg {
font-size: 13px;
color: #555;
line-height: 1.5;
margin: 0;
}
}
.sanctions-result {
@@ -216,7 +105,6 @@ mat-checkbox {
border-left: 4px solid #d32f2f;
border-radius: 4px;
padding: 10px 16px;
margin: 12px 0;
.text-danger {
color: #d32f2f;
@@ -230,14 +118,60 @@ mat-checkbox {
}
}
.dip-info {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 12px;
.dip-info-icon {
font-size: 18px;
width: 18px;
height: 18px;
color: #1976d2;
cursor: pointer;
}
.dip-info-text {
font-size: 13px;
font-weight: 500;
color: #555;
}
}
.mobile-verify-row {
display: flex;
align-items: center;
gap: 12px;
.mobile-field {
flex: 1;
max-width: 320px;
}
.verify-btn {
height: 40px;
white-space: nowrap;
font-size: 13px;
margin-bottom: 18px;
}
.verified-label {
white-space: nowrap;
margin-bottom: 18px;
}
.text-success {
color: #388e3c;
font-size: 14px;
font-weight: 600;
}
}
.external-id-status {
font-size: 12px;
font-weight: 500;
&.loading {
color: #1976d2;
}
&.success {
color: #388e3c;
}
@@ -247,12 +181,27 @@ mat-checkbox {
}
}
@media (width <= 480px) {
form {
padding: 8px 0;
@media (max-width: 768px) {
.form-grid {
grid-template-columns: 1fr;
}
.layout-row-wrap {
gap: 4px !important;
.name-fields-row {
flex-direction: column;
gap: 4px;
.name-field {
min-width: unset;
flex: none;
}
}
.mobile-verify-row {
flex-direction: column;
align-items: stretch;
.mobile-field {
max-width: none;
}
}
}
@@ -27,7 +27,7 @@ import { SettingsService } from 'app/settings/settings.service';
import { MatDivider } from '@angular/material/divider';
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
import { MatCheckbox } from '@angular/material/checkbox';
import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { MatIcon } from '@angular/material/icon';
import { MatTooltip } from '@angular/material/tooltip';
@@ -49,9 +49,7 @@ import { DipVerifyDialogComponent } from './dip-verify-dialog.component';
MatDivider,
CdkTextareaAutosize,
MatCheckbox,
MatStepperPrevious,
FaIconComponent,
MatStepperNext,
MatIcon,
MatTooltip
]
@@ -100,6 +98,10 @@ export class ClientGeneralStepComponent implements OnInit, OnDestroy {
genderOptions: any;
/** Saving Product Options */
savingProductOptions: any;
/** Occupation Category Options */
occupationCategoryOptions: any;
/** Occupation Options */
occupationOptions: any;
/** Mobile number DIP verification status */
mobileVerified = false;
/** Sanctions verification state */
@@ -152,6 +154,8 @@ export class ClientGeneralStepComponent implements OnInit, OnDestroy {
dateOfBirth: [''],
clientTypeId: [''],
clientClassificationId: [''],
occupationCategoryId: [''],
occupationId: [''],
submittedOnDate: [
this.settingsService.businessDate,
Validators.required
@@ -172,6 +176,8 @@ export class ClientGeneralStepComponent implements OnInit, OnDestroy {
this.constitutionOptions = this.clientTemplate.clientNonPersonConstitutionOptions;
this.genderOptions = this.clientTemplate.genderOptions;
this.savingProductOptions = this.clientTemplate.savingProductOptions;
this.occupationCategoryOptions = this.clientTemplate.occupationCategoryOptions || [];
this.occupationOptions = this.clientTemplate.occupationOptions || [];
}
/**
@@ -7,111 +7,59 @@
-->
<div class="mat-typography" [formGroup]="kycForm">
<div class="kyc-header">
<h3>{{ 'labels.inputs.KYC Verification' | translate }}</h3>
<span class="kyc-badge">KYC</span>
</div>
<div class="section-block">
<h4 class="section-title">
<fa-icon icon="fingerprint" class="section-icon"></fa-icon>
{{ 'labels.inputs.KYC Verification' | translate }}
<span class="kyc-badge">KYC</span>
</h4>
<p class="kyc-subtitle">
{{ 'labels.inputs.KYC' | translate }} — RBI Master Direction compliant. Fields are optional but recommended for
compliance.
</p>
<div class="kyc-info-hint">
<mat-icon class="kyc-info-hint-icon">info</mat-icon>
<span>Verification (PAN, Aadhaar, GSTIN) will be available from the KYC tab after the client is created.</span>
</div>
<mat-divider class="m-b-20 m-t-10"></mat-divider>
<!-- PAN Section -->
<div class="kyc-field-row">
<div class="kyc-field-label-row">
<span class="kyc-field-title">{{ 'labels.inputs.PAN Number' | translate }}</span>
<span class="kyc-tag">KYC</span>
<div class="kyc-info-hint">
<mat-icon class="kyc-info-hint-icon">info</mat-icon>
<span>Verification (PAN, Aadhaar, GSTIN) will be available from the KYC tab after the client is created.</span>
</div>
<mat-form-field appearance="outline" class="full-width">
<mat-label>{{ 'labels.inputs.PAN Number' | translate }}</mat-label>
<input
matInput
formControlName="panNumber"
placeholder="{{ 'labels.inputs.Enter 10-character PAN' | translate }}"
maxlength="10"
style="text-transform: uppercase"
(input)="kycForm.get('panNumber')?.setValue($any($event.target).value.toUpperCase(), { emitEvent: false })"
/>
@if (kycForm.get('panNumber')?.hasError('pattern') && kycForm.get('panNumber')?.touched) {
<mat-error>{{ 'labels.inputs.Enter 10-character PAN' | translate }}</mat-error>
}
</mat-form-field>
</div>
<mat-divider class="m-b-20 m-t-10"></mat-divider>
<div class="form-grid">
<!-- PAN -->
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.PAN Number' | translate }}</mat-label>
<input matInput formControlName="panNumber"
placeholder="{{ 'labels.inputs.Enter 10-character PAN' | translate }}"
maxlength="10" style="text-transform: uppercase"
(input)="kycForm.get('panNumber')?.setValue($any($event.target).value.toUpperCase(), { emitEvent: false })" />
@if (kycForm.get('panNumber')?.hasError('pattern') && kycForm.get('panNumber')?.touched) {
<mat-error>{{ 'labels.inputs.Enter 10-character PAN' | translate }}</mat-error>
}
</mat-form-field>
<!-- Aadhaar Section -->
<div class="kyc-field-row">
<div class="kyc-field-label-row">
<span class="kyc-field-title">{{ 'labels.inputs.Aadhaar Number' | translate }}</span>
<span class="kyc-tag">KYC</span>
<!-- Aadhaar -->
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.Aadhaar Number' | translate }}</mat-label>
<input matInput formControlName="aadhaarNumber"
placeholder="{{ 'labels.inputs.Enter 12-digit Aadhaar' | translate }}"
maxlength="12" type="password" />
@if (kycForm.get('aadhaarNumber')?.hasError('pattern') && kycForm.get('aadhaarNumber')?.touched) {
<mat-error>{{ 'labels.inputs.Enter 12-digit Aadhaar' | translate }}</mat-error>
}
</mat-form-field>
<!-- GSTIN -->
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ 'labels.inputs.GSTIN Number' | translate }}</mat-label>
<input matInput formControlName="gstinNumber"
placeholder="{{ 'labels.inputs.Enter 15-character GSTIN' | translate }}"
maxlength="15" style="text-transform: uppercase"
(input)="kycForm.get('gstinNumber')?.setValue($any($event.target).value.toUpperCase(), { emitEvent: false })" />
@if (kycForm.get('gstinNumber')?.hasError('pattern') && kycForm.get('gstinNumber')?.touched) {
<mat-error>{{ 'labels.inputs.Enter 15-character GSTIN' | translate }}</mat-error>
}
</mat-form-field>
<!-- Remarks -->
<mat-form-field appearance="outline" class="form-field full-width">
<mat-label>{{ 'labels.inputs.Remarks' | translate }}</mat-label>
<textarea matInput formControlName="remarks" rows="3"></textarea>
</mat-form-field>
</div>
<mat-form-field appearance="outline" class="full-width">
<mat-label>{{ 'labels.inputs.Aadhaar Number' | translate }}</mat-label>
<input
matInput
formControlName="aadhaarNumber"
placeholder="{{ 'labels.inputs.Enter 12-digit Aadhaar' | translate }}"
maxlength="12"
type="password"
/>
@if (kycForm.get('aadhaarNumber')?.hasError('pattern') && kycForm.get('aadhaarNumber')?.touched) {
<mat-error>{{ 'labels.inputs.Enter 12-digit Aadhaar' | translate }}</mat-error>
}
</mat-form-field>
</div>
<mat-divider class="m-b-20 m-t-10"></mat-divider>
<!-- GSTIN Section -->
<div class="kyc-field-row">
<div class="kyc-field-label-row">
<span class="kyc-field-title">{{ 'labels.inputs.GSTIN Number' | translate }}</span>
<span class="kyc-tag">KYC</span>
</div>
<mat-form-field appearance="outline" class="full-width">
<mat-label>{{ 'labels.inputs.GSTIN Number' | translate }}</mat-label>
<input
matInput
formControlName="gstinNumber"
placeholder="{{ 'labels.inputs.Enter 15-character GSTIN' | translate }}"
maxlength="15"
style="text-transform: uppercase"
(input)="kycForm.get('gstinNumber')?.setValue($any($event.target).value.toUpperCase(), { emitEvent: false })"
/>
@if (kycForm.get('gstinNumber')?.hasError('pattern') && kycForm.get('gstinNumber')?.touched) {
<mat-error>{{ 'labels.inputs.Enter 15-character GSTIN' | translate }}</mat-error>
}
</mat-form-field>
</div>
<mat-divider class="m-b-20 m-t-10"></mat-divider>
<!-- Additional Fields -->
<div class="kyc-additional">
<mat-form-field appearance="outline" class="full-width">
<mat-label>{{ 'labels.inputs.Remarks' | translate }}</mat-label>
<textarea matInput formControlName="remarks" rows="3"></textarea>
</mat-form-field>
</div>
<!-- Navigation -->
<div class="layout-row align-center gap-2percent margin-t responsive-column">
<button mat-raised-button matStepperPrevious type="button">
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button matStepperNext type="button">
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
</div>
</div>
@@ -6,21 +6,29 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
.kyc-header {
.section-block {
margin-bottom: 8px;
}
.section-title {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 4px;
gap: 8px;
font-size: 15px;
font-weight: 600;
color: #333;
margin: 0 0 16px 0;
h3 {
margin: 0;
.section-icon {
color: var(--md-sys-color-primary, #1074b9);
font-size: 14px;
}
}
.kyc-badge {
background-color: #1976d2;
color: #fff;
font-size: 11px;
font-size: 10px;
font-weight: 700;
padding: 2px 8px;
border-radius: 12px;
@@ -28,24 +36,6 @@
line-height: 18px;
}
.kyc-tag {
background-color: #e3f2fd;
color: #1565c0;
font-size: 10px;
font-weight: 700;
padding: 2px 7px;
border-radius: 10px;
border: 1px solid #90caf9;
letter-spacing: 0.5px;
line-height: 16px;
}
.kyc-subtitle {
color: #666;
font-size: 13px;
margin: 0 0 8px;
}
.kyc-info-hint {
display: flex;
align-items: center;
@@ -56,7 +46,7 @@
background-color: #e3f2fd;
border: 1px solid #90caf9;
border-radius: 6px;
margin-bottom: 4px;
margin-bottom: 16px;
}
.kyc-info-hint-icon {
@@ -66,187 +56,22 @@
color: #1565c0;
}
.kyc-field-row {
margin-bottom: 8px;
.form-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 4px 16px;
}
.kyc-field-label-row {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.kyc-field-title {
font-weight: 600;
font-size: 14px;
}
.kyc-input-row {
display: flex;
align-items: flex-start;
gap: 12px;
}
.kyc-input {
flex: 1;
}
.verify-btn {
margin-top: 4px;
min-width: 100px;
display: flex;
align-items: center;
justify-content: center;
}
.kyc-status-row {
margin-top: 4px;
margin-bottom: 8px;
}
.status-chip {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 13px;
font-weight: 500;
padding: 4px 10px;
border-radius: 16px;
&.verified {
background-color: #e8f5e9;
color: #2e7d32;
border: 1px solid #a5d6a7;
}
&.pending {
background-color: #fff8e1;
color: #f57f17;
border: 1px solid #ffe082;
}
&.failed {
background-color: #ffebee;
color: #c62828;
border: 1px solid #ef9a9a;
}
}
.status-chip-icon {
font-size: 16px;
height: 16px;
width: 16px;
}
.status-icon {
font-size: 20px;
&.verified {
color: #2e7d32;
}
&.failed {
color: #c62828;
}
}
.kyc-additional {
margin-top: 8px;
}
.full-width {
.form-field {
width: 100%;
}
.m-b-20 {
margin-bottom: 20px;
.full-width {
grid-column: 1 / -1;
}
.m-t-10 {
margin-top: 10px;
}
/* OTP Section */
.otp-section {
margin-top: 8px;
padding: 12px 16px;
background-color: #f3f8ff;
border: 1px solid #bbdefb;
border-radius: 8px;
}
.otp-info {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
color: #1565c0;
margin: 0 0 10px;
font-weight: 500;
}
.otp-info-icon {
font-size: 18px;
height: 18px;
width: 18px;
color: #1565c0;
}
.otp-input {
max-width: 200px;
}
.resend-btn {
margin-top: 4px;
font-size: 12px;
}
/* Warning & Error messages */
.kyc-warning {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: #f57f17;
margin-top: 4px;
padding: 6px 10px;
background-color: #fffde7;
border: 1px solid #fff59d;
border-radius: 6px;
}
.kyc-warning-icon {
font-size: 16px;
height: 16px;
width: 16px;
color: #f57f17;
}
.kyc-error-msg {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: #c62828;
margin-top: 4px;
padding: 6px 10px;
background-color: #ffebee;
border: 1px solid #ef9a9a;
border-radius: 6px;
}
.kyc-error-icon {
font-size: 16px;
height: 16px;
width: 16px;
color: #c62828;
}
.verification-detail {
display: inline-block;
font-size: 12px;
color: #333;
margin-left: 8px;
font-weight: 500;
@media (max-width: 768px) {
.form-grid {
grid-template-columns: 1fr;
}
}
@@ -11,7 +11,7 @@ import { Component, inject } from '@angular/core';
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
/** Custom Imports */
import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper';
import { MatDivider } from '@angular/material/divider';
import { MatIcon } from '@angular/material/icon';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
@@ -29,8 +29,6 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
styleUrls: ['./client-kyc-step.component.scss'],
imports: [
...STANDALONE_SHARED_IMPORTS,
MatStepperPrevious,
MatStepperNext,
MatDivider,
MatIcon,
FaIconComponent
@@ -6,280 +6,244 @@
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="container p-b-20">
<h3>{{ 'labels.heading.General' | translate }}</h3>
<mat-divider [inset]="true"></mat-divider>
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.name' | translate }}</span>
@if (client.legalFormId === LegalFormId.ENTITY) {
<span class="flex-60">{{ client.fullname }}</span>
}
@if (client.legalFormId === LegalFormId.PERSON) {
<span class="flex-60"
>{{ client.firstname }}
{{ client.middlename ? client.middlename + ' ' + client.lastname : client.lastname }}</span
>
}
</div>
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Office' | translate }}</span>
<span class="flex-60">{{ client.officeId | find: clientTemplate.officeOptions : 'id' : 'name' }}</span>
</div>
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Legal Form' | translate }}</span>
<span class="flex-60">{{ client.legalFormId | find: clientTemplate.clientLegalFormOptions : 'id' : 'value' }}</span>
</div>
@if (client.staffId) {
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Staff' | translate }}</span>
<span class="flex-60">{{ client.staffId | find: clientTemplate.staffOptions : 'id' : 'displayName' }}</span>
<div class="preview-container">
<!-- Client Profile Card -->
<div class="profile-card">
<div class="profile-avatar">
<fa-icon [icon]="client?.legalFormId === LegalFormId.PERSON ? 'user' : 'building'" class="avatar-icon"></fa-icon>
</div>
}
@if (client.dateOfBirth) {
<div class="flex-fill">
<span class="flex-40">{{
client.legalFormId === LegalFormId.PERSON ? 'Date of Birth' : 'Incorporation Date'
}}</span>
<span class="flex-60">{{ client.dateOfBirth | dateFormat }}</span>
</div>
}
@if (client.externalId) {
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.External Id' | translate }}</span>
<span class="flex-60">
<mifosx-external-identifier externalId="{{ client.externalId }}"></mifosx-external-identifier>
</span>
</div>
}
@if (client.mobileNo) {
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Mobile No' | translate }}</span>
<span class="flex-60">{{ client.mobileNo }}</span>
</div>
}
@if (client.emailAddress) {
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Email Address' | translate }}</span>
<span class="flex-60">{{ client.emailAddress }}</span>
</div>
}
@if (client.clientTypeId) {
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Client Type' | translate }}</span>
<span class="flex-60">{{ client.clientTypeId | find: clientTemplate.clientTypeOptions : 'id' : 'name' }}</span>
</div>
}
@if (client.clientClassificationId) {
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Client Classification' | translate }}</span>
<span class="flex-60">{{
client.clientClassificationId | find: clientTemplate.clientClassificationOptions : 'id' : 'name'
}}</span>
</div>
}
@if (client.savingsProductId) {
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Savings Product' | translate }}</span>
<span class="flex-60">{{
client.savingsProductId | find: clientTemplate.savingProductOptions : 'id' : 'name'
}}</span>
</div>
}
@if (client.submittedOnDate) {
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Submitted On Date' | translate }}</span>
<span class="flex-60">{{ client.submittedOnDate | dateFormat }}</span>
</div>
}
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Active' | translate }}?</span>
<span class="flex-60">{{ client.active | yesNo }}</span>
</div>
@if (client.activationDate) {
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Activation Date' | translate }}</span>
<span class="flex-60">{{ client.activationDate | dateFormat }}</span>
</div>
}
@if (client.legalFormId === LegalFormId.PERSON) {
@if (client.genderId) {
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Gender' | translate }}</span>
<span class="flex-60">{{ client.genderId | find: clientTemplate.genderOptions : 'id' : 'name' }}</span>
</div>
}
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Is staff' | translate }}?</span>
<span class="flex-60">{{ client.isStaff | yesNo }}</span>
</div>
}
@if (client.legalFormId === LegalFormId.ENTITY) {
@if (client.clientNonPersonDetails.incorpValidityTillDate) {
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Incorporation Validity Till Date' | translate }}</span>
<span class="flex-60">{{ client.clientNonPersonDetails.incorpValidityTillDate | dateFormat }}</span>
</div>
}
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Incorportation Number' | translate }}</span>
<span class="flex-60">{{ client.clientNonPersonDetails.incorpNumber || 'Not Provided' }}</span>
</div>
@if (client.clientNonPersonDetails.mainBusinessLineId) {
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Main Business Line' | translate }}</span>
<span class="flex-60">{{
client.clientNonPersonDetails.mainBusinessLineId
| find: clientTemplate.clientNonPersonMainBusinessLineOptions : 'id' : 'name'
}}</span>
</div>
}
@if (client.clientNonPersonDetails.constitutionId) {
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Constitution' | translate }}</span>
<span class="flex-60">{{
client.clientNonPersonDetails.constitutionId
| find: clientTemplate.clientNonPersonConstitutionOptions : 'id' : 'name'
}}</span>
</div>
}
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Remarks' | translate }}</span>
<span class="flex-60">{{ client.clientNonPersonDetails.remarks || 'N/A' }}</span>
</div>
}
@if (client.familyMembers.length) {
<div class="layout-row-wrap responsive-column flex-fill m-b-20">
<h3 class="mat-h3 flex-fill">{{ 'labels.heading.Family Members' | translate }}</h3>
<mat-divider class="flex-fill"></mat-divider>
<mat-accordion class="flex-fill m-t-5">
@for (member of client.familyMembers; track member) {
<mat-expansion-panel class="family-member">
<mat-expansion-panel-header>
<mat-panel-title>
{{ member.firstName }}
{{ member.middleName ? member.middleName + ' ' + member.lastName : member.lastName }}
</mat-panel-title>
<mat-panel-description>
{{ member.relationship }}
</mat-panel-description>
</mat-expansion-panel-header>
<mat-divider></mat-divider>
<p>
{{ 'labels.inputs.First Name' | translate }} : {{ member.firstName }}<br />
{{ 'labels.inputs.Middle Name' | translate }} : {{ member.middleName }}<br />
{{ 'labels.inputs.Last Name' | translate }} : {{ member.lastName }}<br />
{{ 'labels.inputs.Qualification' | translate }} : {{ member.qualification }}<br />
{{ 'labels.inputs.Relationship' | translate }} :
{{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name'
}}<br />
{{ 'labels.inputs.Age' | translate }} : {{ member.age }}<br />
{{ 'labels.inputs.Is Dependent' | translate }} : {{ member.isDependent ? 'Yes' : 'No' }}<br />
{{ 'labels.inputs.Marital Status' | translate }} :
{{
member.maritalStatusId
| find: clientTemplate.familyMemberOptions.maritalStatusIdOptions : 'id' : 'name'
}}<br />
{{ 'labels.inputs.Gender' | translate }} :
{{ member.genderId | find: clientTemplate.familyMemberOptions.genderIdOptions : 'id' : 'name' }}<br />
{{ 'labels.inputs.Profession' | translate }} :
{{ member.professionId | find: clientTemplate.familyMemberOptions.professionIdOptions : 'id' : 'name'
}}<br />
{{ 'labels.inputs.Date Of Birth' | translate }} : {{ member.dateOfBirth | dateFormat }}<br />
</p>
</mat-expansion-panel>
<div class="profile-info">
<h3 class="profile-name">
@if (client?.legalFormId === LegalFormId.ENTITY) {
{{ client.fullname }}
}
</mat-accordion>
</div>
}
@if (clientTemplate.isAddressEnabled && client.address && client.address.length) {
<div class="flex-fill layout-row-wrap responsive-column">
<h3 class="mat-h3 flex-fill">{{ 'labels.heading.Address' | translate }}</h3>
<mat-divider class="flex-fill"></mat-divider>
<mat-accordion class="flex-fill m-t-5">
@for (address of client.address; track address) {
<mat-expansion-panel class="address">
<mat-expansion-panel-header>
<mat-panel-title>
{{ getSelectedValue('addressTypeIdOptions', address.addressTypeId)?.name }}
</mat-panel-title>
<mat-panel-description>
{{ address.relationship }}
</mat-panel-description>
</mat-expansion-panel-header>
<mat-divider></mat-divider>
<p>
@if (isFieldEnabled('street')) {
<span>{{ 'labels.inputs.Street' | translate }} : {{ address.street }}<br /></span>
}
@if (isFieldEnabled('addressLine1')) {
<span>{{ 'labels.inputs.Address Line' | translate }} 1 : {{ address.addressLine1 }}<br /></span>
}
@if (isFieldEnabled('addressLine2')) {
<span>{{ 'labels.inputs.Address Line' | translate }} 2 : {{ address.addressLine2 }}<br /></span>
}
@if (isFieldEnabled('addressLine3')) {
<span>{{ 'labels.inputs.Address Line' | translate }} 3 : {{ address.addressLine3 }}<br /></span>
}
@if (isFieldEnabled('townVillage')) {
<span>{{ 'labels.inputs.Town / Village' | translate }} : {{ address.townVillage }}<br /></span>
}
@if (isFieldEnabled('city')) {
<span>{{ 'labels.inputs.City' | translate }} : {{ address.city }}<br /></span>
}
@if (isFieldEnabled('stateProvinceId')) {
<span
>{{ 'labels.inputs.State / Province' | translate }} :
{{ getSelectedValue('stateProvinceIdOptions', address.stateProvinceId)?.name }}<br
/></span>
}
@if (isFieldEnabled('countryId')) {
<span
>{{ 'labels.inputs.Country' | translate }} :
{{ getSelectedValue('countryIdOptions', address.countryId)?.name }}<br
/></span>
}
@if (isFieldEnabled('postalCode')) {
<span>{{ 'labels.inputs.Postal Code' | translate }} : {{ address.postalCode }}<br /></span>
}
@if (isFieldEnabled('isActive')) {
<span>{{ 'labels.inputs.Active Status' | translate }} : {{ address.isActive }}<br /></span>
}
</p>
</mat-expansion-panel>
@if (client?.legalFormId === LegalFormId.PERSON) {
{{ client.firstname }} {{ client.middlename ? client.middlename + ' ' : '' }}{{ client.lastname }}
}
</mat-accordion>
</h3>
<div class="profile-meta">
@if (client?.officeId) {
<span class="meta-chip">
<fa-icon icon="briefcase" class="chip-icon"></fa-icon>
{{ client.officeId | find: clientTemplate.officeOptions : 'id' : 'name' }}
</span>
}
@if (client?.legalFormId) {
<span class="meta-chip">
{{ client.legalFormId | find: clientTemplate.clientLegalFormOptions : 'id' : 'value' }}
</span>
}
@if (client?.active) {
<span class="meta-chip status-active">Active</span>
} @else {
<span class="meta-chip status-inactive">Inactive</span>
}
</div>
</div>
</div>
<!-- General Information Card -->
<div class="info-card">
<div class="card-header">
<fa-icon icon="user" class="card-icon"></fa-icon>
<span>{{ 'labels.heading.General' | translate }}</span>
</div>
<div class="card-body">
<table class="info-table">
<tbody>
@if (client?.dateOfBirth) {
<tr>
<td class="info-label">{{ client.legalFormId === LegalFormId.PERSON ? 'Date of Birth' : 'Incorporation Date' }}</td>
<td class="info-value">{{ client.dateOfBirth | dateFormat }}</td>
</tr>
}
@if (client?.externalId) {
<tr>
<td class="info-label">{{ 'labels.inputs.External Id' | translate }}</td>
<td class="info-value">
<mifosx-external-identifier externalId="{{ client.externalId }}"></mifosx-external-identifier>
</td>
</tr>
}
@if (client?.staffId) {
<tr>
<td class="info-label">{{ 'labels.inputs.Staff' | translate }}</td>
<td class="info-value">{{ client.staffId | find: clientTemplate.staffOptions : 'id' : 'displayName' }}</td>
</tr>
}
@if (client?.legalFormId === LegalFormId.PERSON && client?.genderId) {
<tr>
<td class="info-label">{{ 'labels.inputs.Gender' | translate }}</td>
<td class="info-value">{{ client.genderId | find: clientTemplate.genderOptions : 'id' : 'name' }}</td>
</tr>
}
@if (client?.mobileNo) {
<tr>
<td class="info-label">{{ 'labels.inputs.Mobile No' | translate }}</td>
<td class="info-value">{{ client.mobileNo }}</td>
</tr>
}
@if (client?.emailAddress) {
<tr>
<td class="info-label">{{ 'labels.inputs.Email Address' | translate }}</td>
<td class="info-value">{{ client.emailAddress }}</td>
</tr>
}
@if (client?.clientTypeId) {
<tr>
<td class="info-label">{{ 'labels.inputs.Client Type' | translate }}</td>
<td class="info-value">{{ client.clientTypeId | find: clientTemplate.clientTypeOptions : 'id' : 'name' }}</td>
</tr>
}
@if (client?.clientClassificationId) {
<tr>
<td class="info-label">{{ 'labels.inputs.Client Classification' | translate }}</td>
<td class="info-value">{{ client.clientClassificationId | find: clientTemplate.clientClassificationOptions : 'id' : 'name' }}</td>
</tr>
}
@if (client?.occupationCategoryId) {
<tr>
<td class="info-label">{{ 'labels.inputs.Occupation Category' | translate }}</td>
<td class="info-value">{{ client.occupationCategoryId | find: clientTemplate.occupationCategoryOptions : 'id' : 'name' }}</td>
</tr>
}
@if (client?.occupationId) {
<tr>
<td class="info-label">{{ 'labels.inputs.Occupation' | translate }}</td>
<td class="info-value">{{ client.occupationId | find: clientTemplate.occupationOptions : 'id' : 'name' }}</td>
</tr>
}
@if (client?.submittedOnDate) {
<tr>
<td class="info-label">{{ 'labels.inputs.Submitted On Date' | translate }}</td>
<td class="info-value">{{ client.submittedOnDate | dateFormat }}</td>
</tr>
}
<tr>
<td class="info-label">{{ 'labels.inputs.Active' | translate }}?</td>
<td class="info-value">
<span [class]="client?.active ? 'badge-yes' : 'badge-no'">{{ client?.active | yesNo }}</span>
</td>
</tr>
@if (client?.activationDate) {
<tr>
<td class="info-label">{{ 'labels.inputs.Activation Date' | translate }}</td>
<td class="info-value">{{ client.activationDate | dateFormat }}</td>
</tr>
}
@if (client?.savingsProductId) {
<tr>
<td class="info-label">{{ 'labels.inputs.Savings Product' | translate }}</td>
<td class="info-value">{{ client.savingsProductId | find: clientTemplate.savingProductOptions : 'id' : 'name' }}</td>
</tr>
}
@if (client?.legalFormId === LegalFormId.PERSON) {
<tr>
<td class="info-label">{{ 'labels.inputs.Is staff' | translate }}?</td>
<td class="info-value">{{ client.isStaff | yesNo }}</td>
</tr>
}
@if (client?.legalFormId === LegalFormId.ENTITY && client?.clientNonPersonDetails) {
@if (client.clientNonPersonDetails.constitutionId) {
<tr>
<td class="info-label">{{ 'labels.inputs.Constitution' | translate }}</td>
<td class="info-value">{{ client.clientNonPersonDetails.constitutionId | find: clientTemplate.clientNonPersonConstitutionOptions : 'id' : 'name' }}</td>
</tr>
}
<tr>
<td class="info-label">{{ 'labels.inputs.Incorporation Number' | translate }}</td>
<td class="info-value">{{ client.clientNonPersonDetails.incorpNumber || 'N/A' }}</td>
</tr>
}
</tbody>
</table>
</div>
</div>
<!-- KYC Details Card -->
@if (kycData?.panNumber || kycData?.aadhaarNumberMasked || kycData?.gstinNumber) {
<div class="info-card">
<div class="card-header">
<fa-icon icon="fingerprint" class="card-icon"></fa-icon>
<span>{{ 'labels.inputs.KYC' | translate }}</span>
<span class="kyc-badge">KYC</span>
</div>
<div class="card-body">
<table class="info-table">
<tbody>
@if (kycData.panNumber) {
<tr>
<td class="info-label">{{ 'labels.inputs.PAN Number' | translate }}</td>
<td class="info-value mono">{{ kycData.panNumber }}</td>
</tr>
}
@if (kycData.aadhaarNumberMasked) {
<tr>
<td class="info-label">{{ 'labels.inputs.Aadhaar Number' | translate }}</td>
<td class="info-value mono">{{ kycData.aadhaarNumberMasked }}</td>
</tr>
}
@if (kycData.gstinNumber) {
<tr>
<td class="info-label">{{ 'labels.inputs.GSTIN Number' | translate }}</td>
<td class="info-value mono">{{ kycData.gstinNumber }}</td>
</tr>
}
@if (kycData.remarks) {
<tr>
<td class="info-label">{{ 'labels.inputs.Remarks' | translate }}</td>
<td class="info-value">{{ kycData.remarks }}</td>
</tr>
}
</tbody>
</table>
</div>
</div>
}
</div>
<div class="layout-row responsive-column align-center gap-2px margin-t">
<button mat-raised-button matStepperPrevious>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button [routerLink]="['../']">
{{ 'labels.buttons.Cancel' | translate }}
</button>
<button mat-raised-button color="primary" (click)="submitEvent.emit()">
{{ 'labels.buttons.Submit' | translate }}
</button>
<!-- Family Members / Nominee Card -->
@if (client?.familyMembers?.length) {
<div class="info-card">
<div class="card-header">
<fa-icon icon="users" class="card-icon"></fa-icon>
<span>{{ 'labels.heading.Family Members' | translate }} / {{ 'labels.inputs.Nominee' | translate }}</span>
<span class="count-badge">{{ client.familyMembers.length }}</span>
</div>
<div class="card-body no-padding">
<table class="data-table">
<thead>
<tr>
<th>{{ 'labels.inputs.name' | translate }}</th>
<th>{{ 'labels.inputs.Relationship' | translate }}</th>
<th>{{ 'labels.inputs.Date Of Birth' | translate }}</th>
<th>{{ 'labels.inputs.Is Dependent' | translate }}</th>
</tr>
</thead>
<tbody>
@for (member of client.familyMembers; track member) {
<tr>
<td>{{ member.firstName }} {{ member.lastName }}</td>
<td>{{ member.relationshipId | find: clientTemplate.familyMemberOptions.relationshipIdOptions : 'id' : 'name' }}</td>
<td>{{ member.dateOfBirth | dateFormat }}</td>
<td>
<span [class]="member.isDependent ? 'badge-yes' : 'badge-no'">{{ member.isDependent ? 'Yes' : 'No' }}</span>
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
}
<!-- Submit Section -->
<div class="submit-section">
<button mat-raised-button [routerLink]="['../']" class="cancel-btn">
{{ 'labels.buttons.Cancel' | translate }}
</button>
<button mat-raised-button color="primary" class="submit-btn" (click)="submitEvent.emit()">
<fa-icon icon="check" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Submit' | translate }}
</button>
</div>
</div>
@@ -6,43 +6,292 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
h2,
h3,
h4 {
margin: 0;
.preview-container {
display: flex;
flex-direction: column;
gap: 16px;
}
/* ── Profile Card ── */
.profile-card {
display: flex;
align-items: center;
gap: 16px;
padding: 20px 24px;
background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
border-radius: 10px;
border: 1px solid rgba(0, 0, 0, 0.06);
}
.profile-avatar {
width: 56px;
height: 56px;
border-radius: 50%;
background: var(--md-sys-color-primary, #1074b9);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
.avatar-icon {
color: #fff;
font-size: 22px;
}
}
.profile-info {
flex: 1;
min-width: 0;
}
.profile-name {
margin: 0 0 6px;
font-size: 20px;
font-weight: 600;
color: #1a1a1a;
}
.profile-meta {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.meta-chip {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 12px;
font-weight: 500;
}
padding: 3px 10px;
border-radius: 20px;
background: rgba(255, 255, 255, 0.7);
color: #555;
border: 1px solid rgba(0, 0, 0, 0.08);
span {
margin: 0.5em 0;
}
mat-divider {
margin: 0 0 0.5em;
}
.margin-t {
margin-top: 2em;
}
.family-member {
h3 {
margin: 1% auto;
.chip-icon {
font-size: 10px;
color: #888;
}
p {
line-height: 30px;
margin-left: 2%;
&.status-active {
background: #e8f5e9;
color: #2e7d32;
border-color: #a5d6a7;
}
&.status-inactive {
background: #fff3e0;
color: #e65100;
border-color: #ffcc80;
}
}
.address {
h3 {
margin: 1% auto;
}
/* ── Info Cards ── */
.info-card {
border: 1px solid rgba(0, 0, 0, 0.08);
border-radius: 8px;
overflow: hidden;
background: #fff;
}
p {
line-height: 30px;
margin-left: 2%;
.card-header {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 20px;
background: #fafafa;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
font-size: 14px;
font-weight: 600;
color: #333;
.card-icon {
color: var(--md-sys-color-primary, #1074b9);
font-size: 13px;
}
}
.card-body {
padding: 16px 20px;
&.no-padding {
padding: 0;
}
}
.count-badge {
margin-left: auto;
background: var(--md-sys-color-primary, #1074b9);
color: #fff;
font-size: 11px;
font-weight: 700;
width: 22px;
height: 22px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
/* ── Info Table (Key-Value pairs) ── */
.info-table {
width: 100%;
border-collapse: collapse;
tr {
border-bottom: 1px solid rgba(0, 0, 0, 0.04);
&:last-child {
border-bottom: none;
}
}
td {
padding: 10px 0;
vertical-align: top;
}
.info-label {
width: 40%;
font-size: 13px;
color: rgba(0, 0, 0, 0.5);
font-weight: 500;
padding-right: 16px;
}
.info-value {
font-size: 14px;
color: #1a1a1a;
font-weight: 500;
}
}
/* ── Data Table (Family, etc.) ── */
.data-table {
width: 100%;
border-collapse: collapse;
thead {
background: #fafafa;
th {
padding: 10px 16px;
font-size: 12px;
font-weight: 600;
color: rgba(0, 0, 0, 0.55);
text-align: left;
text-transform: uppercase;
letter-spacing: 0.3px;
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
}
tbody {
tr {
border-bottom: 1px solid rgba(0, 0, 0, 0.04);
&:last-child {
border-bottom: none;
}
&:hover {
background: #f8f9fa;
}
}
td {
padding: 10px 16px;
font-size: 13px;
color: #333;
}
}
}
/* ── Badges ── */
.badge-yes {
display: inline-block;
font-size: 12px;
font-weight: 600;
padding: 2px 10px;
border-radius: 12px;
background: #e8f5e9;
color: #2e7d32;
}
.badge-no {
display: inline-block;
font-size: 12px;
font-weight: 600;
padding: 2px 10px;
border-radius: 12px;
background: #f5f5f5;
color: #888;
}
/* ── KYC ── */
.kyc-badge {
margin-left: auto;
background: #1976d2;
color: #fff;
font-size: 10px;
font-weight: 700;
padding: 2px 8px;
border-radius: 12px;
letter-spacing: 0.5px;
}
.mono {
font-family: 'Roboto Mono', monospace;
letter-spacing: 1px;
}
/* ── Submit Section ── */
.submit-section {
display: flex;
justify-content: flex-end;
gap: 12px;
padding: 20px 0 4px;
border-top: 1px solid rgba(0, 0, 0, 0.08);
margin-top: 8px;
}
.submit-btn {
min-width: 160px;
height: 44px;
font-size: 15px;
font-weight: 600;
letter-spacing: 0.3px;
}
.cancel-btn {
color: rgba(0, 0, 0, 0.6);
height: 44px;
}
/* ── Responsive ── */
@media (max-width: 768px) {
.profile-card {
flex-direction: column;
text-align: center;
padding: 16px;
}
.profile-meta {
justify-content: center;
}
.info-table {
.info-label {
width: 45%;
}
}
.data-table {
thead th,
tbody td {
padding: 8px 10px;
font-size: 12px;
}
}
}
@@ -17,7 +17,6 @@ import {
MatExpansionPanelTitle,
MatExpansionPanelDescription
} from '@angular/material/expansion';
import { MatStepperPrevious } from '@angular/material/stepper';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { FindPipe } from '../../../pipes/find.pipe';
import { DateFormatPipe } from '../../../pipes/date-format.pipe';
@@ -41,7 +40,6 @@ import { LegalFormId } from 'app/clients/models/legal-form.enum';
MatExpansionPanelHeader,
MatExpansionPanelTitle,
MatExpansionPanelDescription,
MatStepperPrevious,
FaIconComponent,
FindPipe,
DateFormatPipe,
@@ -55,6 +53,8 @@ export class ClientPreviewStepComponent {
@Input() clientTemplate: any;
/** Client Object */
@Input() client: any;
/** KYC Data */
@Input() kycData: any;
/** Form submission event */
@Output() submitEvent = new EventEmitter();
@@ -51,150 +51,116 @@
</div>
<div class="mat-typography account-card-title">
<mat-card-title class="make-flex content">
<h3 class="flex-95">
<i
class="fa fa-stop"
[ngClass]="clientViewData.status.code | statusLookup"
matTooltip="{{ 'labels.status.' + clientViewData.status.value | translate }}"
></i>
<b>{{ 'labels.inputs.Client Name' | translate }} :</b>
<!-- Top Row: Name + Status + Actions -->
<mat-card-title class="cv-title-row">
<div class="cv-name-block">
<i class="fa fa-stop" [ngClass]="clientViewData.status.code | statusLookup"
matTooltip="{{ 'labels.status.' + clientViewData.status.value | translate }}"></i>
<mifosx-entity-name
[entityName]="
complianceHideClientData ? maskName(clientViewData.displayName) : clientViewData.displayName
"
[display]="'right'"
[hideCopy]="complianceHideClientData"
></mifosx-entity-name>
</h3>
<div class="flex-5 align-end-center">
<button mat-icon-button [matMenuTriggerFor]="clientMenu" aria-label="Client actions" yPosition="below">
<mat-icon matListIcon class="actions-menu">
<fa-icon icon="bars" size="sm"></fa-icon>
</mat-icon>
</button>
[entityName]="complianceHideClientData ? maskName(clientViewData.displayName) : clientViewData.displayName"
[display]="'right'" [hideCopy]="complianceHideClientData"></mifosx-entity-name>
<span class="cv-status-chip" [ngClass]="clientViewData.status.code | statusLookup">
{{ 'labels.status.' + clientViewData.status.value | translate }}
</span>
</div>
<button mat-icon-button [matMenuTriggerFor]="clientMenu" aria-label="Client actions">
<mat-icon matListIcon class="actions-menu"><fa-icon icon="bars" size="sm"></fa-icon></mat-icon>
</button>
</mat-card-title>
<!-- ID Chips Row -->
<div class="cv-id-row">
<div class="cv-id-chip">
<span class="cv-id-label">{{ 'labels.inputs.Account No' | translate }}</span>
<mifosx-account-number accountNo="{{ clientViewData.accountNo }}"></mifosx-account-number>
</div>
@if (clientViewData.cifNumber) {
<div class="cv-id-chip">
<span class="cv-id-label">{{ 'labels.inputs.CIF Number' | translate }}</span>
<mifosx-account-number accountNo="{{ clientViewData.cifNumber }}"></mifosx-account-number>
</div>
}
@if (clientViewData.externalId) {
<div class="cv-id-chip">
<span class="cv-id-label">{{ 'labels.inputs.External Id' | translate }}</span>
<mifosx-external-identifier
[externalId]="complianceHideClientData ? maskValue(clientViewData.externalId) : clientViewData.externalId"
[completed]="true" [hideCopy]="complianceHideClientData"></mifosx-external-identifier>
</div>
}
</div>
<!-- Details Grid -->
<mat-card-subtitle>
<div class="layout-row responsive-column">
<div class="flex-50">
<table class="account-overview">
<tbody>
<tr>
<td>
<b>{{ 'labels.inputs.Office' | translate }}</b>
</td>
<td><mifosx-entity-name [entityName]="clientViewData.officeName"></mifosx-entity-name></td>
</tr>
<tr>
<td>
<b>{{ 'labels.inputs.Client' | translate }}</b>
</td>
<td><mifosx-account-number accountNo="{{ clientViewData.accountNo }}"></mifosx-account-number></td>
</tr>
<tr>
<td>
<b>{{ 'labels.inputs.External Id' | translate }}</b>
</td>
<td>
<mifosx-external-identifier
[externalId]="
complianceHideClientData ? maskValue(clientViewData.externalId) : clientViewData.externalId
"
[completed]="true"
[hideCopy]="complianceHideClientData"
></mifosx-external-identifier>
</td>
</tr>
@if (clientViewData.activationDate) {
<tr>
<td>
<b>{{ 'labels.inputs.Activation Date' | translate }}</b>
</td>
<td>{{ clientViewData.activationDate | dateFormat }}</td>
</tr>
}
<tr>
<td>
<b>{{ 'labels.inputs.Staff' | translate }}</b>
</td>
@if (clientViewData.staffName) {
<td>{{ clientViewData.staffName }}</td>
}
@if (!clientViewData.staffName) {
<td>{{ 'labels.inputs.Unassigned' | translate }}</td>
}
</tr>
</tbody>
</table>
<div class="cv-details-grid">
<div class="cv-detail">
<span class="cv-dl">{{ 'labels.inputs.Office' | translate }}</span>
<span class="cv-dv">{{ clientViewData.officeName }}</span>
</div>
<div class="flex-50">
<table class="account-overview">
<tbody>
@if (clientViewData.groups.length > 0) {
<tr>
<td>
<b>{{ 'labels.inputs.Member Of' | translate }}</b>
</td>
<td>
@for (group of clientViewData.groups; track group) {
<span>
<span class="m-r-3">{{ group.name }}</span>
</span>
}
</td>
</tr>
}
@if (clientViewData.clientType) {
<tr>
<td>
<b>{{ 'labels.inputs.Client Type' | translate }}</b>
</td>
<td>{{ clientViewData.clientType.name }}</td>
</tr>
@if (clientViewData.clientClassification) {
<tr>
<td>
<b>{{ 'labels.inputs.Client Classification' | translate }}</b>
</td>
<td>{{ clientViewData.clientClassification.name }}</td>
</tr>
}
}
<tr>
<td>
<b>{{ 'labels.inputs.Mobile Number' | translate }}</b>
</td>
<td>
<mifosx-external-identifier
[externalId]="
complianceHideClientData ? maskValue(clientViewData.mobileNo) : clientViewData.mobileNo
"
[completed]="true"
[hideCopy]="complianceHideClientData"
></mifosx-external-identifier>
</td>
</tr>
<tr>
<td>
<b>{{ 'labels.inputs.Email' | translate }}</b>
</td>
<td>
<mifosx-external-identifier
[externalId]="
complianceHideClientData
? maskEmail(clientViewData.emailAddress)
: clientViewData.emailAddress
"
[completed]="true"
[hideCopy]="complianceHideClientData"
></mifosx-external-identifier>
</td>
</tr>
</tbody>
</table>
<div class="cv-detail">
<span class="cv-dl">{{ 'labels.inputs.Staff' | translate }}</span>
<span class="cv-dv">{{ clientViewData.staffName || ('labels.inputs.Unassigned' | translate) }}</span>
</div>
@if (clientViewData.activationDate) {
<div class="cv-detail">
<span class="cv-dl">{{ 'labels.inputs.Activation Date' | translate }}</span>
<span class="cv-dv">{{ clientViewData.activationDate | dateFormat }}</span>
</div>
}
@if (clientViewData.clientType) {
<div class="cv-detail">
<span class="cv-dl">{{ 'labels.inputs.Client Type' | translate }}</span>
<span class="cv-dv">{{ clientViewData.clientType.name }}</span>
</div>
}
@if (clientViewData.clientClassification) {
<div class="cv-detail">
<span class="cv-dl">{{ 'labels.inputs.Client Classification' | translate }}</span>
<span class="cv-dv">{{ clientViewData.clientClassification.name }}</span>
</div>
}
@if (clientViewData.mobileNo) {
<div class="cv-detail">
<span class="cv-dl">{{ 'labels.inputs.Mobile Number' | translate }}</span>
<span class="cv-dv">
<mifosx-external-identifier
[externalId]="complianceHideClientData ? maskValue(clientViewData.mobileNo) : clientViewData.mobileNo"
[completed]="true" [hideCopy]="complianceHideClientData"></mifosx-external-identifier>
</span>
</div>
}
@if (clientViewData.emailAddress) {
<div class="cv-detail">
<span class="cv-dl">{{ 'labels.inputs.Email' | translate }}</span>
<span class="cv-dv">
<mifosx-external-identifier
[externalId]="complianceHideClientData ? maskEmail(clientViewData.emailAddress) : clientViewData.emailAddress"
[completed]="true" [hideCopy]="complianceHideClientData"></mifosx-external-identifier>
</span>
</div>
}
@if (clientViewData.occupationCategory) {
<div class="cv-detail">
<span class="cv-dl">{{ 'labels.inputs.Occupation Category' | translate }}</span>
<span class="cv-dv">{{ clientViewData.occupationCategory.name }}</span>
</div>
}
@if (clientViewData.occupation) {
<div class="cv-detail">
<span class="cv-dl">{{ 'labels.inputs.Occupation' | translate }}</span>
<span class="cv-dv">{{ clientViewData.occupation.name }}</span>
</div>
}
@if (clientViewData.groups?.length > 0) {
<div class="cv-detail">
<span class="cv-dl">{{ 'labels.inputs.Member Of' | translate }}</span>
<span class="cv-dv">
@for (group of clientViewData.groups; track group) {
<span>{{ group.name }} </span>
}
</span>
</div>
}
</div>
</mat-card-subtitle>
</div>
@@ -30,16 +30,121 @@
}
}
.account-overview {
color: white;
min-width: 85%;
margin-left: 10px;
}
.make-flex {
display: flex;
}
.mat-card-title-group {
width: 100%;
}
/* ── Title Row ── */
.cv-title-row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
}
.cv-name-block {
display: flex;
align-items: center;
gap: 8px;
font-size: 18px;
font-weight: 600;
color: #fff;
i.fa-stop {
font-size: 12px;
}
}
.cv-status-chip {
font-size: 10px;
font-weight: 700;
padding: 2px 10px;
border-radius: 12px;
letter-spacing: 0.4px;
text-transform: uppercase;
background: rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.9);
}
/* ── ID Chips Row ── */
.cv-id-row {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 14px;
flex-wrap: wrap;
}
.cv-id-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 12px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 5px;
color: #fff;
font-size: 12px;
}
.cv-id-label {
font-size: 10px;
font-weight: 600;
color: rgba(255, 255, 255, 0.55);
text-transform: uppercase;
letter-spacing: 0.4px;
}
/* ── Details Grid ── */
.cv-details-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 6px 16px;
}
.cv-detail {
display: flex;
flex-direction: column;
gap: 1px;
padding: 4px 0;
}
.cv-dl {
font-size: 10px;
color: rgba(255, 255, 255, 0.5);
font-weight: 500;
}
.cv-dv {
font-size: 13px;
color: rgba(255, 255, 255, 0.95);
font-weight: 500;
}
.actions-menu {
color: #fff !important;
}
/* ── Responsive ── */
@media (max-width: 1024px) {
.cv-details-grid {
grid-template-columns: repeat(3, 1fr);
}
}
@media (max-width: 768px) {
.cv-details-grid {
grid-template-columns: repeat(2, 1fr);
}
.cv-id-row {
flex-direction: column;
align-items: flex-start;
}
}
@media (max-width: 480px) {
.cv-details-grid {
grid-template-columns: 1fr;
}
}
@@ -87,6 +87,10 @@
<span class="label">{{ 'labels.inputs.Account No' | translate }}</span>
<span class="value">{{ clientViewData.accountNo || '-' }}</span>
</div>
<div class="data-item">
<span class="label">{{ 'labels.inputs.CIF Number' | translate }}</span>
<span class="value">{{ clientViewData.cifNumber || '-' }}</span>
</div>
<div class="data-item">
<span class="label">{{ 'labels.inputs.External Id' | translate }}</span>
<span class="value">{{ clientViewData.externalId || '-' }}</span>
@@ -178,6 +182,18 @@
<span class="value">{{ clientViewData.clientClassification.name }}</span>
</div>
}
@if (clientViewData.occupationCategory) {
<div class="data-item">
<span class="label">{{ 'labels.inputs.Occupation Category' | translate }}</span>
<span class="value">{{ clientViewData.occupationCategory.name }}</span>
</div>
}
@if (clientViewData.occupation) {
<div class="data-item">
<span class="label">{{ 'labels.inputs.Occupation' | translate }}</span>
<span class="value">{{ clientViewData.occupation.name }}</span>
</div>
}
@if (!clientViewData.clientType && !clientViewData.clientClassification) {
<div class="data-item">
<span class="value no-data">{{ 'labels.commons.No classification data available' | translate }}</span>
+61 -42
View File
@@ -7,50 +7,66 @@
-->
<mat-card class="container">
<div class="layout-column layout-gt-sm-row align-gt-sm-start-center">
<div class="search-box m-r-30">
<mat-form-field class="search-box">
<!-- Header Bar -->
<div class="table-header">
<div class="table-title-group">
<h2 class="table-title">
<div class="t-logomark"><span></span><span></span><span></span><span></span></div>
{{ 'labels.menus.Clients' | translate }}
</h2>
<span class="table-count" *ngIf="totalRows">{{ totalRows }} records</span>
</div>
<div class="table-actions">
<mat-form-field class="table-search" appearance="outline">
<input
matInput
placeholder="{{ 'labels.text.SearchByClient' | translate }}"
class="search-box"
(keydown.enter)="search($event.target.value)"
/>
</mat-form-field>
</div>
@if (existsClientsToFilter) {
<div class="filter-box">
<mat-checkbox #showClosedAccounts labelPosition="after" class="m-r-10"
>{{ 'labels.inputs.Show Closed Accounts' | translate }}
@if (existsClientsToFilter) {
<mat-checkbox #showClosedAccounts labelPosition="after" class="table-checkbox">
{{ 'labels.inputs.Show Closed Accounts' | translate }}
</mat-checkbox>
}
<div class="table-buttons">
<button
mat-stroked-button
[routerLink]="['../', 'organization', 'bulk-import', 'Clients']"
*mifosxHasPermission="'CREATE_CLIENT'"
class="btn-import"
>
<fa-icon icon="download"></fa-icon>
{{ 'labels.buttons.Import Client' | translate }}
</button>
<button
mat-flat-button
color="primary"
[routerLink]="['create']"
*mifosxHasPermission="'CREATE_CLIENT'"
class="btn-create"
>
<fa-icon icon="plus"></fa-icon>
{{ 'labels.buttons.Create Client' | translate }}
</button>
</div>
}
<div class="action-button gap-25px">
<button
mat-raised-button
color="primary"
[routerLink]="['../', 'organization', 'bulk-import', 'Clients']"
*mifosxHasPermission="'CREATE_CLIENT'"
>
<fa-icon icon="download" class="m-r-20"></fa-icon>{{ 'labels.buttons.Import Client' | translate }}
</button>
<button mat-raised-button color="primary" [routerLink]="['create']" *mifosxHasPermission="'CREATE_CLIENT'">
<fa-icon icon="plus" class="m-r-20"></fa-icon>{{ 'labels.buttons.Create Client' | translate }}
</button>
</div>
</div>
<div [hidden]="!existsClientsToFilter" class="client-list">
<!-- Table -->
<div [hidden]="!existsClientsToFilter" class="table-container">
@if (isLoading) {
<div>
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</div>
<mat-progress-bar mode="indeterminate" class="table-loader"></mat-progress-bar>
}
<table mat-table [dataSource]="dataSource" matSort (matSortChange)="sortChanged($event)" class="bordered-table">
<table mat-table [dataSource]="dataSource" matSort (matSortChange)="sortChanged($event)" class="modern-table">
<!-- Name Column -->
<ng-container matColumnDef="displayName">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.name' | translate }}</th>
<td mat-cell *matCellDef="let row" [routerLink]="[row.id, 'general']">
<td mat-cell *matCellDef="let row" [routerLink]="[row.id, 'general']" class="cell-link">
{{ hideClientData ? maskName(row.displayName) : row.displayName }}
</td>
</ng-container>
@@ -58,15 +74,21 @@
<!-- Account no Column -->
<ng-container matColumnDef="accountNumber">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Account No' | translate }}</th>
<td mat-cell *matCellDef="let row">
<td mat-cell *matCellDef="let row" class="cell-mono">
<mifosx-account-number display="left" accountNo="{{ row.accountNumber }}"></mifosx-account-number>
</td>
</ng-container>
<!-- CIF Number Column -->
<ng-container matColumnDef="cifNumber">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.CIF Number' | translate }}</th>
<td mat-cell *matCellDef="let row" class="cell-mono">{{ row.cifNumber }}</td>
</ng-container>
<!-- External ID Column -->
<ng-container matColumnDef="externalId">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.External Id' | translate }}</th>
<td mat-cell *matCellDef="let row">
<td mat-cell *matCellDef="let row" class="cell-mono">
<mifosx-external-identifier display="left" externalId="{{ row.externalId }}"></mifosx-external-identifier>
</td>
</ng-container>
@@ -75,22 +97,20 @@
<ng-container matColumnDef="status">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Status' | translate }}</th>
<td mat-cell *matCellDef="let row">
<div [ngClass]="row.status.code | statusLookup">
<fa-icon icon="stop"></fa-icon>
<span class="m-l-10 status">
{{ row.status.value | translate }}
</span>
</div>
<span class="status-badge" [ngClass]="row.status.code | statusLookup">
{{ row.status.value | translate }}
</span>
</td>
</ng-container>
<!-- Office Column -->
<ng-container matColumnDef="officeName">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Office Name' | translate }}</th>
<td mat-cell *matCellDef="let row">{{ row.officeName }}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns" class="select-row"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns" class="table-row"></tr>
</table>
<mat-paginator
@@ -102,10 +122,9 @@
></mat-paginator>
</div>
<div class="alert" [hidden]="!notExistsClientsToFilter">
<div class="message">
<i class="fa fa-exclamation-circle alert-check"></i>
{{ 'labels.text.No client was found' | translate }}
</div>
<!-- Empty State -->
<div class="empty-state" [hidden]="!notExistsClientsToFilter">
<fa-icon icon="search" class="empty-icon"></fa-icon>
<p class="empty-text">{{ 'labels.text.No client was found' | translate }}</p>
</div>
</mat-card>
+1
View File
@@ -86,6 +86,7 @@ export class ClientsComponent implements OnInit {
displayedColumns = [
'displayName',
'accountNumber',
'cifNumber',
'externalId',
'status',
'officeName'
@@ -6,81 +6,110 @@
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="container">
<mat-stepper orientation="vertical" [linear]="false" class="mat-elevation-z8" labelPosition="bottom" #clientStepper>
<ng-template matStepperIcon="number">
<fa-icon icon="pencil-alt" size="sm"></fa-icon>
</ng-template>
<div class="create-client-container">
<div class="client-header">
<fa-icon icon="user-plus" class="header-icon"></fa-icon>
<h2>{{ 'labels.heading.Create Client' | translate }}</h2>
</div>
<ng-template matStepperIcon="edit">
<fa-icon icon="pencil-alt" size="sm"></fa-icon>
</ng-template>
<ng-template matStepperIcon="done">
<fa-icon icon="check" size="sm"></fa-icon>
</ng-template>
<ng-template matStepperIcon="error">
<fa-icon icon="exclamation-triangle" size="lg"></fa-icon>
</ng-template>
<ng-template matStepperIcon="preview">
<fa-icon icon="eye" size="sm"></fa-icon>
</ng-template>
<mat-step [stepControl]="clientGeneralForm">
<ng-template matStepLabel>{{ 'labels.inputs.GENERAL' | translate }}</ng-template>
<mifosx-client-general-step
[clientTemplate]="clientTemplate"
(legalFormChangeEvent)="legalFormChange($event)"
></mifosx-client-general-step>
</mat-step>
<mat-step>
<ng-template matStepLabel>{{ 'labels.inputs.Nominee' | translate }}</ng-template>
<mifosx-client-family-members-step
#clientFamily
[clientTemplate]="clientTemplate"
></mifosx-client-family-members-step>
</mat-step>
<mat-step>
<ng-template matStepLabel>{{ 'labels.inputs.KYC' | translate }}</ng-template>
<mifosx-client-kyc-step #clientKyc></mifosx-client-kyc-step>
</mat-step>
@if (clientTemplate.isAddressEnabled) {
<mat-step>
<ng-template matStepLabel>{{ 'labels.inputs.ADDRESS' | translate }}</ng-template>
<mifosx-client-address-step
#clientAddress
<mat-tab-group class="client-tabs" animationDuration="200ms" [preserveContent]="true" [(selectedIndex)]="selectedTabIndex">
<!-- Tab 1: General Details -->
<mat-tab>
<ng-template mat-tab-label>
<fa-icon icon="user" class="tab-icon"></fa-icon>
{{ 'labels.inputs.GENERAL' | translate }}
</ng-template>
<div class="tab-content">
<mifosx-client-general-step
[clientTemplate]="clientTemplate"
[clientAddressFieldConfig]="clientAddressFieldConfig"
>
</mifosx-client-address-step>
</mat-step>
}
(legalFormChangeEvent)="legalFormChange($event)"
></mifosx-client-general-step>
</div>
</mat-tab>
@for (datatable of datatables; track datatable) {
<mat-step>
<ng-template matStepLabel>{{ datatable.registeredTableName }}</ng-template>
<mifosx-client-datatable-step [datatableData]="datatable" #dtclient></mifosx-client-datatable-step>
</mat-step>
}
<!-- Tab 2: KYC & Nominee -->
<mat-tab>
<ng-template mat-tab-label>
<fa-icon icon="id-card" class="tab-icon"></fa-icon>
{{ 'labels.inputs.KYC' | translate }} & {{ 'labels.inputs.Nominee' | translate }}
</ng-template>
<div class="tab-content">
<div class="tab-section">
<mifosx-client-kyc-step #clientKyc></mifosx-client-kyc-step>
</div>
@if (areFormvalids()) {
<mat-step completed>
<ng-template matStepLabel>{{ 'labels.inputs.PREVIEW' | translate }}</ng-template>
<mat-divider class="section-divider"></mat-divider>
<div class="tab-section">
<mifosx-client-family-members-step
#clientFamily
[clientTemplate]="clientTemplate"
></mifosx-client-family-members-step>
</div>
@if (clientTemplate.isAddressEnabled) {
<mat-divider class="section-divider"></mat-divider>
<div class="tab-section">
<mifosx-client-address-step
#clientAddress
[clientTemplate]="clientTemplate"
[clientAddressFieldConfig]="clientAddressFieldConfig"
></mifosx-client-address-step>
</div>
}
@for (datatable of datatables; track datatable) {
<mat-divider class="section-divider"></mat-divider>
<div class="tab-section">
<h3>{{ datatable.registeredTableName }}</h3>
<mifosx-client-datatable-step [datatableData]="datatable" #dtclient></mifosx-client-datatable-step>
</div>
}
</div>
</mat-tab>
<!-- Tab 3: Preview & Submit -->
<mat-tab>
<ng-template mat-tab-label>
<fa-icon icon="eye" class="tab-icon"></fa-icon>
{{ 'labels.inputs.PREVIEW' | translate }}
</ng-template>
<div class="tab-content">
<mifosx-client-preview-step
[clientTemplate]="clientTemplate"
[clientAddressFieldConfig]="clientAddressFieldConfig"
[client]="client"
[kycData]="clientKycStep?.kycData"
(submitEvent)="submit()"
>
</mifosx-client-preview-step>
</mat-step>
}
</mat-stepper>
></mifosx-client-preview-step>
</div>
</mat-tab>
</mat-tab-group>
<!-- Bottom Action Bar -->
<div class="action-bar">
<button mat-raised-button [routerLink]="['../']" class="cancel-btn">
{{ 'labels.buttons.Cancel' | translate }}
</button>
<div class="action-bar-right">
@if (selectedTabIndex > 0) {
<button mat-raised-button (click)="selectedTabIndex = selectedTabIndex - 1">
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Previous' | translate }}
</button>
}
@if (selectedTabIndex < 2) {
<button mat-raised-button color="primary" (click)="selectedTabIndex = selectedTabIndex + 1">
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
}
@if (selectedTabIndex === 2 && areFormvalids()) {
<button mat-raised-button color="primary" (click)="submit()">
<fa-icon icon="check" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Submit' | translate }}
</button>
}
</div>
</div>
</div>
@@ -5,3 +5,104 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
.create-client-container {
max-width: 960px;
margin: 0 auto;
padding: 24px 16px;
}
.client-header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 20px;
.header-icon {
font-size: 20px;
color: var(--md-sys-color-primary, #1074b9);
}
h2 {
margin: 0;
font-size: 22px;
font-weight: 500;
}
}
.client-tabs {
background: var(--md-sys-color-surface, #fff);
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
::ng-deep {
.mat-mdc-tab-header {
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.mat-mdc-tab {
min-width: 160px;
padding: 0 24px;
height: 52px;
}
.mat-mdc-tab-body-wrapper {
min-height: 200px;
}
.mat-mdc-tab-body {
overflow: visible !important;
}
.mat-mdc-tab-body-content {
overflow: visible !important;
}
}
}
.tab-icon {
margin-right: 8px;
}
.tab-content {
padding: 24px 16px;
}
.tab-section {
margin-bottom: 16px;
}
.section-divider {
margin: 24px 0;
}
.no-address-message {
display: flex;
align-items: center;
gap: 8px;
padding: 32px 16px;
color: rgba(0, 0, 0, 0.54);
font-size: 14px;
mat-icon {
color: rgba(0, 0, 0, 0.38);
}
}
.action-bar {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
padding: 16px 0;
border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.action-bar-right {
display: flex;
gap: 12px;
}
.cancel-btn {
color: rgba(0, 0, 0, 0.6);
}
@@ -19,12 +19,14 @@ import { ClientFamilyMembersStepComponent } from '../client-stepper/client-famil
import { ClientAddressStepComponent } from '../client-stepper/client-address-step/client-address-step.component';
import { ClientDatatableStepComponent } from '../client-stepper/client-datatable-step/client-datatable-step.component';
import { ClientKycStepComponent } from '../client-stepper/client-kyc-step/client-kyc-step.component';
import { ClientPreviewStepComponent } from '../client-stepper/client-preview-step/client-preview-step.component';
/** Custom Services */
import { SettingsService } from 'app/settings/settings.service';
import { MatStepper, MatStepperIcon, MatStep, MatStepLabel } from '@angular/material/stepper';
import { MatTabsModule } from '@angular/material/tabs';
import { MatIconModule } from '@angular/material/icon';
import { MatDivider } from '@angular/material/divider';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { ClientPreviewStepComponent } from '../client-stepper/client-preview-step/client-preview-step.component';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
/**
@@ -36,11 +38,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
styleUrls: ['./create-client.component.scss'],
imports: [
...STANDALONE_SHARED_IMPORTS,
MatStepper,
MatStepperIcon,
MatTabsModule,
MatIconModule,
MatDivider,
FaIconComponent,
MatStep,
MatStepLabel,
ClientGeneralStepComponent,
ClientFamilyMembersStepComponent,
ClientAddressStepComponent,
@@ -55,19 +56,15 @@ export class CreateClientComponent {
private clientsService = inject(ClientsService);
private settingsService = inject(SettingsService);
/** Client General Step */
@ViewChild(ClientGeneralStepComponent, { static: true }) clientGeneralStep: ClientGeneralStepComponent;
/** Client Family Members Step */
@ViewChild(ClientGeneralStepComponent) clientGeneralStep: ClientGeneralStepComponent;
@ViewChild('clientFamily') clientFamilyMembersStep: ClientFamilyMembersStepComponent;
/** Client Address Step */
@ViewChild('clientAddress') clientAddressStep: ClientAddressStepComponent;
/** Client KYC Step */
@ViewChild('clientKyc') clientKycStep: ClientKycStepComponent;
/** Get handle on dtclient tags in the template */
@ViewChildren('dtclient') clientDatatables: QueryList<ClientDatatableStepComponent>;
datatables: any = [];
legalFormType = 1;
selectedTabIndex = 0;
/** Client Template */
clientTemplate: any;
@@ -89,38 +86,26 @@ export class CreateClientComponent {
});
}
/**
* Retrieves general information about client.
*/
get clientGeneralForm() {
return this.clientGeneralStep.createClientForm;
return this.clientGeneralStep?.createClientForm;
}
/**
* Retrieves the client object
*/
get client() {
if (this.clientTemplate.isAddressEnabled) {
return {
...this.clientGeneralStep.clientGeneralDetails,
...this.clientFamilyMembersStep.familyMembers,
...this.clientAddressStep.address
};
} else {
return {
...this.clientGeneralStep.clientGeneralDetails,
...this.clientFamilyMembersStep.familyMembers
};
}
const general = this.clientGeneralStep?.clientGeneralDetails || {};
const family = this.clientFamilyMembersStep?.familyMembers || {};
const addr = this.clientTemplate.isAddressEnabled && this.clientAddressStep ? this.clientAddressStep.address : {};
return { ...general, ...family, ...addr };
}
areFormvalids(): boolean {
if (!this.clientGeneralStep || !this.clientGeneralForm) {
return false;
}
let areValids = this.clientGeneralForm.valid;
// Block form if sanctions match found
if (this.clientGeneralStep.sanctionsBlocked) {
return false;
}
if (this.clientTemplate.isAddressEnabled) {
if (this.clientTemplate.isAddressEnabled && this.clientAddressStep) {
areValids = areValids && this.clientAddressStep.address.address.length > 0;
}
if (this.clientTemplate.datatables && this.clientTemplate.datatables.length > 0 && this.clientDatatables) {
@@ -128,7 +113,6 @@ export class CreateClientComponent {
areValids = areValids && clientDatatable.datatableForm.valid;
});
}
return areValids;
}