{% extends 'manager/base.html' %} {% load static %} {% load i18n %} {% block title %}{% trans "User Management" %}{% endblock %} {% block header.add_script %} {% endblock %} {% block content %}

{% trans "Showing" %} {{ users.start_index }} - {{ users.end_index }} {% trans "of" %} {{ users.paginator.count }} {% trans "users" %}

{% for user in users %}
{% if user.profile.first_name %} {{ user.profile.first_name|first }}{{ user.profile.last_name|first }} {% else %} {% endif %}
{% if user.profile.first_name or user.profile.last_name %} {{ user.profile.first_name }} {{ user.profile.last_name }} {% else %} {% trans "User" %} #{{ user.id }} {% endif %}

{{ user.phone_number }}

{% if user.profile.email %}

{{ user.profile.email }}

{% endif %} {% if user.company %}

{{ user.company.name }}

{% endif %}
{% trans "Lacto Points:" %} {{ user.lacto_points_score|default:0 }} | {% trans "Joined:" %} {{ user.created_at|date:"M Y" }} {% if user.profile.last_login %} | {% trans "Last active:" %} {{ user.profile.last_login|timesince }} {% trans "ago" %} {% endif %}
{% with subscription=user.subscription_info %} {{ subscription.status }} {% endwith %}
{{ user.churn_risk_score }} {% trans "Risk" %}
{% with biometrics=user.latest_biometrics %} {% if biometrics %}
{% if biometrics.weight %} {% trans "Weight:" %} {{ biometrics.weight }}kg
{% endif %} {% if biometrics.blood_sugar %} {% trans "Blood Sugar:" %} {{ biometrics.blood_sugar }}
{% endif %} {% if biometrics.a1c %} {% trans "A1C:" %} {{ biometrics.a1c }}% {% endif %}
{% endif %} {% endwith %}
{% empty %}
{% trans "No users found" %}

{% trans "Try adjusting your filters or search criteria" %}

{% endfor %}
{% if users.has_other_pages %}
{% endif %}
{% endblock %}