bookings list

This commit is contained in:
2025-01-30 14:38:53 +08:00
parent 4f3ad4d912
commit ac262169ef
2 changed files with 31 additions and 1 deletions
+29
View File
@@ -34,6 +34,35 @@
</table>
</div>
</div>
<div class="mt-5">
<h2>Bookings</h2>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Booked By (User ID)</th>
<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.user_id }}</td>
<td>{{ booking.listing.title if booking.listing else 'Unknown' }}</td>
<td>{{ booking.listing.location if booking.listing else 'Unknown' }}</td>
<td>{{ booking.listing.property_type 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>
</div>
<div class="mt-5">
<h2>Registered Users</h2>
<div class="table-responsive">