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')
|
{{ $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')
@endcan
|