{% extends 'wfbo/_layout.html.twig' %} {% block wfbo_title %}Event — {{ event.eventDate|date('F j, Y') }}{% endblock %} {% block wfbo_content %} {% set readOnly = isPast or isLocked %} {% for flash in app.flashes('success') %} {% endfor %} {% for flash in app.flashes('error') %} {% endfor %}
← Back to Events

{{ event.eventDate|date('F j, Y') }}

{{ event.arena.name }} — {{ event.numberOfRaces }} race(s) {% if isLocked %}Locked{% endif %}

Results {% if not readOnly %}
Edit Event {% endif %}
{% for race in races %}

Race {{ race.raceNumber }}

{% set activeCount = entryCounts[race.id] ?? 0 %} {% set totalCount = entryTotalCounts[race.id] ?? 0 %} {% set scratchedCount = totalCount - activeCount %} {{ activeCount }} entr{{ activeCount == 1 ? 'y' : 'ies' }}{% if scratchedCount > 0 %}, {{ scratchedCount }} scratched{% endif %}
Betting Status {% if isPast %} {{ race.bettingOpen ? 'Open' : 'Closed' }} {% elseif race.bettingOpen %}
{% else %} Closed {% endif %}
{% for betType in singleRaceBetTypes %} {% set offering = offeringsByRace[race.id][betType.code] ?? null %}
{{ betType.label }} {% if offering %}
{% if not readOnly and race.bettingOpen %}
{% else %} {{ offering.open ? 'Open' : 'Closed' }} {% endif %}
{% else %} {% set eligible = (entryCounts[race.id] ?? 0) >= betType.minStarters %} {% if not readOnly and race.bettingOpen %}
{% endif %} {% endif %}
{% endfor %}
{% endfor %}

Multi-Race Bets

{% if not readOnly %} {% endif %}
{% if multiRaceOfferings is empty %}

No multi-race bets configured yet.

{% else %}
{% for offering in multiRaceOfferings %} {% set anyLegClosed = false %} {% for leg in offering.legs %} {% if not leg.race.bettingOpen %} {% set anyLegClosed = true %} {% endif %} {% endfor %}
{{ offering.betType.label }}
Races {{ offering.legs|map(leg => leg.race.raceNumber)|join(' → ') }}
{% if readOnly %} {{ offering.open ? 'Open' : 'Closed' }} {% elseif not anyLegClosed %}
{% else %} {{ offering.open ? 'Open' : 'Closed' }} {% endif %} {% if not readOnly %} {% endif %}
{% endfor %}
{% endif %}
{# ── Add Multi-Race Bet Modal ── #} {% endblock %}