@extends('layouts.omd.omd') @section('title', 'Orders List') @section('content')
{{-- ── PAGE HEADER ── --}} {{-- ── STATS ROW ── --}} {{-- ── MAIN CONTENT ── --}}
{{-- ── TAB PILLS ── --}}
{{-- ════ INQUEUE ORDERS ════ --}}
InQueue Orders
@forelse($inQueueOrders as $order) @php $q = $order->quotation; $qn = $q ? strtoupper(substr($q->state_code ?? '', 0, 2)) . '-' . ($q->created_at ? \Carbon\Carbon::parse($q->created_at)->format('y') : '00') . '-' . str_pad($q->id ?? 0, 3, '0', STR_PAD_LEFT) : 'N/A'; $pv = $order->progress ?? 0; $pc = $pv < 40 ? 'danger' : ($pv < 70 ? 'warning' : 'success'); @endphp @empty @endforelse
Quote No Factory Name / Location % Completion Status Chat Remarks
{{ $qn }}
{{ $order->title ?? 'Project Name' }}
{{ $order->location ?? '—' }}
{{ $pv }}% complete
{{ $order->current_status ?? 'In Queue' }} Chat @if($order->remarks === 'Delayed') Delayed @else On Time @endif

No InQueue orders found

{{-- ════ ACTIVE ORDERS ════ --}}
Active Orders
@forelse($activeOrders as $order) @php $q = $order->quotation; $qn = $q ? strtoupper(substr($q->state_code ?? '', 0, 2)) . '-' . ($q->created_at ? \Carbon\Carbon::parse($q->created_at)->format('y') : '00') . '-' . str_pad($q->id ?? 0, 3, '0', STR_PAD_LEFT) : 'N/A'; $pv = $order->progress ?? 0; $pc = $pv < 40 ? 'danger' : ($pv < 70 ? 'warning' : 'success'); @endphp @empty @endforelse
Quote No Factory Name / Location % Completion Status Chat
{{ $qn }}
{{ $order->title ?? 'Project Name' }}
{{ $order->location ?? '—' }}
{{ $pv }}% complete
{{ $order->current_status ?? 'Processing' }} Chat

No active orders found

{{-- ════ COMPLETED ORDERS ════ --}}
Completed Orders
@forelse($completedOrders as $order) @empty @endforelse
Job No Project Name / Location % Completion Status
#E{{ $order->id }}
{{ $order->project_name ?? 'Project Name' }}
{{ $order->location ?? '—' }}
{{ $order->completion ?? 100 }}% complete
Completed

No completed orders found

{{-- end tab-content --}}
{{-- end main-wrap --}}
@endsection