fix: add search and groupHeadIds support to RM group export functionality#24
Open
ilramdhan wants to merge 1 commit intomutugading:mainfrom
Open
fix: add search and groupHeadIds support to RM group export functionality#24ilramdhan wants to merge 1 commit intomutugading:mainfrom
ilramdhan wants to merge 1 commit intomutugading:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the Finance RM Groups export flow to support exporting by free-text search and by an explicit selection of group head IDs, enabling more flexible “filtered” and “selected” export modes through the BFF route and underlying RPC types.
Changes:
- Extend
ExportRMGroupsRequest/ExportRMGroupsParamsto includesearchandgroupHeadIds. - Update the BFF export route to parse
searchand a comma-separatedgroup_head_idslist and forward them toexportRMGroups. - Update the RM Groups page export action to include the current search term in export requests.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/types/generated/finance/v1/rm_group.ts | Updates generated proto TS types/serialization for ExportRMGroupsRequest to include groupHeadIds + search. |
| src/types/finance/rm-group.ts | Extends UI-level export params type to expose search and groupHeadIds. |
| src/app/api/v1/finance/rm-groups/export/route.ts | Adds parsing/forwarding of search and group_head_ids for export. |
| src/app/(dashboard)/finance/rm-pricing/groups/rm-groups-page-client.tsx | Sends current list-page search filter with export requests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request updates the RM Groups export functionality to support exporting based on both search queries and explicit group selection. The backend API and client-side logic have been enhanced to allow more flexible export operations, including filtered, searched, and selected group modes.
Type of Change
Module/Component Affected
Changes Made
Export Functionality Improvements:
handleExportfunction inrm-groups-page-client.tsxnow sends bothactiveFilterandsearchparameters when exporting, enabling exports that respect both filters and search terms.route.ts) now accepts and processes a comma-separated list ofgroup_head_idsfor "Selected" mode, as well as thesearchparameter, allowing programmatic export of specific groups or filtered lists.Type Definition Updates:
ExportRMGroupsParamsinterface inrm-group.tshas been extended to includesearchandgroupHeadIdsparameters, reflecting the new export capabilities and clarifying the precedence and usage of these fields.Build Verification
npm run lintpassesnpx tsc --noEmitpassesnpm run buildsucceedsAccessibility
Performance
Pre-merge Checklist