Repository navigation
WEB-1382: Fix loan holder label on standalone loan pages - #4203
harshiniiiiiii wants to merge 1 commit into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Note
|
| Layer / File(s) | Summary |
|---|---|
Derive and display holder details src/app/loans/loans-view/loans-view.component.ts, src/app/loans/loans-view/loans-view.component.html, src/app/loans/loans-view/loans-view.component.spec.ts |
The component derives holder type, name, and account number from loan details, preferring a client association over a group association. The template displays available values and uses a neutral label when no holder is identified. Tests cover identity selection, route-data updates, and rendered labels. |
Add and verify account-holder translations src/assets/translations/*.json, src/app/loans/loans-view/web-1382-loan-holder-translations.spec.ts |
Fourteen locale files add an account-holder label. Tests check that labels are present and verify English, Spanish, and French values. |
Estimated code review effort: 2 (Simple) | ~15 minutes
Change: Bug fix
Suggested reviewers: iohacker
Merge Risk: 
Minimal · previous review 28359
-
The localized account-holder labels show no identified merge-blocking issue in this review scope. Merge after normal checks.
Pre-merge checks: 
4
Finishing Touches
-
Fix failing CI checks
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
-
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
-
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
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.
CodeRabbit Verify
- Run CodeRabbit Verify to test the changes in this pull request.
ea76419 to
5913cfb
Compare
ce52154 to
317afdf
Compare
IOhacker
left a comment
There was a problem hiding this comment.
I think the screenshots should not be part of the PR
3430d4d to
194b103
Compare
|
@IOhacker ptal All feedback addressed on the latest push:
|
Summary
Fixes WEB-1382: loan account pages opened through a standalone route (for example
/loans/73/general) renderedundefined Name:(localized asindéfini Nom:, etc.) because the account holder type was derived only fromrouter.url.Root cause
LoansViewComponentsetentityTypeinngOnInit()by looking forclients,groups, orcentersin the current URL. A standalone/loans/:loanIdroute matches none of them, soentityTypestayedundefined; the template then built thelabels.text.undefinedkey, which resolves to a localized "undefined" entry in every locale.Fix
clientId/clientName,groupId/group) instead of the URL.labels.text.Account holderlabel for loans without an identifiable holder, translated in all 14 supported locales.labels.text.undefinedentries are intentionally left untouched; the component no longer constructs that key.Tests
Client Name:,Group Name:,Account holder:, and no undefined-derived label.Validation
prepay-loan.component.spec.ts, reproduces onorigin/dev).prepay-loan.component.spec.tsandcurrency-name.pipe.spec.ts(both reproduce onorigin/dev).npm run lint: passed.npm run build:prod: passed.origin/devrenderedundefined Name:for the same fixture; the new rendered-template test asserts the corrected labels.demo.mifos.communityconfirms the labels shown in the screenshots above.Notes
LoansModule, and Fineract loans are associated with a client or group, so there is no valid center holder path to preserve..github/screenshots/WEB-1382/, following the existingWEB-1221convention.Summary by CodeRabbit