Files
AirService_potyk/resources/views/livewire/directories/statuses-page.blade.php
T
2026-03-20 15:47:17 +05:00

13 lines
1.8 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="slug" placeholder="Slug" 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="sortOrder" type="number" min="1" class="w-full rounded-xl border border-slate-300 px-3 py-2">
<label class="inline-flex items-center gap-2"><input wire:model.defer="isFinal" type="checkbox" class="rounded"> <span class="text-sm">Финальный</span></label>
<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">Slug</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">{{ $item->slug }}</td><td class="py-2">{{ $item->sort_order }}</td><td class="py-2">{{ $item->is_final ? 'Да' : 'Нет' }}</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>