Move Devices under Settings like Branches and Team.
Deploy Ladill POS / deploy (push) Successful in 29s

Drop Devices from the main sidebar, surface a Devices card on the Settings
page, and nest device routes under /settings/devices with legacy redirects.
This commit is contained in:
isaacclad
2026-07-15 23:56:03 +00:00
parent 29f2c96c2b
commit 4546c2ab8c
8 changed files with 212 additions and 155 deletions
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Pos;
use App\Http\Controllers\Controller;
use App\Http\Controllers\Pos\Concerns\ScopesToAccount;
use App\Models\PosDevice;
use App\Models\PosLocation;
use App\Models\PosMember;
use App\Models\PaymentGatewaySetting;
@@ -41,9 +42,14 @@ class SettingsController extends Controller
? PosLocation::owned($owner)->orderBy('name')->get()
: PosLocation::owned($owner)->whereKey($scope)->orderBy('name')->get();
$devicesQuery = PosDevice::owned($owner)->with('location')->orderBy('name');
$this->scopeToLocation($request, $devicesQuery);
return view('pos.settings', [
'location' => $location,
'branches' => $branches,
'devices' => $devicesQuery->limit(10)->get(),
'deviceTypes' => config('pos.device_types', []),
'members' => PosMember::owned($owner)->with('location')->orderBy('created_at')->get(),
'roles' => config('pos.roles', []),
'hasMultiLocation' => $this->subscriptions->canUseMultiLocation($account),