05/07 Phase 3: fixed tenant's appoinment page error

This commit is contained in:
2026-05-07 15:53:40 -04:00
parent bac9f7ee2c
commit 61a1b83688
2 changed files with 3 additions and 8 deletions
+2 -7
View File
@@ -4,12 +4,12 @@
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="fw-bold mb-0"><i class="bi bi-calendar3 me-2"></i>Appointments</h4>
<div class="d-flex align-items-center gap-2">
<a href="{{ url_for('appointments.index', date=(view_date - timedelta(days=1)).isoformat()) }}"
<a href="{{ url_for('appointments.index', date=prev_date.isoformat()) }}"
class="btn btn-outline-secondary btn-sm"></a>
<input type="date" class="form-control form-control-sm" value="{{ view_date.isoformat() }}"
onchange="window.location='{{ url_for('appointments.index') }}?date='+this.value"
style="width:150px;">
<a href="{{ url_for('appointments.index', date=(view_date + timedelta(days=1)).isoformat()) }}"
<a href="{{ url_for('appointments.index', date=next_date.isoformat()) }}"
class="btn btn-outline-secondary btn-sm"></a>
<a href="{{ url_for('appointments.create') }}" class="btn btn-primary btn-sm ms-2">+ New</a>
</div>
@@ -48,9 +48,4 @@
</table>
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
// Import timedelta not available in Jinja — use JS for date nav
</script>
{% endblock %}