Add multi-branch POS with team roles and branch-scoped cashiers.
Deploy Ladill POS / deploy (push) Successful in 1m58s
Deploy Ladill POS / deploy (push) Successful in 1m58s
Pro and Business users can manage branches, invite cashiers with branch assignment, and switch registers; sales and register flows respect acting location. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AccountSwitchController extends Controller
|
||||
{
|
||||
public function switch(Request $request): RedirectResponse
|
||||
{
|
||||
$data = $request->validate([
|
||||
'account' => ['required', 'integer'],
|
||||
]);
|
||||
|
||||
abort_unless($request->user()->canAccessAccount($data['account']), 403);
|
||||
|
||||
$request->session()->put('ladill_account', $data['account']);
|
||||
$request->session()->forget('ladill_pos_location');
|
||||
|
||||
return back();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user