From 8391ece55a63fe809459b986de4b6c1b66e4f417 Mon Sep 17 00:00:00 2001 From: Mark Gregory Date: Fri, 12 Jun 2026 07:15:43 +0100 Subject: [PATCH] fixed pricing controller --- .../PlatformDashboardController.php | 5 +- .../resources/views/dashboard/index.blade.php | 87 +++++++++++++++++-- composer.json | 16 ++-- package.json | 1 + resources/css/app.css | 1 + resources/js/app.js | 2 + vite.config.js | 1 + 7 files changed, 100 insertions(+), 13 deletions(-) diff --git a/Modules/Platform/app/Http/Controllers/PlatformDashboardController.php b/Modules/Platform/app/Http/Controllers/PlatformDashboardController.php index 420ad985..9e3fd184 100644 --- a/Modules/Platform/app/Http/Controllers/PlatformDashboardController.php +++ b/Modules/Platform/app/Http/Controllers/PlatformDashboardController.php @@ -36,7 +36,10 @@ class PlatformDashboardController extends Controller 'paymentsTotal' => Payment::where('status', 'paid')->sum('amount'), 'warehousesCount' => $warehousesCount, 'pricesCount' => $pricesCount, - 'prices' => PlatformPrice::query()->ordered()->limit(3)->get(), + 'prices' => PlatformPrice::query() + ->where('is_active', true) + ->ordered() + ->get(), 'companies' => $companies, 'companyUsageChartLabels' => $companies->isNotEmpty() diff --git a/Modules/Platform/resources/views/dashboard/index.blade.php b/Modules/Platform/resources/views/dashboard/index.blade.php index 0cc87bc6..20425a45 100644 --- a/Modules/Platform/resources/views/dashboard/index.blade.php +++ b/Modules/Platform/resources/views/dashboard/index.blade.php @@ -87,9 +87,84 @@ - {{-- Lower Section --}} -
- {{-- Administration --}} + +
+
+
+

Pricing

+ +

+ Pricing plans +

+ +

+ Current platform pricing tiers and administration shortcuts. +

+
+ + +
+ +
+ @foreach ($prices as $price) +
+
+
+

+ {{ $price->name }} +

+ +

+ {{ $price->strapline }} +

+
+ + @if ($price->badge_label) + + {{ $price->badge_label }} + + @endif +
+ +

+ £{{ number_format($price->monthly_amount / 100, 0) }} + / month +

+ + @if (! empty($price->features)) +
    + @foreach (array_slice($price->features, 0, 3) as $feature) +
  • + + {{ $feature }} +
  • + @endforeach +
+ @endif +
+ @endforeach +
+
+ +
@@ -99,8 +174,8 @@
- - + +
@@ -121,7 +196,6 @@
- {{-- Recent Companies --}}
@@ -169,6 +243,5 @@
- diff --git a/composer.json b/composer.json index 6421e4a9..4f68765c 100644 --- a/composer.json +++ b/composer.json @@ -43,10 +43,14 @@ "smalot/pdfparser": "*", "spatie/laravel-medialibrary": "^11.23", "spatie/laravel-permission": "^8.0", + "spatie/pdf-to-text": "^1.54", "stancl/tenancy": "^3.10", "yajra/laravel-datatables": "^13.0" }, "require-dev": { + "barryvdh/laravel-debugbar": "^4.3", + "barryvdh/laravel-ide-helper": "^3.7", + "beyondcode/laravel-query-detector": "^2.3", "fakerphp/faker": "^1.24", "laravel/boost": "^2.4", "laravel/dusk": "^8.6", @@ -96,14 +100,10 @@ "npm install", "npm run build" ], - "rebuild": [ - + "reload": [ "npm run build", - "@php artisan optimize:clear", - "@php artisan octane:reload" - ], "dev": [ "Composer\\Config::disableProcessTimeout", @@ -124,6 +124,12 @@ "@lint:check", "@php artisan test" ], + "full-test": [ + "lsof -ti tcp:9515 | xargs kill -9 2>/dev/null || true", + "./vendor/laravel/dusk/bin/chromedriver-mac-arm --port=9515 &", + "@php artisan test", + "@php artisan dusk" + ], "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" diff --git a/package.json b/package.json index bc1b5b09..1a05660f 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@tailwindcss/vite": "^4.1.11", "chart.js": "^4.5.1", "concurrently": "^9.0.1", + "flatpickr": "^4.6.13", "laravel-vite-plugin": "^3.1", "tailwindcss": "^4.0.7", "vite": "^8.0.0" diff --git a/resources/css/app.css b/resources/css/app.css index 282d540b..dd6fe54e 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -1,5 +1,6 @@ @import 'tailwindcss'; @import '../../vendor/livewire/flux/dist/flux.css'; +@import 'flatpickr/dist/flatpickr.css'; @source '../views'; @source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php'; diff --git a/resources/js/app.js b/resources/js/app.js index 5421815b..bf77691c 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1,3 +1,5 @@ +require("flatpickr"); + import '@fortawesome/fontawesome-free/css/all.min.css'; import Chart from 'chart.js/auto'; diff --git a/vite.config.js b/vite.config.js index d86ed745..2a77a8bf 100644 --- a/vite.config.js +++ b/vite.config.js @@ -10,6 +10,7 @@ export default defineConfig({ laravel({ input: [ 'resources/css/app.css', + 'resources/css/wms-dashboard.css', 'resources/js/app.js', 'resources/js/passkeys.js', ],