shivaansh0610-LUFFY opened a new pull request, #689:
URL: https://github.com/apache/fineract-backoffice-ui/pull/689

   <html><head></head><body><h2>What and why</h2><p>Closes #687.</p><p>Moves 
teller and cashier data access behind a dedicated <code 
inline="">TELLER_API</code> contract and Fineract adapter, following the 
existing staff and office API-boundary pattern.</p><p>This also fixes incorrect 
date handling in the teller and cashier screens. Teller list dates were being 
passed through an array-only date converter even though <code inline="">GET 
/tellers</code> returns string dates, and the teller edit form could interpret 
a date such as <code inline="">2026-10-02</code> as an array and save it as 
<code inline="">1901-12-02</code>.</p><p>The new adapter normalizes Fineract 
date values through <code inline="">toIsoFineractDate</code> and flattens the 
cashier response envelope to <code inline="">Cashier[]</code>, so the affected 
screens consistently consume the contract rather than raw generated API 
responses.</p><h2>Verification</h2><ul><li><p>Teller API adapter tests: 26/26 
passing.</p></li><l
 i><p>Teller feature tests: 48 passing in total, including new list-date 
regression coverage.</p></li><li><p>Full unit suite: 1954/1955 passing. The 
single <code inline="">journal-entries-list</code> failure passes when run 
independently and is outside the files changed here.</p></li><li><p><code 
inline="">npm run lint</code> — clean.</p></li><li><p><code 
inline="">api:surface</code> — clean.</p></li><li><p>Production build — 
clean.</p></li><li><p><code inline="">npm run format:check</code> — 
clean.</p></li><li><p><code inline="">npm run i18n:check</code> — 
clean.</p></li><li><p><code inline="">check:a11y-names</code> — 
clean.</p></li><li><p><code inline="">check:icons</code> — 
clean.</p></li><li><p>Mutation checks caught the nine intentionally broken 
behaviors covering status handling, date padding/parsing, envelope flattening, 
blank descriptions, edit-date loading, summary currency, and list-date 
display.</p></li><li><p>The implementation was exercised with mocked API
  data.</p></li></ul><p>A real Fineract backend was not used because Docker was 
not running.</p><h2>Screenshots</h2><p>Before/after screenshots and recordings 
were captured for the teller and cashier UI because the API-boundary problem 
exposed visible data regressions.</p><p>The evidence includes the teller and 
cashier lists and the teller edit flow.</p><p>The key regression demonstrated 
by the evidence is:</p>
   Field | Before | After
   -- | -- | --
   startDate sent on edit | 1901-12-02 | 2026-10-02
   
   <p>The screenshots and recording were captured against mocked API responses 
matching the shapes described in the issue. A live Fineract backend was not 
used.</p><h2>AI assistance (optional)</h2><ul><li><p>Tool / 
model:</p></li><li><p>Harness / workflow:</p></li></ul><h2>Checklist</h2><ul 
class="contains-task-list"><li class="task-list-item"><p><input type="checkbox" 
checked="" disabled=""> I did not hand-edit generated files under <code 
inline="">src/app/api/</code>.</p></li><li class="task-list-item"><p><input 
type="checkbox" checked="" disabled=""> New component or service code uses the 
adapter boundary in <code inline="">src/app/core/adapters/</code> instead of 
direct browser globals or imperative third-party APIs.</p></li><li 
class="task-list-item"><p><input type="checkbox" checked="" disabled=""> 
User-facing strings use translation keys.</p></li><li 
class="task-list-item"><p><input type="checkbox" checked="" disabled=""> I 
added or updated tests appropriate to this change, in
 cluding regression coverage for date handling and the API adapter.</p></li><li 
class="task-list-item"><p><input type="checkbox" checked="" disabled=""> UI 
workflow changes include suitable e2e coverage, including real-backend testing 
where relevant. <em>(The affected UI was covered with the existing mocked 
Playwright coverage; no backend behavior was changed and a real-Fineract run 
was not performed because Docker was not running.)</em></p></li><li 
class="task-list-item"><p><input type="checkbox" checked="" disabled=""> 
Commits are signed — see <a 
href="https://chatgpt.com/c/CONTRIBUTING.md#commit-signing";>Commit Signing</a> 
in CONTRIBUTING.md.</p></li><li class="task-list-item"><p><input 
type="checkbox" checked="" disabled=""> I followed the <a 
href="https://chatgpt.com/c/CONTRIBUTING.md#ai-assisted-contributions";>AI-assisted
 contributions guidance</a>.</p></li><li class="task-list-item"><p><input 
