{% extends 'manager/base.html' %} {% load static %} {% load i18n %} {% block title %}{% trans "User Profile" %} - {% if user.profile.first_name %}{{ user.profile.first_name }} {{ user.profile.last_name }}{% else %}User #{{ user.id }}{% endif %}{% endblock %} {% block header.add_script %} {% endblock %} {% block content %}
{{ user.phone_number }}
{% if user.profile.email %}{{ user.profile.email }}
{% endif %}{% trans "Joined" %} {{ user.created_at|date:"F d, Y" }} {% if user.profile.last_login %} | {% trans "Last active" %} {{ user.profile.last_login|timesince }} {% trans "ago" %} {% endif %}
{% trans "Name" %}: {{ coach_info.name }}
{% trans "Email" %}: {{ coach_info.email }}
{% trans "ID" %}: {{ coach_info.id }}
{% trans "No coach assigned" %}
{% endif %}{% trans "From" %}: {{ diet.from_date|date:"M d, Y" }} {% if diet.has_data %} {% trans "Active" %} {% else %} {% trans "Template" %} {% endif %}
{% trans "Created" %}: {{ diet.created_at|date:"M d, Y" }} {% trans "by" %} {{ diet.creator }}{% trans "... and" %} {{ diet_history|length|add:"-5" }} {% trans "more diets" %}
{% endif %}{% trans "No diet history available" %}
{% endif %}{% trans "Phone:" %} {{ user.phone_number }}
{% if user.profile.email %}{% trans "Email:" %} {{ user.profile.email }}
{% endif %} {% if user.profile.gender is not None %}{% trans "Gender:" %} {% if user.profile.gender %}{% trans "Female" %}{% else %}{% trans "Male" %}{% endif %}
{% endif %} {% if user.profile.birth_date %}{% trans "Birth Date:" %} {{ user.profile.birth_date|date:"F d, Y" }}
{% endif %}{% trans "Height:" %} {{ user.profile.height }} cm
{% endif %} {% if user.profile.weight %}{% trans "Weight:" %} {{ user.profile.weight }} kg
{% endif %} {% if user.profile.goal_weight %}{% trans "Goal Weight:" %} {{ user.profile.goal_weight }} kg
{% endif %} {% if user.profile.activity_level %}{% trans "Activity Level:" %} {{ user.profile.get_activity_level_display }}
{% endif %}{% trans "Health Conditions:" %}
{% trans "Diabetes Type:" %} {{ user.profile.get_diabetes_type_display }}
{% endif %}{% trans "Latest Measurements:" %}
{% if biometrics.weight %}{% trans "Weight:" %} {{ biometrics.weight }} kg
{% endif %} {% if biometrics.bmi %}{% trans "BMI:" %} {{ biometrics.bmi|floatformat:1 }}
{% endif %} {% if biometrics.blood_sugar %}{% trans "Blood Sugar:" %} {{ biometrics.blood_sugar }} mg/dL
{% endif %} {% if biometrics.a1c %}{% trans "A1C:" %} {{ biometrics.a1c }}%
{% endif %} {% endif %}{% trans "Total Points:" %} {{ point.total_points|default:0 }}
{% trans "Diet:" %} {{ point.total_Diet_Point|default:0 }} | {% trans "Exercise:" %} {{ point.total_Exercise_Point|default:0 }} | {% trans "Water:" %} {{ point.total_Water_Point|default:0 }}{% trans "No recent activity recorded" %}
{% endif %}{% trans "Plan:" %} {{ subscription.plan }}
{% endif %} {% if subscription.start_date %}{% trans "Start Date:" %} {{ subscription.start_date|date:"M d, Y" }}
{% endif %} {% if subscription.end_date %}{% trans "End Date:" %} {{ subscription.end_date|date:"M d, Y" }}
{% endif %}{% trans "Renewal Status:" %} {{ subscription.renewal_status }}
{% endwith %}{% trans "Plan" %} {{ payment.plan }}
{{ payment.created_at|date:"M d, Y" }}{% trans "... and" %} {{ payment_history.count|add:"-5" }} {% trans "more payments" %}
{% endif %} {% else %}{% trans "No payment history" %}
{% endif %}