WEB-657: Working Capital Loan charge adjustment#3728
Conversation
|
Note
|
| Layer / File(s) | Summary |
|---|---|
Charge action visibility src/app/loans/loans-view/charges-tab/charges-tab.component.html, src/app/loans/loans-view/view-charge/view-charge.component.html, src/app/loans/loans-view/loans-view.component.html |
Actions are conditionally rendered for applicable loan statuses and balances, and the overdue-charges tab uses a null-safe length check. |
Charge navigation context src/app/loans/loans-view/charges-tab/charges-tab.component.html, src/app/loans/loans-view/view-charge/view-charge.component.html |
Charge-row and back-button navigation now pass the current product type as a query parameter. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Possibly related PRs
- openMF/web-app#3709: Updates related charge-table action visibility and menu conditions.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title is specific and matches the main change: working capital loan charge adjustment support. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
src/app/loans/loans-view/view-charge/view-charge.component.html (1)
18-18: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse an appropriate icon for the Edit action.
The
editCharge()button currently uses theflagicon, which is identical to the icon used forwaiveCharge()below. Consider updating it to a more intuitive icon for editing.🎨 Proposed fix
- <fa-icon icon="flag" class="m-r-10"></fa-icon> + <fa-icon icon="pencil" class="m-r-10"></fa-icon>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/app/loans/loans-view/view-charge/view-charge.component.html` at line 18, Update the icon used by the editCharge() button from "flag" to an appropriate edit/pencil icon, while leaving the waiveCharge() button's flag icon unchanged.src/app/loans/loans-view/charges-tab/charges-tab.component.html (1)
284-311: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winAdd permission guards to charge actions.
The action buttons in this menu lack
*mifosxHasPermissiondirectives. For consistency with other components (likeview-charge) and to prevent unauthorized users from seeing restricted actions, consider adding the appropriate permission checks (e.g.,'UPDATE_LOANCHARGE','DELETE_LOANCHARGE','PAY_LOANCHARGE','WAIVE_LOANCHARGE').🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/app/loans/loans-view/charges-tab/charges-tab.component.html` around lines 284 - 311, Add mifosxHasPermission guards to the charge action buttons in the menu: use UPDATE_LOANCHARGE for adjust/edit, DELETE_LOANCHARGE for delete, PAY_LOANCHARGE for pay, and WAIVE_LOANCHARGE for waive. Preserve the existing status and charge-state conditions while preventing unauthorized users from seeing these actions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/app/loans/loans-view/view-charge/view-charge.component.html`:
- Around line 12-46: Update the permission directives in the view-charge
template for all charge actions to use the corresponding loan-charge permissions
instead of savings-account permissions. Change the Edit action to use the loan
charge update permission rather than waive, and update the Pay, Waive, and
pending-approval Edit/Delete actions consistently while preserving their
existing click handlers and visibility conditions.
---
Nitpick comments:
In `@src/app/loans/loans-view/charges-tab/charges-tab.component.html`:
- Around line 284-311: Add mifosxHasPermission guards to the charge action
buttons in the menu: use UPDATE_LOANCHARGE for adjust/edit, DELETE_LOANCHARGE
for delete, PAY_LOANCHARGE for pay, and WAIVE_LOANCHARGE for waive. Preserve the
existing status and charge-state conditions while preventing unauthorized users
from seeing these actions.
In `@src/app/loans/loans-view/view-charge/view-charge.component.html`:
- Line 18: Update the icon used by the editCharge() button from "flag" to an
appropriate edit/pencil icon, while leaving the waiveCharge() button's flag icon
unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 502a0d08-0bac-4651-9b34-83b43192fa0b
📒 Files selected for processing (4)
src/app/home/reporting-dashboard/reporting-dashboard.component.tssrc/app/loans/loans-view/charges-tab/charges-tab.component.htmlsrc/app/loans/loans-view/loans-view.component.htmlsrc/app/loans/loans-view/view-charge/view-charge.component.html
💤 Files with no reviewable changes (1)
- src/app/home/reporting-dashboard/reporting-dashboard.component.ts
4170860 to
7c016d3
Compare
7c016d3 to
929b1ee
Compare
929b1ee to
b43ca51
Compare
Description
We are adding the functionality to allow the user will be able to do charge adjustment transaction on active loan accounts, even if the Loan Charge is fully paid
Related issues and discussion
WEB-657
Screenshots, if any
Screen.Recording.2026-07-17.at.8.14.01.AM.mov
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
If you have multiple commits please combine them into one commit by squashing them.
Read and understood the contribution guidelines at
web-app/.github/CONTRIBUTING.md.Summary by CodeRabbit