{{-- Grid table with row selection. Expects: $grid, $rows (paginator), $columns, $editUrl (closure), $emptyTitle. Must be rendered inside an x-data="crmGrid(...)" element. --}} @php $key = $grid->engine->keyAlias(); $showTask = $grid->hasActivitySummary() && ! array_intersect(array_keys($columns), ['status', 'subject']); @endphp {{-- Selection bar --}}
| @foreach ($columns as $name => $c) |
@if ($c['sortable']) |
@endforeach
@if ($showTask)Latest task | @endif
|---|---|---|
| @foreach ($columns as $name => $c) | @include('crm.partials.saved-view-cell', ['col' => $c]) | @endforeach @if ($showTask)
@if ($a = $row->_activity ?? null)
@php($tone = match (strtolower((string) $a->status)) { 'completed' => 'badge-green', 'in progress' => 'badge-amber', 'not started' => 'badge-blue', default => 'badge-gray' })
{{ $a->status ?: '—' }}
{{ $a->user_name ?: 'User #'.$a->user_id }}
@if ($a->count > 1)+{{ $a->count - 1 }}@endif
@else
Not allocated
@endif
|
@endif