11 lines
1.5 KiB
PHP
11 lines
1.5 KiB
PHP
<div class="grid gap-4 lg:grid-cols-3">
|
|
<div class="card"><div class="card-body space-y-3">
|
|
<h2 class="text-lg font-semibold">{{ $editingId ? 'Редактировать приоритет' : 'Новый приоритет' }}</h2>
|
|
<input wire:model.defer="name" placeholder="Название" class="w-full rounded-xl border border-slate-300 px-3 py-2">
|
|
<input wire:model.defer="colorHex" type="color" class="w-full rounded-xl border border-slate-300 px-3 py-2 h-10">
|
|
<input wire:model.defer="level" type="number" min="1" max="4" class="w-full rounded-xl border border-slate-300 px-3 py-2">
|
|
<button wire:click="save" class="rounded-xl bg-slate-900 text-white px-3 py-2 text-sm">Сохранить</button>
|
|
</div></div>
|
|
<div class="card lg:col-span-2"><div class="card-body"><table class="min-w-full text-sm"><thead><tr><th class="text-left py-2">Название</th><th class="text-left py-2">Цвет</th><th class="text-left py-2">Уровень</th><th></th></tr></thead><tbody>@foreach($items as $item)<tr class="border-t border-slate-100"><td class="py-2">{{ $item->name }}</td><td class="py-2"><span class="inline-block h-4 w-8 rounded" style="background-color: {{ $item->color_hex }}"></span></td><td class="py-2">{{ $item->level }}</td><td class="py-2 text-right"><button wire:click="edit({{ $item->id }})" class="text-xs mr-2">Изм.</button><button wire:click="delete({{ $item->id }})" class="text-xs text-rose-600">Удалить</button></td></tr>@endforeach</tbody></table></div></div>
|
|
</div>
|