This commit is contained in:
Mark Gregory
2026-06-11 10:58:34 +01:00
parent 6d081cab5b
commit 0e83986850
13 changed files with 725 additions and 426 deletions
Vendored
BIN
View File
Binary file not shown.
@@ -11,6 +11,20 @@ use Modules\Platform\app\Models\PlatformPrice;
class PlatformPriceController extends Controller class PlatformPriceController extends Controller
{ {
/**
* Display the customer-facing platform pricing cards.
*/
public function publicIndex(): View
{
return view('platform::prices.public', [
'prices' => PlatformPrice::query()
->where('is_active', true)
->ordered()
->get(),
]);
}
/** /**
* Display platform prices in a card grid with administration actions. * Display platform prices in a card grid with administration actions.
*/ */
@@ -1,15 +1,14 @@
<x-layouts::app :title="__('Create Price')"> <x-layouts::app :title="__('Create Price')">
<div class="space-y-6"> <div class="space-y-6">
<section class="overflow-hidden rounded-3xl bg-gradient-to-br from-slate-950 via-slate-900 to-cyan-950 p-5 text-white shadow-xl sm:p-6"> <div class="flex flex-wrap items-center justify-between gap-3">
<div class="flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between"> <p class="text-sm font-semibold text-zinc-500 dark:text-zinc-400">
<div> Add a new platform pricing card with billing values, feature bullets and status controls.
<p class="text-xs font-semibold uppercase tracking-[0.28em] text-cyan-300">Administration</p> </p>
<h1 class="mt-2 text-2xl font-bold tracking-tight sm:text-3xl">Create price</h1>
<p class="mt-2 max-w-2xl text-sm leading-6 text-slate-300">Add a new platform pricing card with billing values, feature bullets and status controls.</p> <a href="{{ route('platform.prices.index') }}" wire:navigate class="rounded-xl border border-zinc-200 bg-white px-4 py-2 text-sm font-semibold text-zinc-700 shadow-sm hover:border-cyan-400 hover:text-cyan-700 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-200">
Back to prices
</a>
</div> </div>
<a href="{{ route('platform.prices.index') }}" wire:navigate class="rounded-xl border border-white/15 bg-white/10 px-4 py-2 text-sm font-semibold text-white backdrop-blur hover:bg-white/15">Back to prices</a>
</div>
</section>
<section class="rounded-3xl border border-zinc-200 bg-white p-6 shadow-sm dark:border-zinc-800 dark:bg-zinc-900"> <section class="rounded-3xl border border-zinc-200 bg-white p-6 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
<form method="POST" action="{{ route('platform.prices.store') }}" class="space-y-6"> <form method="POST" action="{{ route('platform.prices.store') }}" class="space-y-6">
@@ -17,8 +16,12 @@
@include('platform::prices._form') @include('platform::prices._form')
<div class="flex flex-wrap justify-end gap-3 border-t border-zinc-100 pt-5 dark:border-zinc-800"> <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">Cancel</a> <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">
<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> 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">
Create price
</button>
</div> </div>
</form> </form>
</section> </section>
@@ -1,15 +1,14 @@
<x-layouts::app :title="__('Edit Price')"> <x-layouts::app :title="__('Edit Price')">
<div class="space-y-6"> <div class="space-y-6">
<section class="overflow-hidden rounded-3xl bg-gradient-to-br from-slate-950 via-slate-900 to-cyan-950 p-5 text-white shadow-xl sm:p-6"> <div class="flex flex-wrap items-center justify-between gap-3">
<div class="flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between"> <p class="text-sm font-semibold text-zinc-500 dark:text-zinc-400">
<div> Update {{ $price->name }} pricing, feature list and visibility settings.
<p class="text-xs font-semibold uppercase tracking-[0.28em] text-cyan-300">Administration</p> </p>
<h1 class="mt-2 text-2xl font-bold tracking-tight sm:text-3xl">Edit {{ $price->name }}</h1>
<p class="mt-2 max-w-2xl text-sm leading-6 text-slate-300">Update the pricing card, feature list and visibility settings without changing the rest of the platform.</p> <a href="{{ route('platform.prices.index') }}" wire:navigate class="rounded-xl border border-zinc-200 bg-white px-4 py-2 text-sm font-semibold text-zinc-700 shadow-sm hover:border-cyan-400 hover:text-cyan-700 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-200">
Back to prices
</a>
</div> </div>
<a href="{{ route('platform.prices.index') }}" wire:navigate class="rounded-xl border border-white/15 bg-white/10 px-4 py-2 text-sm font-semibold text-white backdrop-blur hover:bg-white/15">Back to prices</a>
</div>
</section>
<section class="rounded-3xl border border-zinc-200 bg-white p-6 shadow-sm dark:border-zinc-800 dark:bg-zinc-900"> <section class="rounded-3xl border border-zinc-200 bg-white p-6 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
<form method="POST" action="{{ route('platform.prices.update', $price) }}" class="space-y-6"> <form method="POST" action="{{ route('platform.prices.update', $price) }}" class="space-y-6">
@@ -18,8 +17,12 @@
@include('platform::prices._form') @include('platform::prices._form')
<div class="flex flex-wrap justify-end gap-3 border-t border-zinc-100 pt-5 dark:border-zinc-800"> <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">Cancel</a> <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">
<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> 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">
Save changes
</button>
</div> </div>
</form> </form>
</section> </section>
@@ -1,18 +1,21 @@
<x-layouts::app :title="__('Platform Prices')"> <x-layouts::app :title="__('Platform Pricing')">
<div class="space-y-6"> <div class="space-y-6">
<section class="overflow-hidden rounded-3xl bg-gradient-to-br from-slate-950 via-slate-900 to-cyan-950 p-5 text-white shadow-xl sm:p-6"> <div class="flex flex-wrap items-center justify-between gap-3">
<div class="flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between">
<div> <div>
<p class="text-xs font-semibold uppercase tracking-[0.28em] text-cyan-300">Platform</p> <p class="text-sm font-semibold text-zinc-500 dark:text-zinc-400">
<h1 class="mt-2 text-2xl font-bold tracking-tight sm:text-3xl">Pricing plans</h1> Customer-facing plan cards managed from Platform.
<p class="mt-2 max-w-2xl text-sm leading-6 text-slate-300">Maintain customer-facing Basic, Advanced and Pro pricing from one administration page.</p> </p>
</div> </div>
<div class="flex flex-wrap gap-3"> <div class="flex flex-wrap gap-3">
<a href="{{ route('platform.dashboard') }}" wire:navigate class="rounded-xl border border-white/15 bg-white/10 px-4 py-2 text-sm font-semibold text-white backdrop-blur hover:bg-white/15">Platform dashboard</a> <a href="{{ route('platform.dashboard') }}" wire:navigate class="rounded-xl border border-zinc-200 bg-white px-4 py-2 text-sm font-semibold text-zinc-700 shadow-sm hover:border-cyan-400 hover:text-cyan-700 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-200">
<a href="{{ route('platform.prices.create') }}" wire:navigate class="rounded-xl bg-cyan-300 px-4 py-2 text-sm font-bold text-slate-950 shadow-lg shadow-cyan-950/30 hover:bg-cyan-200">Add price</a> Platform dashboard
</a>
<a href="{{ route('platform.prices.create') }}" wire:navigate class="rounded-xl bg-cyan-500 px-4 py-2 text-sm font-bold text-slate-950 shadow-lg shadow-cyan-950/20 hover:bg-cyan-400">
Add price
</a>
</div> </div>
</div> </div>
</section>
@if (session('status')) @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">
@@ -29,31 +32,49 @@
? 'from-cyan-500 to-blue-600' ? '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 @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) @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">Featured</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">
Featured
</div>
@endif @endif
<div class="bg-gradient-to-br {{ $headerClass }} p-5 text-white"> <div class="bg-gradient-to-br {{ $headerClass }} p-5 text-white">
<div class="flex items-start justify-between gap-4"> <div class="flex items-start justify-between gap-4">
<div> <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-2xl font-black tracking-tight">{{ $price->name }}</h2> <h2 class="mt-2 text-2xl font-black tracking-tight">{{ $price->name }}</h2>
</div> </div>
<span class="grid h-11 w-11 place-items-center rounded-2xl bg-white/15 text-lg backdrop-blur"> <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> <i class="fa-solid {{ $isBasic ? 'fa-box' : ($isAdvanced ? 'fa-layer-group' : 'fa-crown') }}" aria-hidden="true"></i>
</span> </span>
</div> </div>
<p class="mt-3 text-sm leading-6 text-white/80">{{ $price->strapline }}</p> <p class="mt-3 text-sm leading-6 text-white/80">{{ $price->strapline }}</p>
</div> </div>
<div class="p-5"> <div class="p-5">
<div class="flex items-end gap-2"> <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> <span class="pb-1 text-sm font-semibold text-zinc-500">/ month</span>
</div> </div>
<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-4 min-h-12 text-sm leading-6 text-zinc-600 dark:text-zinc-300">{{ $price->description }}</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>
<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"> <ul class="mt-5 space-y-3 text-sm text-zinc-700 dark:text-zinc-200">
@foreach ($price->featureRows() as $feature) @foreach ($price->featureRows() as $feature)
@@ -68,12 +89,17 @@
<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' }}"> <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' }} {{ $price->is_active ? 'Active' : 'Hidden' }}
</span> </span>
<div class="flex items-center gap-2"> <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">Edit</a> <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 @csrf
@method('DELETE') @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">Delete</button> <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> </form>
</div> </div>
</div> </div>
@@ -0,0 +1,85 @@
<x-layouts::app :title="__('Pricing')">
<div class="space-y-6">
<section class="overflow-hidden rounded-3xl bg-gradient-to-br from-slate-950 via-slate-900 to-cyan-950 p-6 text-white shadow-xl sm:p-8">
<div class="flex flex-col gap-6 lg:flex-row lg:items-center lg:justify-between">
<div>
<p class="text-sm font-semibold uppercase tracking-[0.3em] text-cyan-300">Platform</p>
<h1 class="mt-3 text-3xl font-bold tracking-tight sm:text-5xl">Platform pricing</h1>
<p class="mt-3 max-w-2xl text-slate-300">Choose the right WMS plan for warehouse visibility, operational control and enterprise-grade administration.</p>
</div>
<div class="grid gap-3 sm:min-w-80 sm:grid-cols-2">
<div class="rounded-2xl bg-white/10 p-4 backdrop-blur">
<p class="text-sm text-slate-300">Plans</p>
<p class="mt-2 flex items-center gap-2 text-2xl font-bold text-emerald-300">
<i class="fa-solid fa-layer-group" aria-hidden="true"></i>
{{ $prices->count() }}
</p>
</div>
<div class="rounded-2xl bg-white/10 p-4 backdrop-blur">
<p class="text-sm text-slate-300">Billing</p>
<p class="mt-2 text-2xl font-bold">Monthly</p>
</div>
</div>
</div>
</section>
<section class="grid gap-5 lg:grid-cols-3">
@forelse ($prices as $price)
@php
$isBasic = $price->code === 'basic';
$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');
@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">
@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>
@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>
<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>
</div>
<p class="mt-4 text-sm leading-6 text-white/80">{{ $price->strapline }}</p>
</div>
<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="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>
@endif
<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)
<li class="flex gap-3">
<i class="fa-solid fa-check mt-1 text-cyan-500" aria-hidden="true"></i>
<span>{{ $feature }}</span>
</li>
@endforeach
</ul>
</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">
<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>
</article>
@endforelse
</section>
</div>
</x-layouts::app>
+8
View File
@@ -8,6 +8,14 @@ use Modules\Platform\app\Http\Controllers\PlatformDashboardController;
use Modules\Platform\app\Http\Controllers\PlatformPriceController; use Modules\Platform\app\Http\Controllers\PlatformPriceController;
use Modules\Platform\app\Http\Controllers\StripeWebhookController; use Modules\Platform\app\Http\Controllers\StripeWebhookController;
Route::middleware(['auth', 'verified', 'tenant.assigned'])
->prefix('platform')
->name('platform.')
->group(function (): void {
Route::get('/pricing', [PlatformPriceController::class, 'publicIndex'])->name('pricing.index');
});
Route::middleware(['auth', 'verified', 'tenant.assigned', 'platform.admin']) Route::middleware(['auth', 'verified', 'tenant.assigned', 'platform.admin'])
->prefix('admin') ->prefix('admin')
->name('platform.') ->name('platform.')
@@ -3,77 +3,21 @@
namespace Modules\Pricing\Http\Controllers; namespace Modules\Pricing\Http\Controllers;
use Illuminate\Contracts\Support\Renderable; use Illuminate\Contracts\Support\Renderable;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller; use Illuminate\Routing\Controller;
use Modules\Platform\app\Models\PlatformPrice;
class PricingController extends Controller class PricingController extends Controller
{ {
/** /**
* Display a listing of the resource. * Display the platform pricing cards from the shared Platform price model.
* @return Renderable
*/ */
public function index() public function index(): Renderable
{ {
return view('pricing::index'); return view('platform::prices.public', [
} 'prices' => PlatformPrice::query()
->where('is_active', true)
/** ->ordered()
* Show the form for creating a new resource. ->get(),
* @return Renderable ]);
*/
public function create()
{
return view('pricing::create');
}
/**
* Store a newly created resource in storage.
* @param Request $request
* @return Renderable
*/
public function store(Request $request)
{
//
}
/**
* Show the specified resource.
* @param int $id
* @return Renderable
*/
public function show($id)
{
return view('pricing::show');
}
/**
* Show the form for editing the specified resource.
* @param int $id
* @return Renderable
*/
public function edit($id)
{
return view('pricing::edit');
}
/**
* Update the specified resource in storage.
* @param Request $request
* @param int $id
* @return Renderable
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
* @param int $id
* @return Renderable
*/
public function destroy($id)
{
//
} }
} }
+7 -12
View File
@@ -1,16 +1,11 @@
<?php <?php
/* use Illuminate\Support\Facades\Route;
|-------------------------------------------------------------------------- use Modules\Pricing\Http\Controllers\PricingController;
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::prefix('pricing')->group(function() { Route::middleware(['auth', 'verified', 'tenant.assigned'])
Route::get('/', 'PricingController@index'); ->prefix('pricing')
->name('pricing.')
->group(function (): void {
Route::get('/', [PricingController::class, 'index'])->name('index');
}); });
+23 -7
View File
@@ -232,6 +232,9 @@
$pageTitle = $title ?? __('Warehouse Management System'); $pageTitle = $title ?? __('Warehouse Management System');
$pageDescription = match (true) { $pageDescription = match (true) {
request()->routeIs('platform.dashboard') => __('Manage tenant companies, licences, payments, warehouses and internal API operations from one resilient control plane.'), request()->routeIs('platform.dashboard') => __('Manage tenant companies, licences, payments, warehouses and internal API operations from one resilient control plane.'),
request()->routeIs('platform.prices.index') => __('Choose, publish and maintain Basic, Advanced and Pro WMS pricing from one controlled platform screen.'),
request()->routeIs('platform.prices.create') => __('Create a professional customer-facing pricing card with billing values, features and visibility controls.'),
request()->routeIs('platform.prices.edit') => __('Update pricing, plan features and card visibility while preserving the live platform layout.'),
request()->routeIs('platform.companies.*') => __('Manage tenant companies, ownership, users and the warehouse records attached to each organisation.'), request()->routeIs('platform.companies.*') => __('Manage tenant companies, ownership, users and the warehouse records attached to each organisation.'),
request()->routeIs('platform.licenses.*') => __('Review licence allocation, account status and platform access across MPBA tenants.'), request()->routeIs('platform.licenses.*') => __('Review licence allocation, account status and platform access across MPBA tenants.'),
request()->routeIs('platform.payments.*') => __('Track payment activity, paid totals and tenant billing status from one administration screen.'), request()->routeIs('platform.payments.*') => __('Track payment activity, paid totals and tenant billing status from one administration screen.'),
@@ -240,6 +243,17 @@
request()->routeIs('analytics.*') => __('Review operational insight, warehouse trends and management reporting.'), request()->routeIs('analytics.*') => __('Review operational insight, warehouse trends and management reporting.'),
default => __('Manage tenant companies, licences, payments, warehouses and internal API operations from one resilient control plane.'), default => __('Manage tenant companies, licences, payments, warehouses and internal API operations from one resilient control plane.'),
}; };
$pageStats = match (true) {
request()->routeIs('platform.prices.*') => [
['label' => __('Plans'), 'value' => '3', 'icon' => 'fa-layer-group'],
['label' => __('Billing'), 'value' => __('Monthly'), 'icon' => null],
],
default => [
['label' => __('System status'), 'value' => __('OK'), 'icon' => 'fa-heart-pulse'],
['label' => __('Paid £'), 'value' => '0.00', 'icon' => null],
],
};
@endphp @endphp
<main class="wms-content"> <main class="wms-content">
@@ -255,15 +269,17 @@
<i class="fa-solid fa-bars" aria-hidden="true"></i> <i class="fa-solid fa-bars" aria-hidden="true"></i>
</button> </button>
@foreach ($pageStats as $stat)
<div class="wms-page-hero-stat"> <div class="wms-page-hero-stat">
<span>{{ __('System status') }}</span> <span>{{ $stat['label'] }}</span>
<strong><i class="fa-solid fa-heart-pulse" aria-hidden="true"></i> {{ __('OK') }}</strong> <strong>
</div> @if (! empty($stat['icon']))
<i class="fa-solid {{ $stat['icon'] }}" aria-hidden="true"></i>
<div class="wms-page-hero-stat"> @endif
<span>{{ __('Paid £') }}</span> {{ $stat['value'] }}
<strong>0.00</strong> </strong>
</div> </div>
@endforeach
</div> </div>
</section> </section>
@@ -0,0 +1,107 @@
<?php if (isset($component)) { $__componentOriginal81a506f898233b9e7d58286e6bea3c18 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal81a506f898233b9e7d58286e6bea3c18 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'f4ac99e09542ff494432bc959d4fee61::app','data' => ['title' => __('Pricing')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('layouts::app'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(__('Pricing'))]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
<div class="space-y-6">
<section class="overflow-hidden rounded-3xl bg-gradient-to-br from-slate-950 via-slate-900 to-cyan-950 p-6 text-white shadow-xl sm:p-8">
<div class="flex flex-col gap-6 lg:flex-row lg:items-center lg:justify-between">
<div>
<p class="text-sm font-semibold uppercase tracking-[0.3em] text-cyan-300">Platform</p>
<h1 class="mt-3 text-3xl font-bold tracking-tight sm:text-5xl">Platform pricing</h1>
<p class="mt-3 max-w-2xl text-slate-300">Choose the right WMS plan for warehouse visibility, operational control and enterprise-grade administration.</p>
</div>
<div class="grid gap-3 sm:min-w-80 sm:grid-cols-2">
<div class="rounded-2xl bg-white/10 p-4 backdrop-blur">
<p class="text-sm text-slate-300">Plans</p>
<p class="mt-2 flex items-center gap-2 text-2xl font-bold text-emerald-300">
<i class="fa-solid fa-layer-group" aria-hidden="true"></i>
<?php echo e($prices->count()); ?>
</p>
</div>
<div class="rounded-2xl bg-white/10 p-4 backdrop-blur">
<p class="text-sm text-slate-300">Billing</p>
<p class="mt-2 text-2xl font-bold">Monthly</p>
</div>
</div>
</div>
</section>
<section class="grid gap-5 lg:grid-cols-3">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $prices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $price): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
<?php
$isBasic = $price->code === 'basic';
$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');
?>
<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">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php 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"><?php echo e($price->badge_label ?: 'Popular'); ?></div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<div class="bg-gradient-to-br <?php echo e($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"><?php echo e($price->badge_label ?: 'Plan'); ?></p>
<h2 class="mt-2 text-3xl font-black tracking-tight"><?php echo e($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 <?php echo e($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"><?php echo e($price->strapline); ?></p>
</div>
<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"><?php echo e($price->formatAmount($price->monthly_amount)); ?></span>
<span class="pb-1 text-sm font-semibold text-zinc-500">/ month</span>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php 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"><?php echo e($price->formatAmount($price->annual_amount)); ?></span></p>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<p class="mt-4 min-h-12 text-sm leading-6 text-zinc-600 dark:text-zinc-300"><?php echo e($price->description); ?></p>
<ul class="mt-5 space-y-3 text-sm text-zinc-700 dark:text-zinc-200">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $price->featureRows(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $feature): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
<li class="flex gap-3">
<i class="fa-solid fa-check mt-1 text-cyan-500" aria-hidden="true"></i>
<span><?php echo e($feature); ?></span>
</li>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</ul>
</div>
</article>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
<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>
</article>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</section>
</div>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal81a506f898233b9e7d58286e6bea3c18)): ?>
<?php $attributes = $__attributesOriginal81a506f898233b9e7d58286e6bea3c18; ?>
<?php unset($__attributesOriginal81a506f898233b9e7d58286e6bea3c18); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal81a506f898233b9e7d58286e6bea3c18)): ?>
<?php $component = $__componentOriginal81a506f898233b9e7d58286e6bea3c18; ?>
<?php unset($__componentOriginal81a506f898233b9e7d58286e6bea3c18); ?>
<?php endif; ?>
<?php /**PATH /Users/mag/Sites/WMS/Core/Modules/Platform/Providers/../resources/views/prices/public.blade.php ENDPATH**/ ?>
@@ -27,7 +27,7 @@
<aside class="wms-sidebar" data-wms-sidebar aria-label="<?php echo e(__('Main navigation')); ?>"> <aside class="wms-sidebar" data-wms-sidebar aria-label="<?php echo e(__('Main navigation')); ?>">
<div class="wms-sidebar-header"> <div class="wms-sidebar-header">
<a href="<?php echo e(auth()->user()?->isMpbaPlatformAdmin() && Route::has('platform.dashboard') ? route('platform.dashboard') : route('dashboard')); ?>" wire:navigate class="wms-brand" aria-label="<?php echo e(__('Warehouse Management System')); ?>"> <a href="<?php echo e(auth()->user()?->isMpbaPlatformAdmin() && Route::has('platform.dashboard') ? route('platform.dashboard') : route('dashboard')); ?>" wire:navigate class="wms-brand" aria-label="<?php echo e(__('Warehouse Management System')); ?>">
<span class="wms-brand-mark"><span class="wms-brand-mark-inner">W</span></span> <span class="wms-brand-mark" data-wms-brand-toggle title="<?php echo e(__('Expand sidebar')); ?>"><span class="wms-brand-mark-inner">W</span></span>
<span class="wms-brand-copy" data-wms-sidebar-label> <span class="wms-brand-copy" data-wms-sidebar-label>
<span class="wms-brand-title"><?php echo e(__('Warehouse Management System')); ?></span> <span class="wms-brand-title"><?php echo e(__('Warehouse Management System')); ?></span>
<span class="wms-brand-subtitle">MPBA</span> <span class="wms-brand-subtitle">MPBA</span>
@@ -36,7 +36,6 @@
<button type="button" class="wms-sidebar-toggle" data-wms-sidebar-toggle aria-label="<?php echo e(__('Collapse sidebar')); ?>" aria-expanded="true"> <button type="button" class="wms-sidebar-toggle" data-wms-sidebar-toggle aria-label="<?php echo e(__('Collapse sidebar')); ?>" aria-expanded="true">
<span class="wms-toggle-expanded">‹</span> <span class="wms-toggle-expanded">‹</span>
<span class="wms-toggle-collapsed">›</span>
</button> </button>
<button type="button" class="wms-mobile-close" data-wms-mobile-close aria-label="<?php echo e(__('Close navigation')); ?>">×</button> <button type="button" class="wms-mobile-close" data-wms-mobile-close aria-label="<?php echo e(__('Close navigation')); ?>">×</button>
@@ -144,6 +143,7 @@
<span data-wms-sidebar-label><?php echo e(__('Validation Rules')); ?></span> <span data-wms-sidebar-label><?php echo e(__('Validation Rules')); ?></span>
</a> </a>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?> <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(auth()->user()?->isMpbaPlatformAdmin() && Route::has('platform.prices.index')): ?> <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(auth()->user()?->isMpbaPlatformAdmin() && Route::has('platform.prices.index')): ?>
<a href="<?php echo e(route('platform.prices.index')); ?>" wire:navigate class="wms-sidebar-link <?php if(request()->routeIs('platform.prices.*')): ?> is-active <?php endif; ?>" title="<?php echo e(__('Prices')); ?>"> <a href="<?php echo e(route('platform.prices.index')); ?>" wire:navigate class="wms-sidebar-link <?php if(request()->routeIs('platform.prices.*')): ?> is-active <?php endif; ?>" title="<?php echo e(__('Prices')); ?>">
<i class="fa-solid fa-tags wms-sidebar-icon" aria-hidden="true"></i> <i class="fa-solid fa-tags wms-sidebar-icon" aria-hidden="true"></i>
@@ -325,7 +325,62 @@
</aside> </aside>
<div class="wms-main-panel"> <div class="wms-main-panel">
<?php
$pageTitle = $title ?? __('Warehouse Management System');
$pageDescription = match (true) {
request()->routeIs('platform.dashboard') => __('Manage tenant companies, licences, payments, warehouses and internal API operations from one resilient control plane.'),
request()->routeIs('platform.prices.index') => __('Choose, publish and maintain Basic, Advanced and Pro WMS pricing from one controlled platform screen.'),
request()->routeIs('platform.prices.create') => __('Create a professional customer-facing pricing card with billing values, features and visibility controls.'),
request()->routeIs('platform.prices.edit') => __('Update pricing, plan features and card visibility while preserving the live platform layout.'),
request()->routeIs('platform.companies.*') => __('Manage tenant companies, ownership, users and the warehouse records attached to each organisation.'),
request()->routeIs('platform.licenses.*') => __('Review licence allocation, account status and platform access across MPBA tenants.'),
request()->routeIs('platform.payments.*') => __('Track payment activity, paid totals and tenant billing status from one administration screen.'),
request()->routeIs('warehouses.*') => __('Maintain warehouse locations, operational details and company ownership records.'),
request()->routeIs('inventory-management.*') => __('Monitor inventory activity, stock positions and warehouse item control.'),
request()->routeIs('analytics.*') => __('Review operational insight, warehouse trends and management reporting.'),
default => __('Manage tenant companies, licences, payments, warehouses and internal API operations from one resilient control plane.'),
};
$pageStats = match (true) {
request()->routeIs('platform.prices.*') => [
['label' => __('Plans'), 'value' => '3', 'icon' => 'fa-layer-group'],
['label' => __('Billing'), 'value' => __('Monthly'), 'icon' => null],
],
default => [
['label' => __('System status'), 'value' => __('OK'), 'icon' => 'fa-heart-pulse'],
['label' => __('Paid £'), 'value' => '0.00', 'icon' => null],
],
};
?>
<main class="wms-content"> <main class="wms-content">
<section class="wms-page-hero" aria-labelledby="wms-page-title">
<div class="wms-page-hero-copy">
<div class="wms-page-hero-kicker"><?php echo e(__('MPBA WMS')); ?></div>
<h1 id="wms-page-title" class="wms-page-hero-title"><?php echo e($pageTitle); ?></h1>
<p class="wms-page-hero-description"><?php echo e($pageDescription); ?></p>
</div>
<div class="wms-page-hero-actions">
<button type="button" class="wms-hero-mobile-menu" data-wms-mobile-open aria-label="<?php echo e(__('Open navigation')); ?>">
<i class="fa-solid fa-bars" aria-hidden="true"></i>
</button>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $pageStats; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
<div class="wms-page-hero-stat">
<span><?php echo e($stat['label']); ?></span>
<strong>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(! empty($stat['icon'])): ?>
<i class="fa-solid <?php echo e($stat['icon']); ?>" aria-hidden="true"></i>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php echo e($stat['value']); ?>
</strong>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</div>
</section>
<?php echo e($slot); ?> <?php echo e($slot); ?>
</main> </main>
@@ -425,6 +480,19 @@
applySidebarState(); applySidebarState();
}); });
}); });
document.querySelectorAll('[data-wms-brand-toggle]').forEach((button) => {
if (button.dataset.wmsBound === '1') return;
button.dataset.wmsBound = '1';
button.addEventListener('click', function (event) {
const root = document.documentElement;
if (root.dataset.wmsSidebar !== 'collapsed') return;
event.preventDefault();
event.stopPropagation();
root.dataset.wmsSidebar = 'expanded';
localStorage.setItem(STORAGE_KEY, 'expanded');
applySidebarState();
});
});
document.querySelectorAll('[data-wms-mobile-open]').forEach((button) => { document.querySelectorAll('[data-wms-mobile-open]').forEach((button) => {
if (button.dataset.wmsBound === '1') return; if (button.dataset.wmsBound === '1') return;
button.dataset.wmsBound = '1'; button.dataset.wmsBound = '1';
@@ -1,29 +1,32 @@
<?php if (isset($component)) { $__componentOriginal81a506f898233b9e7d58286e6bea3c18 = $component; } ?> <?php if (isset($component)) { $__componentOriginal81a506f898233b9e7d58286e6bea3c18 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal81a506f898233b9e7d58286e6bea3c18 = $attributes; } ?> <?php if (isset($attributes)) { $__attributesOriginal81a506f898233b9e7d58286e6bea3c18 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'f4ac99e09542ff494432bc959d4fee61::app','data' => ['title' => __('Platform Prices')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'f4ac99e09542ff494432bc959d4fee61::app','data' => ['title' => __('Platform Pricing')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('layouts::app'); ?> <?php $component->withName('layouts::app'); ?>
<?php if ($component->shouldRender()): ?> <?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> <?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?> <?php endif; ?>
<?php $component->withAttributes(['title' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(__('Platform Prices'))]); ?> <?php $component->withAttributes(['title' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(__('Platform Pricing'))]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?> <?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
<div class="space-y-6"> <div class="space-y-6">
<section class="overflow-hidden rounded-3xl bg-gradient-to-br from-slate-950 via-slate-900 to-cyan-950 p-5 text-white shadow-xl sm:p-6"> <div class="flex flex-wrap items-center justify-between gap-3">
<div class="flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between">
<div> <div>
<p class="text-xs font-semibold uppercase tracking-[0.28em] text-cyan-300">Platform</p> <p class="text-sm font-semibold text-zinc-500 dark:text-zinc-400">
<h1 class="mt-2 text-2xl font-bold tracking-tight sm:text-3xl">Pricing plans</h1> Customer-facing plan cards managed from Platform.
<p class="mt-2 max-w-2xl text-sm leading-6 text-slate-300">Maintain customer-facing Basic, Advanced and Pro pricing from one administration page.</p> </p>
</div> </div>
<div class="flex flex-wrap gap-3"> <div class="flex flex-wrap gap-3">
<a href="<?php echo e(route('platform.dashboard')); ?>" wire:navigate class="rounded-xl border border-white/15 bg-white/10 px-4 py-2 text-sm font-semibold text-white backdrop-blur hover:bg-white/15">Platform dashboard</a> <a href="<?php echo e(route('platform.dashboard')); ?>" wire:navigate class="rounded-xl border border-zinc-200 bg-white px-4 py-2 text-sm font-semibold text-zinc-700 shadow-sm hover:border-cyan-400 hover:text-cyan-700 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-200">
<a href="<?php echo e(route('platform.prices.create')); ?>" wire:navigate class="rounded-xl bg-cyan-300 px-4 py-2 text-sm font-bold text-slate-950 shadow-lg shadow-cyan-950/30 hover:bg-cyan-200">Add price</a> Platform dashboard
</a>
<a href="<?php echo e(route('platform.prices.create')); ?>" wire:navigate class="rounded-xl bg-cyan-500 px-4 py-2 text-sm font-bold text-slate-950 shadow-lg shadow-cyan-950/20 hover:bg-cyan-400">
Add price
</a>
</div> </div>
</div> </div>
</section>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session('status')): ?> <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php 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">
@@ -41,31 +44,53 @@
? 'from-cyan-500 to-blue-600' ? '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');
?> ?>
<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">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($price->is_featured): ?> <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php 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">Featured</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">
Featured
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?> <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<div class="bg-gradient-to-br <?php echo e($headerClass); ?> p-5 text-white"> <div class="bg-gradient-to-br <?php echo e($headerClass); ?> p-5 text-white">
<div class="flex items-start justify-between gap-4"> <div class="flex items-start justify-between gap-4">
<div> <div>
<p class="text-xs font-bold uppercase tracking-[0.24em] text-white/70"><?php echo e($price->badge_label ?: 'Plan'); ?></p> <p class="text-xs font-bold uppercase tracking-[0.24em] text-white/70">
<?php echo e($price->badge_label ?: 'Plan'); ?>
</p>
<h2 class="mt-2 text-2xl font-black tracking-tight"><?php echo e($price->name); ?></h2> <h2 class="mt-2 text-2xl font-black tracking-tight"><?php echo e($price->name); ?></h2>
</div> </div>
<span class="grid h-11 w-11 place-items-center rounded-2xl bg-white/15 text-lg backdrop-blur"> <span class="grid h-11 w-11 place-items-center rounded-2xl bg-white/15 text-lg backdrop-blur">
<i class="fa-solid <?php echo e($isBasic ? 'fa-box' : ($isAdvanced ? 'fa-layer-group' : 'fa-crown')); ?>" aria-hidden="true"></i> <i class="fa-solid <?php echo e($isBasic ? 'fa-box' : ($isAdvanced ? 'fa-layer-group' : 'fa-crown')); ?>" aria-hidden="true"></i>
</span> </span>
</div> </div>
<p class="mt-3 text-sm leading-6 text-white/80"><?php echo e($price->strapline); ?></p> <p class="mt-3 text-sm leading-6 text-white/80"><?php echo e($price->strapline); ?></p>
</div> </div>
<div class="p-5"> <div class="p-5">
<div class="flex items-end gap-2"> <div class="flex items-end gap-2">
<span class="text-4xl font-black tracking-tight text-zinc-950 dark:text-white"><?php echo e($price->formatAmount($price->monthly_amount)); ?></span> <span class="text-4xl font-black tracking-tight text-zinc-950 dark:text-white">
<?php echo e($price->formatAmount($price->monthly_amount)); ?>
</span>
<span class="pb-1 text-sm font-semibold text-zinc-500">/ month</span> <span class="pb-1 text-sm font-semibold text-zinc-500">/ month</span>
</div> </div>
<p class="mt-2 text-sm text-zinc-500">Annual: <span class="font-semibold text-zinc-700 dark:text-zinc-200"><?php echo e($price->formatAmount($price->annual_amount)); ?></span></p>
<p class="mt-4 min-h-12 text-sm leading-6 text-zinc-600 dark:text-zinc-300"><?php echo e($price->description); ?></p> <p class="mt-2 text-sm text-zinc-500">
Annual:
<span class="font-semibold text-zinc-700 dark:text-zinc-200">
<?php echo e($price->formatAmount($price->annual_amount)); ?>
</span>
</p>
<p class="mt-4 min-h-12 text-sm leading-6 text-zinc-600 dark:text-zinc-300">
<?php echo e($price->description); ?>
</p>
<ul class="mt-5 space-y-3 text-sm text-zinc-700 dark:text-zinc-200"> <ul class="mt-5 space-y-3 text-sm text-zinc-700 dark:text-zinc-200">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $price->featureRows(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $feature): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?> <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $price->featureRows(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $feature): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
@@ -81,12 +106,17 @@
<?php echo e($price->is_active ? 'Active' : 'Hidden'); ?> <?php echo e($price->is_active ? 'Active' : 'Hidden'); ?>
</span> </span>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<a href="<?php echo e(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> <a href="<?php echo e(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="<?php echo e(route('platform.prices.destroy', $price)); ?>" onsubmit="return confirm('Delete this price?');"> <form method="POST" action="<?php echo e(route('platform.prices.destroy', $price)); ?>" onsubmit="return confirm('Delete this price?');">
<?php echo csrf_field(); ?> <?php echo csrf_field(); ?>
<?php echo method_field('DELETE'); ?> <?php echo method_field('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">Delete</button> <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> </form>
</div> </div>
</div> </div>