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

🤝 Connected Care

Manage your connections

{% if user.is_authenticated %}

➕ Add New Connection

{% csrf_token %}

✓ Your Connections ({{ connections|length }})

{% if connections %} {% for c in connections %}
{% if c.patient.id == user.id %} {{ c.contact.get_full_name|default:c.contact.username }} @{{ c.contact.username }} • {{ c.role }} {% else %} {{ c.patient.get_full_name|default:c.patient.username }} @{{ c.patient.username }} • {{ c.role }} {% endif %}
{% endfor %} {% else %}

No connections yet. Add one above!

{% endif %}
{% if pending_invitations %}

📬 Pending Invitations ({{ pending_invitations|length }})

{% for inv in pending_invitations %}
{{ inv.sender.get_full_name|default:inv.sender.username }} wants to connect as {{ inv.get_role_display|lower }}
{% csrf_token %}
{% csrf_token %}
{% endfor %}
{% endif %} {% if sent_invitations %}

📮 Sent Invitations ({{ sent_invitations|length }})

{% for inv in sent_invitations %}
{{ inv.receiver.get_full_name|default:inv.receiver.username }} ({{ inv.get_role_display|lower }})
{% csrf_token %}
{% endfor %}
{% endif %}
← Back to Dashboard
{% else %}

Login Required

Login

{% endif %}
{% endblock %}