@extends('layouts/layoutMaster') @section('title', __('Shipment Details')) @section('vendor-style') @endsection @section('vendor-script') @endsection @section('content')
{{ __('Shipment') }} #{{ $shipment->number }}
{{ $shipment->status->label() }}
{{ __('OTP') }} {{ $shipment->otp ?? '-' }}
{{ __('SKU') }} {{ $shipment->sku ?? '-' }}
{{ __('Type') }} {{ App\Enums\ShipmentTypeEnum::from($shipment->type)->label() ?? '-' }}
{{ __('Dimensions (W x L)') }} {{ $shipment->width }} x {{ $shipment->length }}
{{ __('Weight') }} {{ $shipment->weight }}
{{ __('Order Details') }} {{ $shipment->details ?? '-' }}
{{ __('Customer Information') }} {{-- Add dashboard customer edit link here if customers are managed as a dashboard entity --}}
{{ __('Customer') }} {{ $shipment->customer_name ?? '-' }}
{{ __('Phone') }} {{ $shipment->customer_phone ?? '-' }}
{{ __('Address') }} {{ $shipment->address_details ?? '-' }}
{{ __('Customer Coordinates') }} {{ $shipment->latitude }}, {{ $shipment->longitude }}
{{ __('Target Delivery Date') }} {{ $shipment->target_delivery_date ?? '-' }}
{{ __('Driver Delivery Date') }} {{ $shipment->driver_delivery_date ?? '-' }}
{{ __('Map') }}
{{ __('QR Code') }}
@php $qrUrl = $shipment->getFirstMediaUrl('qrcode'); @endphp @if ($qrUrl) QR @else {{ __('No QR available') }} @endif
@if ($shipment->transport?->delivery)
{{ __('Driver Information') }}
@if ($shipment->transport?->delivery) {{ __('Edit') }} @endif
@if ($shipment->transport?->delivery?->user)
{{ __('Driver') }} {{ $shipment->transport->delivery->user->name }} ({{ $shipment->transport->delivery->user->phone }})
@endif @if ($shipment->transport?->delivery?->category)
{{ __('Delivery Category') }} {{ $shipment->transport->delivery->category->name ?? '-' }}
@endif @if ($shipment->transport?->delivery?->team)
{{ __('Team') }} {{ $shipment->transport->delivery->team->name ?? '-' }}
@endif
@endif
{{ __('Store Information') }}
@if ($shipment->store) {{ __('Edit') }} @endif
@if ($shipment->store?->user)
{{ __('Store') }} {{ $shipment->store->user->name }} ({{ $shipment->store->user->phone }})
{{ __('Category') }} {{ $shipment->store->category->name ?? '-' }}
{{ __('Delivery Team') }} {{ $shipment->store->deliveryTeam->name ?? '-' }}
@endif
@if ($shipment->tardPoint)
{{ __('Delivery Point Information') }}
{{ __('Edit') }}
@if ($shipment->tardPoint?->user)
{{ __('Delivery Point') }} {{ $shipment->tardPoint->user->name }} ({{ $shipment->tardPoint->user->phone }})
{{ __('Address') }} {{ $shipment->tardPoint->user->address_details ?? '-' }}
@endif @if ($shipment->tardPoint?->category)
{{ __('Category') }} {{ $shipment->tardPoint->category->name ?? '-' }}
@endif
@endif @if ($shipment->status === \App\Enums\ShipmentStatusEnum::CANCELLED)
{{ __('Cancellation Details') }}
{{ __('Reason') }} {{ $shipment->cancelledComment->content ?? '-' }}
{{ __('Cancelled By') }} @php $cancelledByType = $shipment->cancelled_by_type ? class_basename($shipment->cancelled_by_type) : null; $cancelUser = $shipment->cancelledBy?->user; @endphp {{ $cancelledByType ?? '-' }} @if ($cancelUser) - {{ $cancelUser->name }} ({{ $cancelUser->phone }}) @endif
@endif @endsection @section('page-script') @endsection