@extends('layouts.app') @section('content')

{{ __('dashboard.title') }}

{{ __('dashboard.recent_orders') }}

@if($recent_orders->isEmpty())
{{ __('dashboard.no_recent_orders') }}
@else
@foreach($recent_orders as $order) @endforeach
{{ __('common.order_number') }} {{ __('common.customer') }} {{ __('common.date') }} {{ __('common.status') }} {{ __('common.actions') }}
{{ $order->order_number }} {{ $order->customer->first_name }} {{ $order->customer->last_name }} {{ $order->order_date?->translatedFormat('d F Y') }} @php $statusLabels = [ 'draft' => __('orders.status_draft'), 'active' => __('orders.status_active'), 'completed' => __('orders.status_completed'), 'cancelled' => __('orders.status_cancelled'), 'delivered' => __('orders.status_delivered'), 'Draft' => __('orders.status_draft'), 'In Production' => __('orders.status_in_production'), 'Ready for Trial' => __('orders.status_ready_for_trial'), 'Completed' => __('orders.status_completed'), 'Delivered' => __('orders.status_delivered'), ]; @endphp {{ $statusLabels[$order->status] ?? $order->status }} {{ __('common.view') }}
@endif

{{ __('dashboard.recent_measurements') }}

@if($recent_measurements->isEmpty())
{{ __('dashboard.no_recent_measurements') }}
@else
@foreach($recent_measurements as $m) @endforeach
{{ __('common.ref_no') }} {{ __('common.customer') }} {{ __('common.date') }} {{ __('common.cloth_type') }} {{ __('common.actions') }}
{{ $m->measurement_number }} {{ $m->customer->first_name }} {{ $m->customer->last_name }} {{ $m->date?->translatedFormat('d F Y') }} {{ $m->clothType?->title ?? '-' }} {{ __('common.view') }}
@endif
@endsection