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:
@@ -110,6 +110,25 @@ class SubscriptionService
|
||||
return PosLocation::owned($ownerRef)->count();
|
||||
}
|
||||
|
||||
public function canUseMultiLocation(User $user): bool
|
||||
{
|
||||
return $this->isPro($user);
|
||||
}
|
||||
|
||||
public function canAddLocation(User $user, string $ownerRef): bool
|
||||
{
|
||||
if (! $this->canUseMultiLocation($user)) {
|
||||
return $this->locationCount($ownerRef) < (int) config('pos.free.max_locations', 1);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function canManageTeam(User $user): bool
|
||||
{
|
||||
return $this->isPro($user);
|
||||
}
|
||||
|
||||
/** @return array{0:bool,1:string} */
|
||||
public function subscribe(User $user): array
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user