{% extends 'agent/_layout.html.twig' %} {% block title %}Agent Dashboard{% endblock %} {% block agent_content %} {# ── Header ── #}

Agent Dashboard

Track your commissions and referral activity.

Wallet Balance
₱{{ app.user.walletBalance|number_format(2) }}
Withdraw →
{# ── Period filter bar ── #} {% set presets = [ {key: 'today', label: 'Today'}, {key: 'yesterday', label: 'Yesterday'}, {key: 'this_month', label: 'This Month'}, {key: 'last_month', label: 'Last Month'}, {key: 'this_year', label: 'This Year'}, ] %}
{% for p in presets %} {{ p.label }} {% endfor %} {# Custom month picker #}
{# Custom year picker #}
{# ── Stats cards ── #}
{% set cards = [ {key: 'commissions', label: 'Casino Commissions', value: '₱' ~ stats.commissions|number_format(2), sub: periodLabel}, {key: 'downlineDeposits', label: 'Total Downline Deposits', value: '₱' ~ stats.downlineDeposits|number_format(2), sub: periodLabel}, {key: 'commissionRate', label: isMasterAgent ? 'Master Commission Rate' : 'Your Commission Rate', value: commissionRate ~ '%', sub: ''}, {key: 'betCount', label: 'Bets by Referrals', value: stats.betCount, sub: periodLabel}, {key: 'activeReferrals', label: 'Active Referrals', value: stats.activeReferrals, sub: 'placed bets · ' ~ periodLabel}, {key: 'playersRegistered',label: 'Players Registered', value: stats.playersRegistered, sub: periodLabel}, {key: 'playersLoggedIn', label: 'Players Logged In', value: stats.playersLoggedIn, sub: periodLabel}, {key: 'lrCommission', label: 'Live Racing Commissions', value: '₱' ~ liveRacingCommissionAmount, sub: periodLabel}, {key: 'lrCommissionRate', label: 'Live Racing Commission Rate', value: liveRacingCommissionRate ~ '%', sub: ''}, ] %} {% for card in cards %}

{{ card.label }}

{{ card.value }}

{{ card.sub }}

{% endfor %}
{# ── All-time referred count ── #}

Total Referred (All Time)

{{ referredCount }}

{# ── Referral Code ── #}

Your Referral Code

{# ── Referral Link ── #}

Referral Registration Link

{# ── Referral QR Code ── #}

Share Your Referral Link

Share this QR code so people can scan and register using your referral link.

Scan with your phone camera to open the registration page

{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}