Skip to content

fix(ppc/proto): add customer_code and customer_name to Demand - #52

Merged
ilramdhan merged 1 commit into
mutugading:mainfrom
ilramdhan:fix/production-plan-and-chat-bot-ai
Jul 30, 2026
Merged

fix(ppc/proto): add customer_code and customer_name to Demand#52
ilramdhan merged 1 commit into
mutugading:mainfrom
ilramdhan:fix/production-plan-and-chat-bot-ai

Conversation

@ilramdhan

Copy link
Copy Markdown
Member

Description

PR ini melakukan denormalisasi data dengan menambahkan field customer_code dan customer_name ke dalam message/entitas Demand (berdasarkan customer_id). Pendekatan ini selaras dengan apa yang sudah dilakukan pada product_code dan product_name. Tujuannya adalah untuk optimasi performa frontend—halaman demand list dan detail kini dapat langsung menampilkan identitas customer tanpa perlu melakukan request tambahan ke backend (second round trip), memastikan planner tidak lagi melihat ID mentah.

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: demand.proto (Silakan sesuaikan dengan nama file proto PPC yang relevan)

Changes Made

  • Menambahkan field customer_code (opsional/string) pada message Demand.
  • Menambahkan field customer_name (opsional/string) pada message Demand.

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
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

  • Performance/UX Note: Penambahan field ini bertujuan untuk menghindari N+1 query atau fetch berulang di sisi frontend. Pastikan backend mapper sudah di-update untuk me-resolve dan mengisi nilai customer_code dan customer_name saat me-return data Demand.

Denormalize the PPC customer master's code and name onto Demand via
customer_id, the same way product_code/product_name already are. The
demand list and detail views must name the customer without a second
round trip, and a bare id is never shown to a planner.

Authored-By: Ilham R <ilhamram332@gmail.com>
Co-Authored-By: Ilham R <me@ilramdhan.dev>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: IT Mutugading <it@mutugading.com>
Co-Authored-By: Indra Putro <indraputro@mutugading.com>
Co-Authored-By: Ilham R <ilham.ramadhan@mutugading.com>
Co-Authored-By: IT Mutu Gading <mutugadingapps@gmail.com>
@ilramdhan ilramdhan added this to the Costing Release Milestone milestone Jul 30, 2026
@ilramdhan ilramdhan self-assigned this Jul 30, 2026
Copilot AI review requested due to automatic review settings July 30, 2026 06:43
@ilramdhan ilramdhan added bug Something isn't working enhancement New feature or request fix labels Jul 30, 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 25671a4 into mutugading:main Jul 30, 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