Aman-Mittal opened a new issue, #793:
URL: https://github.com/apache/fineract-backoffice-ui/issues/793

   #### Summary
   The **Create Loan** form doesn't follow the required-field and validation 
conventions that other forms already use. #585 addressed these conventions 
generally and is closed, but this form was missed. Three problems:
   
   1. Twelve inputs are `required` (client, product, principal, term frequency 
and type, number of repayments, repayment every, frequency, interest rate, 
interest type, amortization and interest-calculation period), yet **none** 
shows a required marker. The Create Client form, by contrast, marks its 
required fields with `*`.
   2. **Save** stays disabled until every required field is valid. Nothing says 
which field is blocking it: there's no summary, tooltip or `aria-describedby`.
   3. **Repayments Starting From Date** is optional and starts empty 
(`repaymentsStartingFromDate = null`), but its date button *displays today's 
date*. An officer reads that as "the first repayment is due today". This is the 
same `ion-datetime-button` behaviour #747 describes for the client's Date of 
Birth.
   
   #### Current behavior
   - Before a product is chosen, Save is disabled and every field looks 
optional.
   - After a product is chosen, the terms are pre-filled and Save enables. If 
an officer then clears a required value, Save silently disables again.
   - The "Repayments Starting From Date" control shows the current date even 
though no value is set or submitted. The form only sends 
`repaymentsStartingFromDate` when the property is non-null, per 
`loan-form.component.ts` around line 765.
   
   #### Expected behavior
   - Every required field is visibly marked, consistent with the client and 
user forms.
   - When Save is disabled, the user can see why: each invalid field shows its 
error once touched, and a summary or the button's description lists what is 
missing.
   - An unset optional date shows a neutral placeholder (for example "Not set — 
defaults from product schedule"), not today's date. It also gets a clear action 
to reset it.
   
   #### Steps to reproduce
   1. Open a client and choose **New Account → Loan Account**.
   2. Observe that no label shows a required marker, and that Save is disabled 
with no explanation.
   3. Observe that **Repayments Starting From Date** shows today's date.
   4. Select a product, clear **Principal**, and observe that Save disables 
with no message.
   
   #### User impact
   - Officers can't tell which fields matter or why they can't save, so they 
trial-and-error through a 20-field form.
   - The phantom "today" date is misleading on a field that changes every 
instalment date when it *is* set. An officer may "correct" it to a wrong date, 
or believe the first repayment falls on disbursement day.
   - For screen-reader users, the disabled button carries no description, and 
required fields aren't announced as required in the visible label.
   
   #### Evidence
   The form after a product is chosen: no required markers, and "Repayments 
Starting From Date" reads 16 Oct 2026, today's date, while its bound value is 
`null`.
   
   ![Create Loan form without required markers; empty optional date shown as 
today](https://raw.githubusercontent.com/Aman-Mittal/fineract-backoffice-ui/assets/issue-screenshots/ux-audit-2026-10-16/loan-application-form.svg)
   
   DOM inspection of the 17 `ion-input`/`ion-select` controls: 12 carry 
`required`, and 0 render an asterisk. The Save `ion-button` has no 
`aria-describedby`.
   
   #### Proposed improvement
   - Use the shared form-field primitive that renders the required marker (see 
#287 / #684) for every input in this form.
   - Show inline errors for touched invalid fields. While the form is invalid, 
describe the Save button with a short "Complete: Principal, Interest Rate…" 
message.
   - Render optional, unset date pickers with a placeholder instead of today's 
date. Use the same fix as #747, ideally in the shared date-button wrapper so 
every form benefits.
   
   #### Acceptance criteria
   - [ ] All 12 required inputs show a required marker, and their accessible 
names indicate "required".
   - [ ] With an invalid form, the user can identify every blocking field 
without guessing, both visually and through the Save button's accessible 
description.
   - [ ] "Repayments Starting From Date" shows a placeholder while unset. 
Setting and clearing it works, and the payload omits it when unset.
   - [ ] Unit tests assert the required markers, the disabled-reason text, and 
the unset-date rendering.
   
   #### Verification status
   Reproduced on the deployed `main` (2026-10-16), superuser, tenant `default`. 
Required attributes were counted in the DOM, and the null binding was confirmed 
in source.
   
   #### Related API capabilities
   `POST /v1/loans`: `repaymentsStartingFromDate` is optional; when omitted, 
Fineract derives the first due date from the disbursement date and the 
repayment frequency.
   
   Related: #585 (generic required-marker and disabled-Save issue, closed), 
#747 (date picker shows today when unset), #766 (same silent-Save pattern on 
the fixed-deposit account form).
   


-- 
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]

Reply via email to