fix(loans): fix duplicate routerLinkActive variables and wrong tab la…#3560
fix(loans): fix duplicate routerLinkActive variables and wrong tab la…#3560Harshdhall01 wants to merge 1 commit into
Conversation
|
Note
|
| 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.
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 and usage tips.
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
src/app/loans/loans-view/loans-view.component.html
|
Thanks for catching this! Fixed the i18n key to use |
| [active]="deferredIncome.isActive" | ||
| > | ||
| {{ 'labels.inputs.Account Details' | translate }} | ||
| {{ 'labels.inputs.Deferred income' | translate }} |
There was a problem hiding this comment.
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
10a05fa to
dfdafad
Compare
|
Hi @IOhacker, I replied to your inline comment explaining the reason for the Deferred income change, and have squashed |
|
Hi @IOhacker, just a gentle ping! I've addressed your inline comment |
Description
Three navigation tabs in
loans-view.component.htmlhad duplicatetemplate reference variables causing broken active state detection
and incorrect tab labels.
#general(duplicate of General tab)and displayed "General" instead of "Original Schedule"
#accountdetail(duplicate of AccountDetails tab) and displayed "Account Details" instead of "Deferred Income"
#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
web-app/.github/CONTRIBUTING.md.Summary by CodeRabbit