feat: Implement upcoming appointments feature for users
- Added `remove_done` function to clean up finished appointments in the database. - Introduced `get_upcoming_for_user` function to retrieve upcoming appointments for a specific user. - Updated `backend_server.py` to include a new endpoint for fetching user-specific upcoming events. - Modified `blueprint.py` to render upcoming events in the user interface. - Enhanced `terminplan.html` to display a list of upcoming appointments with relevant details and action links. - Updated configuration to enable the new appointment planning feature.
This commit is contained in:
@@ -132,8 +132,12 @@ def main():
|
||||
if guard:
|
||||
return guard
|
||||
|
||||
current_user = session.get('username', '')
|
||||
upcoming_events = appointment_service.get_user_upcoming_events(current_user) if current_user else []
|
||||
|
||||
return render_template(
|
||||
'terminplaner.html',
|
||||
school_periods=cfg.SCHOOL_PERIODS,
|
||||
current_user=session.get('username', ''),
|
||||
current_user=current_user,
|
||||
upcoming_events=upcoming_events,
|
||||
)
|
||||
Reference in New Issue
Block a user