user dashboard
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}User Dashboard{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-4">
|
||||
<h1 class="text-center">Your Bookings</h1>
|
||||
{% if bookings %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Listing</th>
|
||||
<th>Location</th>
|
||||
<th>Property Type</th>
|
||||
<th>Check-in</th>
|
||||
<th>Check-out</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for booking in bookings %}
|
||||
<tr>
|
||||
<td>{{ booking.listing.title if booking.listing else 'Unknown' }}</td>
|
||||
<td>{{ booking.listing.location if booking.listing else 'Unknown' }}</td>
|
||||
<td>{{ booking.listing.PROPERTY_TYPES.get(booking.listing.property_type, 'Unknown') if booking.listing else 'Unknown' }}</td>
|
||||
<td>{{ booking.check_in.strftime('%Y-%m-%d') }}</td>
|
||||
<td>{{ booking.check_out.strftime('%Y-%m-%d') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="text-center">You have no bookings yet.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user