[CLAUDE] FE-Admin: Designer flat UI Phòng × Cấp + types ChoDuyet=10 (Chunk B)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m1s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m1s
PeWorkflowsPage + WorkflowsPage rewrite for flat workflow model (Mig 21): - Drop InnerStepDto + EditInnerStep types - Drop PHASE_OPTIONS (auto-assign ChoDuyet=10 behind scenes) - StepDto + EditStep extend với departmentId, positionLevel - copyFromDefinition simplified - Designer step UI: Tên + Phòng Select + Cấp Select + SLA + Approvers Role/User optional fallback (drop entire InnerSteps sub-section) - DefinitionCard view: hiển thị badge Phòng (emerald) + Cấp NV/PP/TP (violet) + SLA per step - Save payload: phase=10 (ChoDuyet), departmentId, positionLevel - Hint amber: "Mig 21 flat workflow: User cùng Phòng + Cấp ≥ step → duyệt được (OR-of-many)" types/purchaseEvaluation.ts (fe-admin + fe-user mirror): - + ChoDuyet=10 enum value + label "Đang duyệt" + color amber - Legacy 2-6 + 98 keep cho data cũ display OK - getPeDisplayStatus: ChoDuyet + legacy intermediate → "Đã gửi duyệt" Verify: npm build fe-admin + fe-user pass. Pending Chunk D: Docs + Skill + Memory + session log. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -16,16 +16,19 @@ export const PurchaseEvaluationTypeCode: Record<number, string> = {
|
||||
2: 'DuyetNccPhuongAn',
|
||||
}
|
||||
|
||||
// Mig 21 drastic refactor: enum simplified. ChoDuyet=10 generic intermediate.
|
||||
// Legacy 2-9 + 98 deprecated, giữ values cho data cũ đọc OK.
|
||||
export const PurchaseEvaluationPhase = {
|
||||
DangSoanThao: 1,
|
||||
ChoPurchasing: 2,
|
||||
ChoDuAn: 3,
|
||||
ChoCCM: 4,
|
||||
ChoCEODuyetPA: 5,
|
||||
ChoCEODuyetNCC: 6,
|
||||
ChoPurchasing: 2, // [LEGACY]
|
||||
ChoDuAn: 3, // [LEGACY]
|
||||
ChoCCM: 4, // [LEGACY]
|
||||
ChoCEODuyetPA: 5, // [LEGACY]
|
||||
ChoCEODuyetNCC: 6, // [LEGACY]
|
||||
DaDuyet: 7,
|
||||
TraLai: 98, // approver trả về Drafter sửa — vẫn cho edit
|
||||
TuChoi: 99, // terminal từ chối — KHÔNG edit
|
||||
ChoDuyet: 10, // [Mig 21] generic intermediate
|
||||
TraLai: 98, // [LEGACY]
|
||||
TuChoi: 99,
|
||||
} as const
|
||||
export type PurchaseEvaluationPhase = typeof PurchaseEvaluationPhase[keyof typeof PurchaseEvaluationPhase]
|
||||
|
||||
@ -37,6 +40,7 @@ export const PurchaseEvaluationPhaseLabel: Record<number, string> = {
|
||||
5: 'Chờ CEO duyệt PA',
|
||||
6: 'Chờ CEO duyệt NCC',
|
||||
7: 'Đã duyệt',
|
||||
10: 'Đang duyệt',
|
||||
98: 'Trả lại',
|
||||
99: 'Từ chối',
|
||||
}
|
||||
@ -49,6 +53,7 @@ export const PurchaseEvaluationPhaseColor: Record<number, string> = {
|
||||
5: 'bg-fuchsia-100 text-fuchsia-700',
|
||||
6: 'bg-pink-100 text-pink-700',
|
||||
7: 'bg-emerald-100 text-emerald-700',
|
||||
10: 'bg-amber-100 text-amber-700',
|
||||
98: 'bg-yellow-100 text-yellow-800',
|
||||
99: 'bg-red-100 text-red-700',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user