55 lines
2.5 KiB
HTML
55 lines
2.5 KiB
HTML
{% extends "tenant/layouts/base.html" %}
|
|
{% block title %}Waitlist{% endblock %}
|
|
{% block content %}
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h4 class="fw-bold mb-0"><i class="bi bi-clock-history me-2"></i>Waitlist</h4>
|
|
<a href="{{ url_for('waitlist.add') }}" class="btn btn-primary btn-sm">+ Add to Waitlist</a>
|
|
</div>
|
|
{% if entries %}
|
|
<div class="card shadow-sm">
|
|
<div class="table-responsive">
|
|
<table class="table table-hover mb-0">
|
|
<thead class="table-light">
|
|
<tr><th>Name</th><th>Phone</th><th>Service</th><th>Staff</th><th>Requested</th><th>Status</th><th></th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for e in entries %}
|
|
<tr>
|
|
<td class="fw-semibold">{{ e.customer_name }}</td>
|
|
<td class="small">{{ e.customer_phone or '—' }}</td>
|
|
<td class="small">{{ e.service.name if e.service else '—' }}</td>
|
|
<td class="small">{{ e.staff.name if e.staff else '—' }}</td>
|
|
<td class="small text-muted">{{ e.requested_date.strftime('%b %d') if e.requested_date else '—' }}</td>
|
|
<td>
|
|
<span class="badge {{ 'bg-warning text-dark' if e.status == 'waiting' else 'bg-info' }}">
|
|
{{ e.status }}
|
|
</span>
|
|
</td>
|
|
<td class="d-flex gap-1">
|
|
{% if e.status == 'waiting' %}
|
|
<form method="POST" action="{{ url_for('waitlist.notify', entry_id=e.id) }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button class="btn btn-outline-primary btn-sm">Notify</button>
|
|
</form>
|
|
{% endif %}
|
|
<form method="POST" action="{{ url_for('waitlist.set_status', entry_id=e.id) }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<input type="hidden" name="status" value="booked">
|
|
<button class="btn btn-outline-success btn-sm">Booked</button>
|
|
</form>
|
|
<form method="POST" action="{{ url_for('waitlist.set_status', entry_id=e.id) }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<input type="hidden" name="status" value="expired">
|
|
<button class="btn btn-outline-secondary btn-sm">Expire</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="alert alert-light">No active waitlist entries.</div>
|
|
{% endif %}
|
|
{% endblock %} |