{{ __('Batch List') }}

@can('create_batch') {{ __('Add New Batch') }} @endcan
@if (session('success')) @endif

Filters

Reset
@if($batches->count() > 0)
@foreach($batches as $batch) @endforeach
ID Harvest Time Status Source Product Actions
{{ $batch->id }} {{ $batch->harvest_time ? \Carbon\Carbon::parse($batch->harvest_time)->format('M d, Y') : 'N/A' }} @php $statuses = [ 'pending' => 'Pending', 'processing' => 'Processing', 'completed' => 'Completed', 'cancelled' => 'Cancelled' ]; $statusColors = [ 'pending' => 'bg-yellow-100 text-yellow-800', 'processing' => 'bg-blue-100 text-blue-800', 'completed' => 'bg-green-100 text-green-800', 'cancelled' => 'bg-red-100 text-red-800', ]; $statusColor = $statusColors[$batch->status] ?? 'bg-gray-100 text-gray-800'; @endphp @can('manage_batch')
@else {{ $statuses[$batch->status] ?? ucfirst($batch->status) }} @endcan
@if($batch->source) {{ $batch->source->name ?? 'Source #' . $batch->source->id }} @else N/A @endif {{ $batch->product->name ?? 'N/A' }}
@can('create_batch') {{ __('Eco Process') }} @endcan @can('view_batch') View @endcan @can('edit_batch') Edit @endcan @can('delete_batch')
@endcan
@if($batches->hasPages())
{{ $batches->links() }}
@endif @else
No batches found. @can('create_batch') Create one now. @endcan
@endif
@push('scripts') @endpush