{% extends "base.html" %} {% from "components/cards.html" import info_card, stat_card %} {% from "components/ui.html" import confirm_dialog, modal, page_header %} {% from "components/client_select.html" import client_select %} {% block extra_css %} {% endblock %} {% block content %} {% if timer_stopped_toast %} {% endif %} {% set dashboard_breadcrumbs = [{'text': _('Dashboard')}] %} {{ page_header('fas fa-tachometer-alt', _('Dashboard'), _("Here's a quick overview of your work."), breadcrumbs=dashboard_breadcrumbs) }}

{{ _('Timer') }}

{% if not active_timer %}
{% if last_timer_context %}
{% endif %}
{% endif %}
{% if active_timer %}
{% if active_timer.is_paused %} {{ _('Paused') }} {% if active_timer.break_seconds %} {{ _('Break') }}: {{ active_timer.break_formatted }} {% endif %} {% else %} {{ _('Running') }} {% if active_timer.break_seconds %} {{ _('Break so far') }}: {{ active_timer.break_formatted }} {% endif %} {% endif %}

{% if active_timer.project %} {{ active_timer.project.name }} {% elif active_timer.client %} {{ active_timer.client.name }} ({{ _('Direct') }}) {% else %} {{ _('No project') }} {% endif %}

{{ _('Started at') }} {{ active_timer.start_time|user_time }}

{{ _('Elapsed') }}: {{ active_timer.duration_formatted }}

{% if not active_timer.is_paused %}
{{ _('Adjust time') }}:
{% endif %}
{% if active_timer.is_paused %}
{% else %}
{% endif %}
{% else %}

{{ _('No active timer.') }}

{% if recent_entries %}

{{ _('Resume your last session or use the buttons above to repeat last / start a new timer.') }}

{% else %}

{{ _('Click "Start Timer" above to begin tracking your time.') }}

{% endif %}
{% endif %}

{{ _('Today\'s Hours') }}

{{ "%.2f"|format(today_hours) }} hours
{% if standard_hours_per_day is defined and today_overtime_hours is defined %}
{% if today_overtime_hours > 0 %} + {{ "%.2f"|format(today_overtime_hours) }}h {{ _('overtime') }} {% elif standard_hours_per_day %} {{ "%.2f"|format(today_hours) }}h / {{ "%.1f"|format(standard_hours_per_day) }}h {% endif %}
{% endif %}

{{ _('Week\'s Hours') }}

{{ "%.2f"|format(week_hours) }} hours
{% if standard_hours_per_day is defined and week_overtime_hours is defined %}
{% if week_overtime_hours > 0 %}+ {{ "%.2f"|format(week_overtime_hours) }}h {{ _('overtime') }}{% endif %}
{% endif %}

{{ _('Month\'s Hours') }}

{{ "%.2f"|format(month_hours) }} hours
{% if overtime_ytd_hours is defined %}
{{ _('Overtime (YTD)') }}: {{ "%.2f"|format(overtime_ytd_hours) }}h
{% endif %}

{{ _('Value insights') }}

{{ _('Your tracked time at a glance') }}

{{ _('Loading insights…') }}

{{ _('This week vs last week') }}

{{ _('Hours per day (Mon–today vs same days last week)') }}

{{ _('Recent Entries') }}

{{ _('View all') }}
{% for entry in recent_entries[:5] %} {% else %} {% endfor %}
{{ _('Project') }} {{ _('Duration') }} {{ _('Date') }} {{ _('Actions') }}
{% if entry.project %} {{ entry.project.name }} {% elif entry.client %} {{ entry.client.name }} ({{ _('Direct') }}) {% else %} {{ _('N/A') }} {% endif %} {% if active_timer and entry.id == active_timer.id %}{{ entry.duration_formatted }}{% else %}{{ entry.duration_formatted }}{% endif %} {{ entry.start_time|user_datetime }}
{% if current_user.is_admin or entry.user_id == current_user.id %} {% endif %}

{{ _('No recent entries found.') }}

{{ _('Start tracking time to see entries here.') }}

{% if is_module_enabled('weekly_goals') %} {% if current_week_goal %}

{{ _('Weekly Goal') }}

{{ current_week_goal.actual_hours }}h / {{ current_week_goal.target_hours }}h {{ current_week_goal.progress_percentage }}%
{{ _('Remaining') }}
{{ current_week_goal.remaining_hours }}h
{{ _('Days Left') }}
{{ current_week_goal.days_remaining }}
{% if current_week_goal.days_remaining > 0 and current_week_goal.remaining_hours > 0 %}
{{ _('Need') }} {{ current_week_goal.average_hours_per_day }}h/day {{ _('to reach goal') }}
{% endif %}
{% else %}

{{ _('No Weekly Goal') }}

{{ _('Set a weekly time goal to track your progress') }}

{{ _('Create Goal') }}
{% endif %} {% endif %}

{{ _('Time by project (last 7 days)') }}

{{ _('View report') }}
{% if time_by_project_7d %}
{% else %}

{{ _('No time logged in the last 7 days.') }}

{{ _('Start tracking to see distribution here.') }}

{% endif %}

{{ _('Top Projects (30 days)') }}

{% if top_projects %} {% set max_hours = top_projects[0].hours if top_projects and top_projects[0].hours > 0 else 1 %}
    {% for item in top_projects %}
  • {{ loop.index }}
    {{ item.project.name }}
    {{ _('Billable') }}: {{ '%.1f'|format(item.billable_hours) }}h
    {{ '%.1f'|format(item.hours) }}h
  • {% endfor %}
{% else %}

{{ _('No activity in the last 30 days.') }}

{{ _('Start tracking time on projects to see them here.') }}

{% endif %}

{{ _('Recent Activity') }}

{{ _('Live') }}
{% if recent_activities %} {% for activity in recent_activities %}
{% if not loop.last %}
{% endif %}

{{ activity.description or 'Activity' }}

{{ activity.created_at|local_datetime_short }}

{% endfor %} {% else %}

{{ _('No recent activity') }}

{% endif %}
{% if current_user.ui_show_donate and not is_license_activated %}

{{ _('Enjoying TimeTracker?') }}

{{ _('You have tracked %(hours)s hours', hours=('%.1f'|format((usage_support_stats.total_hours or 0)|float))) }} · {{ _('You have created %(count)s entries', count=usage_support_stats.time_entries_count or 0) }} {% if (usage_support_stats.reports_generated_count or 0) > 0 %} · {{ _('Reports generated: %(n)s', n=usage_support_stats.reports_generated_count) }} {% endif %}

{% if is_supporter_instance %}

{{ _('Thank you for supporting development. Sharing TimeTracker still helps a lot.') }}

{{ _('License') }}
{% else %}

{{ _('If this saves you time, consider supporting development — everything stays free and open.') }}

{% endif %}
{% endif %} {% if support_dashboard_prompt %} {% endif %}
{% for entry in recent_entries %} {% if current_user.is_admin or entry.user_id == current_user.id %} {{ confirm_dialog( 'confirmDeleteEntry-' ~ entry.id, 'Delete Time Entry', 'Are you sure you want to delete this time entry? This action cannot be undone.', 'Delete', 'Cancel', 'danger' ) }} {% endif %} {% endfor %} {% set create_task_modal_content %}

{{ _('Enter a name for the new task.') }}

{% endset %} {% set create_task_modal_footer %} {% endset %} {{ modal('createTaskModal', _('Create task'), create_task_modal_content, create_task_modal_footer, 'sm') }} {% endblock %} {% block scripts_extra %} {% endblock %}