@foreach ($costCenters as $index => $costCenter) {{ $costCenters->firstItem() + $index }} {{ $costCenter->code }}
{{ $costCenter->name }}
@if ($costCenter->description)

{{ \Illuminate\Support\Str::limit($costCenter->description, 120) }}

@endif {{ $typeOptions[$costCenter->type] ?? ucfirst(str_replace('_', ' ', $costCenter->type)) }} {{ $costCenter->parent ? $costCenter->parent->code . ' ยท ' . $costCenter->parent->name : 'โ€”' }} {{ $costCenter->is_active ? 'Active' : 'Inactive' }}
Start: {{ optional($costCenter->start_date)->format('d-m-Y') ?? 'โ€”' }}
End: {{ optional($costCenter->end_date)->format('d-m-Y') ?? 'โ€”' }}
@can('cost-center-edit') @endcan @role('super-admin')
@csrf @method('DELETE')
@endrole
@endforeach