Move Branches and Team into settings; drop wallet from plan CTAs.
Deploy Ladill Care / deploy (push) Successful in 1m24s
Deploy Ladill Care / deploy (push) Successful in 1m24s
Match Frontdesk by linking branches and team from settings instead of the admin sidebar, and simplify Care plan upgrade button copy.
This commit is contained in:
@@ -24,7 +24,9 @@ class SettingsController extends Controller
|
|||||||
{
|
{
|
||||||
$this->authorizeAbility($request, 'settings.view');
|
$this->authorizeAbility($request, 'settings.view');
|
||||||
$organization = $this->organization($request);
|
$organization = $this->organization($request);
|
||||||
$canManage = app(CarePermissions::class)->can($this->member($request), 'settings.manage');
|
$member = $this->member($request);
|
||||||
|
$permissions = app(CarePermissions::class);
|
||||||
|
$canManage = $permissions->can($member, 'settings.manage');
|
||||||
$credential = $credentials->forOrganization($organization);
|
$credential = $credentials->forOrganization($organization);
|
||||||
|
|
||||||
$branchCount = Branch::owned($this->ownerRef($request))
|
$branchCount = Branch::owned($this->ownerRef($request))
|
||||||
@@ -32,11 +34,15 @@ class SettingsController extends Controller
|
|||||||
->count();
|
->count();
|
||||||
|
|
||||||
$plans = app(PlanService::class);
|
$plans = app(PlanService::class);
|
||||||
|
$hasPaidPlan = $plans->hasPaidPlan($organization);
|
||||||
|
|
||||||
return view('care.settings.edit', [
|
return view('care.settings.edit', [
|
||||||
'organization' => $organization,
|
'organization' => $organization,
|
||||||
'canManage' => $canManage,
|
'canManage' => $canManage,
|
||||||
'branchCount' => $branchCount,
|
'branchCount' => $branchCount,
|
||||||
|
'canViewBranches' => $permissions->can($member, 'admin.branches.view'),
|
||||||
|
'canViewTeam' => $permissions->can($member, 'admin.members.view'),
|
||||||
|
'hasPaidPlan' => $hasPaidPlan,
|
||||||
'canUseQueueIntegration' => $plans->canUseQueueIntegration($organization),
|
'canUseQueueIntegration' => $plans->canUseQueueIntegration($organization),
|
||||||
'messagingSmsReady' => $credential->hasValidSms(),
|
'messagingSmsReady' => $credential->hasValidSms(),
|
||||||
'messagingEmailReady' => $credential->hasValidBird(),
|
'messagingEmailReady' => $credential->hasValidBird(),
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
<p class="mt-1 text-xs text-slate-500">Link after inviting them under Administration → Team.</p>
|
<p class="mt-1 text-xs text-slate-500">Link after inviting them under Settings → Team.</p>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn-primary w-full">Save</button>
|
<button type="submit" class="btn-primary w-full">Save</button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
@csrf
|
@csrf
|
||||||
<input type="hidden" name="branches" :value="branchCount()">
|
<input type="hidden" name="branches" :value="branchCount()">
|
||||||
<button type="submit" class="btn-primary w-full"
|
<button type="submit" class="btn-primary w-full"
|
||||||
x-text="'Upgrade to Pro — {{ $currency }} ' + fmt(proTotal()) + '/mo wallet'"></button>
|
x-text="'Upgrade to Pro — {{ $currency }} ' + fmt(proTotal()) + '/mo'"></button>
|
||||||
</form>
|
</form>
|
||||||
<template x-for="months in @js($prepaidMonths)" :key="months">
|
<template x-for="months in @js($prepaidMonths)" :key="months">
|
||||||
<form x-show="billing == months" method="post" action="{{ route('care.pro.subscribe-prepaid') }}">
|
<form x-show="billing == months" method="post" action="{{ route('care.pro.subscribe-prepaid') }}">
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
@csrf
|
@csrf
|
||||||
<input type="hidden" name="branches" :value="branchCount()">
|
<input type="hidden" name="branches" :value="branchCount()">
|
||||||
<button type="submit" class="w-full rounded-xl bg-amber-400 px-4 py-2.5 text-sm font-semibold text-slate-900 hover:bg-amber-300"
|
<button type="submit" class="w-full rounded-xl bg-amber-400 px-4 py-2.5 text-sm font-semibold text-slate-900 hover:bg-amber-300"
|
||||||
x-text="'Upgrade — {{ $currency }} ' + fmt(entTotal()) + '/mo wallet'"></button>
|
x-text="'Upgrade — {{ $currency }} ' + fmt(entTotal()) + '/mo'"></button>
|
||||||
</form>
|
</form>
|
||||||
<template x-for="months in @js($prepaidMonths)" :key="'ent-' + months">
|
<template x-for="months in @js($prepaidMonths)" :key="'ent-' + months">
|
||||||
<form x-show="billing == months" method="post" action="{{ route('care.pro.subscribe-prepaid') }}">
|
<form x-show="billing == months" method="post" action="{{ route('care.pro.subscribe-prepaid') }}">
|
||||||
|
|||||||
@@ -1,5 +1,39 @@
|
|||||||
<x-app-layout title="Settings">
|
<x-app-layout title="Settings">
|
||||||
<x-settings.page title="Facility settings">
|
<x-settings.page title="Facility settings" description="Configure facility details, locations, staff access, and messaging for {{ $organization->name }}.">
|
||||||
|
@if ($canViewBranches || $canViewTeam)
|
||||||
|
<x-settings.card title="Branches & team" description="Locations and staff access for this facility. Multi-branch requires Care Pro.">
|
||||||
|
<ul class="space-y-3">
|
||||||
|
@if ($canViewBranches)
|
||||||
|
<li>
|
||||||
|
<a href="{{ route('care.branches.index') }}"
|
||||||
|
class="flex items-center justify-between rounded-xl border border-slate-100 bg-slate-50 px-4 py-3 text-sm text-slate-700 hover:text-indigo-700">
|
||||||
|
<span>
|
||||||
|
Branches
|
||||||
|
@if (! $hasPaidPlan)
|
||||||
|
<span class="ml-2 rounded-full bg-amber-50 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-amber-700">Pro</span>
|
||||||
|
@endif
|
||||||
|
<span class="mt-0.5 block text-xs text-slate-500">Clinic locations and sites ({{ $branchCount }} configured)</span>
|
||||||
|
</span>
|
||||||
|
<span class="text-slate-400">→</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
@if ($canViewTeam)
|
||||||
|
<li>
|
||||||
|
<a href="{{ route('care.members.index') }}"
|
||||||
|
class="flex items-center justify-between rounded-xl border border-slate-100 bg-slate-50 px-4 py-3 text-sm text-slate-700 hover:text-indigo-700">
|
||||||
|
<span>
|
||||||
|
Team
|
||||||
|
<span class="mt-0.5 block text-xs text-slate-500">Invite colleagues and assign Care roles</span>
|
||||||
|
</span>
|
||||||
|
<span class="text-slate-400">→</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
</x-settings.card>
|
||||||
|
@endif
|
||||||
|
|
||||||
<form method="POST" action="{{ route('care.settings.update') }}" enctype="multipart/form-data" class="space-y-6">
|
<form method="POST" action="{{ route('care.settings.update') }}" enctype="multipart/form-data" class="space-y-6">
|
||||||
@csrf @method('PUT')
|
@csrf @method('PUT')
|
||||||
|
|
||||||
@@ -132,7 +166,5 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<p class="text-sm text-slate-500">{{ $branchCount }} branch(es) configured.</p>
|
|
||||||
</x-settings.page>
|
</x-settings.page>
|
||||||
</x-app-layout>
|
</x-app-layout>
|
||||||
|
|||||||
@@ -64,10 +64,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$adminNav = [];
|
$adminNav = [];
|
||||||
if ($permissions->can($member, 'admin.branches.view')) {
|
|
||||||
$adminNav[] = ['name' => 'Branches', 'route' => route('care.branches.index'), 'active' => request()->routeIs('care.branches.*'),
|
|
||||||
'icon' => '<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m-1.5 3h1.5m3-9H15m-1.5 3H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" />'];
|
|
||||||
}
|
|
||||||
if ($permissions->can($member, 'admin.departments.view')) {
|
if ($permissions->can($member, 'admin.departments.view')) {
|
||||||
$adminNav[] = ['name' => 'Departments', 'route' => route('care.departments.index'), 'active' => request()->routeIs('care.departments.*'),
|
$adminNav[] = ['name' => 'Departments', 'route' => route('care.departments.index'), 'active' => request()->routeIs('care.departments.*'),
|
||||||
'icon' => '<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z" />'];
|
'icon' => '<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z" />'];
|
||||||
@@ -76,16 +72,15 @@
|
|||||||
$adminNav[] = ['name' => 'Practitioners', 'route' => route('care.practitioners.index'), 'active' => request()->routeIs('care.practitioners.*'),
|
$adminNav[] = ['name' => 'Practitioners', 'route' => route('care.practitioners.index'), 'active' => request()->routeIs('care.practitioners.*'),
|
||||||
'icon' => '<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" />'];
|
'icon' => '<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" />'];
|
||||||
}
|
}
|
||||||
if ($permissions->can($member, 'admin.members.view')) {
|
|
||||||
$adminNav[] = ['name' => 'Team', 'route' => route('care.members.index'), 'active' => request()->routeIs('care.members.*'),
|
|
||||||
'icon' => '<path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z" />'];
|
|
||||||
}
|
|
||||||
if ($permissions->can($member, 'audit.view')) {
|
if ($permissions->can($member, 'audit.view')) {
|
||||||
$adminNav[] = ['name' => 'Audit log', 'route' => route('care.audit.index'), 'active' => request()->routeIs('care.audit.*'),
|
$adminNav[] = ['name' => 'Audit log', 'route' => route('care.audit.index'), 'active' => request()->routeIs('care.audit.*'),
|
||||||
'icon' => '<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />'];
|
'icon' => '<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$settingsActive = request()->routeIs('care.settings*') && ! request()->routeIs('care.pro.*');
|
$settingsActive = (request()->routeIs('care.settings*') && ! request()->routeIs('care.pro.*'))
|
||||||
|
|| request()->routeIs('care.branches.*')
|
||||||
|
|| request()->routeIs('care.members.*')
|
||||||
|
|| request()->routeIs('care.integrations*');
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<nav class="flex-1 space-y-0.5 overflow-y-auto px-3 py-4">
|
<nav class="flex-1 space-y-0.5 overflow-y-auto px-3 py-4">
|
||||||
|
|||||||
Reference in New Issue
Block a user