feat(sales): integrate deal search into SalesFilter - #8824
#8824feat(sales): integrate deal search into SalesFilter#8824BatKa-B wants to merge 1 commit intomainerxes/erxes:mainfrom feat/sales-filter-search-integrationerxes/erxes:feat/sales-filter-search-integrationCopy head branch name to clipboard
Conversation
…e SalesSearch Replaces the separate SalesSearch input in MainActionBar with a search filter item inside SalesFilter, matching the popover/dialog/chip pattern used by other filters in the codebase. Reuses the existing `search` query key so it wires into the existing deals.ts backend resolver without changes. Also adds i18n default values and translates the remaining hardcoded date filter labels (close-date, stage-changed).
Reviewer's GuideIntegrates deal text search into the existing SalesFilter system by introducing a search filter key and corresponding dialog/bar views, removes the standalone SalesSearch component from MainActionBar, and localizes previously hardcoded labels for date and other filters via the sales i18n namespace. Sequence diagram for search filter interaction in SalesFiltersequenceDiagram
actor User
participant SalesFilter
participant useMultiQueryState
participant Filter_DialogStringView
participant SalesFilterBar
participant filterDeals
User->>SalesFilter: open search filter dialog
SalesFilter->>useMultiQueryState: useMultiQueryState(search, companyIds, ...)
User->>Filter_DialogStringView: enter search text
Filter_DialogStringView->>useMultiQueryState: update search query
useMultiQueryState->>SalesFilterBar: provide queries including search
SalesFilterBar->>filterDeals: filterDeals(deals, queries)
filterDeals-->>User: display filtered deals
Flow diagram for SalesFilter integration of search into MainActionBargraph TD
MainActionBar[MainActionBar]
SalesFilter[SalesFilter]
ArchivedDeals[ArchivedDeals]
DealsViewControl[DealsViewControl]
Filter_DialogStringView["Filter.DialogStringView (search)"]
Filter_BarItem_search["Filter.BarItem search"]
MainActionBar --> SalesFilter
MainActionBar --> ArchivedDeals
MainActionBar --> DealsViewControl
SalesFilter --> Filter_DialogStringView
SalesFilter --> Filter_BarItem_search
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The search chip in
SalesFilterBarrenders the fullsearchstring insideFilter.BarButton; consider truncating long values and/or adding a tooltip to avoid layout breakage when users enter very long queries. - Label texts are slightly inconsistent in capitalization and wording (e.g.
'Start Date'vs'Date created','By Assigned user'vs'By User'); it may be worth standardizing these to a consistent style before finalizing the UI.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The search chip in `SalesFilterBar` renders the full `search` string inside `Filter.BarButton`; consider truncating long values and/or adding a tooltip to avoid layout breakage when users enter very long queries.
- Label texts are slightly inconsistent in capitalization and wording (e.g. `'Start Date'` vs `'Date created'`, `'By Assigned user'` vs `'By User'`); it may be worth standardizing these to a consistent style before finalizing the UI.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughSales deal filters now include translated search and date labels in English and Mongolian. Search is integrated into ChangesSales filter localization and search
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. 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 |
|
Replaces the separate SalesSearch input in MainActionBar with a search filter item inside SalesFilter, matching the popover/dialog/chip pattern used by other filters in the codebase. Reuses the existing
searchquery key so it wires into the existing deals.ts backend resolver without changes. Also adds i18n default values and translates the remaining hardcoded date filter labels (close-date, stage-changed).Summary by Sourcery
Integrate deal text search into the SalesFilter UI and align sales filters with the shared filter bar and dialog patterns.
New Features:
searchquery key, including bar, dialog, and command palette entries for deals search.Enhancements:
salesnamespace and providing default strings for date and entity-based filters.Summary by CodeRabbit
New Features
Improvements