@extends('layouts.umaster') @section('title', 'Orders Deatils '. $order->id) @section('content')

Orders Details

Order Details (#{{ $order->id }})
Date

{{ $order->created_at->format('d M, Y h:i A') }}

Payment

Wallet

Shipping

{{--

Description: {{ $order->description }}

Status: {{ $order->status }}

Order Date: {{ $order->created_at }}

Shipping Cost: {{ $order->shipping_cost }}

--}} {{--
Customer Details
Customer

{{ $order->user->fname ?? 'N/A' }}{{ $order->user->lname ?? 'N/A' }}

Email

{{ $order->user->email ?? 'N/A' }}

contact

{{ $order->user->phone ?? 'N/A' }}

--}}
Documents
Mark Name:

{{ $order->user->mark ?? 'N/A' }}

Tracking

#{{ $order->tracking_number }}

Shipping Cost

{{ $order->shipping_cost }}

{{-- --}} {{--
{{ $order->days_to_destination }} Days Remaining
--}}


Loading...
Product Details Status number of Sacks/Box Expected Date
{{ $order->description }} {{ $order->status }} {{ $order->qty }} {{ $order->delivery_date }}
Order Status
    @php // Updated status map with new statuses $statusMap = [ 'Received in China' => ['color' => 'primary', 'icon' => 'ph-duotone ph-map-pin'], 'In Transit' => ['color' => 'secondary', 'icon' => 'ph-duotone ph-truck'], 'Received in Ghana' => ['color' => 'info', 'icon' => 'ph-duotone ph-map-trifold'], 'Available for Pickup' => ['color' => 'warning', 'icon' => 'ph-duotone ph-checks'], 'Completed' => ['color' => 'dark', 'icon' => 'ph-duotone ph-check-circle'], 'pending' => ['icon' => 'ti-clock', 'color' => 'secondary'], 'loading' => ['icon' => 'ti-package-export', 'color' => 'warning'], 'departed' => ['icon' => 'ti-rocket', 'color' => 'info'], 'Transit' => ['icon' => 'ti-road', 'color' => 'primary'], 'at port' => ['icon' => 'ti-anchor', 'color' => 'dark'], 'discharged' => ['icon' => 'ti-box', 'color' => 'success'], 'delivered' => ['icon' => 'ti-check', 'color' => 'success'], ]; @endphp @forelse($order->history as $history) @php // Get the status info from the statusMap or default to a fallback $statusInfo = $statusMap[$history->status] ?? ['color' => 'dark', 'icon' => 'ti-alert']; $formattedDate = \Carbon\Carbon::parse($history->date_updated)->format('D, d M Y - h:i A'); @endphp
  • {{ $history->status }}

    {{ $formattedDate }}

    {{ $history->description ?? 'No details provided.' }}

  • @empty
  • No Status
  • @endforelse
{{-- --}}
@endsection