opensource-joe opened a new pull request, #834:
URL: https://github.com/apache/fineract-backoffice-ui/pull/834

   ## What and why
   
   Closes #760
   
   Part of #760 is already fixed. In da67d8e9, found while gating the Working 
Capital loan screen (#777), the permission gate stopped erasing
   the chargeback button's `aria-label`. I checked against a local Fineract: 
with that commit reverted
   the button has no name, and on `main` it is named "Chargeback". So this PR 
covers the rest of the
   issue.
   
   - **Names say what the actions do.** "View Transaction" and "Charge Back 
Repayment", on both the
     `aria-label` and the tooltip. The old "View" was `COMMON.VIEW`, which is 
shared elsewhere, so these
     are two new keys under `LOANS.ACTIONS`. They are in `en`, `fr` and `hi`. 
`ko` has no
     `LOANS.ACTIONS` section yet, so it falls back to English as before.
   - **The chargeback icon no longer looks like undo.** It is now 
`swap-horizontal-outline` instead of
     `arrow-undo-outline`. It is already registered and not used elsewhere on 
this screen.
     (`card-outline` was the other option, but it is already the Repayment 
button's icon on the same
     page.) The colour is still `danger`, since a chargeback is a consequential 
financial action.
   - **The e2e test now guards the names.** In `loan-servicing.spec.ts` the 
adjustment test used to find
     the View button by its icon. It now finds both buttons by accessible name, 
so a nameless button
     fails it.
   
   I left the issue's third suggestion, a separate "Reverse (adjust to 0)" row 
action, out of scope.
   Reversal is still under View → Adjust Transaction. Happy to do that as a 
follow-up if you want it.
   
   ## Verification
   
   - Real backend, local stack (`scripts/e2e-stack.sh --fresh`): 
`loan-servicing.spec.ts` passes. With
     da67d8e9's change to `requires-permission.directive.ts` reverted, it fails 
on
     `getByRole('button', { name: 'Charge Back Repayment' })`. Restored, it 
passes again.
   - Accessibility tree on a seeded loan with a repayment: `button "View 
Transaction"` and
     `button "Charge Back Repayment"`.
   - Loan unit tests: 27 files, 253 tests passed.
   - `npm run lint`, `format:check`, `typecheck:e2e`, `build`, `i18n:check`, 
`check:icons`,
     `check:a11y-names`, `check:template-text`, `check:ui-primitives`: all 
clean.
   
   ## Screenshots
   
   ![Loan transaction row with the eye icon for View Transaction and a red 
two-way arrow for Charge Back 
Repayment](https://raw.githubusercontent.com/opensource-joe/fineract-backoffice-ui/assets/pr-screenshots/fineract-760-row-actions.png)
   
   ## 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, or explained why 
tests were not needed.
   - [x] UI workflow changes include suitable e2e coverage, including 
real-backend testing where relevant.
   - [x] Commits are signed — see [Commit 
Signing](CONTRIBUTING.md#commit-signing) in CONTRIBUTING.md.
   


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