Skip to content

WEB-657: Working Capital product with default accounting rule#3506

Merged
alberto-art3ch merged 1 commit intoopenMF:devfrom
alberto-art3ch:WEB-657/working-capital-loan-product-accounting-rule
Apr 14, 2026
Merged

WEB-657: Working Capital product with default accounting rule#3506
alberto-art3ch merged 1 commit intoopenMF:devfrom
alberto-art3ch:WEB-657/working-capital-loan-product-accounting-rule

Conversation

@alberto-art3ch
Copy link
Copy Markdown
Collaborator

@alberto-art3ch alberto-art3ch commented Apr 14, 2026

Description

Working Capital product is considering now the Accounting, so we require to add the accounting rule parameter to the API

Related issues and discussion

WEB-657

Screenshots

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

Release Notes

  • New Features

    • Working capital loan products now automatically set the accounting rule to 'NONE' upon creation and update.
  • Removed Features

    • Removed near-breach monitoring functionality from working capital products, including threshold evaluation, frequency settings, and related controls.
  • Style

    • Refined loan product settings form layout.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 14, 2026

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(s) in object: '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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4ea734c5-57ae-436b-ac1f-be4d00abe3dd

📥 Commits

Reviewing files that changed from the base of the PR and between 8ecadcc and e1dc122.

📒 Files selected for processing (5)
  • src/app/products/loan-products/create-loan-product/create-loan-product.component.ts
  • src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts
  • src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html
  • src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts
  • src/app/products/loan-products/models/loan-product.model.ts
💤 Files with no reviewable changes (2)
  • src/app/products/loan-products/models/loan-product.model.ts
  • src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html

Walkthrough

This PR adds accountingRule: 'NONE' to working capital loan product payloads during creation and updates, removes near-breach related form controls and validation from the loan product settings step, and eliminates the corresponding near-breach properties from the LoanProduct interface.

Changes

Cohort / File(s) Summary
Accounting Rule Initialization
src/app/products/loan-products/create-loan-product/create-loan-product.component.ts, src/app/products/loan-products/edit-loan-product/edit-loan-product.component.ts
Added explicit injection of accountingRule: 'NONE' into the loanProduct payload before API submission, conditionally for working capital products in the edit component.
Working Capital Settings Form
src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html, src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts
Removed near-breach related form controls (enableNearBreach, nearBreachEvalFrequency, nearBreachEvalFrequencyType, nearBreachThreshold) from form initialization, valueChanges subscriptions, and patching logic; removed divider element from template.
Data Model
src/app/products/loan-products/models/loan-product.model.ts
Removed near-breach optional properties from the LoanProduct interface definition.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • adamsaghy
  • gkbishnoi07
  • somasorosdpc
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly references the main change: adding the accounting rule parameter to Working Capital products. It aligns with the primary modifications across all affected files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

Copy link
Copy Markdown
Collaborator

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alberto-art3ch alberto-art3ch merged commit eee1801 into openMF:dev Apr 14, 2026
6 checks passed
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.

2 participants