{% extends 'base.html.twig' %} {% block title %}Live Racing - Race Results{% endblock %} {% block body %}

Race Results

View results and dividends for past events

{% if allEvents|length == 0 %}

No Events Found

No events have been published yet.

{% else %} {# ── Step 1: Event Selector ── #}
{% if event and raceResults|length > 0 %} {# ── Step 2 & 3: Race tabs with result + dividends ── #}
{{ event.management.name }}
{{ event.eventDate|date('l, F j, Y') }}
{# Race tabs #} {# Race panes #}
{% for rr in raceResults %} {% set race = rr.race %} {% set horses = rr.horses %} {% set dividendRows = rr.dividendRows %} {% set pane_id = 'race-pane-' ~ race.id %}
{% if race.result %} {# ── Race Result ── #}
Finish Order
{% for finisher in race.result %} {% set horse = horses|filter(h => h.id == finisher.horseId)|first %}
{{ loop.index }}{{ loop.first ? 'st' : (loop.index == 2 ? 'nd' : (loop.index == 3 ? 'rd' : 'th')) }}: #{{ finisher.horseNumber }} {% if horse %} {{ horse.horseName }} {% endif %}
{% endfor %}
{# ── Dividends ── #} {% if dividendRows|length > 0 %}
Dividends
{% for row in dividendRows %} {% endfor %}
Bet Type Dividend
{{ row.label }}{% if row.kind == 'multi' %} (whole combo){% endif %} {% if row.refund %} Refunded {% elseif row.deadHeatDividendA is not null or row.deadHeatDividendB is not null %} Dead Heat {{ row.deadHeatDividendA }} / {{ row.deadHeatDividendB }} {% else %} {% set winnerNumber = race.result[0].horseNumber ?? null %} {% if row.kind == 'multi' and row.legPrefix is not empty and winnerNumber %} Dividend ({{ row.legPrefix }}{{ winnerNumber }}): {{ row.dividend }} {% else %} {{ row.dividend }} {% endif %} {%- if row.substituteDividend is not null %} (Substitute: {{ row.substituteDividend }}){% endif %} {%- if row.scratchDividends is not null and row.scratchDividends is not empty %} {% for horseId, div in row.scratchDividends %} {% set scratchHorse = horses|filter(h => h.id == horseId)|first %} {% set scratchNumber = scratchHorse ? scratchHorse.horseNumber : ('#' ~ horseId) %} {% if row.legPrefix is not empty %} Scratch ({{ row.legPrefix }}{{ scratchNumber }}): {{ div }} {% else %} Scratch Horse #{{ horseId }}: {{ div }} {% endif %} {% if not loop.last %}, {% endif %} {% endfor %} {% endif %} {% endif %}
{% endif %} {% else %}

Result pending.

{% endif %}
{% endfor %}
{% elseif event and totalRaceCount > 0 %}

Results for this event aren't final yet. Check back once the races have been settled.

{% elseif event %}

No races found for this event.

{% endif %} {% endif %}
{# Wallet Bar #}

Balance

₱{{ app.user.walletBalance|number_format(2) }}

+ Add Funds
{% endblock %}