@section('title', 'Items') @section('breadcrumbs') {{ Breadcrumbs::render('items.index') }} @endsection
@if(session('success'))
@endif
@php $tabs = ['received' => 'Received', 'assigned' => 'Assigned', 'store' => 'Stored', 'ship' => 'Ready to Ship', 'all' => 'All']; $currentStatus = request('status', 'received'); @endphp @foreach ($tabs as $key => $label) {{ $label }} @endforeach
@role('administrator')
@endrole
@if ($items->count())
@foreach ($items as $item)
@role('administrator') @if (!$item->package_id && in_array($item->status, ['ship', 'received', 'assigned']))
@else @endif @endrole @if ($item->image) @endif
Tracking: {{ $item->tracking_number }}
Item ID: {{ $item->id }}
@if ($item->stored_at) @endif @if ($item->shipped_at) @endif
Customer:{{ optional($item->user)->name ?? 'N/A' }}
Category:{{ $item->category->name ?? 'N/A' }}
Weight:{{ $item->weight }} kg
Status: @if ($item->status === 'store') Stored @elseif ($item->status === 'ship') Ready to Ship @else {{ ucfirst($item->status) }} @endif
Stored At:{{ $item->stored_at->format('Y-m-d') }}
Shipped At:{{ $item->shipped_at->format('Y-m-d') }}
@endforeach
@else

No items found.

@endif
@push('scripts') @endpush