diff --git a/app/Http/Controllers/Admin/RemoteController.php b/app/Http/Controllers/Admin/RemoteController.php index 60588cc..6c155a2 100644 --- a/app/Http/Controllers/Admin/RemoteController.php +++ b/app/Http/Controllers/Admin/RemoteController.php @@ -142,7 +142,7 @@ class RemoteController extends Controller { $validated = $request->validate([ 'machine_id' => 'required|exists:machines,id', - 'command_type' => 'required|string|in:reboot,reboot_card,checkout,lock,unlock,change,dispense,fanon,fanoff,fanauto', + 'command_type' => 'required|string|in:reboot,reboot_force,reboot_card,checkout,lock,unlock,change,dispense,fanon,fanoff,fanauto', 'amount' => 'nullable|integer|min:0', 'slot_no' => 'nullable|string', 'note' => 'nullable|string|max:255', diff --git a/app/Jobs/Machine/ProcessCommandAck.php b/app/Jobs/Machine/ProcessCommandAck.php index 9962467..a985b2a 100644 --- a/app/Jobs/Machine/ProcessCommandAck.php +++ b/app/Jobs/Machine/ProcessCommandAck.php @@ -147,7 +147,7 @@ class ProcessCommandAck implements ShouldQueue ]); // 記錄維護類指令到機台日誌 (MachineLog) - if (in_array($command->command_type, ['reboot', 'reboot_card', 'lock', 'unlock', 'checkout', 'change', 'reload_stock', 'update_products', 'update_ads', 'update_settings'], true)) { + if (in_array($command->command_type, ['reboot', 'reboot_force', 'reboot_card', 'lock', 'unlock', 'checkout', 'change', 'reload_stock', 'update_products', 'update_ads', 'update_settings'], true)) { $msgKey = $status === 'success' ? 'log.command.success' : 'log.command.failed'; $level = $status === 'success' ? 'info' : 'warning'; diff --git a/lang/en.json b/lang/en.json index ef124a7..e583de5 100644 --- a/lang/en.json +++ b/lang/en.json @@ -927,6 +927,7 @@ "Identification": "Identification", "Identity & Codes": "Identity & Codes", "Identity and Codes": "Identity and Codes", + "Ignore busy state (use when stuck)": "Ignore busy state (use when stuck)", "Image": "Image", "Image Downloaded": "Image Downloaded", "Immediate": "Immediate", @@ -1077,6 +1078,7 @@ "Machine Flavor": "Machine Flavor", "Machine Flow ID": "Machine Flow ID", "Machine Flow ID / Time": "Machine Flow ID / Time", + "Machine Force Reboot": "Machine Force Reboot", "Machine Images": "Machine Images", "Machine Inbound Confirmation": "Machine Inbound Confirmation", "Machine Info": "Machine Info", @@ -2422,6 +2424,7 @@ "command.lock": "Lock", "command.reboot": "Reboot", "command.reboot_card": "Reboot Card Reader", + "command.reboot_force": "Force Reboot", "command.reload_stock": "Sync Stock", "command.unlock": "Unlock", "command.update_ads": "Sync Ads", diff --git a/lang/ja.json b/lang/ja.json index eb86d99..34e1ce9 100644 --- a/lang/ja.json +++ b/lang/ja.json @@ -927,6 +927,7 @@ "Identification": "識別情報", "Identity & Codes": "識別・コード", "Identity and Codes": "Identity and Codes", + "Ignore busy state (use when stuck)": "ビジー状態を無視(フリーズ時に使用)", "Image": "画像", "Image Downloaded": "画像をダウンロードしました", "Immediate": "即時", @@ -1077,6 +1078,7 @@ "Machine Flavor": "Machine Flavor", "Machine Flow ID": "機器フローID", "Machine Flow ID / Time": "機器フローID / 時間", + "Machine Force Reboot": "アプリ強制再起動", "Machine Images": "機器写真", "Machine Inbound Confirmation": "入庫確認", "Machine Info": "機器情報", @@ -2422,6 +2424,7 @@ "command.lock": "ロック", "command.reboot": "再起動", "command.reboot_card": "カードリーダー再起動", + "command.reboot_force": "強制再起動", "command.reload_stock": "在庫同期", "command.unlock": "ロック解除", "command.update_ads": "広告同期", diff --git a/lang/zh_TW.json b/lang/zh_TW.json index 8f06c72..0a69bc9 100644 --- a/lang/zh_TW.json +++ b/lang/zh_TW.json @@ -927,6 +927,7 @@ "Identification": "識別資訊", "Identity & Codes": "識別與代碼", "Identity and Codes": "識別與代碼", + "Ignore busy state (use when stuck)": "無視忙碌狀態(卡死時使用)", "Image": "圖片", "Image Downloaded": "圖片已下載", "Immediate": "立即", @@ -1077,6 +1078,7 @@ "Machine Flavor": "機台風味", "Machine Flow ID": "機台流水號", "Machine Flow ID / Time": "機台流水號 / 時間", + "Machine Force Reboot": "強制重啟 APP", "Machine Images": "機台照片", "Machine Inbound Confirmation": "機台入庫確認", "Machine Info": "機台資訊", @@ -2422,6 +2424,7 @@ "command.lock": "鎖機", "command.reboot": "重啟", "command.reboot_card": "讀卡機重啟", + "command.reboot_force": "強制重啟", "command.reload_stock": "同步庫存", "command.unlock": "解鎖", "command.update_ads": "同步廣告", diff --git a/resources/views/admin/remote/index.blade.php b/resources/views/admin/remote/index.blade.php index db0bb02..7d72714 100644 --- a/resources/views/admin/remote/index.blade.php +++ b/resources/views/admin/remote/index.blade.php @@ -34,6 +34,7 @@ 'No active cargo lanes found' => __('No active cargo lanes found'), 'Empty' => __('Empty'), 'Machine Reboot' => __('Machine Reboot'), + 'Machine Force Reboot' => __('Machine Force Reboot'), 'Card Reader Reboot' => __('Card Reader Reboot'), 'Remote Settlement' => __('Remote Settlement'), 'Lock Page Lock' => __('Lock Page Lock'), @@ -444,6 +445,7 @@ getCommandName(type) { const names = { 'reboot': this.translations['Machine Reboot'], + 'reboot_force': this.translations['Machine Force Reboot'], 'reboot_card': this.translations['Card Reader Reboot'], 'checkout': this.translations['Remote Settlement'], 'lock': this.translations['Lock Page Lock'], @@ -661,6 +663,27 @@ + + + + + + + + + + {{ __('Machine Force Reboot') }} + + {{ __('Ignore busy state (use when stuck)') }} + + + diff --git a/resources/views/admin/remote/partials/tab-history-index.blade.php b/resources/views/admin/remote/partials/tab-history-index.blade.php index 20c5ded..a8d8f87 100644 --- a/resources/views/admin/remote/partials/tab-history-index.blade.php +++ b/resources/views/admin/remote/partials/tab-history-index.blade.php @@ -85,6 +85,7 @@