{{ __('Eco Processes for Batch #:batch', ['batch' => $batch->id]) }}

@if (session('success')) @endif
@if($ecoProcesses->count() > 0)
@foreach($ecoProcesses as $ecoProcess) @endforeach
ID Stage Status Start Time End Time Actions
{{ $ecoProcess->id }} @php // Convert snake_case to Title Case and replace underscores with spaces $stageDisplay = ucwords(str_replace(['_', '-'], ' ', $ecoProcess->stage)); // Handle special cases like 'n' to '&' $stageDisplay = str_ireplace(' n ', ' & ', $stageDisplay); @endphp {{ $stageDisplay }} @php $statuses = [ 'pending' => 'Pending', 'in_progress' => 'In Progress', 'completed' => 'Completed', 'failed' => 'Failed' ]; $statusColors = [ 'pending' => 'bg-yellow-100 text-yellow-800', 'in_progress' => 'bg-blue-100 text-blue-800', 'completed' => 'bg-green-100 text-green-800', 'failed' => 'bg-red-100 text-red-800', ]; $statusColor = $statusColors[$ecoProcess->status] ?? 'bg-gray-100 text-gray-800'; @endphp @can('manage_batch')
@else {{ str_replace('_', ' ', ucfirst($ecoProcess->status)) }} @endcan
{{ $ecoProcess->start_time?->format('Y-m-d H:i') ?? 'N/A' }} {{ $ecoProcess->end_time?->format('Y-m-d H:i') ?? 'N/A' }}
@can('edit_batch') {{ __('Edit') }} @endcan @can('delete_batch')
@csrf @method('DELETE')
Are you sure?
@endcan
@if($ecoProcesses->hasPages())
{{ $ecoProcesses->links() }}
@endif @else
{{ __('No eco processes found.') }} @can('create_batch') {{ __('Create one now') }} @endcan
@endif