{% extends "layout.html" %} {% block content %}

{% if g.user.role == Role.ADMIN or g.user.role == Role.SYSTEM_ADMIN %} Admin Dashboard {% elif g.user.role == Role.SUPERVISOR %} Supervisor Dashboard {% elif g.user.role == Role.TEAM_LEADER %} Team Leader Dashboard {% else %} Dashboard {% endif %}

Quick Actions

My Profile

Update your personal information and password.

Edit Profile

Configuration

Configure work hours and break settings.

Work Config

Analytics

View the complete time tracking history.

View Analytics
{% if g.user.role == Role.ADMIN or g.user.role == Role.SYSTEM_ADMIN %}

System Overview

{{ total_users }}

Total Users

{{ total_teams }}

Total Teams

{{ blocked_users }}

Blocked Users

{{ unverified_users }}

Unverified Users

User Management

Manage user accounts, permissions, and roles.

Manage Users

Project Management

Manage projects, assign teams, and track project status.

Manage Projects

Team Management

Configure teams and their members.

Manage Teams

System Settings

Configure application-wide settings like registration and more.

System Settings
{% endif %} {% if g.user.role in [Role.TEAM_LEADER, Role.SUPERVISOR, Role.ADMIN, Role.SYSTEM_ADMIN] %}

Team Management

{% if teams %}

{{ team_member_count }}

Team Members

{{ teams|length }}

Teams Managed

{% if g.user.role == Role.ADMIN or g.user.role == Role.SYSTEM_ADMIN %}

Team Configuration

Create and manage team structures.

Configure Teams
{% endif %}

Your Team Members

{% if team_members %}
{% for member in team_members %}

{{ member.username }}

{{ member.role.value if member.role else 'Team Member' }}

{{ member.email }}

{% if member.is_blocked %} Blocked {% elif not member.is_verified %} Unverified {% else %} Active {% endif %}
{% endfor %}
{% else %}

No team members assigned yet.

{% endif %}
{% else %}

You are not assigned to any team. Contact your administrator to be assigned to a team.

{% endif %}
{% endif %} {% if recent_entries %}

Recent Time Entries

{% if g.user.role in [Role.ADMIN, Role.TEAM_LEADER, Role.SUPERVISOR] %} {% endif %} {% for entry in recent_entries %} {% if g.user.role in [Role.ADMIN, Role.TEAM_LEADER, Role.SUPERVISOR] %} {% endif %} {% endfor %}
UserDate Arrival Departure Duration Status
{{ entry.user.username }}{{ entry.arrival_time.strftime('%Y-%m-%d') }} {{ entry.arrival_time.strftime('%H:%M:%S') }} {{ entry.departure_time.strftime('%H:%M:%S') if entry.departure_time else 'Active' }} {% if entry.duration %} {{ '%d:%02d:%02d'|format(entry.duration//3600, (entry.duration%3600)//60, entry.duration%60) }} {% else %} In progress {% endif %} {% if not entry.departure_time %} Active {% else %} Completed {% endif %}
{% endif %}
{% endblock %}