{% extends 'base.html.twig' %} {% block title %}Round History — Pataasan{% endblock %} {% block body %}
{# ── Header ── #}
← Back to Game

Round History

All finished rounds — {{ totalRounds }} total

{# ── Results table ── #}
{% if pastRounds is not empty %}
{% for pastRound in pastRounds %} {% set myRoundBets = pastBets[pastRound.id] ?? [] %} {% endfor %}
# Time Cards Winner Your Bet Outcome
{{ pastRound.id }} {{ pastRound.scheduledAt|date('M d, H:i') }} {% set winnerNum = pastRound.result|default('card1')|slice(4) %} {% set winnerCard = pastRound.result in ['card1', 'card2'] ? attribute(pastRound, pastRound.result) : null %} {% if winnerCard %} {% endif %} Card {{ winnerNum }} ↑ {% if myRoundBets is not empty %} {% for b in myRoundBets %}
Bet: Card {{ b.prediction|slice(4) }} ₱{{ b.amount|number_format(2) }}
{% endfor %} {% else %} — {% endif %}
{% if myRoundBets is not empty %} {% for b in myRoundBets %}
{% if b.status == 'won' %} Won ₱{{ b.payout|number_format(2) }} {% elseif b.status == 'lost' %} Lose {% else %} Processing {% endif %}
{% endfor %} {% else %} — {% endif %}
{# ── Pagination ── #} {% if totalPages > 1 %}
{% if currentPage > 1 %} ‹ {% else %} ‹ {% endif %} {% set rangeStart = max(1, currentPage - 2) %} {% set rangeEnd = min(totalPages, currentPage + 2) %} {% if rangeStart > 1 %} 1 {% if rangeStart > 2 %}…{% endif %} {% endif %} {% for p in rangeStart..rangeEnd %} {% if p == currentPage %} {{ p }} {% else %} {{ p }} {% endif %} {% endfor %} {% if rangeEnd < totalPages %} {% if rangeEnd < totalPages - 1 %}…{% endif %} {{ totalPages }} {% endif %} {% if currentPage < totalPages %} › {% else %} › {% endif %}
Page {{ currentPage }} of {{ totalPages }}
{% endif %} {% else %}
No finished rounds yet.
{% endif %}
{% endblock %}