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

   ## Summary
   
   Teller management can create and edit tellers, create cashiers, allocate and 
settle cash, and delete a cashier. Two operations are missing:
   
   - **Delete a teller.** Tellers created by mistake, or for a closed branch 
counter, stay in every teller list for good.
   - **Edit a cashier assignment.** Changing a cashier's period (`startDate` / 
`endDate`), full-day / hours or description means deleting the cashier and 
recreating it, which breaks the link to the cash transactions already recorded.
   
   ## Evidence (`main` @ `8da1086f`)
   
   `api-surface.json` `TellerCashManagementService` lists `postTellers`, 
`putTellersTellerId`, `postTellersTellerIdCashiers`, `…Allocate`, `…Settle` and 
`deleteTellersTellerIdCashiersCashierId`. It has no `deleteTellersTellerId` and 
no `putTellersTellerIdCashiersCashierId`. 
`src/app/features/tellers/cashiers/cashier-form.component.ts` is create-only.
   
   ## Platform support
   
   - `DELETE /v1/tellers/{tellerId}`. Fineract refuses it while the teller 
still has cashiers or transactions, and that error should be shown verbatim.
   - `PUT /v1/tellers/{tellerId}/cashiers/{cashierId}` accepts `staffId`, 
`description`, `startDate`, `endDate`, `isFullDay`, `hourStartTime` and 
`hourEndTime`.
   
   ## Proposed implementation
   
   - Add **Delete** to the teller list or view, behind a destructive 
`DialogService.confirm`. Explain the "has cashiers" refusal and link to the 
cashier list.
   - Put `cashier-form.component.ts` into edit mode, prefilled, with a new 
`cashiers/:cashierId/edit` route and an **Edit** row action.
   
   ## RBAC
   
   | Action | Permission code | Typically granted to |
   |---|---|---|
   | View tellers / cashiers | `READ_TELLER` | branch operations, auditors |
   | Create / edit teller (existing) | `CREATE_TELLER` / `UPDATE_TELLER` | 
branch manager |
   | Delete teller | `DELETE_TELLER` | branch manager / head-office operations |
   | Assign cashier (existing) | `ALLOCATECASHIER_TELLER` | branch manager |
   | Edit cashier assignment | `UPDATECASHIERALLOCATION_TELLER` | branch 
manager |
   | Delete cashier (existing) | `DELETECASHIERALLOCATION_TELLER` | branch 
manager |
   
   All codes are in `scripts/permission-codes.json`.
   
   - Writes pass with the exact code **or** `ALL_FUNCTIONS`. With maker-checker 
on, changes are queued for `<CODE>_CHECKER`.
   - Cash-handling roles (cashiers themselves) should normally hold only 
allocate/settle-related reads, not the assignment-management codes. The UI must 
not show these controls to them.
   
   ### UI expectations
   
   - Guard the new edit route with `permissionGuard` 
(`UPDATECASHIERALLOCATION_TELLER`).
   - Gate Delete teller and Edit cashier with `[appRequiresPermission]`.
   
   ## Acceptance criteria
   
   - [ ] An unused teller can be deleted. A teller that still has cashiers 
shows a clear refusal.
   - [ ] A cashier assignment can be edited, and its transactions are preserved.
   - [ ] Both actions are gated on their codes.
   - [ ] Unit tests cover the payloads, the refusal path and the gating.
   


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