WEB-657: Working Capital Product - Charges - #3980
Conversation
|
Note
|
| Layer / File(s) | Summary |
|---|---|
Charges step behavior src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/* |
The charges step defaults missing charge options to an empty list, safely reads multiDisburseLoan, and hides overdue-charge controls for Working Capital products. |
Product form integration src/app/products/loan-products/create-loan-product-classic/*, src/app/products/loan-products/edit-loan-product/* |
The charges step renders for all product types. Create and edit payloads include Working Capital charges, and edit dirty-state tracking includes the charges form. |
Payload and summary handling src/app/products/loan-products/loan-products.ts, src/app/products/loan-products/common/loan-product-summary/* |
Charge payloads use { id } references for all product types. Summaries safely display regular charges and restrict overdue charges to loan products. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Suggested reviewers: adamsaghy, yousufffff
Merge Risk: ⚪ Minimal · up to d94cc
No merge-blocking issue was identified in the Working Capital charge changes.
🚥 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 clearly identifies the main change: adding Working Capital product charge support. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4… |
| 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.
Description
Adds the optional
chargesparameter to the Working Capital loan product, mirroring how a term loan product declares the charges it offers: newm_wc_loan_product_chargejoin table,chargeson POST/PUT, and the resulting list exposed on the product GET and on the account template (loanData.product.charges).Unlike term loans, only charges defined with
chargeAppliesTo = WORKING_CAPITAL_LOANand matching the product currency can be attached, and a charge offered by a WC product can no longer be deleted or deactivated.Related issues and discussion
WEB-657
Screenshots, if any
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
New Features
Bug Fixes