[FEAT] 整合遠端管理指揮中心與 UI 佈局優化
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 48s

1. 實作「遠端管理指揮中心」,整合重啟、結帳、鎖定、找零、出貨等指令至單一介面。
2. 對接 B010 心跳 API 與 B017 庫存 API,實作異步指令下發與效期/批號同步邏輯。
3. 修正 sidebar-menu.blade.php 中的舊版路由連結,解決 RouteNotFoundException 錯誤。
4. 修正 index.blade.php 中的 AJAX 請求名稱,補上 admin. 前綴以符合路由分群。
5. 優化主內容區頂部間距,將 pt-10 縮減為 pt-5,提昇介面緊湊度。
This commit is contained in:
2026-04-01 16:59:29 +08:00
parent 3dbb394862
commit e7ad7e3dc3
8 changed files with 587 additions and 77 deletions

View File

@@ -11,16 +11,15 @@ class RemoteCommand extends Model
protected $fillable = [
'machine_id',
'command',
'command_type',
'payload',
'status',
'response_payload',
'ttl',
'executed_at',
];
protected $casts = [
'payload' => 'array',
'response_payload' => 'array',
'executed_at' => 'datetime',
];
@@ -28,4 +27,12 @@ class RemoteCommand extends Model
{
return $this->belongsTo(Machine::class);
}
/**
* Scope for pending commands
*/
public function scopePending($query)
{
return $query->where('status', 'pending')->orderBy('created_at', 'asc');
}
}