Add Care Enterprise per-branch billing and Paystack prepaid plans.
Deploy Ladill Care / deploy (push) Successful in 1m46s
Deploy Ladill Care / deploy (push) Successful in 1m46s
Mirrors Queue with GHS 499/branch Enterprise and 6/12/24 month Paystack checkout. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -25,16 +25,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