Skip to content

WEB-657: Working Capital Product - Charges - #3980

Open
alberto-art3ch wants to merge 1 commit into
openMF:devfrom
alberto-art3ch:WEB-657/working-capital-product-with-charges
Open

WEB-657: Working Capital Product - Charges#3980
alberto-art3ch wants to merge 1 commit into
openMF:devfrom
alberto-art3ch:WEB-657/working-capital-product-with-charges

Conversation

@alberto-art3ch

@alberto-art3ch alberto-art3ch commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the optional charges parameter to the Working Capital loan product, mirroring how a term loan product declares the charges it offers: new m_wc_loan_product_charge join table, charges on 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_LOAN and 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

    • Charges can now be configured and saved for Working Capital products.
    • The Charges step is available when creating or editing all product types.
    • Product charges are consistently included when saving product details.
  • Bug Fixes

    • Improved handling when charge options or charge data are unavailable.
    • Working Capital products no longer display the loan-only overdue charges section.
    • Changes to charges are now correctly recognized when editing non-loan products.

@alberto-art3ch
alberto-art3ch requested a review from a team September 10, 2026 14:10
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "pre_merge_checks"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: e52cf186-28ec-4601-b6d3-d5ca5fa38981

📥 Commits

Reviewing files that changed from the base of the PR and between db26858 and d94cc92.

📒 Files selected for processing (8)
  • src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html
  • src/app/products/loan-products/create-loan-product-classic/create-loan-product-classic.component.html
  • src/app/products/loan-products/create-loan-product-classic/create-loan-product-classic.component.ts
  • src/app/products/loan-products/edit-loan-product/edit-loan-product.component.html
  • src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts
  • src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.html
  • src/app/products/loan-products/loan-product-stepper/loan-product-charges-step/loan-product-charges-step.component.ts
  • src/app/products/loan-products/loan-products.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

Working Capital products now support charge selection, dirty-state tracking, payload submission, and regular charge display. Overdue charges remain limited to loan products, and missing charge data is handled safely.

Changes

Working Capital charges

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant