Skip to content

fix(loans): fix duplicate routerLinkActive variables and wrong tab la…#3560

Open
Harshdhall01 wants to merge 1 commit into
openMF:devfrom
Harshdhall01:fix/loans-view-tab-labels-and-variables
Open

fix(loans): fix duplicate routerLinkActive variables and wrong tab la…#3560
Harshdhall01 wants to merge 1 commit into
openMF:devfrom
Harshdhall01:fix/loans-view-tab-labels-and-variables

Conversation

@Harshdhall01
Copy link
Copy Markdown
Member

@Harshdhall01 Harshdhall01 commented May 7, 2026

Description

Three navigation tabs in loans-view.component.html had duplicate
template reference variables causing broken active state detection
and incorrect tab labels.

  1. Original Schedule tab used #general (duplicate of General tab)
    and displayed "General" instead of "Original Schedule"
  2. Deferred Income tab used #accountdetail (duplicate of Account
    Details tab) and displayed "Account Details" instead of "Deferred Income"
  3. Transactions tab used #dashboard (duplicate of Dashboard tab)

In Angular, duplicate template reference variables cause both tabs
to highlight simultaneously when either is active, breaking navigation
UX for loan officers managing micro-loan accounts.

Fixed by renaming each variable to be unique and correcting the labels.

I am exploring this codebase as part of my DMP 2026 application for
the Dynamic Pricing of Micro-loans Using Reinforcement Learning project.
Understanding the loan account navigation is essential for my proposed
RL environment which models borrower repayment behavior and interest
rate adjustments.

Related issues and discussion

openMF/mifos-x-ai-sentiment-analysis-module#2

Screenshots, if any

N/A - This is a template variable rename and label text fix.
No visual changes to screenshot.

Checklist

  • 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

  • Bug Fixes
    • Fixed tab navigation state display in the Loans view. The Original Schedule, Transactions, and Deferred Income tabs now consistently reflect their active status when selected.
    • Improved reliability of tab highlighting across navigation and view updates; no other UI layout or routing behavior was changed.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Review 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(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: 944d5a76-fa1b-4d08-bc9a-fe2fb83fb2eb

📥 Commits

Reviewing files that changed from the base of the PR and between f5d2535 and dfdafad.

📒 Files selected for processing (1)
  • src/app/loans/loans-view/loans-view.component.html
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/app/loans/loans-view/loans-view.component.html

Walkthrough

The loans view template is updated to add template reference variables for three tab links: Original Schedule, Transactions, and Deferred Income. Each tab now declares a local reference variable and binds its active state through the [active] property.

Changes

Tab Navigation Reference Variables

Layer / File(s) Summary
Template Reference Variables and Bindings
src/app/loans/loans-view/loans-view.component.html
Three conditional tab links (Original Schedule, Transactions, Deferred Income) are updated with template reference variables (#originalSchedule, #transactions, #deferredIncome) and their [active] properties are bound to these variables.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • IOhacker
  • alberto-art3ch
🚥 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 accurately describes the main change: fixing duplicate routerLinkActive variables and correcting tab labels in the loans view component.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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/loans-view.component.html`:
- Line 287: The template uses the translate key 'labels.inputs.Deferred Income'
(via the translate pipe) which doesn't exist due to a case mismatch; fix it by
updating the template to use the existing key 'labels.inputs.Deferred income'
(lowercase "i") where the translate pipe is applied, or alternatively add
'labels.inputs.Deferred Income' to all locale files and run the project's
translation extraction (npm run translations:extract) so the key is available;
locate the offending string in the loans view template (the interpolation using
the translate pipe) and apply one of these fixes.
🪄 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: fcdee5fb-3e59-4a3a-9b51-a2e5dd33b538

📥 Commits

Reviewing files that changed from the base of the PR and between 9911030 and f5d2535.

📒 Files selected for processing (1)
  • src/app/loans/loans-view/loans-view.component.html
Comment thread src/app/loans/loans-view/loans-view.component.html
@Harshdhall01
Copy link
Copy Markdown
Member Author

Thanks for catching this! Fixed the i18n key to use
'labels.inputs.Deferred income' (lowercase i) to match
the existing translation files.

Copy link
Copy Markdown
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

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

Open a Jira Ticket.

[active]="deferredIncome.isActive"
>
{{ 'labels.inputs.Account Details' | translate }}
{{ 'labels.inputs.Deferred income' | translate }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why this change?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The Deferred Income tab was using #accountdetail as its template reference variable (same as the Account Details tab)
and displaying "Account Details" as its label.
In Angular, duplicate template reference variables cause incorrect active state — both tabs highlight simultaneously.
Fixed variable to #deferredIncome and corrected label to match existing i18n key labels.inputs.Deferred income.

…s and i18n key in loans-view

fix(loans): fix duplicate routerLinkActive variables and wrong tab labels in loans-view

fix(loans): use correct i18n key for Deferred income tab label
@Harshdhall01 Harshdhall01 force-pushed the fix/loans-view-tab-labels-and-variables branch from 10a05fa to dfdafad Compare May 8, 2026 17:30
@Harshdhall01
Copy link
Copy Markdown
Member Author

Hi @IOhacker, I replied to your inline comment explaining the reason for the Deferred income change, and have squashed
the commits into 1.
Regarding the Jira ticket — I tried to create one on MifosForge Jira but I don't have authorization to create
issues yet. Could you help me get access or let me know the correct process for first-time contributors?
Ready for re-review whenever you get a chance!

@Harshdhall01 Harshdhall01 requested a review from IOhacker May 8, 2026 17:34
@Harshdhall01
Copy link
Copy Markdown
Member Author

Hi @IOhacker, just a gentle ping! I've addressed your inline comment
explaining the Deferred Income label change and squashed the commits.
Could you please take another look when you get a chance?

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

Labels

None yet

2 participants