Skip to content

fix(rm-group): enhance UngroupedItem and ListUngroupedItemsRequest for improved grouping monitor view with new filtering and sorting options#25

Merged
ilramdhan merged 1 commit intomutugading:mainfrom
ilramdhan:feat/formula-master-proto
May 5, 2026
Merged

fix(rm-group): enhance UngroupedItem and ListUngroupedItemsRequest for improved grouping monitor view with new filtering and sorting options#25
ilramdhan merged 1 commit intomutugading:mainfrom
ilramdhan:feat/formula-master-proto

Conversation

@ilramdhan
Copy link
Copy Markdown
Member

Description

This pull request updates the raw material grouping monitor API to support both grouped and ungrouped item views, removes obsolete per-period snapshot fields, and adds flexible sorting and filtering options. The changes introduce a new grouping scope enum, update the UngroupedItem message to reflect cross-period grouping status, and enhance the monitor/list/export endpoints to support the new functionality.

Change Type

  • ✨ New service/message
  • ➕ Add field/RPC/enum value
  • 🔄 Modify validation
  • 📝 Documentation update
  • ⚠️ Deprecation
  • 🔧 Config/script changes

Proto Files Changed

  • finance/v1/rm_group.proto

Changes Made

Grouping monitor enhancements:

  • Added the RMGroupingScope enum to distinguish between grouped and ungrouped item views, enabling the monitor and related endpoints to filter items based on current group assignment status, evaluated cross-period.

Ungrouped/grouped item representation:

  • Updated the UngroupedItem message to remove obsolete per-period quantity/rate fields, reserving those field numbers and names. Added new fields for group assignment details (group_head_id, group_code, group_name, sort_order, assigned_at), which are populated only for grouped items.

API changes for listing and exporting items:

  • Modified ListUngroupedItemsRequest and ExportUngroupedItemsRequest to:
    • Remove the period filter (now cross-period).
    • Add the scope field to select between grouped and ungrouped views.
    • Expand the search field to include group code/name when in grouped mode.
    • Add flexible sort_by and sort_order fields for sorting results by various columns, including group-related fields when applicable. [1] [2]

Pre-merge Checklist

  • I have read and followed RULES.md
  • buf format -w applied
  • buf lint passes
  • buf breaking passes
  • Comments document new messages/fields
  • REST mappings follow conventions
  • Validation rules are complete
  • Field numbers are logical

Impact Assessment

  • Backend code regeneration required
  • Frontend code regeneration required
  • OpenAPI spec regeneration required

…r improved grouping monitor view with new filtering and sorting options
@ilramdhan ilramdhan requested a review from Copilot May 5, 2026 00:46
@ilramdhan ilramdhan self-assigned this May 5, 2026
@ilramdhan ilramdhan added bug Something isn't working enhancement New feature or request labels May 5, 2026
@ilramdhan ilramdhan merged commit 1b0779e into mutugading:main May 5, 2026
5 checks passed
Copy link
Copy Markdown

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 reshapes the finance RM grouping monitor API in finance.v1 so the existing ungrouped-item list/export contracts can represent both grouped and ungrouped views, with new scope and sorting controls.

Changes:

  • Added RMGroupingScope to distinguish grouped vs. ungrouped monitor views.
  • Reworked UngroupedItem from a period-specific snapshot into a cross-period grouping-monitor row with optional group assignment fields.
  • Updated list/export request messages to remove the period filter and add scope, sort_by, and sort_order.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread finance/v1/rm_group.proto
Comment on lines +204 to +207
reserved 1;
reserved "period";
reserved 8 to 25;
reserved "cons_val", "stores_val", "cons_qty", "cons_rate", "stores_qty", "stores_rate", "dept_qty", "dept_val", "dept_rate", "last_po_qty1", "last_po_val1", "last_po_rate1", "last_po_qty2", "last_po_val2", "last_po_rate2", "last_po_qty3", "last_po_val3", "last_po_rate3";
Comment thread finance/v1/rm_group.proto
Comment on lines +566 to +567
reserved 3;
reserved "period";
Comment thread finance/v1/rm_group.proto
Comment on lines +656 to +657
reserved 1;
reserved "period";
Comment thread finance/v1/rm_group.proto
Comment on lines +576 to 578
// Free-text search on item_code, item_name, grade_code, grade_name and
// (when scope = GROUPED) group_code / group_name.
string search = 4 [(buf.validate.field).string.max_len = 100];
Comment thread finance/v1/rm_group.proto
Comment on lines +659 to 661
// Free-text search on item_code, item_name, grade_code, grade_name and
// (when scope = GROUPED) group_code / group_name.
string search = 2 [(buf.validate.field).string.max_len = 100];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants