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

   Closes #181.
   
   `centers.routes.ts` declared list, create and edit. A center could be made 
and renamed and nothing else: its groups could not be seen or managed, staff 
could not be assigned, its meeting could not be scheduled, and it could not be 
activated or closed. For centre-based lending the center is the unit of daily 
work — and it is gated behind the institution types that advertise exactly that.
   
   ## What this adds
   
   `/centers/view/:id` with **General**, **Notes** and **Data Tables** tabs, 
and an actions menu: activate, close, assign staff, unassign staff, attach 
groups, detach groups, and attach or reschedule the meeting. The center name in 
the list now links to it. The shell mirrors the group detail view, as the issue 
anticipated.
   
   ## What the platform actually does
   
   Almost none of this is what the shape of the API suggests, and each point 
below is from probing a live instance rather than from documentation.
   
   **The read must name the association.** `associations=all` returns *nothing* 
extra on a center — not even the group members that `associations=groupMembers` 
returns. The generated client has no `associations` parameter at all, so the 
read goes through `HttpClient`. Under the parameter that sounds right, the 
groups tab would have been empty by construction.
   
   **A center is a group underneath**, and two operations exist *only* on the 
groups resource:
   
   - `unassignStaff` — the center endpoint has no such command; `staffId: null` 
is silently ignored (the response reports no changes) and `staffId: -1` is 
refused for not being greater than zero. It also rejects `locale` and 
`dateFormat` as unsupported, so that payload carries the staff id alone.
   - **Notes** — `/centers/{id}/notes` answers `404 "Note does not support 
resource centers"`, while `/groups/{centerId}/notes` stores one. The notes tab 
therefore reuses the group notes list against the center's id, with the links 
and the note form pointed back at the center rather than at a group view that 
does not exist.
   
   **Assigning staff is an update, not a command**, and `name` is mandatory on 
it even though it is not being changed — omitting it answers 
`validation.msg.center.name.cannot.be.blank`, which reads like a form bug.
   
   **Attach candidates come from `orphansOnly=true`**, the platform's own 
filter for groups with no parent center. Filtering this center's own members 
client-side would still have offered groups held by a *different* center, 
producing a refusal the operator cannot act on.
   
   **A weekly meeting requires `repeatsOnDay`** 
(`validation.msg.calendar.repeatsOnDay.cannot.be.blank`), and no meeting may 
start before the center was activated. Weekly is the ordinary cadence for 
centre-based lending, so the day selector sits with the frequency rather than 
being hidden, and is withheld for the frequencies that reject it. This one was 
caught by the backend e2e failing, not by inspection — my first probe used a 
daily meeting, which needs no day.
   
   Closure reasons come from `GET /centers/template?command=close`, and the 
`CenterClosureReason` code ships empty — so an institution that has not 
populated it cannot close a center at all. The dialog says that rather than 
presenting a select that looks broken.
   
   ## Not included
   
   - **Attendance capture.** It needs a meeting-instance and per-client surface 
of its own, and the group detail view has no shell to share for it.
   - **Staff assignment history.** This platform exposes no endpoint for it; 
`associations=all` returns nothing of the kind.
   
   Both are called for by the issue, so they are flagged here rather than 
quietly dropped.
   
   ## Testing
   
   - **955 unit specs** (up from 952 before this branch): the 
association-scoped read, the retry state, status gating, each command's exact 
payload, the staff update carrying the unchanged name, the bare unassign 
payload, attach/detach, a dismissed dialog sending nothing, and the 
weekly-meeting day handling on both create and update.
   - **Backend e2e** against a real Fineract (`center-servicing.spec.ts`, 
registered in `BACKEND_SPECS`): a center activated, staffed, given a group, 
unstaffed, detached and finally given a weekly meeting; plus notes written 
through the groups resource and read back on the center.
   - `lint`, `format:check`, `i18n:check`, `check:icons` and `build` clean.
   


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