Aman-Mittal opened a new pull request, #850: URL: https://github.com/apache/fineract-backoffice-ui/pull/850
The first use of `app-date-field` beyond its proof form, and it is a defect fix rather than a refactor. UI only. ## The defect An `ion-datetime` with no value still renders **today** on its button. Three forms hand-roll a `date-target` placeholder for that; the rest do not, so an optional date nobody has touched reads as the current date. Measured across the feature tree rather than guessed at: | | | |---|---| | hand-written date triads with no placeholder | **76** in 55 files | | of those, bound to a model that starts empty | **15** | | forms that hand-roll a placeholder today | 3 | The 15 are the ones where the button is actively wrong, as opposed to showing a default the form deliberately seeded. The clearest is a loan **guarantor's date of birth**: optional, `signal<string | null>(null)`, and so every guarantor appeared to have been born this morning. ## What this changes Five of the fifteen — the ones whose semantics are unambiguously optional: - `guarantor-form` — date of birth - `loan-charge-form`, `savings-charge-form`, `wc-loan-charge-form` — charge due dates - `reschedule-form` — the submitted-on date Each now uses `app-date-field`, which shows a placeholder while unset and offers a clear action once set. The fix and the migration are the same change, which is the point of having landed the primitive first: 92 lines of template out, 58 in, and five fewer hand-rolled triads. The regression test lives with the defect, in the guarantor form's own spec — it asserts the button says "not set" while `dobDate()` is null, and would fail on the old markup. **None of the four existing specs for these forms needed editing.** ## Why the other ten are not here Not because they are harder. For a field the platform actually *requires*, the right fix is a seeded default — as the client and loan forms do through `PlatformDateService` — not a placeholder that lets an operator submit nothing and get a server-side refusal. Telling those two cases apart needs the platform's rule for each field, which is a different piece of work from this one, and guessing would trade a cosmetic defect for a functional one. For the record, the ten are: `business-dates` (×2), `wc-loan-product-form` (×2), `wc-loan-form` (×2), `wc-breach-action-form`, `wc-delinquency-action-form`, `wc-loan-action-form`, and `email-campaign-form` — whose triad is also shaped differently enough that the structural conversion did not match it. ## Checks - unit suite 329 files / 2822 tests; the four existing specs unchanged and passing; one new regression case - `lint` silent, `tsc` clean, `i18n:check` clean, `format:check` clean - `check:ui-primitives`, `check:a11y-names`, `check:template-text` pass -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
