@extends('layouts.staff') @section('title', 'Kitchen Dashboard') @section('content')

Kitchen Order Dashboard

Welcome, {{ auth()->user()->full_name }}. Manage paid orders awaiting preparation.

Paid orders only
Awaiting Preparation
{{ $statistics['awaiting_preparation'] }}
Preparing
{{ $statistics['preparing'] }}
Ready
{{ $statistics['ready'] }}

Kitchen Queue

Oldest active orders are prioritised.

Refresh
@forelse ($orders as $order)
@if ($order->status === 'confirmed') Awaiting Preparation @elseif ($order->status === 'preparing') Preparing @else Ready @endif @if ( $order->fulfilment_type === 'delivery' ) Delivery @else Collection @endif

{{ $order->order_number }}

Placed {{ $order->created_at->format( 'j F Y \a\t g:i A' ) }}
Estimated fulfilment date
@if ( $order ->estimated_fulfilment_date ) {{ $order ->estimated_fulfilment_date ->format('l, j F Y') }} @else To be confirmed @endif
{{ number_format( (float) $order->total_weight_kg, 3 ) }} kg total
@foreach ($order->items as $item)

{{ $item->quantity }} × {{ $item->meal_name }}

@if ($item->category_name)
{{ $item->category_name }}
@endif
{{ $item ->delivery_lead_days }} {{ Str::plural( 'working day', $item ->delivery_lead_days ) }}
@if ($item->standard_contents)
Standard meal contents

{{ $item ->standard_contents }}

@endif @if ($item->addons->isNotEmpty())
Optional extras
    @foreach ($item->addons as $addon)
  • {{ $addon->addon_name }} @if ( $addon->quantity_scope === 'line_total' ) × {{ $addon->total_quantity }} total @else × {{ $addon->quantity_per_meal }} per meal @endif @if ( $addon->quantity_scope !== 'line_total' ) ( {{ $addon->total_quantity }} portions altogether ) @endif
    Total add-on weight: {{ number_format( (float) $addon->total_weight_kg, 3 ) }} kg
  • @endforeach
@endif @if ($item->special_instruction)
Special instruction
{{ $item ->special_instruction }}
@endif
@endforeach

Kitchen Action

@can('update kitchen orders') @if ($order->status === 'confirmed')
@csrf @method('PATCH')
@elseif ( $order->status === 'preparing' )
@csrf @method('PATCH')
@else
Kitchen preparation is complete. This order is waiting for fulfilment.
@endif @else
You have permission to view this order but not update it.
@endcan
@empty

Kitchen queue is clear

There are no paid orders waiting for kitchen action.

@endforelse
@if ($orders->hasPages())
{{ $orders->links() }}
@endif @endsection @push('scripts') @endpush