Nest Branches and Team under Settings as Pro features.
Deploy Ladill Queue / deploy (push) Successful in 50s

Match Frontdesk: settings cards and nested routes, Pro-gated access,
and legacy /admin redirects to /settings/branches and /settings/team.
This commit is contained in:
isaacclad
2026-07-16 09:48:32 +00:00
parent 8be3eaeb4b
commit 26c9edc131
17 changed files with 629 additions and 165 deletions
@@ -6,6 +6,7 @@ use App\Http\Controllers\Controller;
use App\Http\Controllers\Qms\Concerns\ScopesToAccount;
use App\Models\Branch;
use App\Services\Qms\AuditLogger;
use App\Services\Qms\PlanService;
use App\Services\Qms\QmsPermissions;
use App\Support\OrganizationBranding;
use Illuminate\Http\RedirectResponse;
@@ -16,11 +17,13 @@ class SettingsController extends Controller
{
use ScopesToAccount;
public function edit(Request $request): View
public function edit(Request $request, PlanService $plans): View
{
$this->authorizeAbility($request, 'settings.view');
$organization = $this->organization($request);
$canManage = app(QmsPermissions::class)->can($this->member($request), 'settings.manage');
$member = $this->member($request);
$permissions = app(QmsPermissions::class);
$canManage = $permissions->can($member, 'settings.manage');
$branchCount = Branch::owned($this->ownerRef($request))
->where('organization_id', $organization->id)
@@ -32,6 +35,15 @@ class SettingsController extends Controller
'branchCount' => $branchCount,
'appointmentModes' => config('qms.appointment_modes'),
'industries' => config('qms.industry_templates'),
'hasPaidPlan' => $plans->hasPaidPlan($organization),
'isPro' => $plans->isPro($organization),
'isEnterprise' => $plans->isEnterprise($organization),
'hasBranchesFeature' => $plans->hasFeature($organization, 'branches'),
'hasTeamFeature' => $plans->hasFeature($organization, 'team'),
'canViewBranches' => $permissions->can($member, 'admin.branches.view'),
'canViewTeam' => $permissions->can($member, 'admin.members.view'),
'proPriceMinor' => $plans->proPricePerBranchMinor(),
'activeBranchCount' => $plans->activeBranchCount($organization),
]);
}