Add freemium plans, wallet-billed host notifications, and Pro upgrades.
Deploy Ladill Frontdesk / deploy (push) Successful in 44s
Deploy Ladill Frontdesk / deploy (push) Successful in 44s
Host alerts use email/phone on the host record without requiring a Ladill account link; SMS and over-quota emails debit the org wallet at platform rates. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -21,10 +21,12 @@
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-slate-700">Email</label>
|
||||
<input type="email" name="email" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
|
||||
<p class="mt-1 text-xs text-slate-500">Used for arrival alerts when email notifications are enabled.</p>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-slate-700">Phone</label>
|
||||
<input type="tel" name="phone" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
|
||||
<p class="mt-1 text-xs text-slate-500">Used for SMS alerts when SMS is enabled in settings.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
<label class="flex items-center gap-2 text-sm"><input type="checkbox" name="is_available" value="1" @checked(old('is_available', $host->is_available))> Available for visits</label>
|
||||
<div>
|
||||
<label class="block text-sm font-medium">Linked user (platform ID)</label>
|
||||
<input type="text" name="user_ref" value="{{ old('user_ref', $host->user_ref) }}" placeholder="User public_id for host portal access" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
|
||||
<input type="text" name="user_ref" value="{{ old('user_ref', $host->user_ref) }}" placeholder="User public_id (optional)" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
|
||||
<p class="mt-1 text-xs text-slate-500">Optional — enables the host portal and in-app bell. Email and phone above are used for alerts.</p>
|
||||
<p class="mt-1 text-xs text-slate-500">When set, this user can access the host self-service portal.</p>
|
||||
</div>
|
||||
<button type="submit" class="btn-primary w-full">Save changes</button>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<x-app-layout title="Integrations">
|
||||
<div class="mx-auto max-w-lg">
|
||||
<h1 class="text-xl font-semibold text-slate-900">Integrations</h1>
|
||||
<p class="mt-2 text-sm text-slate-600">Webhooks, calendar feeds, and third-party connectors are included with Frontdesk Pro.</p>
|
||||
|
||||
<div class="mt-6 rounded-2xl border border-indigo-200 bg-indigo-50 p-6">
|
||||
<h2 class="font-semibold text-indigo-900">Upgrade to Pro</h2>
|
||||
<p class="mt-2 text-sm text-indigo-800">
|
||||
GHS {{ number_format($proPriceMinor / 100, 2) }} / month from your Ladill wallet — unlimited branches and kiosks, integrations, scheduled reports, and more.
|
||||
</p>
|
||||
<form method="POST" action="{{ route('frontdesk.settings.upgrade') }}" class="mt-4">
|
||||
@csrf
|
||||
<button type="submit" class="btn-primary">Upgrade from wallet</button>
|
||||
</form>
|
||||
<p class="mt-3 text-xs text-indigo-700">
|
||||
<a href="{{ route('frontdesk.wallet') }}" class="underline">Top up your wallet</a> if you need more balance.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<a href="{{ route('frontdesk.settings') }}" class="mt-6 inline-block text-sm text-slate-600 hover:text-slate-900">← Back to settings</a>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
@@ -243,7 +243,8 @@
|
||||
<template x-if="!result?.awaiting_approval">
|
||||
<p class="mt-1 text-sm text-slate-500">Badge code: <span class="font-mono font-bold" x-text="result?.badge_code"></span></p>
|
||||
</template>
|
||||
<p class="mt-4 text-sm text-slate-500" x-text="result?.awaiting_approval ? 'Please wait at reception.' : 'Your host has been notified.'"></p>
|
||||
<p class="mt-4 text-sm text-slate-500"
|
||||
x-text="result?.awaiting_approval ? 'Please wait at reception.' : (result?.host_notified ? 'Your host has been notified.' : (result?.host_name ? 'Check in complete.' : 'Thank you for checking in.'))"></p>
|
||||
<button type="button" @click="reset()" class="btn-primary btn-primary-lg mt-8 w-full">Done</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,50 @@
|
||||
<h1 class="text-xl font-semibold text-slate-900">Settings</h1>
|
||||
<p class="text-sm text-slate-500">{{ $organization->name }}</p>
|
||||
|
||||
@if ($canManage)
|
||||
<section class="mt-6 max-w-2xl rounded-2xl border border-slate-200 bg-white p-5">
|
||||
<div class="flex flex-wrap items-start justify-between gap-4">
|
||||
<div>
|
||||
<h2 class="text-sm font-semibold text-slate-900">Plan</h2>
|
||||
<p class="mt-1 text-sm text-slate-600">
|
||||
@if ($isPro)
|
||||
<span class="font-medium text-indigo-700">{{ $plan['label'] ?? 'Pro' }}</span> — unlimited branches & kiosks, integrations, and unlimited host emails (SMS still billed per segment).
|
||||
@else
|
||||
<span class="font-medium">Free</span> — 1 branch, 1 kiosk, core check-in & badges. Host alerts billed after {{ number_format($freeEmailAllowance) }} free emails/month.
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
@if (! $isPro)
|
||||
<form method="POST" action="{{ route('frontdesk.settings.upgrade') }}">
|
||||
@csrf
|
||||
<button type="submit" class="btn-primary text-sm">Upgrade to Pro (GHS {{ number_format($proPriceMinor / 100, 2) }}/mo)</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
<dl class="mt-4 grid gap-3 text-sm sm:grid-cols-2">
|
||||
<div>
|
||||
<dt class="text-slate-500">Host emails this month</dt>
|
||||
<dd class="font-medium">
|
||||
@if ($freeEmailAllowance === null)
|
||||
{{ number_format($monthlyUsage->email_count) }} sent (unlimited on Pro)
|
||||
@else
|
||||
{{ number_format($monthlyUsage->email_count) }} / {{ number_format($freeEmailAllowance) }} free
|
||||
@endif
|
||||
</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-slate-500">Host SMS this month</dt>
|
||||
<dd class="font-medium">{{ number_format($monthlyUsage->sms_count) }} sent</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<p class="mt-3 text-xs text-slate-500">
|
||||
Email {{ $emailCostFormatted }} each after free allowance · SMS from {{ $smsCostFormatted }} per segment — charged to your
|
||||
<a href="{{ route('frontdesk.wallet') }}" class="text-indigo-600 underline">Ladill wallet</a>.
|
||||
Hosts are notified via email or phone on their profile; linking a Ladill account is optional (in-app bell only).
|
||||
</p>
|
||||
</section>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('frontdesk.settings.update') }}" enctype="multipart/form-data" class="mt-6 max-w-2xl space-y-6">
|
||||
@csrf @method('PUT')
|
||||
|
||||
@@ -70,6 +114,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-sm font-medium text-slate-700">Notification channels</p>
|
||||
<p class="mt-1 text-xs text-slate-500">Alerts go to each host's email and/or phone — no Ladill account required.</p>
|
||||
<div class="mt-2 flex flex-wrap gap-3">
|
||||
@foreach ($notificationChannels as $key => $label)
|
||||
<label class="flex items-center gap-2 text-sm">
|
||||
|
||||
Reference in New Issue
Block a user