From 0e839868502069830d877e1157b45122d3a713ed Mon Sep 17 00:00:00 2001 From: Mark Gregory Date: Thu, 11 Jun 2026 10:58:34 +0100 Subject: [PATCH] Updates --- .DS_Store | Bin 10244 -> 0 bytes .../Controllers/PlatformPriceController.php | 14 + .../resources/views/prices/create.blade.php | 27 +- .../resources/views/prices/edit.blade.php | 27 +- .../resources/views/prices/index.blade.php | 66 +- .../resources/views/prices/public.blade.php | 85 +++ Modules/Platform/routes/web.php | 8 + .../Http/Controllers/PricingController.php | 74 +-- Modules/Pricing/Routes/web.php | 21 +- resources/views/layouts/app/sidebar.blade.php | 34 +- .../359ae57a7ef889ada0c6818b0f826987.php | 107 +++ .../3d7c4a50df1d313410bd5444267891cf.php | 616 ++++++++++-------- .../d6ef292c8d20ba6f4cc3a4a821697bc7.php | 72 +- 13 files changed, 725 insertions(+), 426 deletions(-) delete mode 100644 .DS_Store create mode 100644 Modules/Platform/resources/views/prices/public.blade.php create mode 100755 storage/framework/views/359ae57a7ef889ada0c6818b0f826987.php diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 3e866efd4115208c943df0010be2631107f67495..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10244 zcmeHMYitx%6uxI#=nNw;)bf;Zx317y*3g!MA`08>Hu7kBZA)LkGP^UhBh#5>W_C+$ zs_QQesEL0xzW)(55jBdUzf63fiSY-iM2U$Q6B85uXas+l7|*?Tw$KNOF(DyjW^?bk z=iYPf-Sh2t=H}idgg~;OHxUvggos$ERBpp+mWPhhGUE|~o_Qz%{R#1iPh6sryzb4g z4m&~wLIgqtLIgqtLIiFG1aQx$k0^5))*%8R0wDsE2+;RK6bqG!K$f^lqp;+*{S0D&t6M-1TZI3A_uC=-D!amn2YaCZX1$`G7TfUS;x zQD#mc!DU#72!sgCM1Y>%C6Xl$e*A0C?>Q^$I2O&eS%$5_rgY93&hz;u-k#lR*h!_b zmXpO%%+Av4-!7ePy`H81A1(7k*R0In0ac_Ezr0Qg#3BaqvLjwTSoKUcZ<(Io*mxd< zipn{2tHdf%77wI{oRPGz`2{bjxdT+|!cep2wwB#z8Y3B{rp>W^&9n`dIheYECi{C# zTX#m1PQlha=9}gNq9jTgW!czR^ZKTEw7I2uJRTj}*xVS8wyfJQJ}!xiV{13<%^b0Y zZRa@04T5(Wna}mf`UJM7MP+%#HXc<)x*XMoa#YehS)Q-<^!D`+?9V7l!87(6mgbv9 zBc=I+&qUg{*nBVEUs46@VF>5MuXQESyYQ5>NCZLWbe@0J_X zxTI)emxm$qDb~tOlHy5SNASnzt}XHgQPHJtOUoJ-@7gGD5|tfNPmxE=J8R@EqSTAI zGK|4^yf3MyMCB{-AYHga^ZZ?T!!CcNq`FlU`@JE}HFk|4^~xR{qR4(m?58g6y6HPE zLt|&Hs`k;TT6NvfG3XV`mRGB3wOdrqp^swPMH9)6zX9jG7%THEmT2J3*r$&iVl9So zEYZljYq*%K=^m|;Mv^4k$w87QqvQm6p1e*zAg9TP`PS)Wbc{4C`P$Y=AcCfKJ#6{g4A44#OZ=P=F#FgHd=4o`k31IGljz;3aq& zUWM1-B)kLf!h7%udYW_g$7}buvyq5 zY!&th{X#|<;xP#2ggY=96Ke>gC}t*H@EQ?L&7N?PhqrFqzN6!&O}HNx&=kA9X7Q4x z(Nzs=Tke0Tb&`mjw`Hncn*xmWQ*wo|o-t!OV|gyhk#0;2)L! zx4?!x90eD~U>qKY5T?yA>N|*Y*8$Su+WFvmAGUs zSh1@(lO>*9okh2>MD~GIz9L?kM?f{tf>#AUyxGd#mvL|3B}#Zh`av EzZ6g4ApigX diff --git a/Modules/Platform/app/Http/Controllers/PlatformPriceController.php b/Modules/Platform/app/Http/Controllers/PlatformPriceController.php index aa6102c0..8c365551 100644 --- a/Modules/Platform/app/Http/Controllers/PlatformPriceController.php +++ b/Modules/Platform/app/Http/Controllers/PlatformPriceController.php @@ -11,6 +11,20 @@ use Modules\Platform\app\Models\PlatformPrice; 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. */ diff --git a/Modules/Platform/resources/views/prices/create.blade.php b/Modules/Platform/resources/views/prices/create.blade.php index e076c88d..e64dbfa2 100644 --- a/Modules/Platform/resources/views/prices/create.blade.php +++ b/Modules/Platform/resources/views/prices/create.blade.php @@ -1,15 +1,14 @@
-
-
-
-

