Files
WMS/Modules/Platform/resources/views/dashboard/index.blade.php
T
2026-06-11 10:10:48 +01:00

47 lines
3.0 KiB
PHP

<x-layouts::app :title="__('Platform')">
<div class="space-y-6">
<section class="grid gap-4 sm:grid-cols-2 xl:grid-cols-4">
@foreach ([['Companies', $companiesCount], ['Active', $activeCompaniesCount], ['Warehouses', $warehousesCount], ['Licences', $licensesCount]] as [$label, $value])
<article class="rounded-2xl border border-zinc-200 bg-white p-5 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
<p class="text-sm text-zinc-500 dark:text-zinc-400">{{ $label }}</p>
<p class="mt-2 text-3xl font-bold text-zinc-900 dark:text-white">{{ $value }}</p>
</article>
@endforeach
</section>
<section class="rounded-2xl border border-zinc-200 bg-white shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
<div class="flex flex-col gap-3 border-b border-zinc-200 p-5 sm:flex-row sm:items-center sm:justify-between dark:border-zinc-800">
<div>
<h2 class="text-lg font-semibold text-zinc-900 dark:text-white">Recent companies</h2>
<p class="text-sm text-zinc-500">Tenant isolation is enforced by company ownership on every warehouse record.</p>
</div>
<a href="{{ route('platform.companies.index') }}" class="rounded-lg bg-zinc-900 px-4 py-2 text-sm font-semibold text-white dark:bg-white dark:text-zinc-900">Manage companies</a>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-zinc-200 text-sm dark:divide-zinc-800">
<thead class="bg-zinc-50 dark:bg-zinc-950">
<tr>
<th class="px-5 py-3 text-left font-semibold">Company</th>
<th class="px-5 py-3 text-left font-semibold">Users</th>
<th class="px-5 py-3 text-left font-semibold">Warehouses</th>
<th class="px-5 py-3 text-left font-semibold">Licences</th>
<th class="px-5 py-3 text-left font-semibold">Status</th>
</tr>
</thead>
<tbody class="divide-y divide-zinc-200 dark:divide-zinc-800">
@foreach ($companies as $company)
<tr>
<td class="px-5 py-4 font-medium">{{ $company->name }}</td>
<td class="px-5 py-4">{{ $company->users_count }}</td>
<td class="px-5 py-4">{{ $company->warehouses_count }}</td>
<td class="px-5 py-4">{{ $company->license_keys_count }}</td>
<td class="px-5 py-4">{{ $company->is_system_company ? 'System' : ucfirst($company->status) }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</section>
</div>
</x-layouts::app>