[FEAT] 遠端指令中心優化與規格同步
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 1m11s

1. 實作遠端指令去重機制 (Supersede):避免重複下達相同待執行指令。
2. 修正遠端指令發送後的 Toast 提示邏輯,確保頁面跳轉後正確顯示回饋。
3. 增加 RemoteCommand 操作者 (user_id) 紀錄與狀態列舉擴充 (superseded)。
4. 修復機台列表「最後頁面」欄位對照錯誤,同步更新 Machine Model 與 API 規格。
5. 優化遠端指令中心 UI:放大卡片字體、調整側面欄間距,符合極簡奢華風規範。
6. 更新 API 技術規格書 (SKILL.md) 與 config/api-docs.php,補全所有機台代碼 (66-611) 與指令。
7. 補全繁體中文、英文、日文多語系翻譯檔案。
This commit is contained in:
2026-04-02 14:57:41 +08:00
parent e7ad7e3dc3
commit e085058d63
16 changed files with 1775 additions and 532 deletions

View File

@@ -106,6 +106,11 @@ class Machine extends Model
return $this->hasMany(MachineSlot::class);
}
public function commands()
{
return $this->hasMany(RemoteCommand::class);
}
public function machineModel()
{
return $this->belongsTo(MachineModel::class);
@@ -133,21 +138,20 @@ class Machine extends Model
'3' => 'Admin Page',
'4' => 'Replenishment Page',
'5' => 'Tutorial Page',
'60' => 'Purchasing',
'61' => 'Locked Page',
'62' => 'Dispense Failed',
'301' => 'Slot Test',
'302' => 'Slot Test',
'401' => 'Payment Selection',
'402' => 'Waiting for Payment',
'403' => 'Dispensing',
'404' => 'Receipt Printing',
'601' => 'Pass Code',
'602' => 'Pickup Code',
'603' => 'Message Display',
'604' => 'Cancel Purchase',
'605' => 'Purchase Finished',
'611' => 'Welcome Gift Status',
'6' => 'Purchasing',
'7' => 'Locked Page',
'60' => 'Dispense Success',
'61' => 'Slot Test',
'62' => 'Payment Selection',
'63' => 'Waiting for Payment',
'64' => 'Dispensing',
'65' => 'Receipt Printing',
'66' => 'Pass Code',
'67' => 'Pickup Code',
'68' => 'Message Display',
'69' => 'Cancel Purchase',
'610' => 'Purchase Finished',
'611' => 'Welcome Gift',
'612' => 'Dispense Failed',
];

View File

@@ -11,6 +11,7 @@ class RemoteCommand extends Model
protected $fillable = [
'machine_id',
'user_id',
'command_type',
'payload',
'status',
@@ -28,6 +29,11 @@ class RemoteCommand extends Model
return $this->belongsTo(Machine::class);
}
public function user()
{
return $this->belongsTo(\App\Models\System\User::class);
}
/**
* Scope for pending commands
*/