65 lines
3.8 KiB
PHP
Executable File
65 lines
3.8 KiB
PHP
Executable File
<x-layouts::app :title="__('Licence Keys')">
|
|
<div class="space-y-6">
|
|
<x-wms.page-hero eyebrow="Platform Administration" title="Licence Keys"
|
|
description="Issue and monitor company licence keys, limits and platform access plans."
|
|
icon="fa-solid fa-key" />
|
|
@if ($plainKey)
|
|
<div class="rounded-2xl bg-emerald-50 p-4 text-emerald-900 ring-1 ring-emerald-200">New key: <code
|
|
class="font-bold">{{ $plainKey }}</code></div>
|
|
@endif
|
|
<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">Issue licence key</h2>
|
|
<form method="POST" action="{{ route('platform.licenses.store') }}" class="mt-5 grid gap-4 md:grid-cols-5">
|
|
@csrf
|
|
<label class="sr-only" for="license_company_id">Company</label>
|
|
<select id="license_company_id" name="company_id" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
|
@foreach ($companies as $company)
|
|
<option value="{{ $company->id }}">{{ $company->name }}</option>
|
|
@endforeach
|
|
</select>
|
|
<label for="sonar-input-959b26bb51" class="visually-hidden">Licence label</label>
|
|
<input name="label" placeholder="Licence label"
|
|
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required id="sonar-input-959b26bb51">
|
|
<label class="sr-only" for="license_plan">Plan</label>
|
|
<select id="license_plan" aria-label="Plan" name="plan" class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950">
|
|
<option>standard</option>
|
|
<option>professional</option>
|
|
<option>enterprise</option>
|
|
</select>
|
|
<label for="sonar-input-d9d34872cd" class="visually-hidden">max users</label>
|
|
<input name="max_users" type="number" value="10"
|
|
class="rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950" required id="sonar-input-d9d34872cd">
|
|
<button
|
|
class="rounded-xl bg-zinc-900 px-4 py-2 font-semibold text-white dark:bg-white dark:text-zinc-900">Issue</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">
|
|
<caption class="sr-only">Data table</caption>
|
|
<thead>
|
|
<tr class="border-b">
|
|
<th class="p-4 text-left">Company</th>
|
|
<th class="p-4 text-left">Label</th>
|
|
<th class="p-4 text-left">Plan</th>
|
|
<th class="p-4 text-left">Prefix</th>
|
|
<th class="p-4 text-left">Expires</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($licenses as $license)
|
|
<tr class="border-b border-zinc-100 dark:border-zinc-800">
|
|
<td class="p-4">{{ $license->company->name }}</td>
|
|
<td class="p-4 font-semibold">{{ $license->label }}</td>
|
|
<td class="p-4">{{ $license->plan }}</td>
|
|
<td class="p-4"><code>{{ $license->key_prefix }}</code></td>
|
|
<td class="p-4">{{ optional($license->expires_at)->toDateString() }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{ $licenses->links() }}
|
|
</div>
|
|
</x-layouts::app>
|