{% extends 'familytouch/base.html' %} {% block title %}Dashboard - FamilyTouch{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

👋 Welcome, {{ display_name }}!

{{ user_type|title }}
{% if user_type == 'patient' %}
📅
{{ appointments|length }}
Upcoming Appointments
📬
{{ recent_updates|length }}
Recent Updates
👥
{{ care_connections|length }}
Care Team Members
⭐
{% if latest_dietitian_review %}1{% else %}0{% endif %}
Latest Reviews

📅 Upcoming Appointments

{% if appointments %} {% for a in appointments %}
Dr. {{ a.provider.get_full_name|default:a.provider.username }}
🕐 {{ a.start|date:"l, M d, Y @ g:i A" }} {% if a.reason %} • {{ a.reason }}{% endif %}
{% endfor %} {% else %}
📅

No upcoming appointments scheduled

{% endif %}

📬 Recent Updates

{% if recent_updates %} {% for u in recent_updates %}
{{ u.sender.get_full_name|default:u.sender.username }}
{{ u.content }}
⏰ {{ u.created_at|date:"M d, Y @ g:i A" }}
{% endfor %} {% else %}
📭

No recent updates

{% endif %}

👥 Connected Care Team

{% if care_connections %} {% for c in care_connections %}
{{ c.contact.get_full_name|default:c.contact.username }}
{{ c.get_role_display }} {% if c.family_role %} • {{ c.get_family_role_display }}{% endif %}
{% endfor %} {% else %}
👥

No connected care team members yet

{% endif %}

⭐ Latest Dietitian Review

{% if latest_dietitian_review %}
Review Summary
{{ latest_dietitian_review.summary }}
⏰ {{ latest_dietitian_review.created_at|date:"M d, Y @ g:i A" }}
{% else %}
⭐

No dietitian reviews yet

Request a Review
{% endif %}
{% elif user_type == 'family' %}

👪 Your Connected Patients

{% if care_connections %} {% for c in care_connections %} {% if c.role == 'family' %}
🧑‍⚕️

{{ c.patient.get_full_name|default:c.patient.username }}

Connected since {{ c.created_at|date:"M d, Y" }} {% if c.family_role %} • Role: {{ c.get_family_role_display }}{% endif %}
📊 Quick Stats:
Upcoming appointments: {{ c.patient.appointments.count }}
🍽️ Set Meal Preferences
{% csrf_token %}
Latest preferences: {% with mc=c.patient.meal_choices.first %} {% if mc %}
🥗 Lunch: {{ mc.lunch }} | 🍲 Dinner: {{ mc.dinner }}
Set by {{ mc.chooser.get_full_name|default:mc.chooser.username }} {% else %}
No preferences set yet {% endif %} {% endwith %}
{% endif %} {% endfor %} {% else %}
👥

No connected patients found

Connect with a Patient
{% endif %}
{% elif user_type == 'doctor' %}

🏥 Provider Dashboard

Manage your patients, appointments, and communicate securely.

{% else %}
🚀

Welcome to your dashboard! More features coming soon.

{% endif %}

⚡ Quick Actions

{% endblock %}