@php $playerPool = $playerPool ?? []; $readonly = $rulesLocked ?? false; $categories = $playerPool['categories'] ?? config('league_rules_defaults.playerPool.categories'); $missingCategoryIds = collect($categories)->contains(fn ($cat) => empty($cat['categoryId'])); @endphp @if ($missingCategoryIds && ! $readonly) @endif
@include('admin.leagues.rules._rules_card_header', ['title' => 'Category Base Prices And Pool Counts'])
Category Base Price Pool Count
@foreach ($categories as $index => $category) @php $categoryId = $category['categoryId'] ?? null; $categoryLabel = ($category['name'] ?? 'Category') . ($categoryId ? ' (#' . $categoryId . ')' : ''); @endphp
{{ $categoryLabel }} @if ($categoryId) @endif
@endforeach
@include('admin.leagues.rules._rules_card_header', ['title' => 'Pool Summary'])
@include('admin.leagues.rules._rules_field', [ 'name' => 'playerPool[auctionPlayers]', 'id' => 'auctionPlayers', 'label' => 'Auction Players', 'value' => (int) ($playerPool['auctionPlayers'] ?? 90), 'helper' => 'Must be 90 as per rulebook.', 'readonly' => $readonly, ]) @include('admin.leagues.rules._rules_field', [ 'name' => 'playerPool[standbyPlayers]', 'id' => 'standbyPlayers', 'label' => 'Standby Players', 'value' => (int) ($playerPool['standbyPlayers'] ?? 10), 'helper' => 'Must be 10 as per rulebook.', 'readonly' => $readonly, ])