{% extends 'wfbo/_layout.html.twig' %} {% block title %}Users — WFBO{% endblock %} {% block wfbo_title %}Users{% endblock %} {% block wfbo_content %} {# Flash messages #} {% for flash in app.flashes('success') %} {% endfor %} {# Header row + Search #}

{{ total }} user{{ total != 1 ? 's' : '' }}{% if search %} matching "{{ search }}"{% endif %}{% if role %} filtered by {{ role == 'ROLE_USER' ? 'User' : role == 'ROLE_SUPER_ADMIN' ? 'SADMIN' : role|replace({'ROLE_': '', '_': ' '})|title }}{% endif %}{% if not search and not role %} total{% endif %}

{% if search or role %} Clear {% endif %}
{# Table #}
{% for user in users %} {# ID #} {# Name #} {# Mobile #} {# Roles #} {% set isPlainUser = 'ROLE_MASTER_AGENT' not in user.roles and 'ROLE_AGENT' not in user.roles and 'ROLE_ADMIN' not in user.roles and 'ROLE_SUPER_ADMIN' not in user.roles and 'ROLE_FINANCE' not in user.roles and 'ROLE_OPERATIONS' not in user.roles %} {# Agent #} {# Status #} {# PLR % #} {# Wallet #} {# Registered #} {# Last Login #} {# Actions #} {% else %} {% endfor %}
# Name Mobile Roles Agent Status PLR% Wallet Registered Last Login Actions
{{ user.id }} {{ user.firstName }} {{ user.lastName }} {{ user.mobileNumber }}
{% for role in user.roles %} {% if role != 'ROLE_USER' %} {% if role == 'ROLE_ADMIN' or role == 'ROLE_SUPER_ADMIN' %}Admin{% elseif role == 'ROLE_MASTER_AGENT' %}Master Agent{% elseif role == 'ROLE_AGENT' %}Agent{% elseif role == 'ROLE_FINANCE' %}Finance{% elseif role == 'ROLE_OPERATIONS' %}Operations{% else %}{{ role }}{% endif %} {% endif %} {% endfor %} {% if isPlainUser %} User {% endif %} {% if user.isOnHold %} On Hold {% endif %} {% if user.isTestAccount %} Test Account {% endif %}
{% if isPlainUser %} {% if user.referredBy %} {{ user.referredBy.firstName }} {{ user.referredBy.lastName }} {% else %} — {% endif %} {% else %} — {% endif %} {% if user.isSuspended %} Suspended {% else %} Active {% endif %} {% if user.houseWinRate is not null %} {{ user.houseWinRate }}% {% else %} — {% endif %} ₱{{ user.walletBalance|number_format(2) }} {{ user.createdAt ? user.createdAt|date('M d, Y') : '—'|raw }} {{ user.lastLoginAt ? user.lastLoginAt|date('M d, Y') : '—'|raw }} {# Hidden forms — triggered by dropdown items #} {% if is_granted('ROLE_ADMIN') %} {% if 'ROLE_ADMIN' not in user.roles and 'ROLE_SUPER_ADMIN' not in user.roles %} {% else %} {% endif %} {% if 'ROLE_FINANCE' not in user.roles %} {% else %} {% endif %} {% if 'ROLE_OPERATIONS' not in user.roles %} {% else %} {% endif %} {% endif %} {% set isAnyAgent = 'ROLE_MASTER_AGENT' in user.roles or 'ROLE_AGENT' in user.roles or 'ROLE_SUB_AGENT' in user.roles %} {% if is_granted('ROLE_SUPER_ADMIN') %} {% if isAnyAgent and is_granted('ROLE_SUPER_ADMIN') %} {% endif %} {% endif %} {# Dropdown trigger #}
No users found.
{# Pagination #} {% if totalPages > 1 %}

Page {{ currentPage }} of {{ totalPages }}

{% if currentPage > 1 %} ← Previous {% endif %} {% if currentPage < totalPages %} Next → {% endif %}
{% endif %} {# ── Change Agent Modal ── #} {% if is_granted('ROLE_ADMIN') %} {% endif %} {# ── House Win Rate Modal ── #} {% if is_granted('ROLE_ADMIN') %} {% endif %} {# ── Reset Password Result Modal ── #} {% set resetPwd = _flashes['reset_password_value'] ?? [] %} {% set resetName = _flashes['reset_password_name'] ?? [] %} {% if resetPwd %} {% endif %} {# ── Transfer Balance Modal ── #} {% if is_granted('ROLE_SUPER_ADMIN') %} {# ── Transfer Confirmation Modal ── #} {% endif %} {% if is_granted('ROLE_ADMIN') %} {% endif %} {% if is_granted('ROLE_SUPER_ADMIN') %} {% endif %} {# ── Transfer Players Modal ── #} {% if is_granted('ROLE_SUPER_ADMIN') %} {% endif %} {% if is_granted('ROLE_SUPER_ADMIN') %} {% endif %} {% endblock %}