Files
booking/templates/dashboard.html
T

78 lines
3.0 KiB
HTML
Raw Normal View History

2025-01-04 19:57:22 +08:00
{% extends 'base.html' %}
{% block title %}Dashboard{% endblock %}
2025-01-22 08:33:57 +08:00
2025-01-04 19:57:22 +08:00
{% block content %}
2025-01-22 08:33:57 +08:00
<div class="container mt-4">
<h1 class="text-center">Host Dashboard</h1>
<div class="mt-4">
<h2>Your Listings</h2>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>Title</th>
<th>Location</th>
<th>Property Type</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for listing in listings %}
<tr>
<td>{{ listing.id }}</td>
<td>{{ listing.title }}</td>
<td>{{ listing.location }}</td>
<td>{{ listing.property_type }}</td>
<td>
<a href="/edit-listing/{{ listing.id }}" class="btn btn-warning btn-sm">Edit</a>
<a href="/delete-listing/{{ listing.id }}" class="btn btn-danger btn-sm">Delete</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
2025-01-04 19:57:22 +08:00
</div>
2025-01-22 08:33:57 +08:00
<div class="mt-5">
<h2>Registered Users</h2>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>Email</th>
<th>Phone</th>
<th>Document</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td>{{ user.id }}</td>
<td>{{ user.email }}</td>
<td>{{ user.phone }}</td>
<td>
{% if user.id in documents %}
<a href="/uploads/documents/{{ documents[user.id].filename }}" target="_blank">View Document</a>
{% else %}
Not Verified
{% endif %}
</td>
<td>
{% if user.id in documents and not documents[user.id].verified %}
<form method="POST" action="/verify-document/{{ documents[user.id].id }}">
<button type="submit" class="btn btn-success btn-sm">Verify</button>
</form>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}