Skip to content

Web 542 fix breadcrumb#3413

Open
samruddhikasar05-bit wants to merge 2 commits intoopenMF:devfrom
samruddhikasar05-bit:WEB-542-fix-breadcrumb
Open

Web 542 fix breadcrumb#3413
samruddhikasar05-bit wants to merge 2 commits intoopenMF:devfrom
samruddhikasar05-bit:WEB-542-fix-breadcrumb

Conversation

@samruddhikasar05-bit
Copy link

@samruddhikasar05-bit samruddhikasar05-bit commented Mar 19, 2026

Description

Describe the changes made and why they were made instead of how they were made. List any dependencies that are required for this change.

Related issues and discussion

#{Issue Number}

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

  • Bug Fixes

    • Loans section now displays detailed error messages when operations fail, improving visibility into transaction issues.
  • Chores

    • Updated savings account creation page setup for enhanced localization support.

@coderabbitai
Copy link

coderabbitai bot commented Mar 19, 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

Walkthrough

The PR introduces enhanced error handling in the loans view component to extract and display API error messages, and updates savings route metadata to use internationalization keys instead of hardcoded strings.

Changes

Cohort / File(s) Summary
Loan Error Handling
src/app/loans/loans-view/loans-view.component.ts
Modified filterDatatablesByProduct() error handler to extract error messages from API response, translate each userMessageGlobalisationCode via i18n, concatenate results, and display via alert instead of silent fallback.
Savings Route Metadata
src/app/savings/savings-routing.module.ts
Updated route data.title and data.breadcrumb for the create child route from hardcoded strings ('Create Savings Account') to i18n translation keys ('labels.createSavingsAccount').

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • IOhacker
  • alberto-art3ch
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'Web 542 fix breadcrumb' refers to only one aspect of the changeset. The PR actually contains two distinct changes: breadcrumb/title translation key updates (WEB-542) and API error handling improvements (WEB-862), but the title mentions only the breadcrumb fix. Update the title to reflect both main changes or prioritize the most significant change. Consider: 'WEB-542: Fix breadcrumb and title translation keys' or include both commits in the scope description.
✅ 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
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

Copy link
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.

Please add in the title the "WEB-542: The Savings product creation section displays text in English: Institution–Client—Create Savings Account—Summary."

Make sure to send only one commit, so then squash and commit

https://mifosforge.jira.com/browse/WEB-542

Copy link

@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: 2

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

243-255: Inconsistent indentation in the error handler block.

The error handler body uses 2-space indentation starting at the function level, while the rest of the file consistently uses 8-space indentation inside the subscribe callbacks. Run npx prettier --write . to fix formatting as per coding guidelines.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/loans/loans-view/loans-view.component.ts` around lines 243 - 255, The
error handler in the subscribe callback in loans-view.component.ts is
mis-indented (uses 2-space indentation) causing inconsistent formatting with
other subscribe callbacks that use 8-space indentation; re-indent the entire
error: (err) => { ... } block (including setting this.datatablesReady,
extraction of errors, message construction, and alert call) to match the 8-space
indentation style used in the surrounding subscribe callbacks and then run npx
prettier --write . to apply project formatting rules (target symbols: the
subscribe callback's error handler and the this.datatablesReady assignment).
🤖 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/loans-view.component.ts`:
- Around line 249-251: The mapping that builds the const message from the errors
array calls this.translate.instant with e.userMessageGlobalisationCode without
checking it; update the mapping over errors in loans-view.component (where const
message is created) to defensively handle missing or falsy
userMessageGlobalisationCode by providing a safe fallback (e.g., a default
translation key or skipping that error) before calling this.translate.instant,
so that this.translate.instant never receives undefined and the resulting
message string is well-formed.
- Around line 243-255: The error handler in loans-view.component.ts uses
this.translate.instant and alert() but the TranslateService is injected as
translateService and the app uses AlertService; update the error callback to
call this.translateService.instant(...) instead of this.translate.instant,
import and inject AlertService (e.g., private alertService =
inject(AlertService) or via constructor) if not present, and replace native
alert(message) with this.alertService.alert(message) (keeping the existing
datatablesReady assignment and mapping logic intact).

---

Nitpick comments:
In `@src/app/loans/loans-view/loans-view.component.ts`:
- Around line 243-255: The error handler in the subscribe callback in
loans-view.component.ts is mis-indented (uses 2-space indentation) causing
inconsistent formatting with other subscribe callbacks that use 8-space
indentation; re-indent the entire error: (err) => { ... } block (including
setting this.datatablesReady, extraction of errors, message construction, and
alert call) to match the 8-space indentation style used in the surrounding
subscribe callbacks and then run npx prettier --write . to apply project
formatting rules (target symbols: the subscribe callback's error handler and the
this.datatablesReady assignment).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 996396ce-2d52-4b0b-8006-bdbbbcbf6b96

📥 Commits

Reviewing files that changed from the base of the PR and between d4fa504 and 2f145de.

📒 Files selected for processing (2)
  • src/app/loans/loans-view/loans-view.component.ts
  • src/app/savings/savings-routing.module.ts

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