{% extends 'agent/_layout.html.twig' %} {% block title %}Player Monitor{% endblock %} {% block agent_content %}

Player Monitor

Last load, days since, and lifetime cash-in / cash-out per downline player. Active = loaded ≤ {{ activeDays }}d · Watch = {{ activeDays + 1 }}–{{ inactiveDays }}d · Inactive = {{ inactiveDays }}d+ or never · New = registered ≤ {{ newDays }}d ago (shown first).

{% set scopes = [{key: 'direct', label: 'Direct players'}, {key: 'all', label: 'All downlines'}] %}
{% for s in scopes %} {{ s.label }} {% endfor %}
{% set filters = [ {key: 'all', label: 'All'}, {key: 'new', label: 'Newly Registered'}, {key: 'active', label: 'Active'}, {key: 'watch', label: 'Watch'}, {key: 'inactive', label: 'Inactive'}, ] %}
{% for f in filters %} {{ f.label }} ({{ counts[f.key] }}) {% endfor %}
{% if search %} Clear {% endif %}
{% if scope == 'all' %}{% endif %} {% for r in rows %} {% set tint = r.bucket == 'inactive' ? 'background:rgba(176,0,32,0.10);' : (r.bucket == 'watch' ? 'background:rgba(234,179,8,0.10);' : '') %} {% if scope == 'all' %} {% endif %} {% else %} {% endfor %}
PlayerAgentMobile Last Load Days Since Cash In Cash Out Last Bet
{{ r.firstName }} {{ r.lastName }} {% if r.isNew %}New{% endif %} {% if r.bucket == 'inactive' %}Inactive {% elseif r.bucket == 'watch' %}Watch{% endif %} {{ r.agent ? r.agent.firstName ~ ' ' ~ r.agent.lastName : '—' }} {{ r.mobileNumber }} {{ r.lastLoadAt ? r.lastLoadAt|date('M d, Y') : 'Never' }} {{ r.daysSinceLoad is null ? '—' : r.daysSinceLoad ~ 'd' }} ₱{{ r.cashIn|number_format(2) }} ₱{{ r.cashOut|number_format(2) }} {% if r.lastBet %}{{ r.lastBet.placedAt|date('M d, H:i') }} · {{ r.lastBet.game }}{% else %}—{% endif %}
No players match this filter.
{% if totalPages > 1 %}

Page {{ currentPage }} of {{ totalPages }} · {{ total }} total

{% set pp = {scope: scope, filter: filter, search: search} %} {% if currentPage > 1 %}← Previous{% endif %} {% if currentPage < totalPages %}Next →{% endif %}
{% endif %} {% endblock %}