diff --git a/.serena/project.yml b/.serena/project.yml index 76ccac8e..3d4296af 100644 --- a/.serena/project.yml +++ b/.serena/project.yml @@ -107,3 +107,10 @@ fixed_tools: [] # override of the corresponding setting in serena_config.yml, see the documentation there. # If null or missing, the value from the global config is used. symbol_info_budget: + +# The language backend to use for this project. +# If not set, the global setting from serena_config.yml is used. +# Valid values: LSP, JetBrains +# Note: the backend is fixed at startup. If a project with a different backend +# is activated post-init, an error will be returned. +language_backend: diff --git a/src/components/production/ProductionDashboard/actions.ts b/src/components/production/ProductionDashboard/actions.ts index 29127f48..dac5d310 100644 --- a/src/components/production/ProductionDashboard/actions.ts +++ b/src/components/production/ProductionDashboard/actions.ts @@ -27,7 +27,7 @@ interface WorkOrderApiItem { client?: { id: number; name: string }; root_nodes_count?: number; }; assignee?: { id: number; name: string }; - items?: { id: number; item_name: string; item_id?: number | null; item?: { id: number; code: string; name: string } | null; quantity: number }[]; + items?: { id: number; item_name: string; item_id?: number | null; item?: { id: number; code: string; name: string } | null; quantity: number; options?: Record | null }[]; } // ===== 상태 변환 ===== @@ -42,8 +42,8 @@ function mapApiStatus(status: WorkOrderApiItem['status']): 'waiting' | 'inProgre // ===== API → WorkOrder 변환 ===== function transformToProductionFormat(api: WorkOrderApiItem): WorkOrder { const totalQuantity = (api.items || []).reduce((sum, item) => sum + Number(item.quantity), 0); - const productCode = api.sales_order?.item?.code || '-'; - const productName = api.items?.[0]?.item_name || '-'; + const productCode = (api.items?.[0]?.options?.product_code as string) || api.sales_order?.item?.code || '-'; + const productName = (api.items?.[0]?.options?.product_name as string) || api.items?.[0]?.item_name || '-'; const dueDate = api.scheduled_date || ''; const today = new Date(); today.setHours(0, 0, 0, 0); diff --git a/src/components/production/WorkerScreen/actions.ts b/src/components/production/WorkerScreen/actions.ts index a526ee3b..e6b04708 100644 --- a/src/components/production/WorkerScreen/actions.ts +++ b/src/components/production/WorkerScreen/actions.ts @@ -92,8 +92,8 @@ function mapApiStatus(status: WorkOrderApiItem['status']): WorkOrderStatus { // ===== API → WorkOrder 변환 ===== function transformToWorkerScreenFormat(api: WorkOrderApiItem): WorkOrder { const totalQuantity = (api.items || []).reduce((sum, item) => sum + Number(item.quantity), 0); - const productCode = api.sales_order?.item?.code || '-'; - const productName = api.items?.[0]?.item_name || '-'; + const productCode = (api.items?.[0]?.options?.product_code as string) || api.sales_order?.item?.code || '-'; + const productName = (api.items?.[0]?.options?.product_name as string) || api.items?.[0]?.item_name || '-'; // 납기일 계산 (지연 여부) const dueDate = api.scheduled_date || '';