[CLAUDE] Hrm: P11-C Vehicle+Driver catalogs (Mig 44) + gotcha #57 filtered-unique 3 HRM catalog (Mig 45)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m18s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m18s
P11-C: extend HrmConfigs +2 kind (Vehicle/Driver) declarative. Mig 44 AddVehicleAndDriverCatalogs (2 table filtered-unique Code, tables 91->93). Domain entity + EF config (filtered day-1) + 2 DbSet + HrmConfigFeatures Region5/6 CRUD + Controller +2 route-group (GET public / write Roles=Admin) + MenuKeys +2 +All (auto Admin perm) + DbInitializer 2 menu leaf + idempotent seed 2 veh/2 drv. FE declarative KIND_CONFIG +2 kind x2 app (SHA256 mirror) + 4-place (types/page/menuKeys/Layout staticMap), :kind-driven no new route. gotcha #57 (bundled; OtPolicy missed in backlog, caught via grep) - Mig 45 FilterHrmCatalogUniqueIndexesByIsDeleted: LeaveType+ShiftPattern+OtPolicy bare .IsUnique() -> .HasFilter([IsDeleted]=0) (recreate-on-soft-deleted-slot 500 fix, mirror Holiday Mig 43). Tests +5 HrmConfigFilteredUniqueTests (181->186 PASS) test-before RED->GREEN. Reviewer caught FE<->BE Driver required-field mismatch -> fixed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
17
src/Backend/SolutionErp.Domain/Hrm/Driver.cs
Normal file
17
src/Backend/SolutionErp.Domain/Hrm/Driver.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using SolutionErp.Domain.Common;
|
||||
|
||||
namespace SolutionErp.Domain.Hrm;
|
||||
|
||||
// Phase 11 P11-C (Mig 44 — S51) — Danh mục tài xế.
|
||||
// Catalog lookup table reference cho Workflow Apps VehicleBooking (đặt xe công).
|
||||
// Sample seed 2 tài xế: "TX-01" + "TX-02".
|
||||
public class Driver : AuditableEntity
|
||||
{
|
||||
public string Code { get; set; } = string.Empty; // UNIQUE — "TX-01", "TX-02", ...
|
||||
public string Name { get; set; } = string.Empty; // Họ tên "Nguyễn Văn Tài"
|
||||
public string PhoneNumber { get; set; } = string.Empty; // SĐT liên hệ
|
||||
public string LicenseNumber { get; set; } = string.Empty; // Số GPLX
|
||||
public string LicenseClass { get; set; } = string.Empty; // Hạng GPLX "B2", "C", "D", "E"
|
||||
public bool IsActive { get; set; } = true;
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
16
src/Backend/SolutionErp.Domain/Hrm/Vehicle.cs
Normal file
16
src/Backend/SolutionErp.Domain/Hrm/Vehicle.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using SolutionErp.Domain.Common;
|
||||
|
||||
namespace SolutionErp.Domain.Hrm;
|
||||
|
||||
// Phase 11 P11-C (Mig 44 — S51) — Danh mục xe công.
|
||||
// Catalog lookup table reference cho Workflow Apps VehicleBooking (đặt xe công).
|
||||
// Sample seed 2 xe: "XE-01" Toyota Innova 7 chỗ + "XE-02" Ford Transit 16 chỗ.
|
||||
public class Vehicle : AuditableEntity
|
||||
{
|
||||
public string Code { get; set; } = string.Empty; // UNIQUE — "XE-01", "XE-02", ...
|
||||
public string Name { get; set; } = string.Empty; // "Toyota Innova", "Ford Transit"
|
||||
public string LicensePlate { get; set; } = string.Empty; // Biển số "30A-12345"
|
||||
public int SeatCount { get; set; } // Số chỗ ngồi
|
||||
public bool IsActive { get; set; } = true;
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
@ -90,6 +90,9 @@ public static class MenuKeys
|
||||
public const string HrmConfigHolidays = "Hrm_Config_Holidays"; // Ngày lễ
|
||||
public const string HrmConfigShifts = "Hrm_Config_Shifts"; // Ca làm việc
|
||||
public const string HrmConfigOtPolicies = "Hrm_Config_OtPolicies"; // Chính sách OT
|
||||
// Phase 11 P11-C (Mig 44 — S51) — Danh mục xe công + tài xế (reference VehicleBooking).
|
||||
public const string HrmConfigVehicles = "Hrm_Config_Vehicles"; // Xe công
|
||||
public const string HrmConfigDrivers = "Hrm_Config_Drivers"; // Tài xế
|
||||
|
||||
// ============================================================
|
||||
// Module Văn phòng số (Phase 10.2 G-O1+ S34 2026-05-27).
|
||||
@ -147,6 +150,7 @@ public static class MenuKeys
|
||||
Budgets, BudgetList, BudgetCreate, BudgetPending,
|
||||
Hrm, HrmHoSo, // Mig 34 — Phase 10.1
|
||||
HrmConfig, HrmConfigLeaveTypes, HrmConfigHolidays, HrmConfigShifts, HrmConfigOtPolicies, // Mig 35 — Phase 10.2 G-H2
|
||||
HrmConfigVehicles, HrmConfigDrivers, // Mig 44 — Phase 11 P11-C
|
||||
Off, OffDanhBa, // Phase 10.2 G-O1 — Văn phòng số
|
||||
OffPhongHop, OffPhongHopView, OffPhongHopManage, OffPhongHopBook, // Phase 10.2 G-O2 — Phòng họp
|
||||
OffDeXuat, OffDeXuatList, OffDeXuatCreate, OffDeXuatInbox, // Phase 10.3 G-O3 — Đề xuất
|
||||
|
||||
Reference in New Issue
Block a user