diff --git a/config/qms.php b/config/qms.php index 60e5558..f330e6d 100644 --- a/config/qms.php +++ b/config/qms.php @@ -246,4 +246,10 @@ return [ 'display_poll_ms' => (int) env('QUEUE_DISPLAY_POLL_MS', 1200), + 'upgrade_banner' => [ + 'title' => 'Unlock Queue Pro or Enterprise', + 'description' => 'Unlimited branches, advanced routing, Care & Frontdesk integrations — from GHS 99/mo.', + 'route' => 'qms.pro.index', + ], + ]; diff --git a/resources/views/partials/upgrade-banner.blade.php b/resources/views/partials/upgrade-banner.blade.php new file mode 100644 index 0000000..e3d1742 --- /dev/null +++ b/resources/views/partials/upgrade-banner.blade.php @@ -0,0 +1,10 @@ +@php $banner = config('qms.upgrade_banner'); @endphp +@if (empty($hasPaidPlan) && ! empty($banner)) +
+
+

{{ $banner['title'] }}

+

{{ $banner['description'] }}

+
+ View plans +
+@endif diff --git a/resources/views/qms/dashboard.blade.php b/resources/views/qms/dashboard.blade.php index 7061388..83cf951 100644 --- a/resources/views/qms/dashboard.blade.php +++ b/resources/views/qms/dashboard.blade.php @@ -68,15 +68,7 @@ @endif - @if (empty($hasPaidPlan)) -
-
-

Unlock Queue Pro or Enterprise

-

Unlimited branches, advanced routing, Care & Frontdesk integrations — from GHS 99/mo.

-
- View plans -
- @endif + @include('partials.upgrade-banner')

Live operations

diff --git a/tests/Feature/QmsProTest.php b/tests/Feature/QmsProTest.php index ed75ece..d9ab77d 100644 --- a/tests/Feature/QmsProTest.php +++ b/tests/Feature/QmsProTest.php @@ -59,7 +59,9 @@ class QmsProTest extends TestCase $this->actingAs($this->owner) ->get(route('qms.dashboard')) ->assertOk() - ->assertSee('Upgrade to Pro'); + ->assertSee('Upgrade to Pro') + ->assertSee('Unlock Queue Pro or Enterprise') + ->assertSee('View plans'); } public function test_sidebar_shows_upgrade_for_operator_without_settings_access(): void