TKK_E32222868/storage/framework/views/01b97acf2befda05deb094a2abc...

64 lines
4.0 KiB
PHP

<div class="p-6 text-white">
<h2 class="text-xl font-semibold mb-4">Daftar Pesanan untuk Dimasak</h2>
<div class="overflow-x-auto rounded-lg bg-[#1f1f1f]">
<table class="min-w-full text-sm text-white">
<thead class="bg-[#2c2c2c] text-gray-300 uppercase text-xs">
<tr>
<th class="px-4 py-3 text-left">Menu Pesanan</th>
<th class="px-4 py-3 text-left">Nama Item</th>
<th class="px-4 py-3 text-left">Meja</th>
<th class="px-4 py-3 text-left">Customer</th>
<th class="px-4 py-3 text-left">Waktu Pesan</th>
<th class="px-4 py-3 text-left">Status</th>
<th class="px-4 py-3 text-left">Aksi</th>
</tr>
</thead>
<tbody>
<!--[if BLOCK]><![endif]--><?php $__empty_1 = true; $__currentLoopData = $kitchenItems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $orderId => $items): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr class="border-t border-gray-700 hover:bg-[#2a2a2a] transition">
<td class="px-4 py-2 font-semibold"><?php echo e($orderId); ?></td>
<td class="px-4 py-2">
<ul class="list-disc list-inside">
<!--[if BLOCK]><![endif]--><?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li><?php echo e($item['name']); ?> (x<?php echo e($item['quantity']); ?>)</li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><!--[if ENDBLOCK]><![endif]-->
</ul>
</td>
<td class="px-4 py-2"><?php echo e($items[0]['table_id']); ?></td>
<td class="px-4 py-2"><?php echo e($items[0]['customer_name']); ?></td>
<td class="px-4 py-2"><?php echo e(\Carbon\Carbon::parse($item['updated_at'])->diffForHumans()); ?></td>
<td class="px-4 py-2">
<?php
$allCooked = collect($items)->every(fn($i) => $i['cooked']);
?>
<!--[if BLOCK]><![endif]--><?php if($allCooked): ?>
<span class="text-green-400 font-medium">Done</span>
<?php else: ?>
<span class="text-orange-400 font-medium">Process</span>
<?php endif; ?><!--[if ENDBLOCK]><![endif]-->
</td>
<td class="px-4 py-2">
<!--[if BLOCK]><![endif]--><?php if(!$allCooked): ?>
<button wire:click="markAllAsCooked(<?php echo e($orderId); ?>)"
class="bg-blue-600 hover:bg-blue-700 text-white text-xs px-3 py-1 rounded shadow">
Sudah Dimasak
</button>
<?php else: ?>
<span class="text-green-500 text-xs">✔ Semua sudah dimasak</span>
<?php endif; ?><!--[if ENDBLOCK]><![endif]-->
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr>
<td colspan="6" class="px-4 py-6 text-center text-gray-400">Tidak ada pesanan yang perlu
dimasak.</td>
</tr>
<?php endif; ?><!--[if ENDBLOCK]><![endif]-->
</tbody>
</table>
</div>
</div>
<?php /**PATH E:\!PROJECT\dfood-website\resources\views/livewire/kitchen-orders.blade.php ENDPATH**/ ?>