{% extends 'admin/layouts/base.html.twig' %} {% block title %}View Users{% endblock %} {% set active = 'app_admin_users' %} {% set breadcrumbs = [ { 'link': path('app_admin_dashboard'), 'title': 'Home' }, { 'title': 'User Management', }, { 'link': path('app_admin_users'), 'title': 'Users', }, { 'title': 'View', } ]%} {% block stylesheets %} {% endblock %} {% block content %}
{% if user.image is empty %} {% else %} {% endif %}
Role

{% if user.roles is empty %} N/A {% else %} {% for roles in user.getRolesName %} {{ roles }}{% if not loop.last %}, {% endif %} {% endfor %} {% endif %}

Email

{{ user.email ? user.email : 'N/A' }}

Registered

{{ user.createdat ? user.createdat|date('Y-m-d') : 'N/A' }}

Last Login

{{ user.lastLogin ? user.lastLogin|date('Y-m-d H:i:s') : 'N/A' }}

Name

{{ user.firstname|upper ~ ' ' ~ user.lastname|upper }}

Address

{{ user.address ?? "N/A" }}

Phone No

{{ user.mobileno ?? "N/A" }}

{% if user.roles is not empty %} {% for roles in user.roles %} {% if roles == "ROLE_AFFILIATE" %} {% endif %} {% endfor %} {% endif %}
{% if user.roles is not empty %} {% for roles in user.roles %} {% if roles == "ROLE_AFFILIATE" %}
Parent Affiliate

{{ parent_user }}

{% endif %} {% endfor %} {% endif %}
Tickets

Open: {{ noOfOpenTickets }}

Close: {{ noOfCloseTickets }}

{% if user.roles is not empty %} {% for roles in user.roles %} {% if roles == "ROLE_AFFILIATE" %}

Affiliate Section

N/A

Total

{{ userTotalRevenue is not null ? userTotalRevenue|number_format(2,',','.') ~ '€' : '0€' }}

This Month

{{ userCurrentMonthRevenue is not null ? userCurrentMonthRevenue|number_format(2,',','.') ~ '€' : '0€' }}

Team

{{ teamRevenue|number_format(2,',','.') }}€

Multi Tier
{% if multiTierUsers|length > 0 %} {% for multiTierUser in multiTierUsers %}
Level {{ multiTierUser.level }} - {{ multiTierUser.user.firstname ~ ' ' ~ multiTierUser.user.lastname }} - {{ multiTierUser.clientTotal }} clients
{% endfor %} {% else %}
No multi-tier users
{% endif %}
Best Partner

{{ bestPartner.username is defined ? bestPartner.username : (bestPartner.firstname is defined ? bestPartner.firstname ~ ' ' ~ bestPartner.lastname : 'N/A') }}

Rating Team
{% endif %} {% endfor %} {% endif %}

Orders

{% if user is not empty %} {% for subscription in subscriptions %} {% endfor %} {% else %} {% endif %}
Order Subscription Id Start End Product Duration Months Period of Time Auto Renewal Payment Method Status Setup AI
#{{ subscription.paymentid.orderid.id }} #{{ subscription.id }} {{ subscription.startdate ? subscription.startdate|date('Y-m-d') : 'N/A' }} {% set start_date = subscription.startdate ? subscription.startdate|date('Y-m-d') : 'N/A' %} {% set duration = subscription.duration %} {% if start_date != 'N/A' and duration %} {% set end_date = (start_date|date_modify('+' ~ duration ~ ' month'))|date('Y-m-d') %} {{ end_date }} {% else %} N/A {% endif %} {{ subscription.paymentid.orderid.productid.name ? subscription.paymentid.orderid.productid.name : 'N/A' }} {{ subscription.duration ? subscription.duration : 'N/A' }} Month {% set now = "now" | date("Y-m-d H:i:s") %} {% set start_date = subscription.startdate|date('Y-m-d') %} {% set duration = subscription.duration %} {% if start_date %} {% if duration %} {% set end_date = start_date|date_modify('+' ~ duration ~ ' month') %} {% set total_weeks = ((end_date|date('U') - start_date|date('U')) / (3600 * 24 * 7))|round %} {% set current_week = (((now|date('U')) - start_date|date('U')) / (3600 * 24 * 7))|round %} {% set display_weeks = current_week ~ ' of ' ~ total_weeks ~ ' W' %} {{ display_weeks }} {% else %} N/A {% endif %} {% else %} N/A {% endif %} {{ subscription.autorenewal == 1 ? 'YES' : 'NO' }} {{ subscription.paymentid.paymentmethod|upper }} {% if subscription.paymentid.orderid.status %} {% set badgeClass = '' %} {% set statusText = subscription.paymentid.orderid.status %} {% if statusText == 'completed' %} {% set badgeClass = 'badge bg-success' %} {% elseif statusText in ['refunded', 'cancelled', 'expired', 'failed'] %} {% set badgeClass = 'badge bg-danger' %} {% elseif statusText in ['processing', 'pending'] %} {% set badgeClass = 'badge bg-warning' %} {% elseif statusText in ['on hold', 'on-hold'] %} {% set badgeClass = 'badge bg-info' %} {% else %} {% set badgeClass = 'badge bg-secondary' %} {% endif %} {{ statusText|upper }} {% else %} N/A {% endif %} N/A
No records found.

Subscriptions

{% if user is not empty %} {% for subscription in subscriptions %} {% endfor %} {% else %} {% endif %}
ID Order Id Payment Date Duration Start Date End Date Status
#{{ subscription.id }} #{{ subscription.paymentid.orderid.id }} {{ subscription.paymentid.paymentDate|date('Y-m-d') }} {{ subscription.duration }} Month {{ subscription.startdate ? subscription.startdate|date('Y-m-d') : 'N/A' }} {% set start_date = subscription.startdate ? subscription.startdate|date('Y-m-d') : 'N/A' %} {% set duration = subscription.duration %} {% if start_date != 'N/A' and duration %} {% set end_date = (start_date|date_modify('+' ~ duration ~ ' month'))|date('Y-m-d') %} {{ end_date }} {% else %} N/A {% endif %} {% if subscription.status %} {% set badgeClass = '' %} {% set statusText = subscription.status %} {% if statusText|lower == 'active' %} {% set badgeClass = 'badge bg-success' %} {% elseif statusText|lower == 'cancelled' %} {% set badgeClass = 'badge bg-danger' %} {% else %} {% set badgeClass = 'badge bg-warning' %} {% endif %} {{ statusText|upper }} {% else %} N/A {% endif %}
No records found.
{% endblock %}