id ?? 'null' }}; $dispatch('kanban-drag', { id: {{ $order?->id ?? 'null' }} })"
@dragend="draggingId = null"
:class="draggingId === {{ $order?->id ?? 'null' }} ?
'shadow-lg ring-2 ring-offset-2 ring-{{ $color }}-300/80 dark:ring-{{ $color }}-700/70 dark:ring-offset-gray-950 scale-[0.99] transition' :
'cursor-grab active:cursor-grabbing transition'">
{{ __('dashboard.kitchen_tickets.order_number', ['id' => $order?->id ?? '?']) }}
{{ $order?->branch?->name ?? __('dashboard.kitchen_tickets.no_branch') }}
@if ($order?->table?->name)
-
{{ __('dashboard.kitchen_tickets.table_name', ['name' => $order->table->name]) }}
@endif
{{ __('dashboard.kitchen_tickets.added_at', ['time' => $order?->created_at?->diffForHumans()]) }}
@foreach ($items as $item)
{{ $item->qty }}x
{{ $item->name }}
@if (!$currentKitchen)
{{ $item->kitchen?->name ?? __('dashboard.kitchen_tickets.global_kitchen') }}
@endif
@if ($item->options->count())
{{ $item->options->pluck('name')->implode(', ') }}
@endif
{{ __('dashboard.kitchen_tickets.notes', ['notes' => $item->notes ?: __('dashboard.kitchen_tickets.no_notes')]) }}
@if ($item->status === \App\Models\OrderItem::STATUS_PENDING)
@endif
@if ($item->status === \App\Models\OrderItem::STATUS_PREPARING)
@endif
@endforeach
@php
$hasPending = $items->contains(fn($i) => $i->status === \App\Models\OrderItem::STATUS_PENDING);
$allReady = $items->every(fn($i) => $i->status === \App\Models\OrderItem::STATUS_READY);
@endphp
@if ($hasPending)
@endif
@if (!$allReady)
@endif