fix(WEB-1086): support loan and savings transaction search - #3807
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 |
|---|---|
Transaction search resources src/app/shared/search-tool/search-tool.component.ts, src/app/shared/search-tool/search-tool.component.spec.ts |
The search tool adds loan and savings transaction resources. The “All” option includes both resources. Tests verify resource mappings and search navigation. |
Transaction result rendering and navigation src/app/search/search.model.ts, src/app/search/search-page/search-page.component.ts, src/app/search/search-page/search-page.component.html |
SearchData includes optional transaction and account fields. The search page formats transaction values, handles missing fields, translates parent types, and routes loan or savings transactions with guarded account navigation. |
Transaction result validation src/app/search/search-page/search-page.component.spec.ts |
Tests cover transaction rows, fallback reference numbers, missing values, client and group navigation, savings tabs, and unchanged non-transaction loan navigation. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Sequence Diagram(s)
sequenceDiagram
participant SearchToolComponent
participant Router
participant SearchPageComponent
SearchToolComponent->>Router: Navigate with selected transaction resource
Router->>SearchPageComponent: Display transaction search results
SearchPageComponent->>Router: Navigate to the transaction account route
🚥 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 clearly and concisely describes the main change: support for loan and savings transaction search. |
| 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. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
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.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/app/search/search-page/search-page.component.spec.ts (1)
123-141: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winTest guarded transaction navigation.
These assertions only verify rendering when identifiers are missing. Add cases that call
navigatewith a missingparentId,accountId, ortransactionId, and assert thatrouter.navigateis not called. This protects the guard innavigateToTransaction.🤖 Prompt for 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. In `@src/app/search/search-page/search-page.component.spec.ts` around lines 123 - 141, Extend the search-page component tests around the existing missing-fields case to invoke navigateToTransaction with missing parentId, accountId, and transactionId values. Assert router.navigate is not called for each case, covering the guard while preserving the current rendering assertions.
🤖 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/search/search-page/search-page.component.ts`:
- Around line 223-288: Localize the parent-type display values returned by
getParentType and formatParentType instead of returning English literals
directly. Add translation keys for Office, Client, and formatted parent types,
resolve them in the template or through TranslateService, and run npm run
translations:extract to register the new keys.
---
Nitpick comments:
In `@src/app/search/search-page/search-page.component.spec.ts`:
- Around line 123-141: Extend the search-page component tests around the
existing missing-fields case to invoke navigateToTransaction with missing
parentId, accountId, and transactionId values. Assert router.navigate is not
called for each case, covering the guard while preserving the current rendering
assertions.
🪄 Autofix
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 Plus
Run ID: 92b9c311-fc22-419c-9ace-86dd2767653b
📒 Files selected for processing (7)
src/app/search/search-page/search-page.component.htmlsrc/app/search/search-page/search-page.component.spec.tssrc/app/search/search-page/search-page.component.tssrc/app/search/search.model.tssrc/app/shared/search-tool/search-tool.component.spec.tssrc/app/shared/search-tool/search-tool.component.tssrc/assets/translations/en-US.json
2dfbe55 to
576ad2b
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
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/search/search-page/search-page.component.ts`:
- Around line 251-271: Normalize entity.parentType to lowercase before the
parentRoute comparison in navigateToTransaction, so any casing of “group”
selects the groups route while other values continue using clients.
🪄 Autofix
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 Plus
Run ID: 0c45908c-6c66-4827-9a4d-cc4746b86234
📒 Files selected for processing (7)
src/app/search/search-page/search-page.component.htmlsrc/app/search/search-page/search-page.component.spec.tssrc/app/search/search-page/search-page.component.tssrc/app/search/search.model.tssrc/app/shared/search-tool/search-tool.component.spec.tssrc/app/shared/search-tool/search-tool.component.tssrc/assets/translations/en-US.json
🚧 Files skipped from review as they are similar to previous changes (6)
- src/app/shared/search-tool/search-tool.component.spec.ts
- src/app/search/search.model.ts
- src/app/shared/search-tool/search-tool.component.ts
- src/assets/translations/en-US.json
- src/app/search/search-page/search-page.component.html
- src/app/search/search-page/search-page.component.spec.ts
0cf0b74 to
def9e25
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
def9e25 to
3480850
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
3480850 to
479b66b
Compare
479b66b to
79e47bf
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Manual CLA check = PASS |
|
MERGED WITH BYPASS AS GITHUB RUNNER STALLED |
Summary
Description
Adds support for searching loan repayments and savings deposit or withdrawal transactions by transaction ID, external ID, and savings reference number. It also displays the transaction results and routes users to the correct client or group transaction page without affecting existing search functionality.
Related issues and discussion
WEB-1086
Screenshots, if any
Screen.Recording.2026-08-06.at.9.04.35.PM.mov
Summary by CodeRabbit
New Features
Bug Fixes
Tests