diff --git a/config/care.php b/config/care.php index 6a45a99..6cc8859 100644 --- a/config/care.php +++ b/config/care.php @@ -238,4 +238,10 @@ return [ 'api_key' => env('QUEUE_API_KEY_CARE'), ], + 'upgrade_banner' => [ + 'title' => 'Unlock Care Pro or Enterprise', + 'description' => 'Unlimited branches, lab & pharmacy modules, encounter billing — from GHS 199/mo.', + 'route' => 'care.pro.index', + ], + ]; diff --git a/resources/views/care/dashboard.blade.php b/resources/views/care/dashboard.blade.php index 37aef58..48f1c04 100644 --- a/resources/views/care/dashboard.blade.php +++ b/resources/views/care/dashboard.blade.php @@ -79,6 +79,8 @@ + @include('partials.upgrade-banner') +
@foreach ($operationalCards as $card) diff --git a/resources/views/partials/upgrade-banner.blade.php b/resources/views/partials/upgrade-banner.blade.php new file mode 100644 index 0000000..35e57ba --- /dev/null +++ b/resources/views/partials/upgrade-banner.blade.php @@ -0,0 +1,10 @@ +@php $banner = config('care.upgrade_banner'); @endphp +@if (empty($hasPaidPlan) && ! empty($banner)) +
+
+

{{ $banner['title'] }}

+

{{ $banner['description'] }}

+
+
View plans +
+@endif diff --git a/tests/Feature/CareProTest.php b/tests/Feature/CareProTest.php index c934faa..6a3dcfb 100644 --- a/tests/Feature/CareProTest.php +++ b/tests/Feature/CareProTest.php @@ -70,7 +70,9 @@ class CareProTest extends TestCase $this->actingAs($this->owner) ->get(route('care.dashboard')) ->assertOk() - ->assertSee('Upgrade to Pro'); + ->assertSee('Upgrade to Pro') + ->assertSee('Unlock Care Pro or Enterprise') + ->assertSee('View plans'); } public function test_subscribe_upgrades_organization_to_pro(): void