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

   <!--
   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
   
   <!-- One or two sentences explaining what changed and why. -->
   
   The Document Templates screen hand-rolled its own `cdk-table`, so unlike 78 
of the other 85 list screens it had no search box, no paging and no retry 
affordance on a failed load. This converts it to the shared `<app-data-table>`, 
following the pattern in `loan-products-list.component.ts`.
   
   - Replaced the raw table with `<app-data-table>`: adds the standard "Type to 
search…" box, paging, a consistent empty state, and a retry button when the 
load fails.
   - `entity` and `type` (Fineract's numeric codes) are resolved to the text 
the columns already displayed — "Client" / "Loan", "Document" / "SMS" — before 
the rows reach the table. The table's own search and sort work off the raw row 
values, so without this, typing "SMS" would search against the number `2` and 
never match anything.
   - Added a unit test file for the component; none existed before.
   
   Closes #222
   
   ## Verification
   
   <!-- List what you ran and what you checked. Note whether the UI was 
exercised with mocks, a real Fineract backend, or both. -->
   
   - Added 6 unit tests covering initial load, the entity/type resolution used 
for search, a failed-load state, edit navigation, and delete with 
confirm/cancel. All pass.
   - `eslint`, `prettier --check`, `tsc --noEmit -p tsconfig.app.json` and `npm 
run i18n:check` are clean.
   - UI exercised in Chrome at 1440x900, dark theme, against mocked API 
responses only (no real Fineract backend). Confirmed the search box narrows the 
list by entity and type text, the columns still read the same values as before, 
and paging appears once the list is filtered down.
   - Not run: the full unit suite, the production build and the Playwright 
specs.
   
   ## Screenshots
   
   <!-- Add screenshots or a short recording for UI changes. Write "Not 
applicable" for non-UI changes. -->
   
   ### Before
   
   <img width="1440" height="900" alt="before-templates-full" 
src="https://github.com/user-attachments/assets/a2f93376-c4ba-40a7-96ae-756d093f825a";
 />
   
   <img width="1440" height="900" alt="before-templates-noSearch" 
src="https://github.com/user-attachments/assets/cda04bde-657e-453c-80a1-6a0adbb27753";
 />
   
   
https://github.com/user-attachments/assets/fd7cec96-de1f-478e-8375-b5ab9f3f89c1
   
   ### After
   
   <img width="1440" height="900" alt="after-templates-full" 
src="https://github.com/user-attachments/assets/a93f1911-f2d0-488f-b1a0-4bfa07984e9c";
 />
   
   <img width="1440" height="900" alt="after-templates-search" 
src="https://github.com/user-attachments/assets/90584f95-c2a1-4067-9bb6-4dc8b3334331";
 />
   
   
https://github.com/user-attachments/assets/ff15bfb6-e1b0-477e-b7b0-dc2d80d51aca
   
   ## AI assistance (optional)
   
   <!-- If generative AI materially assisted this contribution, optionally 
state the tool or model and
   the harness or workflow used. The contributor remains responsible for the 
submitted change. -->
   
   - Tool / model:
   - Harness / workflow:
   
   ## Checklist
   
   <!-- Check each item, or explain why it does not apply. -->
   
   - [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. (No new strings; the search 
box uses the existing keys.)
   - [x] I added or updated tests appropriate to this change, or explained why 
tests were not needed.
   - [ ] UI workflow changes include suitable e2e coverage, including 
real-backend testing where relevant. (No e2e spec added; covered by unit tests 
and a manual mocked run.)
   - [ ] Commits are signed — see [Commit 
Signing](CONTRIBUTING.md#commit-signing) in CONTRIBUTING.md.
   - [ ] I followed the [AI-assisted contributions 
guidance](CONTRIBUTING.md#ai-assisted-contributions).
   


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