phases one of time logged now with log display
This commit is contained in:
@@ -1,25 +1,47 @@
|
||||
<x-layouts::app :title="__('Companies')">
|
||||
<div class="space-y-6">
|
||||
<x-wms.page-hero
|
||||
eyebrow="Platform Administration"
|
||||
title="Companies"
|
||||
<x-wms.page-hero eyebrow="Platform Administration" title="Companies"
|
||||
description="Manage tenant companies and keep every company’s users, warehouses and records isolated."
|
||||
icon="fa-solid fa-building"
|
||||
/>
|
||||
icon="fa-solid fa-building" />
|
||||
<div class="rounded-3xl bg-white p-6 shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-900 dark:ring-zinc-800">
|
||||
<h2 class="text-lg font-bold text-zinc-900 dark:text-white">Create company</h2>
|
||||
<form method="POST" action="{{ route('platform.companies.store') }}" class="mt-5 grid gap-4 md:grid-cols-4">
|
||||
@csrf
|
||||
<input name="name" placeholder="Company name" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<input name="billing_email" placeholder="billing@example.com" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<select name="status" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950"><option value="active">Active</option><option value="suspended">Suspended</option></select>
|
||||
<button class="rounded-xl bg-zinc-900 px-4 py-2 font-semibold text-white dark:bg-white dark:text-zinc-900">Create</button>
|
||||
<input name="name" placeholder="Company name"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<input name="billing_email" placeholder="billing@example.com"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<select name="status" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<option value="active">Active</option>
|
||||
<option value="suspended">Suspended</option>
|
||||
</select>
|
||||
<button
|
||||
class="rounded-xl bg-zinc-900 px-4 py-2 font-semibold text-white dark:bg-white dark:text-zinc-900">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="overflow-x-auto rounded-2xl bg-white shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-900 dark:ring-zinc-800">
|
||||
<div
|
||||
class="overflow-x-auto rounded-2xl bg-white shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-900 dark:ring-zinc-800">
|
||||
<table class="min-w-full text-sm">
|
||||
<thead><tr class="border-b"><th class="p-4 text-left">Name</th><th class="p-4 text-left">Users</th><th class="p-4 text-left">Warehouses</th><th class="p-4 text-left">Licences</th><th class="p-4 text-left">Status</th></tr></thead>
|
||||
<tbody>@foreach($companies as $company)<tr class="border-b border-zinc-100 dark:border-zinc-800"><td class="p-4 font-semibold">{{ $company->name }}</td><td class="p-4">{{ $company->users_count }}</td><td class="p-4">{{ $company->warehouses_count }}</td><td class="p-4">{{ $company->license_keys_count }}</td><td class="p-4">{{ $company->is_system_company ? 'System' : $company->status }}</td></tr>@endforeach</tbody>
|
||||
<thead>
|
||||
<tr class="border-b">
|
||||
<th class="p-4 text-left">Name</th>
|
||||
<th class="p-4 text-left">Users</th>
|
||||
<th class="p-4 text-left">Warehouses</th>
|
||||
<th class="p-4 text-left">Licences</th>
|
||||
<th class="p-4 text-left">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($companies as $company)
|
||||
<tr class="border-b border-zinc-100 dark:border-zinc-800">
|
||||
<td class="p-4 font-semibold">{{ $company->name }}</td>
|
||||
<td class="p-4">{{ $company->users_count }}</td>
|
||||
<td class="p-4">{{ $company->warehouses_count }}</td>
|
||||
<td class="p-4">{{ $company->license_keys_count }}</td>
|
||||
<td class="p-4">{{ $company->is_system_company ? 'System' : $company->status }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ $companies->links() }}
|
||||
|
||||
@@ -1,54 +1,71 @@
|
||||
<x-layouts.app :title="__('Platform Dashboard')">
|
||||
<div class="space-y-6">
|
||||
<x-wms.page-hero
|
||||
title="Platform Dashboard"
|
||||
<x-wms.page-hero title="Platform Dashboard"
|
||||
description="System-level tenant, licence, pricing and operational oversight for the WMS platform."
|
||||
eyebrow="Platform Administration"
|
||||
/>
|
||||
eyebrow="Platform Administration" />
|
||||
|
||||
<section class="grid gap-4 md:grid-cols-2 xl:grid-cols-5">
|
||||
<article class="rounded-2xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-950">
|
||||
<article
|
||||
class="rounded-2xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-950">
|
||||
<p class="text-sm font-medium text-slate-500 dark:text-slate-400">Companies</p>
|
||||
<p class="mt-2 text-3xl font-semibold text-slate-950 dark:text-white">{{ number_format($companiesCount ?? 0) }}</p>
|
||||
<p class="mt-2 text-3xl font-semibold text-slate-950 dark:text-white">
|
||||
{{ number_format($companiesCount ?? 0) }}</p>
|
||||
</article>
|
||||
|
||||
<article class="rounded-2xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-950">
|
||||
<article
|
||||
class="rounded-2xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-950">
|
||||
<p class="text-sm font-medium text-slate-500 dark:text-slate-400">Active</p>
|
||||
<p class="mt-2 text-3xl font-semibold text-emerald-700 dark:text-emerald-300">{{ number_format($activeCompaniesCount ?? 0) }}</p>
|
||||
<p class="mt-2 text-3xl font-semibold text-emerald-700 dark:text-emerald-300">
|
||||
{{ number_format($activeCompaniesCount ?? 0) }}</p>
|
||||
</article>
|
||||
|
||||
<article class="rounded-2xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-950">
|
||||
<article
|
||||
class="rounded-2xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-950">
|
||||
<p class="text-sm font-medium text-slate-500 dark:text-slate-400">Warehouses</p>
|
||||
<p class="mt-2 text-3xl font-semibold text-slate-950 dark:text-white">{{ number_format($warehousesCount ?? 0) }}</p>
|
||||
<p class="mt-2 text-3xl font-semibold text-slate-950 dark:text-white">
|
||||
{{ number_format($warehousesCount ?? 0) }}</p>
|
||||
</article>
|
||||
|
||||
<article class="rounded-2xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-950">
|
||||
<article
|
||||
class="rounded-2xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-950">
|
||||
<p class="text-sm font-medium text-slate-500 dark:text-slate-400">Prices</p>
|
||||
<p class="mt-2 text-3xl font-semibold text-slate-950 dark:text-white">{{ number_format($pricesCount ?? 0) }}</p>
|
||||
<p class="mt-2 text-3xl font-semibold text-slate-950 dark:text-white">
|
||||
{{ number_format($pricesCount ?? 0) }}</p>
|
||||
</article>
|
||||
|
||||
<article class="rounded-2xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-950">
|
||||
<article
|
||||
class="rounded-2xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-950">
|
||||
<p class="text-sm font-medium text-slate-500 dark:text-slate-400">Licences</p>
|
||||
<p class="mt-2 text-3xl font-semibold text-slate-950 dark:text-white">{{ number_format($licensesCount ?? 0) }}</p>
|
||||
<p class="mt-2 text-3xl font-semibold text-slate-950 dark:text-white">
|
||||
{{ number_format($licensesCount ?? 0) }}</p>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
<section class="grid gap-6 xl:grid-cols-3">
|
||||
<article class="rounded-2xl border border-slate-200 bg-white p-6 shadow-sm dark:border-slate-800 dark:bg-slate-950 xl:col-span-1">
|
||||
<article
|
||||
class="rounded-2xl border border-slate-200 bg-white p-6 shadow-sm dark:border-slate-800 dark:bg-slate-950 xl:col-span-1">
|
||||
<h2 class="text-lg font-semibold text-slate-950 dark:text-white">Administration shortcuts</h2>
|
||||
<div class="mt-4 grid gap-3">
|
||||
<a href="{{ route('platform.companies.index') }}" class="rounded-xl border border-slate-200 p-3 text-sm font-semibold hover:bg-slate-50 dark:border-slate-800 dark:hover:bg-slate-900">Manage companies</a>
|
||||
<a href="{{ route('platform.prices.index') }}" class="rounded-xl border border-slate-200 p-3 text-sm font-semibold hover:bg-slate-50 dark:border-slate-800 dark:hover:bg-slate-900">Manage prices</a>
|
||||
<a href="{{ route('platform.pricing.index') }}" class="rounded-xl border border-slate-200 p-3 text-sm font-semibold hover:bg-slate-50 dark:border-slate-800 dark:hover:bg-slate-900">View public pricing</a>
|
||||
<a href="{{ route('platform.companies.index') }}"
|
||||
class="rounded-xl border border-slate-200 p-3 text-sm font-semibold hover:bg-slate-50 dark:border-slate-800 dark:hover:bg-slate-900">Manage
|
||||
companies</a>
|
||||
<a href="{{ route('platform.prices.index') }}"
|
||||
class="rounded-xl border border-slate-200 p-3 text-sm font-semibold hover:bg-slate-50 dark:border-slate-800 dark:hover:bg-slate-900">Manage
|
||||
prices</a>
|
||||
<a href="{{ route('platform.pricing.index') }}"
|
||||
class="rounded-xl border border-slate-200 p-3 text-sm font-semibold hover:bg-slate-50 dark:border-slate-800 dark:hover:bg-slate-900">View
|
||||
public pricing</a>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="rounded-2xl border border-slate-200 bg-white p-6 shadow-sm dark:border-slate-800 dark:bg-slate-950 xl:col-span-2">
|
||||
<article
|
||||
class="rounded-2xl border border-slate-200 bg-white p-6 shadow-sm dark:border-slate-800 dark:bg-slate-950 xl:col-span-2">
|
||||
<h2 class="text-lg font-semibold text-slate-950 dark:text-white">Recent companies</h2>
|
||||
<div class="mt-4 overflow-hidden rounded-xl border border-slate-200 dark:border-slate-800">
|
||||
<table class="min-w-full divide-y divide-slate-200 text-sm dark:divide-slate-800">
|
||||
<thead class="bg-slate-50 text-left text-xs uppercase tracking-wide text-slate-500 dark:bg-slate-900 dark:text-slate-400">
|
||||
<thead
|
||||
class="bg-slate-50 text-left text-xs uppercase tracking-wide text-slate-500 dark:bg-slate-900 dark:text-slate-400">
|
||||
<tr>
|
||||
<th class="px-4 py-3">Company</th>
|
||||
<th class="px-4 py-3">Users</th>
|
||||
@@ -60,7 +77,8 @@
|
||||
<tbody class="divide-y divide-slate-200 dark:divide-slate-800">
|
||||
@forelse (($companies ?? collect()) as $company)
|
||||
<tr>
|
||||
<td class="px-4 py-3 font-medium text-slate-950 dark:text-white">{{ $company->name }}</td>
|
||||
<td class="px-4 py-3 font-medium text-slate-950 dark:text-white">
|
||||
{{ $company->name }}</td>
|
||||
<td class="px-4 py-3">{{ $company->users_count ?? 0 }}</td>
|
||||
<td class="px-4 py-3">{{ $company->warehouses_count ?? 0 }}</td>
|
||||
<td class="px-4 py-3">{{ $company->license_keys_count ?? 0 }}</td>
|
||||
@@ -68,7 +86,8 @@
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="5" class="px-4 py-6 text-center text-slate-500 dark:text-slate-400">No companies have been created yet.</td>
|
||||
<td colspan="5" class="px-4 py-6 text-center text-slate-500 dark:text-slate-400">
|
||||
No companies have been created yet.</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
|
||||
@@ -1,24 +1,59 @@
|
||||
<x-layouts::app :title="__('Licence Keys')">
|
||||
<div class="space-y-6">
|
||||
<x-wms.page-hero
|
||||
eyebrow="Platform Administration"
|
||||
title="Licence Keys"
|
||||
<x-wms.page-hero eyebrow="Platform Administration" title="Licence Keys"
|
||||
description="Issue and monitor company licence keys, limits and platform access plans."
|
||||
icon="fa-solid fa-key"
|
||||
/>
|
||||
@if($plainKey)<div class="rounded-2xl bg-emerald-50 p-4 text-emerald-900 ring-1 ring-emerald-200">New key: <code class="font-bold">{{ $plainKey }}</code></div>@endif
|
||||
icon="fa-solid fa-key" />
|
||||
@if ($plainKey)
|
||||
<div class="rounded-2xl bg-emerald-50 p-4 text-emerald-900 ring-1 ring-emerald-200">New key: <code
|
||||
class="font-bold">{{ $plainKey }}</code></div>
|
||||
@endif
|
||||
<div class="rounded-3xl bg-white p-6 shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-900 dark:ring-zinc-800">
|
||||
<h2 class="text-lg font-bold text-zinc-900 dark:text-white">Issue licence key</h2>
|
||||
<form method="POST" action="{{ route('platform.licenses.store') }}" class="mt-5 grid gap-4 md:grid-cols-5">
|
||||
@csrf
|
||||
<select name="company_id" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">@foreach($companies as $company)<option value="{{ $company->id }}">{{ $company->name }}</option>@endforeach</select>
|
||||
<input name="label" placeholder="Licence label" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<select name="plan" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950"><option>standard</option><option>professional</option><option>enterprise</option></select>
|
||||
<input name="max_users" type="number" value="10" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<button class="rounded-xl bg-zinc-900 px-4 py-2 font-semibold text-white dark:bg-white dark:text-zinc-900">Issue</button>
|
||||
<select name="company_id" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
@foreach ($companies as $company)
|
||||
<option value="{{ $company->id }}">{{ $company->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input name="label" placeholder="Licence label"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<select name="plan" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<option>standard</option>
|
||||
<option>professional</option>
|
||||
<option>enterprise</option>
|
||||
</select>
|
||||
<input name="max_users" type="number" value="10"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<button
|
||||
class="rounded-xl bg-zinc-900 px-4 py-2 font-semibold text-white dark:bg-white dark:text-zinc-900">Issue</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="overflow-x-auto rounded-2xl bg-white shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-900 dark:ring-zinc-800"><table class="min-w-full text-sm"><thead><tr class="border-b"><th class="p-4 text-left">Company</th><th class="p-4 text-left">Label</th><th class="p-4 text-left">Plan</th><th class="p-4 text-left">Prefix</th><th class="p-4 text-left">Expires</th></tr></thead><tbody>@foreach($licenses as $license)<tr class="border-b border-zinc-100 dark:border-zinc-800"><td class="p-4">{{ $license->company->name }}</td><td class="p-4 font-semibold">{{ $license->label }}</td><td class="p-4">{{ $license->plan }}</td><td class="p-4"><code>{{ $license->key_prefix }}</code></td><td class="p-4">{{ optional($license->expires_at)->toDateString() }}</td></tr>@endforeach</tbody></table></div>
|
||||
<div
|
||||
class="overflow-x-auto rounded-2xl bg-white shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-900 dark:ring-zinc-800">
|
||||
<table class="min-w-full text-sm">
|
||||
<thead>
|
||||
<tr class="border-b">
|
||||
<th class="p-4 text-left">Company</th>
|
||||
<th class="p-4 text-left">Label</th>
|
||||
<th class="p-4 text-left">Plan</th>
|
||||
<th class="p-4 text-left">Prefix</th>
|
||||
<th class="p-4 text-left">Expires</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($licenses as $license)
|
||||
<tr class="border-b border-zinc-100 dark:border-zinc-800">
|
||||
<td class="p-4">{{ $license->company->name }}</td>
|
||||
<td class="p-4 font-semibold">{{ $license->label }}</td>
|
||||
<td class="p-4">{{ $license->plan }}</td>
|
||||
<td class="p-4"><code>{{ $license->key_prefix }}</code></td>
|
||||
<td class="p-4">{{ optional($license->expires_at)->toDateString() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ $licenses->links() }}
|
||||
</div>
|
||||
</x-layouts::app>
|
||||
|
||||
@@ -1,24 +1,58 @@
|
||||
<x-layouts::app :title="__('Payments')">
|
||||
<div class="space-y-6">
|
||||
<x-wms.page-hero
|
||||
eyebrow="Platform Administration"
|
||||
title="Payments and Overrides"
|
||||
<x-wms.page-hero eyebrow="Platform Administration" title="Payments and Overrides"
|
||||
description="Record platform payments, manual overrides and billing status by company."
|
||||
icon="fa-solid fa-credit-card"
|
||||
/>
|
||||
icon="fa-solid fa-credit-card" />
|
||||
<div class="rounded-3xl bg-white p-6 shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-900 dark:ring-zinc-800">
|
||||
<h2 class="text-lg font-bold text-zinc-900 dark:text-white">Add payment or override</h2>
|
||||
<form method="POST" action="{{ route('platform.payments.store') }}" class="mt-5 grid gap-4 md:grid-cols-6">
|
||||
@csrf
|
||||
<select name="company_id" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">@foreach($companies as $company)<option value="{{ $company->id }}">{{ $company->name }}</option>@endforeach</select>
|
||||
<input name="amount" type="number" value="0" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<input name="currency" value="gbp" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<select name="status" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950"><option>paid</option><option>pending</option><option>failed</option><option>refunded</option><option>override</option></select>
|
||||
<input name="description" placeholder="Description" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<button class="rounded-xl bg-zinc-900 px-4 py-2 font-semibold text-white dark:bg-white dark:text-zinc-900">Add</button>
|
||||
<select name="company_id" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
@foreach ($companies as $company)
|
||||
<option value="{{ $company->id }}">{{ $company->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input name="amount" type="number" value="0"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<input name="currency" value="gbp"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
|
||||
<select name="status" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<option>paid</option>
|
||||
<option>pending</option>
|
||||
<option>failed</option>
|
||||
<option>refunded</option>
|
||||
<option>override</option>
|
||||
</select>
|
||||
<input name="description" placeholder="Description"
|
||||
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
||||
<button
|
||||
class="rounded-xl bg-zinc-900 px-4 py-2 font-semibold text-white dark:bg-white dark:text-zinc-900">Add</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="overflow-x-auto rounded-2xl bg-white shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-900 dark:ring-zinc-800"><table class="min-w-full text-sm"><thead><tr class="border-b"><th class="p-4 text-left">Company</th><th class="p-4 text-left">Amount</th><th class="p-4 text-left">Status</th><th class="p-4 text-left">Description</th></tr></thead><tbody>@foreach($payments as $payment)<tr class="border-b border-zinc-100 dark:border-zinc-800"><td class="p-4">{{ $payment->company->name }}</td><td class="p-4 font-semibold">{{ strtoupper($payment->currency) }} {{ number_format($payment->amount / 100, 2) }}</td><td class="p-4">{{ $payment->status }}</td><td class="p-4">{{ $payment->description }}</td></tr>@endforeach</tbody></table></div>
|
||||
<div
|
||||
class="overflow-x-auto rounded-2xl bg-white shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-900 dark:ring-zinc-800">
|
||||
<table class="min-w-full text-sm">
|
||||
<thead>
|
||||
<tr class="border-b">
|
||||
<th class="p-4 text-left">Company</th>
|
||||
<th class="p-4 text-left">Amount</th>
|
||||
<th class="p-4 text-left">Status</th>
|
||||
<th class="p-4 text-left">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($payments as $payment)
|
||||
<tr class="border-b border-zinc-100 dark:border-zinc-800">
|
||||
<td class="p-4">{{ $payment->company->name }}</td>
|
||||
<td class="p-4 font-semibold">{{ strtoupper($payment->currency) }}
|
||||
{{ number_format($payment->amount / 100, 2) }}</td>
|
||||
<td class="p-4">{{ $payment->status }}</td>
|
||||
<td class="p-4">{{ $payment->description }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ $payments->links() }}
|
||||
</div>
|
||||
</x-layouts::app>
|
||||
|
||||
@@ -5,72 +5,120 @@
|
||||
<div class="grid gap-5 lg:grid-cols-2">
|
||||
<div>
|
||||
<label for="name" class="text-sm font-semibold text-zinc-700 dark:text-zinc-200">Name</label>
|
||||
<input id="name" name="name" value="{{ old('name', $price->name) }}" required class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950" placeholder="Basic">
|
||||
@error('name')<p class="mt-1 text-sm text-red-500">{{ $message }}</p>@enderror
|
||||
<input id="name" name="name" value="{{ old('name', $price->name) }}" required
|
||||
class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950"
|
||||
placeholder="Basic">
|
||||
@error('name')
|
||||
<p class="mt-1 text-sm text-red-500">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="code" class="text-sm font-semibold text-zinc-700 dark:text-zinc-200">Code</label>
|
||||
<input id="code" name="code" value="{{ old('code', $price->code) }}" class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950" placeholder="basic">
|
||||
@error('code')<p class="mt-1 text-sm text-red-500">{{ $message }}</p>@enderror
|
||||
<input id="code" name="code" value="{{ old('code', $price->code) }}"
|
||||
class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950"
|
||||
placeholder="basic">
|
||||
@error('code')
|
||||
<p class="mt-1 text-sm text-red-500">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="strapline" class="text-sm font-semibold text-zinc-700 dark:text-zinc-200">Strapline</label>
|
||||
<input id="strapline" name="strapline" value="{{ old('strapline', $price->strapline) }}" class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950" placeholder="Core warehouse visibility">
|
||||
@error('strapline')<p class="mt-1 text-sm text-red-500">{{ $message }}</p>@enderror
|
||||
<input id="strapline" name="strapline" value="{{ old('strapline', $price->strapline) }}"
|
||||
class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950"
|
||||
placeholder="Core warehouse visibility">
|
||||
@error('strapline')
|
||||
<p class="mt-1 text-sm text-red-500">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="badge_label" class="text-sm font-semibold text-zinc-700 dark:text-zinc-200">Badge label</label>
|
||||
<input id="badge_label" name="badge_label" value="{{ old('badge_label', $price->badge_label) }}" class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950" placeholder="Popular">
|
||||
@error('badge_label')<p class="mt-1 text-sm text-red-500">{{ $message }}</p>@enderror
|
||||
<input id="badge_label" name="badge_label" value="{{ old('badge_label', $price->badge_label) }}"
|
||||
class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950"
|
||||
placeholder="Popular">
|
||||
@error('badge_label')
|
||||
<p class="mt-1 text-sm text-red-500">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="monthly_amount" class="text-sm font-semibold text-zinc-700 dark:text-zinc-200">Monthly price</label>
|
||||
<input id="monthly_amount" name="monthly_amount" type="number" step="0.01" min="0" value="{{ old('monthly_amount', $price->exists ? number_format($price->monthly_amount / 100, 2, '.', '') : '0.00') }}" required class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950" placeholder="99.00">
|
||||
@error('monthly_amount')<p class="mt-1 text-sm text-red-500">{{ $message }}</p>@enderror
|
||||
<input id="monthly_amount" name="monthly_amount" type="number" step="0.01" min="0"
|
||||
value="{{ old('monthly_amount', $price->exists ? number_format($price->monthly_amount / 100, 2, '.', '') : '0.00') }}"
|
||||
required
|
||||
class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950"
|
||||
placeholder="99.00">
|
||||
@error('monthly_amount')
|
||||
<p class="mt-1 text-sm text-red-500">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="annual_amount" class="text-sm font-semibold text-zinc-700 dark:text-zinc-200">Annual price</label>
|
||||
<input id="annual_amount" name="annual_amount" type="number" step="0.01" min="0" value="{{ old('annual_amount', $price->annual_amount !== null ? number_format($price->annual_amount / 100, 2, '.', '') : '') }}" class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950" placeholder="990.00">
|
||||
@error('annual_amount')<p class="mt-1 text-sm text-red-500">{{ $message }}</p>@enderror
|
||||
<input id="annual_amount" name="annual_amount" type="number" step="0.01" min="0"
|
||||
value="{{ old('annual_amount', $price->annual_amount !== null ? number_format($price->annual_amount / 100, 2, '.', '') : '') }}"
|
||||
class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950"
|
||||
placeholder="990.00">
|
||||
@error('annual_amount')
|
||||
<p class="mt-1 text-sm text-red-500">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="currency" class="text-sm font-semibold text-zinc-700 dark:text-zinc-200">Currency</label>
|
||||
<input id="currency" name="currency" value="{{ old('currency', $price->currency ?: 'gbp') }}" maxlength="3" required class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm uppercase dark:border-zinc-700 dark:bg-zinc-950" placeholder="gbp">
|
||||
@error('currency')<p class="mt-1 text-sm text-red-500">{{ $message }}</p>@enderror
|
||||
<input id="currency" name="currency" value="{{ old('currency', $price->currency ?: 'gbp') }}" maxlength="3"
|
||||
required
|
||||
class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm uppercase dark:border-zinc-700 dark:bg-zinc-950"
|
||||
placeholder="gbp">
|
||||
@error('currency')
|
||||
<p class="mt-1 text-sm text-red-500">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="sort_order" class="text-sm font-semibold text-zinc-700 dark:text-zinc-200">Sort order</label>
|
||||
<input id="sort_order" name="sort_order" type="number" min="0" value="{{ old('sort_order', $price->sort_order ?? 0) }}" required class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950">
|
||||
@error('sort_order')<p class="mt-1 text-sm text-red-500">{{ $message }}</p>@enderror
|
||||
<input id="sort_order" name="sort_order" type="number" min="0"
|
||||
value="{{ old('sort_order', $price->sort_order ?? 0) }}" required
|
||||
class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950">
|
||||
@error('sort_order')
|
||||
<p class="mt-1 text-sm text-red-500">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="lg:col-span-2">
|
||||
<label for="description" class="text-sm font-semibold text-zinc-700 dark:text-zinc-200">Description</label>
|
||||
<textarea id="description" name="description" rows="3" class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950" placeholder="Short customer-facing description">{{ old('description', $price->description) }}</textarea>
|
||||
@error('description')<p class="mt-1 text-sm text-red-500">{{ $message }}</p>@enderror
|
||||
<textarea id="description" name="description" rows="3"
|
||||
class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950"
|
||||
placeholder="Short customer-facing description">{{ old('description', $price->description) }}</textarea>
|
||||
@error('description')
|
||||
<p class="mt-1 text-sm text-red-500">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="lg:col-span-2">
|
||||
<label for="features" class="text-sm font-semibold text-zinc-700 dark:text-zinc-200">Features</label>
|
||||
<textarea id="features" name="features" rows="6" class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950" placeholder="One feature per line">{{ $featuresText }}</textarea>
|
||||
@error('features')<p class="mt-1 text-sm text-red-500">{{ $message }}</p>@enderror
|
||||
<textarea id="features" name="features" rows="6"
|
||||
class="mt-2 w-full rounded-xl border-zinc-300 bg-white px-4 py-3 text-sm dark:border-zinc-700 dark:bg-zinc-950"
|
||||
placeholder="One feature per line">{{ $featuresText }}</textarea>
|
||||
@error('features')
|
||||
<p class="mt-1 text-sm text-red-500">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap gap-4 lg:col-span-2">
|
||||
<label class="inline-flex items-center gap-2 rounded-xl border border-zinc-200 bg-zinc-50 px-4 py-3 text-sm font-semibold dark:border-zinc-800 dark:bg-zinc-950">
|
||||
<input type="checkbox" name="is_featured" value="1" @checked(old('is_featured', $price->is_featured)) class="rounded border-zinc-300">
|
||||
<label
|
||||
class="inline-flex items-center gap-2 rounded-xl border border-zinc-200 bg-zinc-50 px-4 py-3 text-sm font-semibold dark:border-zinc-800 dark:bg-zinc-950">
|
||||
<input type="checkbox" name="is_featured" value="1" @checked(old('is_featured', $price->is_featured))
|
||||
class="rounded border-zinc-300">
|
||||
Featured price
|
||||
</label>
|
||||
|
||||
<label class="inline-flex items-center gap-2 rounded-xl border border-zinc-200 bg-zinc-50 px-4 py-3 text-sm font-semibold dark:border-zinc-800 dark:bg-zinc-950">
|
||||
<input type="checkbox" name="is_active" value="1" @checked(old('is_active', $price->is_active ?? true)) class="rounded border-zinc-300">
|
||||
<label
|
||||
class="inline-flex items-center gap-2 rounded-xl border border-zinc-200 bg-zinc-50 px-4 py-3 text-sm font-semibold dark:border-zinc-800 dark:bg-zinc-950">
|
||||
<input type="checkbox" name="is_active" value="1" @checked(old('is_active', $price->is_active ?? true))
|
||||
class="rounded border-zinc-300">
|
||||
Active
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<x-layouts::app :title="__('Create Price')">
|
||||
<div class="space-y-6">
|
||||
<x-wms.page-hero
|
||||
eyebrow="Administration"
|
||||
title="Create Price"
|
||||
<x-wms.page-hero eyebrow="Administration" title="Create Price"
|
||||
description="Add a professional pricing card with billing values, feature bullets and visibility controls."
|
||||
icon="fa-solid fa-circle-plus"
|
||||
>
|
||||
<a href="{{ route('platform.prices.index') }}" wire:navigate class="rounded-xl bg-white px-4 py-3 text-sm font-bold text-slate-950 shadow-lg hover:bg-cyan-50">
|
||||
icon="fa-solid fa-circle-plus">
|
||||
<a href="{{ route('platform.prices.index') }}" wire:navigate
|
||||
class="rounded-xl bg-white px-4 py-3 text-sm font-bold text-slate-950 shadow-lg hover:bg-cyan-50">
|
||||
Back to prices
|
||||
</a>
|
||||
</x-wms.page-hero>
|
||||
@@ -16,10 +14,12 @@
|
||||
@include('platform::prices._form')
|
||||
|
||||
<div class="flex flex-wrap justify-end gap-3 border-t border-zinc-100 pt-5 dark:border-zinc-800">
|
||||
<a href="{{ route('platform.prices.index') }}" wire:navigate class="rounded-xl border border-zinc-200 px-5 py-3 text-sm font-semibold text-zinc-700 dark:border-zinc-700 dark:text-zinc-200">
|
||||
<a href="{{ route('platform.prices.index') }}" wire:navigate
|
||||
class="rounded-xl border border-zinc-200 px-5 py-3 text-sm font-semibold text-zinc-700 dark:border-zinc-700 dark:text-zinc-200">
|
||||
Cancel
|
||||
</a>
|
||||
<button type="submit" class="rounded-xl bg-cyan-600 px-5 py-3 text-sm font-bold text-white shadow-lg shadow-cyan-950/20 hover:bg-cyan-500">
|
||||
<button type="submit"
|
||||
class="rounded-xl bg-cyan-600 px-5 py-3 text-sm font-bold text-white shadow-lg shadow-cyan-950/20 hover:bg-cyan-500">
|
||||
Create price
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<x-layouts::app :title="__('Edit Price')">
|
||||
<div class="space-y-6">
|
||||
<x-wms.page-hero
|
||||
eyebrow="Administration"
|
||||
:title="'Edit ' . $price->name"
|
||||
<x-wms.page-hero eyebrow="Administration" :title="'Edit ' . $price->name"
|
||||
description="Update pricing, feature text and card visibility while keeping the platform pricing display consistent."
|
||||
icon="fa-solid fa-pen-to-square"
|
||||
>
|
||||
<a href="{{ route('platform.prices.index') }}" wire:navigate class="rounded-xl bg-white px-4 py-3 text-sm font-bold text-slate-950 shadow-lg hover:bg-cyan-50">
|
||||
icon="fa-solid fa-pen-to-square">
|
||||
<a href="{{ route('platform.prices.index') }}" wire:navigate
|
||||
class="rounded-xl bg-white px-4 py-3 text-sm font-bold text-slate-950 shadow-lg hover:bg-cyan-50">
|
||||
Back to prices
|
||||
</a>
|
||||
</x-wms.page-hero>
|
||||
@@ -17,10 +15,12 @@
|
||||
@include('platform::prices._form')
|
||||
|
||||
<div class="flex flex-wrap justify-end gap-3 border-t border-zinc-100 pt-5 dark:border-zinc-800">
|
||||
<a href="{{ route('platform.prices.index') }}" wire:navigate class="rounded-xl border border-zinc-200 px-5 py-3 text-sm font-semibold text-zinc-700 dark:border-zinc-700 dark:text-zinc-200">
|
||||
<a href="{{ route('platform.prices.index') }}" wire:navigate
|
||||
class="rounded-xl border border-zinc-200 px-5 py-3 text-sm font-semibold text-zinc-700 dark:border-zinc-700 dark:text-zinc-200">
|
||||
Cancel
|
||||
</a>
|
||||
<button type="submit" class="rounded-xl bg-cyan-600 px-5 py-3 text-sm font-bold text-white shadow-lg shadow-cyan-950/20 hover:bg-cyan-500">
|
||||
<button type="submit"
|
||||
class="rounded-xl bg-cyan-600 px-5 py-3 text-sm font-bold text-white shadow-lg shadow-cyan-950/20 hover:bg-cyan-500">
|
||||
Save changes
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
<x-layouts::app :title="__('Platform Prices')">
|
||||
<div class="space-y-6">
|
||||
<x-wms.page-hero
|
||||
eyebrow="Administration"
|
||||
title="Pricing Administration"
|
||||
<x-wms.page-hero eyebrow="Administration" title="Pricing Administration"
|
||||
description="Create, edit and publish the platform pricing cards shown under Platform."
|
||||
icon="fa-solid fa-tags"
|
||||
>
|
||||
<a href="{{ route('platform.prices.create') }}" wire:navigate class="rounded-xl bg-white px-4 py-3 text-sm font-bold text-slate-950 shadow-lg hover:bg-cyan-50">
|
||||
icon="fa-solid fa-tags">
|
||||
<a href="{{ route('platform.prices.create') }}" wire:navigate
|
||||
class="rounded-xl bg-white px-4 py-3 text-sm font-bold text-slate-950 shadow-lg hover:bg-cyan-50">
|
||||
Add price
|
||||
</a>
|
||||
</x-wms.page-hero>
|
||||
@if (session('status'))
|
||||
<div class="rounded-2xl border border-emerald-200 bg-emerald-50 px-5 py-4 text-sm font-semibold text-emerald-800 dark:border-emerald-900/60 dark:bg-emerald-950/40 dark:text-emerald-200">
|
||||
<div
|
||||
class="rounded-2xl border border-emerald-200 bg-emerald-50 px-5 py-4 text-sm font-semibold text-emerald-800 dark:border-emerald-900/60 dark:bg-emerald-950/40 dark:text-emerald-200">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
@@ -23,12 +22,16 @@
|
||||
$isAdvanced = $price->code === 'advanced';
|
||||
$headerClass = $isAdvanced
|
||||
? 'from-cyan-500 to-blue-600'
|
||||
: ($isBasic ? 'from-slate-700 to-slate-900' : 'from-indigo-600 to-violet-700');
|
||||
: ($isBasic
|
||||
? 'from-slate-700 to-slate-900'
|
||||
: 'from-indigo-600 to-violet-700');
|
||||
@endphp
|
||||
|
||||
<article class="relative overflow-hidden rounded-3xl border border-zinc-200 bg-white shadow-sm transition hover:-translate-y-0.5 hover:shadow-xl dark:border-zinc-800 dark:bg-zinc-900">
|
||||
<article
|
||||
class="relative overflow-hidden rounded-3xl border border-zinc-200 bg-white shadow-sm transition hover:-translate-y-0.5 hover:shadow-xl dark:border-zinc-800 dark:bg-zinc-900">
|
||||
@if ($price->is_featured)
|
||||
<div class="absolute right-4 top-4 z-10 rounded-full bg-white px-3 py-1 text-xs font-extrabold uppercase tracking-wide text-cyan-700 shadow">
|
||||
<div
|
||||
class="absolute right-4 top-4 z-10 rounded-full bg-white px-3 py-1 text-xs font-extrabold uppercase tracking-wide text-cyan-700 shadow">
|
||||
Featured
|
||||
</div>
|
||||
@endif
|
||||
@@ -42,8 +45,10 @@
|
||||
<h2 class="mt-2 text-2xl font-black tracking-tight">{{ $price->name }}</h2>
|
||||
</div>
|
||||
|
||||
<span class="grid h-11 w-11 place-items-center rounded-2xl bg-white/15 text-lg backdrop-blur">
|
||||
<i class="fa-solid {{ $isBasic ? 'fa-box' : ($isAdvanced ? 'fa-layer-group' : 'fa-crown') }}" aria-hidden="true"></i>
|
||||
<span
|
||||
class="grid h-11 w-11 place-items-center rounded-2xl bg-white/15 text-lg backdrop-blur">
|
||||
<i class="fa-solid {{ $isBasic ? 'fa-box' : ($isAdvanced ? 'fa-layer-group' : 'fa-crown') }}"
|
||||
aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -78,19 +83,24 @@
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<div class="mt-6 flex items-center justify-between gap-3 border-t border-zinc-100 pt-4 dark:border-zinc-800">
|
||||
<span class="rounded-full px-3 py-1 text-xs font-bold {{ $price->is_active ? 'bg-emerald-100 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-200' : 'bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-300' }}">
|
||||
<div
|
||||
class="mt-6 flex items-center justify-between gap-3 border-t border-zinc-100 pt-4 dark:border-zinc-800">
|
||||
<span
|
||||
class="rounded-full px-3 py-1 text-xs font-bold {{ $price->is_active ? 'bg-emerald-100 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-200' : 'bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-300' }}">
|
||||
{{ $price->is_active ? 'Active' : 'Hidden' }}
|
||||
</span>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('platform.prices.edit', $price) }}" wire:navigate class="rounded-lg border border-zinc-200 px-3 py-2 text-sm font-semibold text-zinc-700 hover:border-cyan-400 hover:text-cyan-700 dark:border-zinc-700 dark:text-zinc-200">
|
||||
<a href="{{ route('platform.prices.edit', $price) }}" wire:navigate
|
||||
class="rounded-lg border border-zinc-200 px-3 py-2 text-sm font-semibold text-zinc-700 hover:border-cyan-400 hover:text-cyan-700 dark:border-zinc-700 dark:text-zinc-200">
|
||||
Edit
|
||||
</a>
|
||||
<form method="POST" action="{{ route('platform.prices.destroy', $price) }}" onsubmit="return confirm('Delete this price?');">
|
||||
<form method="POST" action="{{ route('platform.prices.destroy', $price) }}"
|
||||
onsubmit="return confirm('Delete this price?');">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="rounded-lg border border-red-200 px-3 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 dark:border-red-900/70 dark:hover:bg-red-950/40">
|
||||
<button type="submit"
|
||||
class="rounded-lg border border-red-200 px-3 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 dark:border-red-900/70 dark:hover:bg-red-950/40">
|
||||
Delete
|
||||
</button>
|
||||
</form>
|
||||
@@ -99,7 +109,8 @@
|
||||
</div>
|
||||
</article>
|
||||
@empty
|
||||
<article class="rounded-3xl border border-dashed border-zinc-300 bg-white p-6 text-sm text-zinc-500 shadow-sm dark:border-zinc-700 dark:bg-zinc-900 lg:col-span-3">
|
||||
<article
|
||||
class="rounded-3xl border border-dashed border-zinc-300 bg-white p-6 text-sm text-zinc-500 shadow-sm dark:border-zinc-700 dark:bg-zinc-900 lg:col-span-3">
|
||||
No pricing plans have been created yet.
|
||||
</article>
|
||||
@endforelse
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
<x-layouts::app :title="__('Pricing')">
|
||||
<div class="space-y-6">
|
||||
<x-wms.page-hero
|
||||
eyebrow="Platform"
|
||||
title="Pricing"
|
||||
description="Clear platform pricing for Basic, Advanced and Pro access."
|
||||
icon="fa-solid fa-tags"
|
||||
/>
|
||||
<x-wms.page-hero eyebrow="Platform" title="Pricing"
|
||||
description="Clear platform pricing for Basic, Advanced and Pro access." icon="fa-solid fa-tags" />
|
||||
<section class="grid gap-5 lg:grid-cols-3">
|
||||
@forelse ($prices as $price)
|
||||
@php
|
||||
@@ -13,22 +9,30 @@
|
||||
$isAdvanced = $price->code === 'advanced';
|
||||
$headerClass = $isAdvanced
|
||||
? 'from-cyan-500 to-blue-600'
|
||||
: ($isBasic ? 'from-slate-700 to-slate-950' : 'from-indigo-600 to-violet-700');
|
||||
: ($isBasic
|
||||
? 'from-slate-700 to-slate-950'
|
||||
: 'from-indigo-600 to-violet-700');
|
||||
@endphp
|
||||
|
||||
<article class="relative overflow-hidden rounded-3xl border border-zinc-200 bg-white shadow-sm transition hover:-translate-y-0.5 hover:shadow-xl dark:border-zinc-800 dark:bg-zinc-900">
|
||||
<article
|
||||
class="relative overflow-hidden rounded-3xl border border-zinc-200 bg-white shadow-sm transition hover:-translate-y-0.5 hover:shadow-xl dark:border-zinc-800 dark:bg-zinc-900">
|
||||
@if ($price->is_featured)
|
||||
<div class="absolute right-4 top-4 z-10 rounded-full bg-white px-3 py-1 text-xs font-extrabold uppercase tracking-wide text-cyan-700 shadow">{{ $price->badge_label ?: 'Popular' }}</div>
|
||||
<div
|
||||
class="absolute right-4 top-4 z-10 rounded-full bg-white px-3 py-1 text-xs font-extrabold uppercase tracking-wide text-cyan-700 shadow">
|
||||
{{ $price->badge_label ?: 'Popular' }}</div>
|
||||
@endif
|
||||
|
||||
<div class="bg-gradient-to-br {{ $headerClass }} p-6 text-white">
|
||||
<div class="flex items-start justify-between gap-4">
|
||||
<div>
|
||||
<p class="text-xs font-bold uppercase tracking-[0.24em] text-white/70">{{ $price->badge_label ?: 'Plan' }}</p>
|
||||
<p class="text-xs font-bold uppercase tracking-[0.24em] text-white/70">
|
||||
{{ $price->badge_label ?: 'Plan' }}</p>
|
||||
<h2 class="mt-2 text-3xl font-black tracking-tight">{{ $price->name }}</h2>
|
||||
</div>
|
||||
<span class="grid h-12 w-12 place-items-center rounded-2xl bg-white/15 text-xl backdrop-blur">
|
||||
<i class="fa-solid {{ $isBasic ? 'fa-box' : ($isAdvanced ? 'fa-layer-group' : 'fa-crown') }}" aria-hidden="true"></i>
|
||||
<span
|
||||
class="grid h-12 w-12 place-items-center rounded-2xl bg-white/15 text-xl backdrop-blur">
|
||||
<i class="fa-solid {{ $isBasic ? 'fa-box' : ($isAdvanced ? 'fa-layer-group' : 'fa-crown') }}"
|
||||
aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
<p class="mt-4 text-sm leading-6 text-white/80">{{ $price->strapline }}</p>
|
||||
@@ -36,15 +40,19 @@
|
||||
|
||||
<div class="p-6">
|
||||
<div class="flex items-end gap-2">
|
||||
<span class="text-4xl font-black tracking-tight text-zinc-950 dark:text-white">{{ $price->formatAmount($price->monthly_amount) }}</span>
|
||||
<span
|
||||
class="text-4xl font-black tracking-tight text-zinc-950 dark:text-white">{{ $price->formatAmount($price->monthly_amount) }}</span>
|
||||
<span class="pb-1 text-sm font-semibold text-zinc-500">/ month</span>
|
||||
</div>
|
||||
|
||||
@if ($price->annual_amount)
|
||||
<p class="mt-2 text-sm text-zinc-500">Annual: <span class="font-semibold text-zinc-700 dark:text-zinc-200">{{ $price->formatAmount($price->annual_amount) }}</span></p>
|
||||
<p class="mt-2 text-sm text-zinc-500">Annual: <span
|
||||
class="font-semibold text-zinc-700 dark:text-zinc-200">{{ $price->formatAmount($price->annual_amount) }}</span>
|
||||
</p>
|
||||
@endif
|
||||
|
||||
<p class="mt-4 min-h-12 text-sm leading-6 text-zinc-600 dark:text-zinc-300">{{ $price->description }}</p>
|
||||
<p class="mt-4 min-h-12 text-sm leading-6 text-zinc-600 dark:text-zinc-300">
|
||||
{{ $price->description }}</p>
|
||||
|
||||
<ul class="mt-5 space-y-3 text-sm text-zinc-700 dark:text-zinc-200">
|
||||
@foreach ($price->featureRows() as $feature)
|
||||
@@ -57,9 +65,11 @@
|
||||
</div>
|
||||
</article>
|
||||
@empty
|
||||
<article class="rounded-3xl border border-zinc-200 bg-white p-6 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
|
||||
<article
|
||||
class="rounded-3xl border border-zinc-200 bg-white p-6 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
|
||||
<h2 class="text-xl font-bold">No active prices</h2>
|
||||
<p class="mt-2 text-sm text-zinc-500">Add active pricing records from Administration to populate this page.</p>
|
||||
<p class="mt-2 text-sm text-zinc-500">Add active pricing records from Administration to populate
|
||||
this page.</p>
|
||||
</article>
|
||||
@endforelse
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user