zhangxinyao88 opened a new pull request, #835:
URL: https://github.com/apache/fineract-backoffice-ui/pull/835

   ## What and why
   
   Editing a loan currently leaves the optional repayment-date picker at today, 
even when the loan has a saved first repayment date, and hides the “Not set” 
placeholder when none exists. Load the read API’s 
`expectedFirstRepaymentOnDate` into separate display state so both cases show 
the actual loan value.
   
   Opening/canceling the picker or saving an unchanged loan still omits 
`repaymentsStartingFromDate` from the update. An officer-selected replacement 
uses the existing submission path. Create-mode selection and clearing retain 
their existing behavior.
   
   Part of #793; follows the [edit-mode follow-up from 
#831](https://github.com/apache/fineract-backoffice-ui/pull/831#discussion_r4366814617).
 This addresses that follow-up only; the parent issue’s other items remain open.
   
   ## Verification
   
   - Regression baseline: 4 failures / 6 passes before the fix; all 10 focused 
tests pass after it. Covers absent/null, array/string saved dates, unchanged 
PUT omission and explicit replacement.
   - Full unit suite: 316 files / 2,612 tests passed separately with `TZ=UTC` 
and `TZ=America/New_York`; 2 MFE tests passed.
   - Affected mocked Playwright workflow: 4 passed, zero retries, desktop 
1280px and mobile 390px. Covers saved/unset edit display, cancel/unchanged 
save, replacement payload and existing create/clear/retry behavior.
   - Passed lint, format, i18n, icon/accessibility/template/UI-primitive 
checks, e2e typecheck, API surface, license check, GA gate and production 
build. Existing warnings: 8 unrelated lint warnings, header style budget, and 
GA adapter advisory (10/11, zero blocking or undetermined gates).
   - Browser HTTP responses were synthetic fixtures. No real-backend runtime 
was exercised. The current backend loan read resource and 
`LoanAccountData.basicLoanDetails` expose `expectedFirstRepaymentOnDate`; 
generated UI API files were not edited. Existing installed dependencies were 
reused after verifying the exact package-lock hash; no dependency changes.
   
   ## Screenshots
   
   Synthetic data from the passing browser run; the images live on a fork-only 
review branch outside this PR’s code diff.
   
   | | Saved date | Unset date |
   |---|---|---|
   | Desktop | ![Desktop saved 
date](https://raw.githubusercontent.com/zhangxinyao88/fineract-backoffice-ui/6f223ed19378c5958e80893e2a8caa2fefc4db1c/review/loan-repayment-date/desktop-stored.png)
 | ![Desktop unset 
date](https://raw.githubusercontent.com/zhangxinyao88/fineract-backoffice-ui/6f223ed19378c5958e80893e2a8caa2fefc4db1c/review/loan-repayment-date/desktop-unset.png)
 |
   | Mobile | ![Mobile saved 
date](https://raw.githubusercontent.com/zhangxinyao88/fineract-backoffice-ui/6f223ed19378c5958e80893e2a8caa2fefc4db1c/review/loan-repayment-date/mobile-stored.png)
 | ![Mobile unset 
date](https://raw.githubusercontent.com/zhangxinyao88/fineract-backoffice-ui/6f223ed19378c5958e80893e2a8caa2fefc4db1c/review/loan-repayment-date/mobile-unset.png)
 |
   
   ## AI assistance
   
   - Tool: OpenAI Codex.
   - Workflow: Follow-up Contribution; inspected maintainer feedback and API 
contract, added regression tests, and ran the validation above.
   
   ## Checklist
   
   - [x] No hand-edited generated API files.
   - [x] Uses the existing date adapter boundary; no direct browser globals or 
new third-party APIs.
   - [x] Reuses translated user-facing strings.
   - [x] Regression and UI workflow coverage added.
   - [x] Mocked browser testing completed; real-backend limitation stated above.
   - [x] Commit signed; GitHub reports a valid verified signature.
   - [x] AI-assisted contribution guidance followed.
   - [x] Bug fix and regression coverage; new-feature mailing-list discussion 
does not apply.
   


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