Administration

-

Create price

-

Add a new platform pricing card with billing values, feature bullets and status controls.

-
- Back to prices -
-
+
+

+ Add a new platform pricing card with billing values, feature bullets and status controls. +

+ + + Back to prices + +
@@ -17,8 +16,12 @@ @include('platform::prices._form')
- Cancel - + + Cancel + +
diff --git a/Modules/Platform/resources/views/prices/edit.blade.php b/Modules/Platform/resources/views/prices/edit.blade.php index 1d74cd8a..99fa06bb 100644 --- a/Modules/Platform/resources/views/prices/edit.blade.php +++ b/Modules/Platform/resources/views/prices/edit.blade.php @@ -1,15 +1,14 @@
-
-
-
-

Administration

-

Edit {{ $price->name }}

-

Update the pricing card, feature list and visibility settings without changing the rest of the platform.

-
- Back to prices -
-
+
+

+ Update {{ $price->name }} pricing, feature list and visibility settings. +

+ + + Back to prices + +
@@ -18,8 +17,12 @@ @include('platform::prices._form')
- Cancel - + + Cancel + +
diff --git a/Modules/Platform/resources/views/prices/index.blade.php b/Modules/Platform/resources/views/prices/index.blade.php index dab1a4fc..7fef9cd2 100644 --- a/Modules/Platform/resources/views/prices/index.blade.php +++ b/Modules/Platform/resources/views/prices/index.blade.php @@ -1,18 +1,21 @@ - +
-
-
-
-

Platform

-

Pricing plans

-

Maintain customer-facing Basic, Advanced and Pro pricing from one administration page.

-
- +
+
+

+ Customer-facing plan cards managed from Platform. +

-
+ + +
@if (session('status'))
@@ -29,31 +32,49 @@ ? 'from-cyan-500 to-blue-600' : ($isBasic ? 'from-slate-700 to-slate-900' : 'from-indigo-600 to-violet-700'); @endphp +
@if ($price->is_featured) -
Featured
+
+ Featured +
@endif
-

{{ $price->badge_label ?: 'Plan' }}

+

+ {{ $price->badge_label ?: 'Plan' }} +

{{ $price->name }}

+
+

{{ $price->strapline }}

- {{ $price->formatAmount($price->monthly_amount) }} + + {{ $price->formatAmount($price->monthly_amount) }} + / month
-

Annual: {{ $price->formatAmount($price->annual_amount) }}

-

{{ $price->description }}

+ +

+ Annual: + + {{ $price->formatAmount($price->annual_amount) }} + +

+ +

+ {{ $price->description }} +

    @foreach ($price->featureRows() as $feature) @@ -68,12 +89,17 @@ {{ $price->is_active ? 'Active' : 'Hidden' }} +
    - Edit + + Edit +
    @csrf @method('DELETE') - +
diff --git a/Modules/Platform/resources/views/prices/public.blade.php b/Modules/Platform/resources/views/prices/public.blade.php new file mode 100644 index 00000000..03cada62 --- /dev/null +++ b/Modules/Platform/resources/views/prices/public.blade.php @@ -0,0 +1,85 @@ + +
+
+
+
+

Platform

+

Platform pricing

+

Choose the right WMS plan for warehouse visibility, operational control and enterprise-grade administration.

+
+ +
+
+

Plans

+

+ + {{ $prices->count() }} +

+
+
+

Billing

+

Monthly

+
+
+
+
+ +
+ @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 + +
+ @if ($price->is_featured) +
{{ $price->badge_label ?: 'Popular' }}
+ @endif + +
+
+
+

{{ $price->badge_label ?: 'Plan' }}

+

{{ $price->name }}

+
+ + + +
+

{{ $price->strapline }}

+
+ +
+
+ {{ $price->formatAmount($price->monthly_amount) }} + / month +
+ + @if ($price->annual_amount) +

Annual: {{ $price->formatAmount($price->annual_amount) }}

+ @endif + +

{{ $price->description }}

+ +
    + @foreach ($price->featureRows() as $feature) +
  • + + {{ $feature }} +
  • + @endforeach +
+
+
+ @empty +
+

No active prices

+

Add active pricing records from Administration to populate this page.

