The Participants page (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/SdazaP/ruTournament/llms.txt
Use this file to discover all available pages before exploring further.
/dashboard/tournament/:id/competitors) is your central hub for managing the roster of a tournament after it has been created. From here you can add new competitors mid-tournament, correct names, reassign category memberships, search and filter the list, and permanently remove competitors. All changes are persisted immediately to IndexedDB via db.tournaments.put() — no server round-trip is needed. The page is read-only when the tournament status is Finalized.
Adding a competitor
The add-competitor form appears at the top of the page whenever the tournament is not Finalized. It contains three elements:- Name input — type the competitor’s full name. A duplicate check (
isDuplicateName) runs when you click Agregar. If the name matches any existing competitor, an error message"Ya existe un competidor con ese nombre"appears beneath the input and the add action is blocked. - Category selector — a
CategoryTogglecomponent displays all categories in the tournament as clickable tags. Select exactly one category to associate the new competitor with on creation. (You can add more categories later in Edit Mode.) - Agregar button — clicking this calls
handleAdd, which validates uniqueness one final time, creates aCompetitorLocalrecord withid: Date.now().toString(), and writes it to IndexedDB.
Editing competitors
All modifications to existing competitors are gated behind Edit Mode. To enable it, click the “Activar Edición” button in the top-right corner of the page. While Edit Mode is active:- Every competitor row becomes an editable form: the name cell switches from a static
<span>to a text<input>, and the category tags become interactive toggles. - A yellow “Modo edición activado” notification badge bounces in the bottom-right corner as a persistent reminder.
- The app tracks which competitors have been changed and counts unsaved modifications.
| Button | Action |
|---|---|
| Guardar Cambios | Calls db.tournaments.put() with the updated competitors array and exits Edit Mode. |
| Descartar Cambios | Reverts all in-memory edits to the snapshot taken when Edit Mode was activated. |
| Cancelar | Dismisses the modal and returns to Edit Mode without saving or discarding. |
Searching and filtering
Two controls sit above the competitor table and work together to narrow the visible list:- Search bar — a case-insensitive substring filter on competitor names. The match uses
participant.name.toLowerCase().includes(searchTerm.toLowerCase()), so partial names work. Clear the field to show all competitors. - Category filter dropdown — shows all categories in the tournament, plus an “All categories” option at the top. Selecting a category hides every competitor not enrolled in that category. The filter resolves category IDs back to names internally, so it always shows the human-readable category name.
N competidores encontrados) below the controls reflects the current filtered result set.
Removing a competitor
Competitor deletion is only available while Edit Mode is active. When Edit Mode is on, a “Eliminar” button (trash-icon + label) appears in the rightmost column of each competitor row. Clicking it opens a confirmation modal that shows:- The competitor’s name.
- A warning if the competitor already has results recorded in any round.
- A secondary notice reminding you that any group or schedule slots previously generated for this competitor will show as “Desconocido” (Unknown) until you regenerate the groups for their categories.
handleDelete, which removes the competitor from the TournamentLocal.competitors array and writes the updated tournament to IndexedDB.
Category assignments
Each competitor can belong to multiple categories simultaneously. In the competitor table, each row displays aCategoryToggle — a row of colour-coded category tags showing which events the competitor is enrolled in.
To add a category to an existing competitor, Edit Mode must be active. Click an unselected category tag on the competitor’s row. The category ID is added to competitor.categories immediately in local state; if you are not in bulk-edit mode the change is also flushed to IndexedDB right away.
To remove a category, click an already-selected (highlighted) tag while Edit Mode is active. Before the removal is applied, a Remove Category confirmation modal appears showing:
- The category name being removed.
- The competitor’s name.
- A caution that any previously generated schedule or group for this category will have an “Unknown” placeholder until groups are regenerated.
confirmRemoveCategory, which filters the category ID out of competitor.categories and persists the update.
All edits to existing participants — name changes, category additions, and category removals — require Edit Mode to be active. When the tournament status is Finalized, the Edit Mode button is disabled and displays a lock icon. Reactivate the tournament from the tournament dashboard (change status back to
activo) to re-enable editing.