Files
WMS/Modules/Platform/resources/views/companies/index.blade.php
T

50 lines
2.8 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<x-layouts::app :title="__('Companies')">
<div class="space-y-6">
<x-wms.page-hero eyebrow="Platform Administration" title="Companies"
description="Manage tenant companies and keep every company’s users, warehouses and records isolated."
icon="fa-solid fa-building" />
<div class="rounded-3xl bg-white p-6 shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-900 dark:ring-zinc-800">
<h2 class="text-lg font-bold text-zinc-900 dark:text-white">Create company</h2>
<form method="POST" action="{{ route('platform.companies.store') }}" class="mt-5 grid gap-4 md:grid-cols-4">
@csrf
<input name="name" placeholder="Company name"
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required>
<input name="billing_email" placeholder="billing@example.com"
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
<select name="status" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
<option value="active">Active</option>
<option value="suspended">Suspended</option>
</select>
<button
class="rounded-xl bg-zinc-900 px-4 py-2 font-semibold text-white dark:bg-white dark:text-zinc-900">Create</button>
</form>
</div>
<div
class="overflow-x-auto rounded-2xl bg-white shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-900 dark:ring-zinc-800">
<table class="min-w-full text-sm">
<thead>
<tr class="border-b">
<th class="p-4 text-left">Name</th>
<th class="p-4 text-left">Users</th>
<th class="p-4 text-left">Warehouses</th>
<th class="p-4 text-left">Licences</th>
<th class="p-4 text-left">Status</th>
</tr>
</thead>
<tbody>
@foreach ($companies as $company)
<tr class="border-b border-zinc-100 dark:border-zinc-800">
<td class="p-4 font-semibold">{{ $company->name }}</td>
<td class="p-4">{{ $company->users_count }}</td>
<td class="p-4">{{ $company->warehouses_count }}</td>
<td class="p-4">{{ $company->license_keys_count }}</td>
<td class="p-4">{{ $company->is_system_company ? 'System' : $company->status }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{ $companies->links() }}
</div>
</x-layouts::app>