+
+ @endforelse +
+
+
diff --git a/Modules/Platform/routes/web.php b/Modules/Platform/routes/web.php index a0d6a712..d272f04c 100644 --- a/Modules/Platform/routes/web.php +++ b/Modules/Platform/routes/web.php @@ -8,6 +8,14 @@ use Modules\Platform\app\Http\Controllers\PlatformDashboardController; use Modules\Platform\app\Http\Controllers\PlatformPriceController; 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']) ->prefix('admin') ->name('platform.') diff --git a/Modules/Pricing/Http/Controllers/PricingController.php b/Modules/Pricing/Http/Controllers/PricingController.php index f21fa9fa..c340275c 100644 --- a/Modules/Pricing/Http/Controllers/PricingController.php +++ b/Modules/Pricing/Http/Controllers/PricingController.php @@ -3,77 +3,21 @@ namespace Modules\Pricing\Http\Controllers; use Illuminate\Contracts\Support\Renderable; -use Illuminate\Http\Request; use Illuminate\Routing\Controller; +use Modules\Platform\app\Models\PlatformPrice; class PricingController extends Controller { /** - * Display a listing of the resource. - * @return Renderable + * Display the platform pricing cards from the shared Platform price model. */ - public function index() + public function index(): Renderable { - return view('pricing::index'); - } - - /** - * Show the form for creating a new resource. - * @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) - { - // + return view('platform::prices.public', [ + 'prices' => PlatformPrice::query() + ->where('is_active', true) + ->ordered() + ->get(), + ]); } } diff --git a/Modules/Pricing/Routes/web.php b/Modules/Pricing/Routes/web.php index 2dcb7c83..9262e693 100644 --- a/Modules/Pricing/Routes/web.php +++ b/Modules/Pricing/Routes/web.php @@ -1,16 +1,11 @@ group(function() { - Route::get('/', 'PricingController@index'); -}); +Route::middleware(['auth', 'verified', 'tenant.assigned']) + ->prefix('pricing') + ->name('pricing.') + ->group(function (): void { + Route::get('/', [PricingController::class, 'index'])->name('index'); + }); diff --git a/resources/views/layouts/app/sidebar.blade.php b/resources/views/layouts/app/sidebar.blade.php index e437ed9e..f6d35a4e 100644 --- a/resources/views/layouts/app/sidebar.blade.php +++ b/resources/views/layouts/app/sidebar.blade.php @@ -232,6 +232,9 @@ $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.'), @@ -240,6 +243,17 @@ 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], + ], + }; @endphp
@@ -255,15 +269,17 @@ -
- {{ __('System status') }} - {{ __('OK') }} -
- -
- {{ __('Paid £') }} - 0.00 -
+ @foreach ($pageStats as $stat) +
+ {{ $stat['label'] }} + + @if (! empty($stat['icon'])) + + @endif + {{ $stat['value'] }} + +
+ @endforeach
diff --git a/storage/framework/views/359ae57a7ef889ada0c6818b0f826987.php b/storage/framework/views/359ae57a7ef889ada0c6818b0f826987.php new file mode 100755 index 00000000..29a7fd95 --- /dev/null +++ b/storage/framework/views/359ae57a7ef889ada0c6818b0f826987.php @@ -0,0 +1,107 @@ + + + 'f4ac99e09542ff494432bc959d4fee61::app','data' => ['title' => __('Pricing')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> +withName('layouts::app'); ?> +shouldRender()): ?> +startComponent($component->resolveView(), $component->data()); ?> + +except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> + +withAttributes(['title' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(__('Pricing'))]); ?> + + +
+
+
+
+

Platform

+

Platform pricing

+

Choose the right WMS plan for warehouse visibility, operational control and enterprise-grade administration.

+
+ +
+
+

Plans

+

+ + count()); ?> + +

+
+
+

Billing

+

Monthly

+
+
+
+
+ +
+ addLoop($__currentLoopData); foreach($__currentLoopData as $price): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> + 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'); + ?> + +
+ is_featured): ?> +
badge_label ?: 'Popular'); ?>
+ + +
+
+
+

badge_label ?: 'Plan'); ?>

+

name); ?>

+
+ + + +
+

strapline); ?>

+
+ +
+
+ formatAmount($price->monthly_amount)); ?> + / month +
+ + annual_amount): ?> +

Annual: formatAmount($price->annual_amount)); ?>

+ + +

description); ?>

+ +
    + featureRows(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $feature): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> +
  • + + +
  • + popLoop(); $loop = $__env->getLastLoop(); ?> +
+
+
+ popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> +
+

No active prices

+

Add active pricing records from Administration to populate this page.

+
+ +
+
+ renderComponent(); ?> + + + + + + + + + + \ No newline at end of file diff --git a/storage/framework/views/3d7c4a50df1d313410bd5444267891cf.php b/storage/framework/views/3d7c4a50df1d313410bd5444267891cf.php index 5c8a7bf0..774f1b98 100755 --- a/storage/framework/views/3d7c4a50df1d313410bd5444267891cf.php +++ b/storage/framework/views/3d7c4a50df1d313410bd5444267891cf.php @@ -16,228 +16,228 @@ - - make('partials.head', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?> - + + make('partials.head', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?> + - -
-
+ +
+
- -
-
- - -
-
-
- -forceAssetInjection(); ?>
- + forceAssetInjection(); ?>
+