@extends('layouts.front.home') @section('title') {{ __('nav.customer_dashboard_title') }} @endsection @section('css') @endsection @section('content') @php $isAr = app()->getLocale() === 'ar'; @endphp
@include('flash::message')

{{ __('nav.welcome_back') }}

{{ __('nav.dashboard_track_desc') }}

{{ __('nav.recent_orders') }}
{{ __('nav.view_all') }}
@forelse($orders as $order) @php $statusState = $order->front_status_state ?? ['text' => ($isAr ? 'قيد الانتظار' : 'Pending'), 'class' => 'vd-chip-pending']; $statusChipClass = $statusState['class'] ?? 'vd-chip-pending'; if (str_starts_with($statusChipClass, 'chip-')) { $statusChipClass = 'vd-chip-' . substr($statusChipClass, 5); } @endphp

{{ __('nav.order') }} #{{ $order->id }}

{{ $order->provider->name ?? '-' }}

{{ $statusState['text'] ?? ($isAr ? 'قيد الانتظار' : 'Pending') }}
{{ number_format((float)($order->total_cost ?? 0), 2) }} SAR
@empty
{{ __('nav.no_orders') }}
@endforelse
{{ __('nav.notifications') }}
{{ __('nav.view_all') }}
@forelse($recentNotifications as $n)

{{ $n->title ?? __('nav.alert') }}

{{ \Illuminate\Support\Str::limit($n->message ?? $n->content, 60) }}

@empty
{{ __('nav.no_notifications') }}
@endforelse
@include('front.partials.order-workflow-hint', ['role' => 'customer'])
@endsection @section('script') @endsection