Add Queue Enterprise billing and visible upgrade CTAs for all roles.
Deploy Ladill Queue / deploy (push) Successful in 1m32s
Deploy Ladill Queue / deploy (push) Successful in 1m32s
Enterprise charges per active branch (GHS 299+) with wallet subscribe/renew; sidebar and dashboard upsell no longer gated behind settings.view. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -34,16 +34,28 @@ class AppServiceProvider extends ServiceProvider
|
||||
View::composer('partials.sidebar', function ($view) {
|
||||
/** @var User|null $user */
|
||||
$user = auth()->user();
|
||||
$planKey = 'free';
|
||||
$isPro = false;
|
||||
$isEnterprise = false;
|
||||
$hasPaidPlan = false;
|
||||
|
||||
if ($user) {
|
||||
$organization = app(OrganizationResolver::class)->resolveForUser($user);
|
||||
if ($organization) {
|
||||
$isPro = app(PlanService::class)->isPro($organization);
|
||||
$plans = app(PlanService::class);
|
||||
$planKey = $plans->planKey($organization);
|
||||
$isPro = $planKey === 'pro';
|
||||
$isEnterprise = $planKey === 'enterprise';
|
||||
$hasPaidPlan = $plans->hasPaidPlan($organization);
|
||||
}
|
||||
}
|
||||
|
||||
$view->with('isPro', $isPro);
|
||||
$view->with([
|
||||
'planKey' => $planKey,
|
||||
'isPro' => $isPro,
|
||||
'isEnterprise' => $isEnterprise,
|
||||
'hasPaidPlan' => $hasPaidPlan,
|
||||
]);
|
||||
});
|
||||
|
||||
View::composer(['partials.topbar'], function ($view) {
|
||||
|
||||
Reference in New Issue
Block a user