[STYLE] 優化機台日誌顯示與多語系支援

1. 將員工卡與取貨碼驗證失敗的日誌層級由 WARNING 調降為 INFO。
2. 將日誌訊息字串改為支援多語系翻譯的佔位符格式。
3. 新增員工卡與取貨碼驗證失敗的繁中、英文、日文翻譯。
This commit is contained in:
sky121113 2026-05-12 16:00:40 +08:00
parent 029cdb1d26
commit ad921011f0
4 changed files with 11 additions and 5 deletions

View File

@ -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);
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}