Aman-Mittal opened a new issue, #670:
URL: https://github.com/apache/fineract-backoffice-ui/issues/670
Follow-up to #669, which fixed the staff picker and the empty-sheet case on
this screen but deliberately stopped short of this.
## What happens
`collection-sheet.component.ts` renders the generated sheet as:
```html
<pre class="json-output">{{ collectionData() | json }}</pre>
```
A collection sheet is the document a field officer carries to a meeting —
clients, their due amounts, and somewhere to record what was actually
collected. A JSON dump is a debugging view, not that.
## Why #669 did not fix it
The generated client types the `command=generate` response as
`PostCollectionSheetResponse`:
```ts
export interface PostCollectionSheetResponse {
changes?: PostCollectionSheetChanges;
groupId?: number;
resourceId?: number;
}
```
That is the shape of the **save** response, not of a sheet. The real
generate payload is something else — groups, their clients, and each client's
loans and savings with amounts due.
On every instance available while investigating, `POST
/collectionsheet?command=generate` answered `200` with `content-length: 0`,
because no group meetings were scheduled. So the populated shape could not be
observed, and a table built against it would have been written against a guess
rather than a verified payload. That is the specific mistake worth avoiding
here.
## What this needs
1. An instance with a group, a meeting calendar attached to it, and active
loans whose repayments fall on the meeting date — enough to make the endpoint
return a real sheet.
2. The payload captured from that instance, so the rendering is written
against something observed.
3. A table: clients grouped as Fineract groups them, due amounts per loan
and per savings account, and editable collected amounts, since `command=save`
posts them back.
4. Likely an application contract in `core/adapters/api` for it, per ADR
0006 — the generated type is actively misleading here, which is the same class
of problem as #653.
## Also worth deciding
Whether an **individual** collection sheet belongs here alongside the group
one. Fineract exposes both; this screen only covers the group case.
--
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]