@section('title', 'Packages') @section('breadcrumbs') {{ Breadcrumbs::render('packages.index') }} @endsection
@php $tabs = ['created' => 'Created', 'processing' => 'Processing', 'shipped' => 'Shipped', 'delivered' => 'Delivered', 'all' => 'All']; $currentStatus = request('status', 'created'); @endphp @foreach ($tabs as $key => $label) {{ $label }} @endforeach
@if ($packages->count())
@foreach ($packages as $package) @php $cost = $package->calculateTotalCost(); @endphp
{{ ucfirst($package->status) }}
TN# {{ $package->tracking_number }}

@if(Auth::user()->hasRole('administrator')) @endif
Customer:{{ $package->user->email ?? 'N/A' }}
Weight:{{ $package->calculateWeight() }} kg
From:{{ $package->shipping_from }}
To:{{ $package->shipping_to }}
Total:${{ number_format($cost['total'], 2) }}

{{ ucfirst($package->payment_status) }}

@endforeach
@else

No packages found.

@endif
@push('scripts') @endpush