Refactor Admin Dashboard and organize Counts module
This commit is contained in:
18
app.py
18
app.py
@@ -38,7 +38,7 @@ app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(hours=1)
|
||||
|
||||
|
||||
# 1. Define the version
|
||||
APP_VERSION = '0.13.0'
|
||||
APP_VERSION = '0.13.2'
|
||||
|
||||
# 2. Inject it into all templates automatically
|
||||
@app.context_processor
|
||||
@@ -164,22 +164,6 @@ def admin_dashboard():
|
||||
|
||||
|
||||
|
||||
@app.route('/staff-mode')
|
||||
@login_required
|
||||
def staff_mode():
|
||||
"""Allow admin/owner to switch to staff view for scanning"""
|
||||
# Show staff dashboard view regardless of role
|
||||
active_sessions = query_db('''
|
||||
SELECT session_id, session_name, session_type, created_timestamp
|
||||
FROM CountSessions
|
||||
WHERE status = 'active'
|
||||
ORDER BY created_timestamp DESC
|
||||
''')
|
||||
|
||||
return render_template('staff_dashboard.html', sessions=active_sessions, is_admin_mode=True)
|
||||
|
||||
|
||||
|
||||
# ==================== PWA SUPPORT ROUTES ====================
|
||||
|
||||
@app.route('/manifest.json')
|
||||
|
||||
Reference in New Issue
Block a user