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

{{ project.name }} {% if project.code_display %} {{ project.code_display }} {% endif %}

{{ _('Project Dashboard & Analytics') }}

{{ _('Entries Overview') }} {% if project.budget_amount %} {{ _('Budget Analysis') }} {% endif %}

{{ _('Total Hours') }}

{{ "%.1f"|format(project.total_hours) }}

{% if budget_data.estimated_hours > 0 %}

{{ _('of') }} {{ "%.0f"|format(budget_data.estimated_hours) }} {{ _('estimated') }}

{% endif %}

{{ _('Budget Used') }}

{{ "%.0f"|format(budget_data.consumed_amount) }}

{% if budget_data.budget_amount > 0 %}

{{ "%.1f"|format(budget_data.percentage) }}% {{ _('of budget') }}

{% endif %}

{{ _('Tasks Complete') }}

{{ task_stats.completed }}/{{ task_stats.total }}

{{ "%.1f"|format(task_stats.completion_rate) }}% {{ _('completion') }}

{{ _('Team Members') }}

{{ team_contributions|length }}

{{ _('contributing') }}

{{ _('Budget vs. Actual') }}

{% if budget_data.budget_amount > 0 %}

{{ _('Budget') }}

{{ "%.2f"|format(budget_data.budget_amount) }}

{{ _('Remaining') }}

{{ "%.2f"|format(budget_data.remaining_amount) }}

{% else %}

{{ _('No budget set for this project') }}

{% endif %}

{{ _('Task Status Distribution') }}

{% if task_stats.total > 0 %}
{% for status, count in task_stats.by_status.items() %}
{{ status.replace('_', ' ').title() }}: {{ count }}
{% endfor %}
{% else %}

{{ _('No tasks created yet') }}

{% endif %}

{{ _('Team Member Contributions') }}

{% if team_contributions %}
{% for member in team_contributions[:5] %}
{{ member.username }}
{{ "%.1f"|format(member.total_hours) }}h {{ "%.1f"|format(member.percentage) }}%
{% endfor %}
{% else %}

{{ _('No time entries recorded yet') }}

{% endif %}

{{ _('Time Tracking Timeline') }}

{% if timeline_data %}
{% else %}

{{ _('Select a time period to view timeline') }}

{% endif %}

{{ _('Recent Activity') }}

{% if recent_activities %}
{% for activity in recent_activities %}

{{ activity.user.display_name if activity.user.full_name else activity.user.username }} {{ activity.description or (activity.action + ' ' + activity.entity_type) }}

{{ activity.created_at|user_datetime('%Y-%m-%d %H:%M') }}

{% endfor %}
{% else %}

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

{% endif %}

{{ _('Team Member Details') }}

{% if team_contributions %}
{% for member in team_contributions %}

{{ member.username }}

{{ "%.1f"|format(member.total_hours) }}h
{{ member.entry_count }} {{ _('entries') }}
{{ member.task_count }} {{ _('tasks') }}
{{ "%.1f"|format(member.percentage) }}%
{% endfor %}
{% else %}

{{ _('No team members have logged time yet') }}

{% endif %}
{% if task_stats.overdue > 0 %}

{{ _('Attention Required') }}

{{ task_stats.overdue }} {{ _('task(s) are overdue') }}

{% endif %} {% endblock %}