feat: edit client — save per tab, DOB re-KYC alert, audit logs, KYC improvements
- Edit button per tab with Save & Next confirmation dialog - DOB change triggers re-KYC alert, resets PAN verification, auto-fills remarks - Mobile/email changes logged as audit notes via client notes API - Redesigned confirmation dialog with icon + title, type-based theming - KYC re-edit flow: remarks mandatory for VERIFIED records, re-edit API command - Load existing photo & signature in edit KYC, immediate upload on change - Populate all KYC fields (document, AML, form60/15) from API on edit - Non-individual PAN verification uses same flow as individual - Fix table overflow when sidebar panel is open - Add fr unit to stylelint allowed-list Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
b890d24bb7
commit
79e455c4ed
@@ -243,27 +243,27 @@ export class ClientsService {
|
||||
};
|
||||
for (const client of results) {
|
||||
// Fetch DOB from client data
|
||||
this.getClientData(client.id.toString()).pipe(
|
||||
catchError(() => of(null))
|
||||
).subscribe((data: any) => {
|
||||
if (data?.dateOfBirth) {
|
||||
client.dateOfBirth = data.dateOfBirth;
|
||||
}
|
||||
});
|
||||
this.getClientData(client.id.toString())
|
||||
.pipe(catchError(() => of(null)))
|
||||
.subscribe((data: any) => {
|
||||
if (data?.dateOfBirth) {
|
||||
client.dateOfBirth = data.dateOfBirth;
|
||||
}
|
||||
});
|
||||
|
||||
// Fetch father/spouse from family members
|
||||
this.getClientFamilyMembers(client.id.toString()).pipe(
|
||||
catchError(() => of([]))
|
||||
).subscribe((members: any) => {
|
||||
const list = Array.isArray(members) ? members : [];
|
||||
const spouse = list.find((m: any) => getRelName(m) === 'SPOUSE');
|
||||
const father = list.find((m: any) => getRelName(m) === 'FATHER');
|
||||
if (spouse) {
|
||||
client.fatherSpouseName = `S/o: ${spouse.firstName}`;
|
||||
} else if (father) {
|
||||
client.fatherSpouseName = `F/o: ${father.firstName}`;
|
||||
}
|
||||
});
|
||||
this.getClientFamilyMembers(client.id.toString())
|
||||
.pipe(catchError(() => of([])))
|
||||
.subscribe((members: any) => {
|
||||
const list = Array.isArray(members) ? members : [];
|
||||
const spouse = list.find((m: any) => getRelName(m) === 'SPOUSE');
|
||||
const father = list.find((m: any) => getRelName(m) === 'FATHER');
|
||||
if (spouse) {
|
||||
client.fatherSpouseName = `S/o: ${spouse.firstName}`;
|
||||
} else if (father) {
|
||||
client.fatherSpouseName = `F/o: ${father.firstName}`;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,8 +291,12 @@ export class ClientsService {
|
||||
|
||||
getClientNominees(clientId: string, accountNo?: string, accountType?: string): Observable<any> {
|
||||
let params = new HttpParams();
|
||||
if (accountNo) { params = params.set('accountNo', accountNo); }
|
||||
if (accountType) { params = params.set('accountType', accountType); }
|
||||
if (accountNo) {
|
||||
params = params.set('accountNo', accountNo);
|
||||
}
|
||||
if (accountType) {
|
||||
params = params.set('accountType', accountType);
|
||||
}
|
||||
return this.http.get(`/clients/${clientId}/nominees`, { params });
|
||||
}
|
||||
|
||||
@@ -599,6 +603,14 @@ export class ClientsService {
|
||||
return this.http.put(`/clients/${clientId}/kyc/${kycId}`, kycData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-edit a VERIFIED KYC record. Transitions status VERIFIED → IN_PROGRESS.
|
||||
* Remarks are mandatory in the payload.
|
||||
*/
|
||||
reEditClientKyc(clientId: string, kycId: string, kycData: any): Observable<any> {
|
||||
return this.http.put(`/clients/${clientId}/kyc/${kycId}?command=re-edit`, kycData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies PAN number via LincPay (reads PAN from the stored KYC record).
|
||||
* @param clientId Client ID
|
||||
|
||||
Reference in New Issue
Block a user