fix: [build] TS 에러 6건 수정 (수주 status 타입, 출하 cancelled 누락)
- page.tsx: draft→order_registered, in_progress→production_ordered (OrderStatus 타입 일치) - actions.ts: ApiOrderStats에 in_production, produced optional 필드 추가 - ShipmentDetail.tsx: STATUS_TRANSITIONS에 cancelled 추가 - ShipmentList.tsx: colorMap에 cancelled 추가
This commit is contained in:
@@ -299,12 +299,12 @@ function OrderListContent() {
|
||||
|
||||
// 수주: 생산에 넘어가지 않은 건 (DRAFT + CONFIRMED)
|
||||
const orderCount = orders.filter(
|
||||
(o) => o.status === "draft" || o.status === "order_registered" || o.status === "order_confirmed"
|
||||
(o) => o.status === "order_registered" || o.status === "order_confirmed"
|
||||
).length;
|
||||
|
||||
// 생산: 생산지시대기 + 생산중 (IN_PROGRESS + IN_PRODUCTION)
|
||||
const productionCount = orders.filter(
|
||||
(o) => o.status === "in_progress" || o.status === "in_production"
|
||||
(o) => o.status === "production_ordered" || o.status === "in_production"
|
||||
).length;
|
||||
|
||||
// 출하: 출하대기 ~ 출고중 (PRODUCED + SHIPPING)
|
||||
|
||||
@@ -212,6 +212,8 @@ interface ApiOrderStats {
|
||||
draft: number;
|
||||
confirmed: number;
|
||||
in_progress: number;
|
||||
in_production?: number;
|
||||
produced?: number;
|
||||
completed: number;
|
||||
cancelled: number;
|
||||
total_amount: number;
|
||||
|
||||
@@ -85,6 +85,7 @@ const STATUS_TRANSITIONS: Record<ShipmentStatus, ShipmentStatus | null> = {
|
||||
ready: 'shipping',
|
||||
shipping: 'completed',
|
||||
completed: null,
|
||||
cancelled: null,
|
||||
};
|
||||
|
||||
export function ShipmentDetail({ id }: ShipmentDetailProps) {
|
||||
|
||||
@@ -129,6 +129,7 @@ export function ShipmentList() {
|
||||
ready: 'yellow',
|
||||
shipping: 'blue',
|
||||
completed: 'green',
|
||||
cancelled: 'red',
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user