## Introduction

The Head Judge panel lets Head Judges (and Admins) oversee live scoring: choose Event/Heat/Run, view judges grouped by control points, review participant scores, edit or create scores, manage approval, and monitor progress with filters, sorting, and auto‑refresh.

- Access: Only users with Head Judge permissions or Admin role can open this page.
- Selections persist: Event, Heat, and Run are remembered using local storage for a smooth workflow.
- Live operations: Use manual refresh or enable auto‑refresh to keep the scoreboard up‑to‑date.

## Navigation and Session Selection

- Event, Heat, Run dropdowns choose the scoring session. The panel loads participants, judges, and scores for that context.
- Remembered selections: When you return, the last Event/Heat/Run are restored automatically.
- Refresh updates the view. Auto‑Refresh keeps data current at intervals.

## Filters and Sorting

- Filters: Gender, Category, and status toggles:
  - To Approve – participants with any unapproved scores.
  - All Approved – participants whose scores are fully approved.
  - Waiting – participants with no scores yet.
- Sorting:
  - Default – show all; keeps natural order.
  - Average – sorts participants with complete scores by their average (others remain unsorted).
  - Latest – sorts by most recent scoring activity time (for complete participants).

## Score Grid Overview

- Participant column: Name, bib, category, gender.
- Judge columns: Grouped by Control Points (e.g., CP‑1, CP‑2). Each judge column shows score and status.
- Average: Calculated when a participant has scores from all required judges.
- Actions: Contextual buttons to Approve, Approve All, Edit, or Create a score.
- Visual cues:
  - Approved rows show a green accent.
  - Pending items indicate scores needing approval.
  - Empty cells highlight not‑yet‑scored judges.

## Approvals

- Approve a single score: Use the Approve action in the participant row.
- Approve All for participant: Approves all unapproved scores for the selected participant in the current Event/Heat/Run.
- On success, a toast confirms the update. The grid refreshes to reflect the new status.

## Editing Scores

- Edit Score: Opens the Edit Score modal with current value and status.
- Status options: OK, DNS, DNF, DSQ.
- Figures (optional): If the format supports figure data, a chip‑based selector appears by category. You can add/remove chips and save.
- Saving a score that changes value/status/figures typically requires re‑approval.
- Keyboard: Press Enter to save in the Edit form.

## Creating Scores

- Create Score: For missing judge scores, use Create in the participant row.
- Provide the value, status, and optionally select figures.
- Created scores are pending approval until confirmed.
- Keyboard: Press Enter to submit the Create form quickly.

## Figures Selector

- Tap Edit Figures to open the chip‑based selector.
- Click chips to toggle; active chips are highlighted.
- Use Clear within a category to remove all selections for that category.
- When no figures are selected, the figures data is treated as not provided.

## Auto‑Refresh and Performance

- Auto‑Refresh keeps the grid updated every few seconds.
- Disable auto‑refresh temporarily if performing many edits in sequence for a calmer view.

## FAQs

Why don’t I see any participants?
Ensure Event/Heat/Run are selected. If still empty, there may be no registered participants for that heat.
What does “Waiting / To Approve / All Approved” mean?

- Waiting: No scores submitted yet.
- To Approve: Some scores exist but at least one is unapproved.
- All Approved: All required scores are present and approved.

Why can’t I sort by Average or Latest?
Sorting applies to participants with complete scores. If none are complete yet, those sort buttons are disabled.
What happens when I edit a score?
Edits typically mark the score as needing re‑approval. The row will show pending status until approved.
I’m a Head Judge but see an access denied message.
Access requires a matching Head Judge mapping or Admin role. Contact an admin to verify your user setup.
Figures don’t appear in Edit/Create dialogs.
Figure options are available only if the event’s scoring format provides them.

## Troubleshooting

- Nothing loads: Try manual refresh; if error persists, verify you selected Event/Heat/Run.
- Network/API errors: Check your connection. If issues persist, contact a system admin.
- Stale data: Toggle Auto‑Refresh off/on or change selections to force a reload.