Refactor Admin Dashboard and organize Counts module

This commit is contained in:
Javier
2026-01-30 10:30:17 -06:00
parent d6e9f20757
commit a6d8767c28
10 changed files with 172 additions and 135 deletions

18
app.py
View File

@@ -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')