Move Devices under Settings like Branches and Team.
Deploy Ladill POS / deploy (push) Successful in 29s
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user