Aman-Mittal opened a new pull request, #623:
URL: https://github.com/apache/fineract-backoffice-ui/pull/623

   ## What and why
   
   Seven defects found by diffing the generated client in `src/app/api/` 
against `api-surface.json`, then verifying each one against a real Fineract 
rather than a mock. Every one of them fails silently or fails identically to 
"there is no data", which is why none had been reported.
   
   - **Delinquency ranges and buckets could only be deleted.** "Create Range", 
"Create Bucket" and both per-row edits routed to paths with no route and no 
component, so all four landed on "Page not found" while delete worked. Adds the 
two form components and their four routes; the bucket form fills its type and 
range pickers from `GET /delinquency/buckets/template`, which nothing had 
called.
   - **Report-mailing jobs could never be submitted.** The form sent five fewer 
parameters than the platform requires: `locale` (`stretchyReportId` is 
locale-sensitive, so any payload carrying it without one is refused), 
`startDateTime`, `emailMessage`, `emailAttachmentFileFormatId` and 
`dateFormat`. All five are now sent, the report is picked from a list rather 
than typed as a numeric id, and the attachment format comes from `GET 
/reportmailingjobs/template`. `dateFormat` is `yyyy-MM-dd HH:mm:ss` because the 
`dd MMMM yyyy` used elsewhere in this codebase makes the platform throw once a 
time is appended.
   - **Interest rate charts always errored.** `productId` is optional in the 
spec and required by the platform, which answers a bare `GET 
/interestratecharts` with a 500; the screen made exactly that call, showing "No 
records found." under a toast carrying the raw request URL. Charts belong to a 
deposit product, so the list now gathers them per product.
   - **Bulk import sent seven entity types the platform refuses** — all seven 
answered 404, and `clients` is the initial selection, so the import history 
404'd on first load with the error going only to the console.
   - **Buy-down fees and capitalized income were permanently empty on any loan 
without an external id.** Both tabs keyed off the product enable flags while 
their fetch additionally required an external id and used the external-id 
endpoints. External ids are optional. Both now address the loan by id.
   - **The reschedule work queue opened the wrong record.** Rows carry the 
reschedule request id, which the batch command needs, and `openRecord` 
navigated to `/loans/view` with it. Navigation now uses `loanId`.
   - **The savings accounts paginator read "1 - 10 of NaN".** The generated 
model types `pageItems` as a `Set`, so `.size` compiled and returned 
`undefined` at runtime; the count now comes from the array `Array.from` already 
produced.
   
   **Form layout below 240px.** `.form-grid` was `repeat(2, 1fr)` in 32 
components and the shared stylesheet. `1fr` is `minmax(auto, 1fr)`, so the 
column holding the widest control keeps its intrinsic width and the other 
collapses. At 320px — the width `scripts/check-responsive.mjs` declares as the 
minimum — Create GL Account rendered GL Code and Account Usage **4px** wide, 
and Create Loan pushed its right-hand column **52px** past the card. Neither 
moves `document.scrollWidth`, so no existing check could see them. All of them 
become `repeat(auto-fit, minmax(min(240px, 100%), 1fr))`, and `.full-width` 
becomes `grid-column: 1 / -1` so it cannot conjure a second column back once 
the grid has collapsed to one.
   
   Two gaps closed alongside them: **holidays gain edit and delete** (offered 
while pending activation, the only state the platform accepts either command in 
— a holiday entered with the wrong dates was previously permanent, and holidays 
move repayment dates), and **selecting a loan product now fills the terms it 
defines** rather than leaving the officer to retype the product's own defaults, 
with anything already typed left alone.
   
   Closes #622
   Closes #620
   
   ### One thing this PR cannot fix
   
   With every mandatory parameter present, `POST /reportmailingjobs` still 
fails on the platform side: `number_of_runs` is `NOT NULL` with no default, and 
`numberOfRuns` is rejected as an unsupported request parameter, so no client 
can satisfy it. Reproduced with curl independently of this UI. That is a 
platform defect and is going to [FINERACT 
Jira](https://issues.apache.org/jira/projects/FINERACT) separately.
   
   The spec therefore asserts the request payload's completeness and the 
absence of a validation failure, rather than a 200 — so it neither fails on 
someone else's bug nor freezes that bug into this suite. It should be tightened 
to assert the 200 once the platform side lands.
   
   ## Verification
   
   Against a **real Fineract** (`deploy/docker-compose-e2e.yml`), because each 
defect is invisible to a mock — the mock would accept the payload the platform 
rejects, and would answer the entity token the screen sent rather than the one 
the platform knows.
   
   - 5 new backend Playwright specs, **14 cases, all passing**:
     - `e2e/delinquency-configuration.spec.ts` — creates a range then edits it; 
creates a bucket from the ranges the template offers
     - `e2e/report-mailing-job.spec.ts` — asserts the payload carries all five 
parameters, correctly shaped, and draws no validation failure
     - `e2e/interest-rate-charts.spec.ts` — the list renders without a server 
error
     - `e2e/bulk-import-entity-types.spec.ts` — every one of the 18 offered 
tokens is one the platform accepts
     - `e2e/form-layout-reflow.spec.ts` — measures the fields themselves, since 
page-overflow assertions cannot see this class of defect
   - **Both viewports.** `form-layout-reflow` and `report-mailing-job` assert 
at **320×844** and **1280×900**. The desktop half is not a formality: a fix 
that simply stacked everything would pass the narrow assertions while making 
every form on a 1280px screen a single tall column.
   - `npm test` — 250 files, 1568 tests, green. One existing unit test asserted 
the defect it shipped with (`still skips the request when the loan has no 
external id to fetch by`) and is replaced by its inverse.
   - `npm run lint`, `i18n:check`, `api:surface`, `check:a11y-names`, 
`check:route-permissions`, `check:responsive`, `check:theme-contrast`, 
`typecheck:e2e`, `ng build` — all green.
   - TypeScript `strict` with `noPropertyAccessFromIndexSignature` and 
`noImplicitOverride`; no new suppressions in `eslint-suppressions.json`.
   
   ## Screenshots
   
   Not added — the interesting evidence here is geometric and behavioural 
rather than visual, and it is asserted in `e2e/form-layout-reflow.spec.ts` 
(field widths and card-edge overflow at 320px) and in the four API specs 
(status codes and payload shape). Happy to attach recordings if a reviewer 
would rather see them; the delinquency and report-mailing specs run with 
`video: 'on'`.
   
   ## Checklist
   
   - [x] I did not hand-edit generated files under `src/app/api/`.
   - [x] New component or service code uses the adapter boundary in 
`src/app/core/adapters/` instead of direct browser globals or imperative 
third-party APIs. The two new delinquency forms use native controls with 
`TranslatePipe` and the `src/app/ui/` primitives, per ADR 0005 — `src/app/ui/` 
has no form-field primitive yet, which is #287.
   - [x] User-facing strings use translation keys.
   - [x] I added or updated tests appropriate to this change.
   - [x] UI workflow changes include suitable e2e coverage, including 
real-backend testing where relevant.
   - [x] Commits are signed.
   - [x] I followed the [AI-assisted contributions 
guidance](CONTRIBUTING.md#ai-assisted-contributions).
   


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