type="checkbox" checked="" disabled=""> If this adds a feature or changes a 
workflo
 w, I raised it on<br><a 
href="https://lists.apache.org/[email protected]";>[email protected]</a>
 first —<br>or it is a bug fix, refactor or test change, where that does not 
apply. <em>(Refactor/bug fix; no new workflow or feature 
proposal.)</em></p></li></ul></body></html><!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
     http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
   -->
   
   <!-- Commits must be signed to merge — see CONTRIBUTING.md#commit-signing if 
you haven't set this up. -->
   
   ## What and why
   
   Closes #687.
   
   Moves teller and cashier data access behind a dedicated `TELLER_API` 
contract and Fineract adapter, following the existing staff and office 
API-boundary pattern.
   
   This also fixes incorrect date handling in the teller and cashier screens. 
Teller list dates were being passed through an array-only date converter even 
though `GET /tellers` returns string dates, and the teller edit form could 
interpret a date such as `2026-10-02` as an array and save it as `1901-12-02`.
   
   The new adapter normalizes Fineract date values through `toIsoFineractDate` 
and flattens the cashier response envelope to `Cashier[]`, so the affected 
screens consistently consume the contract rather than raw generated API 
responses.
   
   ## Verification
   
   * Teller API adapter tests: 26/26 passing.
   * Teller feature tests: 48 passing in total, including new list-date 
regression coverage.
   * Full unit suite: 1954/1955 passing. The single `journal-entries-list` 
failure passes when run independently and is outside the files changed here.
   * `npm run lint` — clean.
   * `api:surface` — clean.
   * Production build — clean.
   * `npm run format:check` — clean.
   * `npm run i18n:check` — clean.
   * `check:a11y-names` — clean.
   * `check:icons` — clean.
   * Mutation checks caught the nine intentionally broken behaviors covering 
status handling, date padding/parsing, envelope flattening, blank descriptions, 
edit-date loading, summary currency, and list-date display.
   * The implementation was exercised with mocked API data.
   
   A real Fineract backend was not used because Docker was not running.
   
   ## Screenshots
   
   Before/after screenshots and recordings were captured for the teller and 
cashier UI because the API-boundary problem exposed visible data regressions.
   
   The evidence includes the teller and cashier lists and the teller edit flow.
   
   The key regression demonstrated by the evidence is:
   
   | Field                    | Before       | After        |
   | ------------------------ | ------------ | ------------ |
   | `startDate` sent on edit | `1901-12-02` | `2026-10-02` |
   
   The screenshots and recording were captured against mocked API responses 
matching the shapes described in the issue. A live Fineract backend was not 
used.
   
   ## AI assistance (optional)
   
   * Tool / model:
   * Harness / workflow:
   
   ## 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.
   * [x] User-facing strings use translation keys.
   * [x] I added or updated tests appropriate to this change, including 
regression coverage for date handling and the API adapter.
   * [x] UI workflow changes include suitable e2e coverage, including 
real-backend testing where relevant. *(The affected UI was covered with the 
existing mocked Playwright coverage; no backend behavior was changed and a 
real-Fineract run was not performed because Docker was not running.)*
   * [x] Commits are signed — see [[Commit 
Signing](https://chatgpt.com/c/CONTRIBUTING.md#commit-signing)](CONTRIBUTING.md#commit-signing)
 in CONTRIBUTING.md.
   * [x] I followed the [[AI-assisted contributions 
guidance](https://chatgpt.com/c/CONTRIBUTING.md#ai-assisted-contributions)](CONTRIBUTING.md#ai-assisted-contributions).
   * [x] If this adds a feature or changes a workflow, I raised it on
     
[[[email protected]](https://lists.apache.org/[email protected])](https://lists.apache.org/[email protected])
 first —
     or it is a bug fix, refactor or test change, where that does not apply. 
*(Refactor/bug fix; no new workflow or feature proposal.)*


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