feat: update kyc tab, branch day register, and dormancy reports
Tests / testRigor (push) Canceled after 0s
build-run / Run Lint, Build and Deploy (push) Canceled after 0s
Publish Image in Docker Hub / build (push) Canceled after 0s
Playwright E2E Tests / Run Playwright Tests (push) Canceled after 0s

This commit is contained in:
2026-09-10 18:29:33 +05:30
parent f0c06988c0
commit fd5fe6e3b2
16 changed files with 595 additions and 104 deletions
@@ -1079,12 +1079,15 @@ export class EditClientComponent {
*/
private saveKycDocProof(clientId: string) {
const payload = this.clientKycStep?.kycDocPayload;
if (!payload?.proofId || !payload?.files?.length) return;
// A document number corrected without re-scanning the document is still a change worth
// saving, so this no longer requires files — it used to return here and the new number was
// silently dropped.
if (!payload?.proofId) return;
const proofName = payload.proof?.name || 'KYC Document';
const uploadFiles = (identifierId: string) => {
for (const entry of payload.files) {
for (const entry of payload.files || []) {
const formData = new FormData();
formData.append('name', `${proofName} — ${entry.slot}`);
formData.append('file', entry.file);
@@ -1092,8 +1095,26 @@ export class EditClientComponent {
}
};
if (this.clientKycStep?.existingKycIdentifierId) {
uploadFiles(this.clientKycStep.existingKycIdentifierId);
// A document already on file is updated in place, not posted again.
//
// Re-collecting a document used to create a second identifier carrying the same number and
// the same scans, with nothing to say which of the two was current — the client in front of
// this was left with two identical Aadhaar rows. The document the customer renewed is the
// one already recorded, so its number and type are written back to that row and any new
// scans are attached to it.
const existingId = this.clientKycStep?.existingKycIdentifierId;
if (existingId) {
this.resolveDocumentTypeId(payload.proofId, proofName).subscribe((documentTypeId: number | null) => {
const update: any = { documentKey: payload.documentKey || `${proofName} - ${clientId}`, status: 'Active' };
if (documentTypeId != null) {
update.documentTypeId = documentTypeId;
}
this.clientsService.updateClientIdentifier(clientId, existingId, update).subscribe({
// The scans go up either way: failing to rewrite the number must not cost the images.
next: () => uploadFiles(existingId),
error: () => uploadFiles(existingId)
});
});
return;
}