05/07 Phase 3: fixed tenant's appoinment page error
This commit is contained in:
@@ -228,4 +228,4 @@ def _user_db_id():
|
||||
uid_str = current_user.get_id()
|
||||
return int(uid_str.split(":")[1]) if uid_str and ":" in uid_str else None
|
||||
except Exception:
|
||||
return None
|
||||
return None
|
||||
|
||||
@@ -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 %}
|
||||
Reference in New Issue
Block a user