{% extends 'wfbo/_layout.html.twig' %} {% block wfbo_title %}Live Racing Event Audit{% endblock %} {% set actionLabels = { 'live-racing-event-published': 'Event Published', 'live-racing-race-created': 'Race Created', 'live-racing-race-closed': 'Race Closed', 'live-racing-horse-created': 'Horse Added', 'live-racing-horses-scratched': 'Horse(s) Scratched', 'live-racing-result-saved': 'Result Saved', 'live-racing-bet-placed': 'Bet Placed', } %} {% set actionIcons = { 'live-racing-event-published': '📢', 'live-racing-race-created': '🏁', 'live-racing-race-closed': '🔒', 'live-racing-horse-created': '🐎', 'live-racing-horses-scratched': '✂️', 'live-racing-result-saved': '✅', 'live-racing-bet-placed': '🎫', } %} {% block wfbo_content %}
← Back to Event Details

Audit Log — Event #{{ eventId }}

{{ total }} record(s)

{% for log in auditLogs %} {% else %} {% endfor %}
Date / Time Action Details Performed By

{{ log.createdAt|date('M d, Y') }}

{{ log.createdAt|date('h:i A') }}

{{ actionIcons[log.action]|default('•') }} {{ actionLabels[log.action]|default(log.action) }} {% if log.metadata %} {% if log.metadata.race_number is defined %}
Race: {{ log.metadata.race_number }}
{% endif %} {% if log.metadata.horse_number is defined %}
Horse: #{{ log.metadata.horse_number }} {% if log.metadata.horse_name is defined %} — {{ log.metadata.horse_name }}{% endif %}
{% endif %} {% if log.metadata.horse_ids is defined and log.metadata.horse_ids|length > 0 %}
Scratched Horses: {{ log.metadata.horse_ids|join(', ') }}
{% endif %} {% if log.metadata.stats is defined %}
Settled: {{ log.metadata.stats.won }} won, {{ log.metadata.stats.lost }} lost, {{ log.metadata.stats.void }} void
{% endif %} {% if log.metadata.bet_type is defined %}
Bet Type: {{ log.metadata.bet_type }}
{% endif %} {% if log.metadata.race_number is defined and log.metadata.race_number is not null %}
Race: {{ log.metadata.race_number }}
{% endif %} {% if log.metadata.combos is defined %}
Combos: {{ log.metadata.combos }}
{% endif %} {% if log.metadata.total_wager is defined %}
Wager: ₱{{ log.metadata.total_wager|number_format(2) }}
{% endif %} {% if log.metadata.multiplier is defined %}
Multiplier: {{ log.metadata.multiplier }}×
{% endif %} {% if log.action == 'live-racing-event-published' %} Published {% endif %} {% else %} — {% endif %}
{% if log.targetUser and log.action == 'live-racing-bet-placed' %} {{ log.targetUser.firstName }} {{ log.targetUser.lastName }} (User #{{ log.targetUser.id }}) {% elseif log.actor %} {{ log.actor.firstName }} {{ log.actor.lastName }} {% else %} — {% endif %}
No audit records found for this event.
{# ── Pagination ── #} {% set totalPages = (total / limit)|round(0, 'ceil') %} {% if totalPages > 1 %}

Page {{ page }} of {{ totalPages }}  ·  {{ total }} total

{% if page > 1 %} ← Previous {% endif %} {% if page < totalPages %} Next → {% endif %}
{% endif %} {% endblock %}