@extends('layout.mainlayout') @section('content')
@if (session('success')) @endif
Order List
+ New Order
@forelse($orders as $order) {{-- Order Status Badge --}} {{-- Payment Status Badge --}} @empty @endforelse
Order Number / Type Total Created By Order Status Payment Date Time Action
{{ $order->order_number }}
{{ $order->order_type }} @if($order->order_type === 'DINE_IN')
@if($order->table_id)
Table: {{ $order->table_id }}
@endif @if($order->waiter_id)
Waiter: {{ $order->waiter_id }}
@endif
@endif
Tsh {{ number_format($order->total_amount, 2) }} {{ $order->created_by ?? 'System' }} @php $osColor = match($order->order_status) { 'PENDING' => 'warning', 'COOKING' => 'info', 'READY' => 'success', 'COMPLETED' => 'primary', 'CANCELLED' => 'danger', default => 'secondary', }; $osLabel = $order->order_status === 'READY' ? 'DONE' : $order->order_status; @endphp {{ $osLabel }} @if($order->chef_comment)
💬 {{ $order->chef_comment }} @endif
@php $psColor = match($order->payment_status) { 'PAID' => 'success', 'PARTIAL' => 'warning', default => 'danger', }; @endphp {{ $order->payment_status }} {{ \Carbon\Carbon::parse($order->created_at)->format('Y-m-d H:i:s') }} {{-- Receipt --}} {{-- Direct Print --}} {{-- Pay button — only when READY and not yet PAID --}} @if($order->order_status === 'READY' && $order->payment_status !== 'PAID') @endif {{-- Delete --}}
@csrf @method('DELETE')
No orders yet. Create one now.
{{-- ═══════════════════════════════════════════════════ --}} {{-- RECEIPT MODAL --}} {{-- ═══════════════════════════════════════════════════ --}} {{-- ═══════════════════════════════════════════════════ --}} {{-- PAYMENT MODAL --}} {{-- ═══════════════════════════════════════════════════ --}} @endsection