Skip to content

WEB-634-The dashboard menu should display the full credit traceability#3230

Merged
IOhacker merged 1 commit intoopenMF:devfrom
JaySoni1:loan-dashboard-traceability
Feb 25, 2026
Merged

WEB-634-The dashboard menu should display the full credit traceability#3230
IOhacker merged 1 commit intoopenMF:devfrom
JaySoni1:loan-dashboard-traceability

Conversation

@JaySoni1
Copy link
Copy Markdown
Contributor

@JaySoni1 JaySoni1 commented Feb 25, 2026

Changes Made :-

  • Fix [Fix Loan Dashboard Chart issue .

WEB-634

Summary by CodeRabbit

  • Bug Fixes

    • Improved fallback handling for loan period calculations so missing principal/interest values now use original due amounts.
    • Fixed chart data truncation—payment charts now show the full dataset rather than limiting to the first 10 items.
  • Style

    • Updated chart label styling: slightly reduced font size and fixed rotation to ensure all labels display clearly.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 25, 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

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4fe7ce5 and 4961512.

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

Walkthrough

Updates to the loan account dashboard component: fallback to original due fields for period values, payments chart now uses full datasets and shows all labels, and x-axis tick styling adjusted (font size and fixed 45° rotation with autoSkip disabled).

Changes

Cohort / File(s) Summary
Loan Dashboard Chart Visualization
src/app/loans/loans-view/loan-account-dashboard/loan-account-dashboard.component.ts
Added fallback to principalOriginalDue / interestOriginalDue when building period data. Replaced slicing of payments chart labels/data so full arrays are used. Set x-axis tick fontSize 10, maxRotation/minRotation to 45, and autoSkip: false to show all labels.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions 'credit traceability' but the actual changes focus on loan dashboard chart improvements—fallback data sourcing, expanded payment chart data display, and axis styling adjustments. Update the title to reflect the actual changes, such as 'Fix Loan Dashboard Chart display by expanding payment data and adjusting axis styling' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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
  • Post copyable unit tests in a comment

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

🧹 Nitpick comments (1)
src/app/loans/loans-view/loan-account-dashboard/loan-account-dashboard.component.ts (1)

296-300: Consider adaptive tick skipping for long repayment schedules.

At Line 298-Line 300, fixed rotation + autoSkip: false can make long schedules very dense and hard to read. Consider toggling skip/rotation based on labels.length so short schedules stay fully visible while long ones remain usable.

♻️ Suggested adjustment
+    const denseLabels = labels.length > 24;
...
            ticks: {
              font: {
                size: 10
              },
-              maxRotation: 45,
-              minRotation: 45,
-              autoSkip: false
+              maxRotation: denseLabels ? 45 : 0,
+              minRotation: denseLabels ? 45 : 0,
+              autoSkip: denseLabels,
+              maxTicksLimit: denseLabels ? 24 : undefined
            }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/app/loans/loans-view/loan-account-dashboard/loan-account-dashboard.component.ts`
around lines 296 - 300, The X axis config in loan-account-dashboard.component.ts
currently forces maxRotation/minRotation and autoSkip: false which makes long
repayment schedules unreadable; update the axis/tick logic (where you build the
chart options for the chart instance / method that sets ticks) to inspect
labels.length and apply adaptive settings: for small label counts keep autoSkip:
false and fixed rotations, but for larger label counts enable autoSkip: true and
reduce maxRotation/minRotation (or set them to 0/30) so ticks skip and rotate
less; reference the tick config block that contains maxRotation, minRotation and
autoSkip when implementing this conditional adjustment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@src/app/loans/loans-view/loan-account-dashboard/loan-account-dashboard.component.ts`:
- Around line 224-225: The pushes to principalData and interestData use the ||
operator which treats 0 as falsy and causes incorrect fallbacks; update the
expressions in loan-account-dashboard.component.ts (the principalData.push and
interestData.push calls) to use nullish coalescing (??) so they only fall back
when the value is null or undefined (e.g., use period.principalDue ??
period.principalOriginalDue ?? 0 and period.interestDue ??
period.interestOriginalDue ?? 0) to preserve legitimate zero values.

---

Nitpick comments:
In
`@src/app/loans/loans-view/loan-account-dashboard/loan-account-dashboard.component.ts`:
- Around line 296-300: The X axis config in loan-account-dashboard.component.ts
currently forces maxRotation/minRotation and autoSkip: false which makes long
repayment schedules unreadable; update the axis/tick logic (where you build the
chart options for the chart instance / method that sets ticks) to inspect
labels.length and apply adaptive settings: for small label counts keep autoSkip:
false and fixed rotations, but for larger label counts enable autoSkip: true and
reduce maxRotation/minRotation (or set them to 0/30) so ticks skip and rotate
less; reference the tick config block that contains maxRotation, minRotation and
autoSkip when implementing this conditional adjustment.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a3fb13f and 4fe7ce5.

📒 Files selected for processing (1)
  • src/app/loans/loans-view/loan-account-dashboard/loan-account-dashboard.component.ts

@JaySoni1 JaySoni1 force-pushed the loan-dashboard-traceability branch from 4fe7ce5 to 4961512 Compare February 25, 2026 22:33
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.

Lgtm

@IOhacker IOhacker merged commit 00c1e9c into openMF:dev Feb 25, 2026
5 checks passed
@JaySoni1
Copy link
Copy Markdown
Contributor Author

@IOhacker Thank You for the review

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