## Configure Heats Panel Help

This guide covers all features for assigning participants to heats, managing ordering, and bulk-updating bibs with filters, search, drag-and-drop, and utilities.

##### Introduction

The Configure Heats panel lets you: (1) filter/search available participants and assign them to a selected heat; (2) review current heat assignments; (3) reorder, sort, shuffle, reverse selections; (4) assign bib numbers in bulk; (5) move/copy or promote to another heat; and (6) remove assignments.

On this page

#### 1) Event selection

- Use the Event dropdown at the top to choose the event you’re configuring.
- Until an event is selected, assignments and heat options are hidden.

#### 2) Filters & search (Grid/Row view)

In the “Available Participants” area, you can switch between:

- Grid view (cards) and Row view (table-like) — use the toggle buttons or press `V` to switch.
- Filter by Category, Gender, Club, and Year.
- Search by name, bib, or club. Use the clear button to reset.
- Select cards/rows by clicking them. “Select all visible” chooses everything currently shown after filters/search.
- Selection syncs across Grid/Row views automatically; if a selected item becomes hidden by filters, it’s de-selected for safety.
- The status badge shows total visible and selected counts. Use Esc to clear the selection.
- Mobile/touch friendly: tap to select/deselect items.

Tip: Participants listed here are those in the event and not yet assigned to any heat. If someone is missing, check the Current Assignments table or add them to the event first.

##### 2a) What appears where (data sources)

- Available Participants pulls people already added to the selected event, but who are not currently assigned to any heat.
- Current Assignments shows all rows in `event_participants` for the event — each row is one participant assigned to a heat.
- Category shown in Available Participants is derived from event-specific category if set; otherwise their base category is used.

#### 3) Assign to heat

- Select one or more participants, choose a Heat from the Heat Selection dropdown, then click Assign.
- Duplicate prevention: A participant with the same bib cannot be inserted twice into the same heat. Duplicates are skipped.
- If you see no heats, configure your event’s heats in `event_heat_settings` first.
- Assignment runs via AJAX. On success you’ll get a confirmation and the page reloads to reflect changes.

Note: Some deployments include an optional Auto‑Assign feature to add all currently visible filtered participants to a heat. If present, use filters first, then run Auto‑Assign to the target heat.

#### 4) Current assignments table

- Shows all participants in heats for the selected event.
- Filter by Heat, Category, Club, Gender, and Year.
- Year supports single years, ranges (e.g., 2016–2020), and age groups (Under/Over N):
  - Range: Keep rows where birth year is within the range.
  - Before/After: Keep rows where birth year is before/after the threshold.
  - Under‑N: Keep rows with birth year greater than currentYear–N (younger than N).
  - Over‑N: Keep rows with birth year less than currentYear–N (older than N).
- Use the master checkbox to select visible rows. Each row has quick actions (edit participant, remove from heat).
- Drag-and-drop rows to reorder. New order is saved automatically.
- Serial number column auto-renumbers based on current filter and row visibility.
- Master checkbox shows an indeterminate state when some but not all visible rows are selected.

#### 5) Reorder, reverse, shuffle, sort

- Reverse Selected: flips the order of selected rows where they currently are.
- Shuffle Selected: randomizes the order of selected rows.
- Sort by Name, Sort by bib, Sort by Year: sorts only the selected rows in place.
- All operations respect filters and only apply to visible + selected rows.
- Group drag: If multiple rows are selected, dragging one moves the entire selected block together.
- Every change posts the new order to be saved; look for a small console message if you’re debugging.

#### 6) Assign bib numbers (bulk)

- Open Assign bib to pick a bib series, optional start number, and whether to overwrite existing bibs.
- Select rows in the assignments table first; the modal operates on those IDs.
- Series bounds are shown; leave start number blank to continue from the series’ next available.
- Start number placeholder auto-fills from the chosen series. If Overwrite existing is unchecked, only empty bibs are assigned.

#### 7) Move / Copy / Promote

- Move to Heat: transfers selected assignment rows to another heat and removes them from the source heat.
- Copy to Heat: duplicates selected assignment rows into another heat, keeping the originals.
- Promote to Heat: moves participants based on event promotion logic (linked heat flow/results). This is a separate modal from Move/Copy and usually does not require row selection.
- Submit buttons and descriptions update based on whether you choose Move vs Copy. Confirmations are shown before running.

#### 8) Remove / Unassign

- Use Remove Selected to unassign multiple rows at once.
- Use the row’s Remove action (X) to unassign a single participant from a heat.
- These operations delete from `event_participants` (they don’t remove the person from the event entirely).
- Both bulk and single remove paths show a confirmation before proceeding.

#### FAQ

##

They might already be assigned to a heat for this event (check the Current Assignments table) or not added to the event yet. The available list shows only participants in the event who are not currently in any heat.

##

Move reassigns rows to the target heat; Copy duplicates rows in the target heat; Promote uses your configured heat flow/results to advance participants automatically.

##

When assigning, the system checks if a participant with the same bib already exists in the target heat and skips duplicates. If two participant records share the same bib, only one can exist in a given heat.

##

From your event’s heat configuration (`event_heat_settings`). If you don’t see options, set them up first.

##

You can drag to reorder within the table as displayed. To move across heats, use Move/Copy/Promote. Saved order applies to the rows in the table after changes.

##

For safety, items hidden by active filters/search are deselected to avoid unintended operations on invisible rows. Clear filters to select them again.

##

No. They unassign the row from the heat by deleting from `event_participants`. The participant remains in the event.

##

Heats are loaded from your event’s heat settings. Configure `event_heat_settings` for the event, then return to this page.

#### Troubleshooting

- Assign button does nothing: Make sure you selected a heat and at least one participant. Check for any on-page error messages or network errors.
- No heats in the dropdown: Configure heats for the event first.
- Participant won’t assign: If the same bib already exists in the target heat, it’s skipped to prevent duplicates.
- Drag-and-drop not saving: Ensure the table is not filtered down to zero rows; try a small reorder and watch the console for a “Saved order” message.
- Bulk actions don’t run: Confirm you’ve selected visible rows (master checkbox respects filters). The confirmation dialog must be accepted.
- Move/Copy/Promote blocked: Pick a target heat and ensure you’ve selected rows for Move/Copy. Promote typically doesn’t need selection.

#### Keyboard shortcuts

- `Ctrl/Cmd + A`: Select all visible (in the Available Participants area)
- `Esc`: Clear selection
- `Ctrl/Cmd + F`: Focus the participant search
- `V`: Toggle Grid/Row view