Skip to content

feat(finance/proto): CPR workflow revamp, route graph coordinates, param UI display, and validation fixes - #47

Merged
ilramdhan merged 6 commits into
mutugading:mainfrom
ilramdhan:fix/product-costing-request
Jul 8, 2026
Merged

feat(finance/proto): CPR workflow revamp, route graph coordinates, param UI display, and validation fixes#47
ilramdhan merged 6 commits into
mutugading:mainfrom
ilramdhan:fix/product-costing-request

Conversation

@ilramdhan

Copy link
Copy Markdown
Member

Description

PR ini membawa beberapa pembaruan signifikan untuk mendukung UI/UX dan alur kerja (workflow) pada modul finance. Pembaruan meliputi penambahan field pengaturan tampilan drawer parameter di UI, penambahan field koordinat dan agregasi pada CostRoute untuk graph editor, perombakan RPC workflow pada CostProductRequest (termasuk bulk handling), perbaikan validasi untuk field yang sudah deprecated, serta penambahan dokumentasi terkait hasil audit bulan Juli 2026.

Change Type

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

Proto Files Changed

  • common/v1/common.proto
  • finance/v1/uom.proto
  • Other: parameter.proto, cost_product_parameter.proto, cost_route.proto, cost_product_request.proto (Silakan sesuaikan dengan nama file aslinya)

Changes Made

  • Parameter Display UI: Menambahkan field is_approval_visible dan approval_display_order pada Parameter dan UpdateParameterRequest agar operator dapat mengatur parameter mana yang muncul di CPR approval drawer. Menambahkan display_group dan display_order ke ParamValueEntry untuk kebutuhan rendering pada param-detail-drawer.
  • Route Graph Coordinates: Menambahkan field agregasi level_count dan rm_count pada CostRouteHead (untuk kebutuhan list view). Menambahkan field koordinat position_x, position_y, dan rm_group_name pada CostRouteRm untuk mendukung free drag dan pengelompokan label pada graph editor.
  • CPR Workflow Revamp & Bulk RPCs: Memperluas opsi sort_by pada ListCostProductRequestsRequest dan mengizinkan klasifikasi "pending" saat Create/Update. Menambahkan field cpr_reference_product_sys_id dan satu RPC terpadu baru, yaitu SubmitAndDecideCostProductRequest (menggabungkan Submit, StartReview, VerifyClassification, DecideFeasibility, LinkRoute). Menambahkan RPC Export/Import/Template untuk bulk request handling.
  • Documentation: Menambahkan improvement notes section dari hasil audit dokumentasi bulan Juli 2026.
  • FIX (Validation Relaxing): Menambahkan IGNORE_IF_ZERO_VALUE pada deprecated product spec fields (raw_material_type, paper_tube_type_id, weight_per_bobbin_kg, box_type). Hal ini agar validasi tidak me-reject write/create data baru yang otomatis mengirimkan nilai zero value ("" atau 0) pada field-field deprecated tersebut.

Related Issues

Fixes #
Related to #

Breaking Change Check

Is this a breaking change?

  • No - buf breaking passes
  • Yes - Requires version bump

Breaking Change Evidence

# Output of buf breaking command
# Catatan: Semua perubahan bersifat additive (aman), kecuali finding lama D2 shade-rename yang sudah di-approve.
buf breaking --against '.git#branch=main'

Lint Check

# Output of buf lint
buf lint

Generated Code Preview (Optional)

// Generated Go code changes

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

Reviewer Notes

  • Workflow Change: Perhatikan penambahan RPC SubmitAndDecideCostProductRequest. RPC ini adalah wrapper baru yang menggabungkan beberapa state transitions CPR (Submit -> Review -> Verify -> Decide -> LinkRoute) ke dalam satu pemanggilan (mengurangi round-trip ke backend).
  • Validation Fix: Field spesifikasi produk lama (raw material, paper tube, box, etc.) sekarang memakai IGNORE_IF_ZERO_VALUE agar backward compatible saat melakukan update/create di mana front-end hanya mengirim zero value.

ilramdhan and others added 6 commits July 3, 2026 20:12
…er to Parameter

Extend Parameter message and UpdateParameterRequest with two new fields
so operators can configure which parameters appear in the CPR approval
drawer and in what order.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Enables grouped, ordered rendering of param values in the parameter
summary drawer (param-detail-drawer).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ute proto

Additive fields for the routing pages UX batch: aggregate level_count/rm_count
on CostRouteHead for the list view, and persisted position_x/position_y +
rm_group_name on CostRouteRm for the graph editor (free RM drag + group label).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… changes

Combines two batches whose proto edits landed interleaved in the working tree:
- product-requests-ux-batch: extend ListCostProductRequestsRequest.sort_by
  (type/title/customer/class/urgency), allow "pending" product_classification
  on Create/Update.
- product-request-workflow-revamp: add cpr_reference_product_sys_id field,
  new SubmitAndDecideCostProductRequest RPC (merges Submit+StartReview+
  VerifyClassification+DecideFeasibility+conditional LinkRoute), and additive
  Export/Import/Template RPCs for bulk request handling.

All changes additive; buf breaking clean except pre-existing/pre-approved
D2 shade-rename findings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
raw_material_type, paper_tube_type_id, weight_per_bobbin_kg, and box_type
are deprecated for new writes, which always send zero values ("" / 0).
The prior required-value validation rejected those writes; add
IGNORE_IF_ZERO_VALUE so validation only applies to historical rows that
still carry a value.
@ilramdhan ilramdhan added this to the Costing Release Milestone milestone Jul 8, 2026
@ilramdhan ilramdhan self-assigned this Jul 8, 2026
@ilramdhan ilramdhan added the bug Something isn't working label Jul 8, 2026
Copilot AI review requested due to automatic review settings July 8, 2026 04:05
@ilramdhan ilramdhan added enhancement New feature or request fix labels Jul 8, 2026

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ilramdhan
ilramdhan merged commit 2afa608 into mutugading:main Jul 8, 2026
1 check passed
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 fix

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants