@extends('layouts.app') @section('title', __('Grading Criteria')) @push('styles') @endpush @section('content') {{-- Page Header --}}

{{ __('Grading Criteria') }}

{{ __('Criteria are configurable here and snapshotted onto each selection decision, so later changes never rewrite past decisions.') }}

{{-- ✅ Add Criterion Form --}}
{{ __('Add New Criterion') }}
@csrf
{{-- ✅ Criteria Table --}}
@forelse($criteria as $criterion) @empty @endforelse
{{ __('Name') }} {{ __('Max Score') }} {{ __('Weight') }} {{ __('Status') }}
{{ $criterion->name }} {{ $criterion->max_score }} {{ $criterion->weight ?? '—' }} {{-- Assuming status is a string like 'active' or a boolean --}} @if (is_string($criterion->status)) @else @endif
{{ __('No criteria found') }}

{{ __('Add a new criterion using the form above.') }}

{{-- ✅ Custom Pagination --}}
Showing {{ $criteria->firstItem() ?? 0 }}–{{ $criteria->lastItem() ?? 0 }} of {{ $criteria->total() }} results
{{ $criteria->appends(request()->query())->links('pagination::bootstrap-5') }}
@endsection