fixed pricing controller
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -87,9 +87,84 @@
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
{{-- Lower Section --}}
|
||||
<section style="display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 1.25rem; align-items: start;">
|
||||
{{-- Administration --}}
|
||||
|
||||
<section class="rounded-3xl border border-zinc-200 bg-white p-5 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
|
||||
<div class="mb-5 flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div>
|
||||
<p class="text-xs font-bold uppercase tracking-[0.28em] text-cyan-500">Pricing</p>
|
||||
|
||||
<h2 class="mt-2 text-xl font-bold text-zinc-900 dark:text-white">
|
||||
Pricing plans
|
||||
</h2>
|
||||
|
||||
<p class="text-sm text-zinc-500 dark:text-zinc-400">
|
||||
Current platform pricing tiers and administration shortcuts.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<a
|
||||
href="{{ route('platform.pricing.index') }}"
|
||||
wire:navigate
|
||||
class="inline-flex h-10 items-center justify-center gap-2 rounded-xl border border-zinc-200 px-4 text-sm font-bold text-zinc-700 hover:border-cyan-400 hover:text-cyan-700 dark:border-zinc-700 dark:text-zinc-200"
|
||||
>
|
||||
<i class="fa-solid fa-credit-card" aria-hidden="true"></i>
|
||||
View pricing
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="{{ route('platform.prices.index') }}"
|
||||
wire:navigate
|
||||
class="inline-flex h-10 items-center justify-center gap-2 rounded-xl bg-cyan-600 px-4 text-sm font-bold text-white shadow-sm shadow-cyan-600/20 ring-1 ring-cyan-500/30 transition hover:bg-cyan-500"
|
||||
>
|
||||
<i class="fa-solid fa-tags" aria-hidden="true"></i>
|
||||
Manage prices
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-4 md:grid-cols-3">
|
||||
@foreach ($prices as $price)
|
||||
<article class="rounded-2xl border border-zinc-200 p-5 dark:border-zinc-800">
|
||||
<div class="flex items-start justify-between gap-3">
|
||||
<div>
|
||||
<h3 class="text-lg font-bold text-zinc-900 dark:text-white">
|
||||
{{ $price->name }}
|
||||
</h3>
|
||||
|
||||
<p class="mt-1 text-sm text-zinc-500 dark:text-zinc-400">
|
||||
{{ $price->strapline }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@if ($price->badge_label)
|
||||
<span class="rounded-full bg-cyan-500/10 px-3 py-1 text-xs font-bold uppercase tracking-wide text-cyan-600 dark:text-cyan-400">
|
||||
{{ $price->badge_label }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<p class="mt-4 text-2xl font-black text-zinc-900 dark:text-white">
|
||||
£{{ number_format($price->monthly_amount / 100, 0) }}
|
||||
<span class="text-sm font-semibold text-zinc-500">/ month</span>
|
||||
</p>
|
||||
|
||||
@if (! empty($price->features))
|
||||
<ul class="mt-4 space-y-2 text-sm text-zinc-600 dark:text-zinc-300">
|
||||
@foreach (array_slice($price->features, 0, 3) as $feature)
|
||||
<li class="flex gap-2">
|
||||
<i class="fa-solid fa-check mt-1 text-cyan-500" aria-hidden="true"></i>
|
||||
<span>{{ $feature }}</span>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</article>
|
||||
@endforeach
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="grid gap-5 xl:grid-cols-[360px_minmax(0,1fr)]">
|
||||
<article class="rounded-3xl border border-zinc-200 bg-white p-5 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
|
||||
<div class="mb-5 flex items-start justify-between gap-4">
|
||||
<div>
|
||||
@@ -99,8 +174,8 @@
|
||||
</div>
|
||||
|
||||
<span class="grid h-11 w-11 place-items-center rounded-2xl bg-cyan-500/10 text-cyan-500">
|
||||
<i class="fa-solid fa-sliders" aria-hidden="true"></i>
|
||||
</span>
|
||||
<i class="fa-solid fa-sliders" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-3">
|
||||
@@ -121,7 +196,6 @@
|
||||
</div>
|
||||
</article>
|
||||
|
||||
{{-- Recent Companies --}}
|
||||
<article class="min-w-0 overflow-hidden rounded-3xl border border-zinc-200 bg-white shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
|
||||
<div class="flex flex-col gap-4 border-b border-zinc-200 p-5 sm:flex-row sm:items-start sm:justify-between dark:border-zinc-800">
|
||||
<div>
|
||||
@@ -169,6 +243,5 @@
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</x-layouts::app>
|
||||
|
||||
+11
-5
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
require("flatpickr");
|
||||
|
||||
import '@fortawesome/fontawesome-free/css/all.min.css';
|
||||
import Chart from 'chart.js/auto';
|
||||
|
||||
|
||||
@@ -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',
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user