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:
co-authored by
Claude Opus 4.7
parent
325228c514
commit
83ea57ccf0
@@ -0,0 +1,186 @@
|
||||
/**
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Shared mixin for the client stepper steps.
|
||||
*
|
||||
* When the per-step `readOnly` flag is on, the host calls `form.disable()` which
|
||||
* cascades Material's default `~0.38 opacity` onto every outlined input,
|
||||
* select, checkbox and label. Visually it reads as "blurry". This mixin keeps
|
||||
* the disabled affordances (no caret, no border highlight on focus, no
|
||||
* pointer cursor on selects) but restores crisp colour + weight so the saved
|
||||
* values stay legible.
|
||||
*
|
||||
* Usage in a step component's .scss:
|
||||
*
|
||||
* @use '../stepper-readonly-overrides' as readonly;
|
||||
*
|
||||
* :host {
|
||||
* @include readonly.readonly-form-overrides;
|
||||
* }
|
||||
*/
|
||||
@mixin readonly-form-overrides {
|
||||
/* ─── MDC design-token overrides ───
|
||||
These CSS custom properties feed Material's disabled-state colors at the
|
||||
token level — higher in the cascade than any rule selector — so they win
|
||||
even against Material's own !important declarations baked into MDC styles. */
|
||||
--mdc-outlined-text-field-disabled-input-text-color: #0f172a;
|
||||
--mdc-outlined-text-field-disabled-label-text-color: #64748b;
|
||||
--mdc-outlined-text-field-disabled-outline-color: #cbd5e1;
|
||||
--mdc-outlined-text-field-disabled-supporting-text-color: #64748b;
|
||||
--mdc-outlined-text-field-disabled-leading-icon-color: #475569;
|
||||
--mdc-outlined-text-field-disabled-trailing-icon-color: #475569;
|
||||
--mdc-filled-text-field-disabled-input-text-color: #0f172a;
|
||||
--mdc-filled-text-field-disabled-label-text-color: #64748b;
|
||||
--mat-select-disabled-trigger-text-color: #0f172a;
|
||||
--mat-form-field-disabled-input-text-color: #0f172a;
|
||||
--mat-form-field-disabled-input-text-placeholder-color: #64748b;
|
||||
--mdc-checkbox-disabled-selected-icon-color: #059669;
|
||||
--mdc-checkbox-disabled-unselected-icon-color: #94a3b8;
|
||||
|
||||
::ng-deep {
|
||||
/* Outlined form fields in disabled state */
|
||||
.mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled {
|
||||
opacity: 1;
|
||||
|
||||
/* Input value */
|
||||
.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;
|
||||
}
|
||||
|
||||
/* Floating label */
|
||||
.mat-mdc-floating-label,
|
||||
.mdc-floating-label {
|
||||
color: #64748b !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
/* Outline border */
|
||||
.mdc-notched-outline__leading,
|
||||
.mdc-notched-outline__notch,
|
||||
.mdc-notched-outline__trailing {
|
||||
border-color: #cbd5e1 !important;
|
||||
border-width: 1px !important;
|
||||
}
|
||||
|
||||
/* matPrefix / matSuffix icons */
|
||||
.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;
|
||||
}
|
||||
|
||||
/* Hint text */
|
||||
.mat-mdc-form-field-hint {
|
||||
color: #64748b !important;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* mat-select value + arrow.
|
||||
MDC nests the visible text deeper than `.mat-mdc-select-value` — the
|
||||
actual `<span>` that renders the chosen option is `.mat-mdc-select-min-line`.
|
||||
Without explicitly forcing it, MDC's disabled-state CSS wins and the
|
||||
text reads as washed-out grey. */
|
||||
.mat-mdc-select-value-text,
|
||||
.mat-mdc-select-value,
|
||||
.mat-mdc-select-min-line,
|
||||
.mat-mdc-select-placeholder {
|
||||
color: #0f172a !important;
|
||||
-webkit-text-fill-color: #0f172a !important;
|
||||
font-weight: 600;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
.mat-mdc-select-arrow {
|
||||
color: #94a3b8 !important;
|
||||
}
|
||||
|
||||
/* The disabled select wrapper itself drops opacity in MDC — undo that. */
|
||||
.mat-mdc-select-disabled,
|
||||
.mat-mdc-select-disabled .mat-mdc-select-trigger {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
/* The MDC text-field root (parent of input + outline) also gets a
|
||||
disabled modifier. Strip any opacity it applies. */
|
||||
.mdc-text-field--disabled {
|
||||
opacity: 1 !important;
|
||||
|
||||
.mdc-text-field__input,
|
||||
input,
|
||||
textarea {
|
||||
color: #0f172a !important;
|
||||
-webkit-text-fill-color: #0f172a !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Native suffix icon buttons (e.g. eye-toggle) */
|
||||
.toggle-vis-btn,
|
||||
.mat-mdc-icon-button {
|
||||
color: #64748b !important;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Disabled checkboxes — keep the check + label crisp */
|
||||
.mat-mdc-checkbox-disabled {
|
||||
opacity: 1 !important;
|
||||
|
||||
.mdc-form-field > label,
|
||||
.mat-mdc-checkbox-label,
|
||||
.mdc-label {
|
||||
color: #0f172a !important;
|
||||
opacity: 1 !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.mdc-checkbox__background {
|
||||
background-color: #059669 !important;
|
||||
border-color: #059669 !important;
|
||||
}
|
||||
|
||||
.mdc-checkbox__checkmark {
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Disabled mat-radio */
|
||||
.mat-mdc-radio-button.mat-mdc-radio-disabled {
|
||||
opacity: 1 !important;
|
||||
|
||||
.mdc-form-field > label,
|
||||
.mdc-label {
|
||||
color: #0f172a !important;
|
||||
opacity: 1 !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
/* Disabled mat-slide-toggle */
|
||||
.mat-mdc-slide-toggle.mat-mdc-slide-toggle-disabled {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
/* Native UA override — Chrome/Safari force their own grey on disabled
|
||||
form controls via `-webkit-text-fill-color`, which beats `color`. */
|
||||
input:disabled,
|
||||
select:disabled,
|
||||
textarea:disabled {
|
||||
color: #0f172a !important;
|
||||
-webkit-text-fill-color: #0f172a !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user