Overview
The Administrative Dashboard is the central command center for workforce management in Checawaa. It provides real-time visibility into employee attendance, automated tardiness detection, visual analytics with interactive charts, and one-click access to reporting and notification tools.Only users with admin privileges (username: “admin”) can access the dashboard. Regular employees are automatically redirected to the employee tracking interface.
Dashboard Features
The admin panel consolidates critical workforce data into an intuitive interface:Real-Time Attendance
Complete history of all employee check-ins with timestamps and status indicators
Tardiness Detection
Automatic flagging of late arrivals (after 8:30 AM) with visual status badges
Visual Analytics
Interactive doughnut charts showing cumulative tardiness by employee
Quick Actions
One-click buttons for sending reminders and generating PDF reports
Accessing the Dashboard
Automatic Redirect
The system automatically redirects admin users to
/monitor after successful loginAccess Control
The system enforces strict access control inapp.py:134-175:
Dashboard Interface
Header Section
The dashboard header provides identity and quick action controls:Main Grid Layout
The dashboard uses a two-column responsive grid:- Attendance Table
Left Column: Complete attendance history tableDisplays:
- Employee name with online indicator
- Check-in date (YYYY-MM-DD format)
- Precise timestamp (HH:MM:SS)
- Status badge (PUNTUAL/RETARDO)
Attendance Monitoring
Data Processing Logic
The backend processes attendance records with automatic status calculation inapp.py:134-175:
Tardiness Tracking Rules
8:30 AM Cutoff Time: Any check-in after 08:30:00 is automatically flagged as “RETARDO” (late)
hora_reg > "08:30:00"→ RETARDO (red badge)hora_reg <= "08:30:00"→ PUNTUAL (green badge)
Visual Charts
Interactive Tardiness Analytics
The dashboard uses Chart.js to visualize cumulative tardiness patterns:Chart Features
Responsive Design
Automatically scales to fit sidebar width on all devices
Color Coding
Distinct colors for each employee for easy identification
Interactive Legend
Click legend items to show/hide specific employees
Quick Action Buttons
Send Reminders Button
Manually trigger email notifications to absent employees:Generate PDF Report Button
Direct link to download comprehensive attendance reports:Dashboard Workflow
Typical Admin Day
Morning Review (8:00-9:00 AM)
- Check who has started tracking
- Review tardiness status badges
- Send manual reminders if needed
Mid-Day Monitoring
- Monitor active employee count
- Review real-time attendance table
- Analyze tardiness patterns in chart
Status Indicators
Visual Feedback System
- Status Badges
- Online Indicators
- Email Status
PUNTUAL (On Time)
- Green badge
- Check-in at or before 8:30 AM
- No action required
- Red badge
- Check-in after 8:30 AM
- Counted in tardiness chart
Data Refresh
Manual Refresh Strategy
- Frequent monitoring: Refresh every 15-30 minutes during morning hours
- After reminders: Refresh 10-15 minutes after sending notifications
- Before reports: Refresh immediately before generating PDFs
Performance Considerations
Large datasets
Large datasets
The dashboard loads all historical records into memory. For organizations with hundreds of employees or months of data:Potential issues:
- Slow page load times
- Large data transfer over network
- Browser memory constraints
- Implement pagination in attendance table
- Add date range filters
- Archive old records periodically
- Consider database migration from JSON files
Security & Access
Login Required
All dashboard routes protected by
@login_required decoratorAdmin-Only
Explicit check:
if current_user.id != 'admin' blocks non-adminsSession Management
Flask-Login handles secure session tokens and timeouts
Logout Available
Prominent logout link in header for session termination
Integration Points
The dashboard integrates with all core Checawaa features:- Employee Tracking: Displays all GPS check-ins with timestamps
- Automated Reminders: Manual trigger button for on-demand notifications
- PDF Reports: One-click report generation from dashboard data