Skip to content

fix(WEB-1086): support loan and savings transaction search - #3807

Merged
DavidMifosA merged 2 commits into
openMF:devfrom
AnvayKharb:fix/WEB-1086-transaction-search
Aug 7, 2026
Merged

DavidMifosA merged 2 commits into
openMF:devfrom
AnvayKharb:fix/WEB-1086-transaction-search

Conversation

@AnvayKharb

@AnvayKharb AnvayKharb commented Aug 6, 2026

Copy link
Copy Markdown
Member

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

    • Added search options for savings and loan transactions, including an “All” option covering both.
    • Search results now display account numbers, external IDs, entity names, and parent types more consistently.
    • Added transaction-specific navigation for client, group loan, and savings results.
    • Missing optional details now appear as blank fields instead of causing display issues.
  • Bug Fixes

    • Improved navigation and rendering for transaction search results.
  • Tests

    • Added comprehensive coverage for search results, filtering, display fields, and navigation.

@AnvayKharb
AnvayKharb requested a review from a team August 6, 2026 15:35
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: "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

Search now supports loan and savings transaction resources. Search results render transaction-specific values and route transaction rows to account transaction pages. Tests cover rendering, fallback values, navigation, and existing loan routes.

Changes

Transaction-aware search

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
Loading
🚥 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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/search/search-page/search-page.component.spec.ts (1)

123-141: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Test guarded transaction navigation.

These assertions only verify rendering when identifiers are missing. Add cases that call navigate with a missing parentId, accountId, or transactionId, and assert that router.navigate is not called. This protects the guard in navigateToTransaction.

🤖 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

📥 Commits

Reviewing files that changed from the base of the PR and between 87a1d4a and 2dfbe55.

📒 Files selected for processing (7)
  • src/app/search/search-page/search-page.component.html
  • src/app/search/search-page/search-page.component.spec.ts
  • src/app/search/search-page/search-page.component.ts
  • src/app/search/search.model.ts
  • src/app/shared/search-tool/search-tool.component.spec.ts
  • src/app/shared/search-tool/search-tool.component.ts
  • src/assets/translations/en-US.json

Comment thread src/app/search/search-page/search-page.component.ts Outdated
@AnvayKharb
AnvayKharb force-pushed the fix/WEB-1086-transaction-search branch from 2dfbe55 to 576ad2b Compare August 6, 2026 15:42
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 87a1d4a and 576ad2b.

📒 Files selected for processing (7)
  • src/app/search/search-page/search-page.component.html
  • src/app/search/search-page/search-page.component.spec.ts
  • src/app/search/search-page/search-page.component.ts
  • src/app/search/search.model.ts
  • src/app/shared/search-tool/search-tool.component.spec.ts
  • src/app/shared/search-tool/search-tool.component.ts
  • src/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

Comment thread src/app/search/search-page/search-page.component.ts
@AnvayKharb
AnvayKharb force-pushed the fix/WEB-1086-transaction-search branch 3 times, most recently from 0cf0b74 to def9e25 Compare August 6, 2026 16:55
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

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.

@AnvayKharb
AnvayKharb force-pushed the fix/WEB-1086-transaction-search branch from def9e25 to 3480850 Compare August 6, 2026 17:13
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

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.

@AnvayKharb
AnvayKharb force-pushed the fix/WEB-1086-transaction-search branch from 3480850 to 479b66b Compare August 6, 2026 17:31
IOhacker
IOhacker previously approved these changes Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

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.

@DavidMifosA
DavidMifosA marked this pull request as draft August 7, 2026 06:12
@DavidMifosA
DavidMifosA marked this pull request as ready for review August 7, 2026 06:12

@DavidH-1 DavidH-1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@DavidH-1

DavidH-1 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Manual CLA check = PASS

@DavidMifosA
DavidMifosA merged commit 8e93561 into openMF:dev Aug 7, 2026
1 check passed
@DavidH-1

DavidH-1 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

MERGED WITH BYPASS AS GITHUB RUNNER STALLED

@coderabbitai coderabbitai Bot mentioned this pull request Aug 14, 2026
2 tasks
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.

4 participants