@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @php $locked = $criteria->where('is_locked', true)->count() > 0; @endphp @if($locked)
Criteria are locked — no further modifications permitted.
@endif {{-- Existing criteria table --}} @if($criteria->isNotEmpty())

Saved Criteria

@php $total = $criteria->sum('weight'); @endphp Total Weight: {{ $total }}%
@foreach($criteria as $i => $c) @endforeach
#CriterionCategoryWeight %Max ScoreStatus
{{ $i + 1 }} {{ $c->name }} {{ $c->category ?? '—' }} {{ $c->weight }}% {{ $c->max_score }} {{ $c->is_locked ? 'Locked' : 'Draft' }}
@if(!$locked)
@csrf
@endif
@endif {{-- Form to set/replace criteria --}} @if(!$locked)

{{ $criteria->isNotEmpty() ? 'Replace Criteria' : 'Define Evaluation Criteria' }}

@csrf
@forelse($criteria as $i => $c)
@empty
@endforelse
Total weight: 0%
@endif