feat: add RBI circulars, CKYC, KYC, Superset analytics, passbook modules and UI updates

Add new feature modules (RBI feeds, CKYC, KYC tab, Form60, Superset analytics, passbook),
update client family members, dashboard, login page, sidenav, images, translations,
environment config, and fix RBI feeds API auth by using relative URLs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Aditya
2026-03-10 15:13:35 +05:30
co-authored by Claude Opus 4.6
parent 07f701f654
commit 73aa69ee02
84 changed files with 6256 additions and 700 deletions
@@ -0,0 +1,117 @@
<!--
Copyright since 2025 Mifos Initiative
This Source Code Form is subject to the terms of the Mozilla Public
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/.
-->
<div class="mat-typography" [formGroup]="kycForm">
<div class="kyc-header">
<h3>{{ 'labels.inputs.KYC Verification' | translate }}</h3>
<span class="kyc-badge">KYC</span>
</div>
<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>
<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>
<!-- 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>
</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>
@@ -0,0 +1,252 @@
/**
* Copyright since 2025 Mifos Initiative
*
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/.
*/
.kyc-header {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 4px;
h3 {
margin: 0;
}
}
.kyc-badge {
background-color: #1976d2;
color: #fff;
font-size: 11px;
font-weight: 700;
padding: 2px 8px;
border-radius: 12px;
letter-spacing: 0.5px;
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;
gap: 8px;
font-size: 13px;
color: #1565c0;
padding: 8px 12px;
background-color: #e3f2fd;
border: 1px solid #90caf9;
border-radius: 6px;
margin-bottom: 4px;
}
.kyc-info-hint-icon {
font-size: 18px;
height: 18px;
width: 18px;
color: #1565c0;
}
.kyc-field-row {
margin-bottom: 8px;
}
.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 {
width: 100%;
}
.m-b-20 {
margin-bottom: 20px;
}
.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;
}
@@ -0,0 +1,84 @@
/**
* Copyright since 2025 Mifos Initiative
*
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/.
*/
/** Angular Imports */
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';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
/**
* Client KYC Step Component
* Collects PAN, Aadhaar, and GSTIN details during client creation.
* KYC data is submitted via POST /clients/{clientId}/kyc after client creation.
* Verification happens later from the KYC tab on the client view page.
*/
@Component({
selector: 'mifosx-client-kyc-step',
templateUrl: './client-kyc-step.component.html',
styleUrls: ['./client-kyc-step.component.scss'],
imports: [
...STANDALONE_SHARED_IMPORTS,
MatStepperPrevious,
MatStepperNext,
MatDivider,
MatIcon,
FaIconComponent
]
})
export class ClientKycStepComponent {
private formBuilder = inject(UntypedFormBuilder);
/** KYC Reactive Form */
kycForm: UntypedFormGroup = this.formBuilder.group({
panNumber: [
'',
[Validators.pattern(/^[A-Z]{5}[0-9]{4}[A-Z]{1}$/)]
],
aadhaarNumber: [
'',
[Validators.pattern(/^\d{12}$/)]
],
gstinNumber: [
'',
[Validators.pattern(/^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}$/)]
],
remarks: ['']
});
/**
* Returns the KYC payload matching the backend API contract.
* POST /clients/{clientId}/kyc expects: kycType, riskCategory, panNumber,
* aadhaarNumberMasked (NOT full aadhaarNumber), gstinNumber, remarks.
*/
get kycData(): any {
const aadhaarRaw = this.kycForm.value.aadhaarNumber || '';
const aadhaarMasked = aadhaarRaw.length === 12 ? 'XXXXXXXX' + aadhaarRaw.slice(-4) : null;
return {
locale: 'en',
kycType: 1,
riskCategory: 1,
panNumber: this.kycForm.value.panNumber || null,
aadhaarNumberMasked: aadhaarMasked,
gstinNumber: this.kycForm.value.gstinNumber || null,
remarks: this.kycForm.value.remarks || null
};
}
/** Returns true if any KYC data has been entered */
get hasKycData(): boolean {
const v = this.kycForm.value;
return !!(v.panNumber || v.aadhaarNumber || v.gstinNumber);
}
}