@extends('admin.layouts.layouts') @section('title', 'View Order') @section('content')
Farmer Name:
{{ $showDetails->users->name ?? '-' }}
Order Number:
{{ $showDetails->order_number ?? '-' }}
Order Date:
{{ isset($showDetails->order_date) ? date('d-m-Y', strtotime($showDetails->order_date)) : '-' }}
Total Amount:
{{ number_format((float) $showDetails->total_amount, 2, '.', '') ?? '-' }}
Created At:
{{ $showDetails->created_at->format('d-m-Y h:i A') ?? '-' }}
{{--
Created By:
{{ $showDetails->creator->name ?? '' }}
--}}
Status:
@php switch ($showDetails->status) { case '0': $buttonClass = 'warning'; $buttonText = 'Pending'; break; case '1': $buttonClass = 'info'; $buttonText = 'Confirmed'; break; case '2': $buttonClass = 'success'; $buttonText = 'Completed'; break; case '3': $buttonClass = 'danger'; $buttonText = 'Cancelled'; break; case '4': $buttonClass = 'primary'; $buttonText = 'Dispatch'; break; default: $buttonClass = 'secondary'; // A neutral default for unknown statuses $buttonText = 'Unknown Status'; break; } @endphp
By Hand or Courier:
@if (isset($showDetails->by_hand_or_courier)) @if ($showDetails->by_hand_or_courier == 0 || $showDetails->by_hand_or_courier == '0') By Hand @else By Courier @endif @else - @endif
Courier Company:
{{ $showDetails->courierCompany?->name ?? '-' }}
Tracking Number:
{{ $showDetails->tracking_no ?? '-' }}
{{-- Unified Modal for Assign --}}
Order Items
No Product Name Product Type Price Quantity Created Date
Order History
No Status Status Date Updated Date Updated By
@endsection @section('page-js') @endsection