Skip to content

fix: add search and groupHeadIds support to RM group export functionality#24

Open
ilramdhan wants to merge 1 commit intomutugading:mainfrom
ilramdhan:feat/formula-master-fe
Open

fix: add search and groupHeadIds support to RM group export functionality#24
ilramdhan wants to merge 1 commit intomutugading:mainfrom
ilramdhan:feat/formula-master-fe

Conversation

@ilramdhan
Copy link
Copy Markdown
Member

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

  • 🐛 Bug fix
  • ✨ New feature
  • 🎨 UI/UX improvement
  • ♻️ Refactor
  • 📚 Documentation
  • 🔧 Chore (deps, config)

Module/Component Affected

  • Dashboard
  • Finance
  • HR / IT / CI / EXSIM
  • Components (common/)
  • Components (ui/)
  • Navigation
  • API Routes

Changes Made

Export Functionality Improvements:

  • The handleExport function in rm-groups-page-client.tsx now sends both activeFilter and search parameters when exporting, enabling exports that respect both filters and search terms.
  • The backend export API (route.ts) now accepts and processes a comma-separated list of group_head_ids for "Selected" mode, as well as the search parameter, allowing programmatic export of specific groups or filtered lists.

Type Definition Updates:

  • The ExportRMGroupsParams interface in rm-group.ts has been extended to include search and groupHeadIds parameters, reflecting the new export capabilities and clarifying the precedence and usage of these fields.

Build Verification

  • npm run lint passes
  • npx tsc --noEmit passes
  • npm run build succeeds

Accessibility

  • Keyboard navigation works
  • Screen reader compatible
  • Proper ARIA labels
  • Color contrast adequate

Performance

  • No unnecessary re-renders
  • Images optimized
  • Heavy components lazy loaded

Pre-merge Checklist

  • I have read and followed RULES.md
  • I have read and followed CONTRIBUTING.md
  • Loading states implemented (if data fetching)
  • Error handling present
  • Component props typed properly
  • Uses semantic color classes
  • Responsive design tested
  • Dark mode compatible
  • Screenshots included (for UI changes)

@ilramdhan ilramdhan requested a review from Copilot May 2, 2026 02:19
@ilramdhan ilramdhan self-assigned this May 2, 2026
@ilramdhan ilramdhan added the enhancement New feature or request label May 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 / ExportRMGroupsParams to include search and groupHeadIds.
  • Update the BFF export route to parse search and a comma-separated group_head_ids list and forward them to exportRMGroups.
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants