{% 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.roles is empty %} N/A {% else %} {% for roles in user.getRolesName %} {{ roles }}{% if not loop.last %}, {% endif %} {% endfor %} {% endif %}
{{ user.email ? user.email : 'N/A' }}
{{ user.createdat ? user.createdat|date('Y-m-d') : 'N/A' }}
{{ user.lastLogin ? user.lastLogin|date('Y-m-d H:i:s') : 'N/A' }}
{{ user.firstname|upper ~ ' ' ~ user.lastname|upper }}
{{ user.address ?? "N/A" }}
{{ user.mobileno ?? "N/A" }}
{{ app.request.server.get('REF_LINK_URL') ~ "/ref/" ~ user.refcode }}
{{ parent_user }}
{{ app.request.server.get('REF_LINK_URL') ~ "/ref/" ~ user.refid.refcode }}
Open: {{ noOfOpenTickets }}
Close: {{ noOfCloseTickets }}
N/A
{{ userTotalRevenue is not null ? userTotalRevenue|number_format(2,',','.') ~ '€' : '0€' }}
{{ userCurrentMonthRevenue is not null ? userCurrentMonthRevenue|number_format(2,',','.') ~ '€' : '0€' }}
{{ teamRevenue|number_format(2,',','.') }}€
{{ bestPartner.username is defined ? bestPartner.username : (bestPartner.firstname is defined ? bestPartner.firstname ~ ' ' ~ bestPartner.lastname : 'N/A') }}
| 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. | ||||||||||
| 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. | ||||||