{% extends 'base.html' %}

{% block content %}
<div class="container mt-5">
    <h2>My Bookings</h2>
    {% if bookings %}
        <ul class="list-group">
            {% for booking in bookings %}
                <li class="list-group-item">
                    <a href="{% url 'property_detail' booking.property.id %}">{{ booking.property.title }}</a>
                    <p>From: {{ booking.start_date }}</p>
                    <p>To: {{ booking.end_date }}</p>
                </li>
            {% endfor %}
        </ul>
    {% else %}
        <p>You have no bookings yet.</p>
    {% endif %}
</div>
{% endblock %}
