Client-stepper: pre-fill existing KYC/address proofs in edit, fix identifier saves

Edit-mode now shows the previously selected KYC document type + uploaded file thumbnail
(loads from /clients/{id}/identifiers + /client_identifiers/{id}/documents). Same for
address proof on the India address step. Closes the gap where editing a client showed
an empty file picker even when proof had been uploaded on create.

Identifier-save hardened across all three callsites (create-client, edit-client,
identities-tab.createIdentifierWithDocs) - the KYC chip picker proofId is a CODE
string ('AADHAAR'), but backend ClientIdentifierRequest.documentTypeId is Long, which
Spring rejects with HttpMessageNotReadableException -> 400. resolveDocumentTypeId
helper looks up the code against /kyc/proof-types?type=id and substitutes the numeric
CodeValue id before posting. Skips silently for constitution-specific non-individual
docs that have no CodeValue mapping.

KYC payload normalises panNumber / enterprisePan / gstinNumber / cinNumber via
toUpperCase + whitespace strip so user-typed lowercase or trailing spaces don't trip
the backend regex (validation.msg.CLIENTKYC.panNumber.does.not.match.regexp).

State name match in client-address save now normalises both sides (lowercase, collapse
underscores + spaces) so legacy MADHYA_PRADESH resolves to 'Madhya Pradesh' returned
by api.postalpincode.in. Backed by tenant migration 0297.

Identities-tab resolver flattened - was returning identifiers before the per-row
forkJoin(getClientIdentificationDocuments) completed, so the view rendered empty
documents arrays. Now uses switchMap + forkJoin so the resolver awaits completion.

Also bundles concurrent work-in-progress on letter-mgmt, organization, users,
bank-calendar, shell, nominee/notes/identifier dialogs, and theming.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Aditya
2026-05-20 12:40:58 +05:30
co-authored by Claude Opus 4.7
parent 325228c514
commit 83ea57ccf0
84 changed files with 10281 additions and 1194 deletions
@@ -105,3 +105,59 @@
grid-template-columns: 1fr;
}
}
/* ═══════════════════════════════════════════════════════════════
Read-only / disabled form-field overrides
─── Mirrors the India-address step so view-mode addresses stay
legible instead of looking ghosted at 0.38 opacity.
═══════════════════════════════════════════════════════════════ */
:host ::ng-deep {
.mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled {
opacity: 1;
.mat-mdc-input-element,
input.mat-mdc-input-element,
textarea.mat-mdc-input-element {
color: #0f172a !important;
-webkit-text-fill-color: #0f172a !important;
font-weight: 600;
caret-color: transparent;
}
.mat-mdc-floating-label,
.mdc-floating-label {
color: #64748b !important;
opacity: 1 !important;
}
.mdc-notched-outline__leading,
.mdc-notched-outline__notch,
.mdc-notched-outline__trailing {
border-color: #cbd5e1 !important;
border-width: 1px !important;
}
.field-prefix-icon mat-icon,
.mat-mdc-form-field-icon-prefix mat-icon,
.mat-mdc-form-field-icon-suffix mat-icon {
color: #475569 !important;
opacity: 1;
}
.mat-mdc-form-field-hint {
color: #64748b !important;
opacity: 1;
}
.mat-mdc-select-value-text,
.mat-mdc-select-value {
color: #0f172a !important;
-webkit-text-fill-color: #0f172a !important;
font-weight: 600;
}
.mat-mdc-select-arrow {
color: #94a3b8 !important;
}
}
}