From decfe57b501d7b67cd61cf1a784f3a3cdff68dec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Wed, 18 Mar 2026 15:06:14 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[order]=20=EC=88=98=EC=A3=BC=20=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=20=EA=B0=9C=EC=84=A0=20-=20stats=20=EC=83=81=ED=83=9C?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80,=20=EC=88=98=EC=A0=95=20=EC=8B=9C=20item?= =?UTF-8?q?=5Fname=20=EC=9C=A0=ED=9A=A8=EC=84=B1=20=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - stats에 IN_PRODUCTION/PRODUCED 상태 추가 - 수주 수정 시 item_name 유효성 에러 수정 (V1#29) Co-Authored-By: Claude Opus 4.6 (1M context) --- app/Http/Requests/Order/UpdateOrderRequest.php | 2 +- app/Services/OrderService.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Requests/Order/UpdateOrderRequest.php b/app/Http/Requests/Order/UpdateOrderRequest.php index ae9db234..2a2b17be 100644 --- a/app/Http/Requests/Order/UpdateOrderRequest.php +++ b/app/Http/Requests/Order/UpdateOrderRequest.php @@ -66,7 +66,7 @@ public function rules(): array 'items' => 'nullable|array', 'items.*.item_id' => 'nullable|integer|exists:items,id', 'items.*.item_code' => 'nullable|string|max:50', - 'items.*.item_name' => 'required|string|max:200', + 'items.*.item_name' => 'sometimes|required|string|max:200', 'items.*.specification' => 'nullable|string|max:500', 'items.*.quantity' => 'required|numeric|min:0', 'items.*.unit' => 'nullable|string|max:20', diff --git a/app/Services/OrderService.php b/app/Services/OrderService.php index 79411dc2..4cf71153 100644 --- a/app/Services/OrderService.php +++ b/app/Services/OrderService.php @@ -135,6 +135,8 @@ public function stats(?string $orderType = null): array 'draft' => $counts[Order::STATUS_DRAFT] ?? 0, 'confirmed' => $counts[Order::STATUS_CONFIRMED] ?? 0, 'in_progress' => $counts[Order::STATUS_IN_PROGRESS] ?? 0, + 'in_production' => $counts[Order::STATUS_IN_PRODUCTION] ?? 0, + 'produced' => $counts[Order::STATUS_PRODUCED] ?? 0, 'completed' => $counts[Order::STATUS_COMPLETED] ?? 0, 'cancelled' => $counts[Order::STATUS_CANCELLED] ?? 0, 'total_amount' => array_sum($amounts),