From ad921011f02eb04b96a8023ec39c53ed006a0c44 Mon Sep 17 00:00:00 2001 From: sky121113 Date: Tue, 12 May 2026 16:00:40 +0800 Subject: [PATCH] =?UTF-8?q?[STYLE]=20=E5=84=AA=E5=8C=96=E6=A9=9F=E5=8F=B0?= =?UTF-8?q?=E6=97=A5=E8=AA=8C=E9=A1=AF=E7=A4=BA=E8=88=87=E5=A4=9A=E8=AA=9E?= =?UTF-8?q?=E7=B3=BB=E6=94=AF=E6=8F=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 將員工卡與取貨碼驗證失敗的日誌層級由 WARNING 調降為 INFO。 2. 將日誌訊息字串改為支援多語系翻譯的佔位符格式。 3. 新增員工卡與取貨碼驗證失敗的繁中、英文、日文翻譯。 --- app/Http/Controllers/Api/V1/App/MachineController.php | 4 ++-- lang/en.json | 4 +++- lang/ja.json | 4 +++- lang/zh_TW.json | 4 +++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Api/V1/App/MachineController.php b/app/Http/Controllers/Api/V1/App/MachineController.php index 5c237ae..c8d9eb9 100644 --- a/app/Http/Controllers/Api/V1/App/MachineController.php +++ b/app/Http/Controllers/Api/V1/App/MachineController.php @@ -525,7 +525,7 @@ class MachineController extends Controller Cache::forget("pickup_fails:{$machine->id}"); } - ProcessStateLog::dispatch($machine->id, $machine->company_id, "[PickupCode] Verification failed: $code", 'warning'); + ProcessStateLog::dispatch($machine->id, $machine->company_id, "[PickupCode] Verification failed: :code", 'info', ['code' => $code]); return response()->json(['success' => false, 'message' => 'Invalid code', 'code' => 404, 'remaining_attempts' => 5 - $fails], 404); } @@ -636,7 +636,7 @@ class MachineController extends Controller ->first(); if (!$staffCard) { - ProcessStateLog::dispatch($machine->id, $machine->company_id, "[StaffCard] Verification failed: $uid", 'warning'); + ProcessStateLog::dispatch($machine->id, $machine->company_id, "[StaffCard] Verification failed: :uid", 'info', ['uid' => $uid]); return response()->json(['success' => false, 'code' => 404, 'message' => 'Card not found or inactive'], 404); } diff --git a/lang/en.json b/lang/en.json index 75a0c0c..7264588 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1940,5 +1940,7 @@ "All Normal": "All Normal", "Needs Attention": "Needs Attention", "Total Orders": "Total Orders", - "Real-time fleet status and revenue monitoring": "Real-time fleet status and revenue monitoring" + "Real-time fleet status and revenue monitoring": "Real-time fleet status and revenue monitoring", + "[StaffCard] Verification failed: :uid": "[StaffCard] Verification failed: :uid", + "[PickupCode] Verification failed: :code": "[PickupCode] Verification failed: :code" } \ No newline at end of file diff --git a/lang/ja.json b/lang/ja.json index 9e057a3..3be55c4 100644 --- a/lang/ja.json +++ b/lang/ja.json @@ -1939,5 +1939,7 @@ "All Normal": "すべて正常", "Needs Attention": "要注意", "Total Orders": "本日の合計注文", - "Real-time fleet status and revenue monitoring": "フリート全体のリアルタイムステータスと収益監視" + "Real-time fleet status and revenue monitoring": "フリート全体のリアルタイムステータスと収益監視", + "[StaffCard] Verification failed: :uid": "[スタッフカード] 認証失敗: :uid", + "[PickupCode] Verification failed: :code": "[受取コード] 認証失敗: :code" } \ No newline at end of file diff --git a/lang/zh_TW.json b/lang/zh_TW.json index 1b533ac..3bc9f2d 100644 --- a/lang/zh_TW.json +++ b/lang/zh_TW.json @@ -1940,5 +1940,7 @@ "All Normal": "運作正常", "Needs Attention": "需要注意", "Total Orders": "今日訂單", - "Real-time fleet status and revenue monitoring": "全機台即時狀態與營收監控" + "Real-time fleet status and revenue monitoring": "全機台即時狀態與營收監控", + "[StaffCard] Verification failed: :uid": "[員工卡] 驗證失敗: :uid", + "[PickupCode] Verification failed: :code": "[取貨碼] 驗證失敗: :code" } \ No newline at end of file