{% extends 'familytouch/base.html' %} {% block title %}My Appointments - FamilyTouch{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{% if messages %} {% for message in messages %}
{{ message }}
{% endfor %} {% endif %}

📝 Book New Appointment

{% if providers %}
{% csrf_token %}
â„šī¸ Note: Your appointment request will be sent to the doctor for confirmation. You will be notified once the appointment is confirmed.
{% else %}
đŸ‘¨â€âš•ī¸

You don't have any connected healthcare providers yet.

Connect with doctors to book appointments.

{% endif %}

📋 Upcoming Appointments

{% if upcoming_appointments %} {% for appointment in upcoming_appointments %}
đŸ‘¨â€âš•ī¸

Dr. {{ appointment.provider.get_full_name|default:appointment.provider.username }}

@{{ appointment.provider.username }}

{% if appointment.status == 'requested' %}âŗ Pending Confirmation {% elif appointment.status == 'scheduled' %}✓ Confirmed {% endif %}
📅 {{ appointment.start|date:"l, F d, Y" }}
🕐 {{ appointment.start|date:"g:i A" }} - {{ appointment.end|date:"g:i A" }}
{% if appointment.reason %}
📝 {{ appointment.reason }}
{% endif %}
{% csrf_token %}
{% endfor %} {% else %}
📅

No upcoming appointments

{% endif %}
{% if past_appointments %}

📚 Past Appointments

{% for appointment in past_appointments %}
đŸ‘¨â€âš•ī¸

Dr. {{ appointment.provider.get_full_name|default:appointment.provider.username }}

{{ appointment.get_status_display }}
📅 {{ appointment.start|date:"F d, Y" }} at {{ appointment.start|date:"g:i A" }}
{% if appointment.reason %}
📝 {{ appointment.reason }}
{% endif %}
{% endfor %}
{% endif %}
{% endblock %}