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

   Three defects found by driving the running application against a live 
Fineract instance, not by reading code. Two of them are on Collection Sheet; 
the third is on `app-data-table` and therefore on every list screen.
   
   ## Collection Sheet
   
   ### The staff field asked for a database id
   
   ```html
   <ion-item fill="outline" class="full-width">
     <ion-label position="stacked">{{ 'COLLECTION_SHEET.STAFF' | translate 
}}</ion-label>
     <ion-input type="number" name="staffId" [(ngModel)]="staffId"></ion-input>
   </ion-item>
   ```
   
   Office, on the same form, was already a select. So the one control a branch 
operator cannot fill — a staff member's primary key — was the one that scopes 
the sheet to their own officer.
   
   It is now a select over `GET /staff?officeId=N`, which already returns 
`displayName`. It stays disabled until an office is chosen, and clears the 
selection when the office changes, because Fineract scopes staff by office and 
will refuse one from elsewhere.
   
   ### …and then threw the answer away
   
   `staffId` is a component field of its own, while `buildBody()` spread only 
the `request` object:
   
   ```ts
   private buildBody(): CollectionSheetRequest {
     return { ...this.request, transactionDate: ..., dateFormat: ... };
   }
   ```
   
   So whatever was entered never reached the request. The control did nothing 
at all. Verified fixed in the network panel:
   
   ```json
   {"locale":"en","officeId":1,"staffId":4,"transactionDate":"02 October 
2026","dateFormat":"dd MMMM yyyy"}
   ```
   
   ### An empty sheet rendered as the word `null`
   
   Fineract answers `command=generate` with `200` and `content-length: 0` when 
nothing falls due in the period, which `HttpClient` delivers as `null`. The 
screen rendered that through `{{ collectionData() | json }}` — so the operator 
saw the literal text `null` under a "Collection Results" heading, with a live 
**SAVE COLLECTION SHEET** button beneath it.
   
   Now: an empty state that says nothing is due, and Save only when there is a 
sheet to save. Confirmed on the running app — after Generate the only remaining 
button is Back.
   
   ## The search help icon, on every list screen
   
   `.search-container` in `data-table.component.ts` had **no CSS rule at all**, 
so it was `display: block` and the `app-help-icon` describing the search field 
wrapped onto the line below — a lone `?` sitting under the search box with 
nothing beside it to explain.
   
   Measured on Chart of Accounts before: container `1549×63`, field at `y=156`, 
icon at `y=199`. After: container `42` tall, both on one line.
   
   ## What is deliberately not done
   
   The populated sheet still renders as a raw dump. The generated client types 
the `generate` response as `PostCollectionSheetResponse` — `{changes, groupId, 
resourceId}` — which is the shape of the **save** response, not of a sheet. The 
real shape is something else, and no instance to hand has a scheduled group 
meeting to return one against, so a table built now would be written against a 
guess. It is left as the non-empty branch until the shape can be verified. 
Worth its own issue.
   
   ## Verification
   
   ```
   npm run test:unit    280 files / 1843 tests passed   (8 new)
   ```
   
   Plus, against the live instance: staff list loads 12 members for Head 
Office, `staffId: 4` reaches the request body, the empty response renders the 
empty state with no Save, and the help icon sits inline.
   
   One note on the ratchet: the new spec names `CollectionSheetService`, 
`OfficesService` and `StaffService` to spy on them, which is one more 
`local/no-generated-api-import` suppression — the same pattern the existing 
component specs use, since the component itself is still on the generated 
client. Adding `StaffService` to the component's existing `from '../../api'` 
statement costs nothing, because that rule reports once per import declaration 
rather than per name.


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