@extends('admin.layouts.app') @section('title', __('admin.startups_admin.list_title') . ' — ' . __('admin.brand.name')) @section('page_title', __('admin.startups_admin.list_title')) @php $dash = '—'; @endphp @push('styles') @endpush @section('content') @include('admin.partials.flash') {{-- ── Group chips (single horizontal scrollable row) ─────────── --}} @if (! empty($groupChips)) @php $preserve = collect(request()->query())->except(['group_id', 'page'])->all(); $chipUrl = fn ($groupId = null) => $groupId === null ? url()->current() . (count($preserve) ? '?' . http_build_query($preserve) : '') : url()->current() . '?' . http_build_query(array_merge($preserve, ['group_id' => $groupId])); // Favorites chip — toggles ?favorites=1 while preserving the // rest of the query string. See investor index for parity. $favsActive = request()->boolean('favorites'); $favsBase = collect(request()->query())->except(['favorites', 'page'])->all(); $favsChipUrl = $favsActive ? url()->current() . (count($favsBase) ? '?' . http_build_query($favsBase) : '') : url()->current() . '?' . http_build_query(array_merge($favsBase, ['favorites' => 1])); @endphp
{{ __('admin.startups_admin.all_groups') }} {{ $startups->total() }} @foreach ($groupChips as $g) {{ $g['name'] }} {{ $g['count'] }} @endforeach {{-- Favorites chip on the far end of the strip. --}} {{ __('admin.favorites.chip') }}
@endif {{-- ── Toolbar: Filters + Columns aligned ──────────────────────── --}}
{{-- Rows-per-page selector. Number-only (no label) and ordered AFTER the Columns button per UX spec. --}}
@foreach (request()->except(['per_page', 'page']) as $k => $v) @if (is_array($v)) @foreach ($v as $vv) @endforeach @else @endif @endforeach
@if ($startups->isEmpty()) @else
@foreach ($columnCatalog as $key => $col) @endforeach @foreach ($startups as $startup) @php $currentActionId = (int) ($startup->action_option_id ?? 0); $currentActionName = $currentActionId && isset($actionOptions[$currentActionId]) ? $actionOptions[$currentActionId] : ''; @endphp @foreach ($columnCatalog as $key => $col) @endforeach @endforeach
@if (isset($sortableColumns[$key])) @else {{ $col['label'] }} @endif {{ __('admin.fields.actions') }}
{{ $startup->display_name }} {!! ($col['value'])($startup) !!}
@if (! empty($actionOptions)) @endif
{{ $startups->links() }}
@endif
{{-- Rejection confirmation modal (shared with the startup show page). --}} @include('admin.partials.rejection-modal') @endsection @push('scripts') @endpush