Skip to content

feat: add employee group proto definitions with CRUD, list, and import/export capabilities#20

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

feat: add employee group proto definitions with CRUD, list, and import/export capabilities#20
ilramdhan merged 1 commit intomutugading:mainfrom
ilramdhan:feat/formula-master-proto

Conversation

@ilramdhan
Copy link
Copy Markdown
Member

Description

This pull request introduces a new EmployeeGroup master data model and associated CRUD and batch import/export API definitions to the IAM service. The changes add a new protobuf file, employee_group.proto, which defines the EmployeeGroup entity, request/response messages for all operations, and the EmployeeGroupService with RESTful HTTP bindings.

Change Type

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

Proto Files Changed

  • iam/v1/employee_group.proto

Changes Made

The most important changes are:

New Entity and Core CRUD API:

  • Added the EmployeeGroup message, representing a department or functional group (e.g., ASM, DYM, MGR), with fields for ID, code, name, active status, and audit info.
  • Defined create, get, update (code is immutable), and delete (soft delete) request/response messages and corresponding RPCs in the new EmployeeGroupService.

Listing, Search, and Filtering:

  • Added paginated listing with search, active status filtering, and sorting (by code, name, or created_at) via the ListEmployeeGroupsRequest and ListEmployeeGroupsResponse messages and RPC.

Excel Import/Export and Template Download:

  • Added support for exporting employee groups to Excel, importing from Excel with duplicate handling, and downloading an import template, each with dedicated request/response messages and service methods.

Validation and Metadata:

Breaking Change Check

Is this a breaking change?

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

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

@ilramdhan ilramdhan requested a review from Copilot April 16, 2026 02:10
@ilramdhan ilramdhan self-assigned this Apr 16, 2026
@ilramdhan ilramdhan added the feat label Apr 16, 2026
@ilramdhan ilramdhan merged commit 098fa4e into mutugading:main Apr 16, 2026
3 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

Adds a new IAM master-data protobuf definition for EmployeeGroup, including a REST-mapped gRPC service for CRUD, listing (search/filter/sort/pagination), and Excel import/export/template download—mirroring existing IAM master-data patterns (e.g., EmployeeLevel).

Changes:

  • Introduce EmployeeGroup entity message with audit metadata.
  • Add request/response messages for create/get/update/delete and list operations.
  • Add Excel export/import and template download messages + EmployeeGroupService HTTP bindings.

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

// Employee group ID to update (UUID format).
string employee_group_id = 1 [(buf.validate.field).string.uuid = true];
// New display name (optional, 1-100 chars if provided).
optional string name = 2 [(buf.validate.field).string = {max_len: 100}];
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

UpdateEmployeeGroupRequest.name is documented as "1-100 chars if provided", but the validation only enforces max_len: 100 (so an explicit empty string would be accepted). Either enforce min_len: 1 when set, or adjust the comment to reflect that an empty string is allowed (e.g., to clear the name).

Suggested change
optional string name = 2 [(buf.validate.field).string = {max_len: 100}];
optional string name = 2 [(buf.validate.field).string = {
min_len: 1
max_len: 100
}];

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants