{% extends "base.html" %} {% block title %}{{ _('Weekly Goal Details') }} - {{ config.APP_NAME }}{% endblock %} {% block content %}

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

{{ goal.week_label }} {% if goal.exclude_weekends %} {{ _('5-day work week') }} {% endif %}

{{ _('Target Hours') }}

{{ goal.target_hours }}h

{{ _('Actual Hours') }}

{{ goal.actual_hours }}h

{{ _('Status') }}

{% if goal.status == 'completed' %} {% elif goal.status == 'active' %} {% elif goal.status == 'failed' %} {% else %} {% endif %}
{% if goal.status == 'completed' %}

{{ _('Completed') }}

{% elif goal.status == 'active' %}

{{ _('Active') }}

{% elif goal.status == 'failed' %}

{{ _('Failed') }}

{% else %}

{{ _('Cancelled') }}

{% endif %}

{{ _('Progress') }}

{{ goal.actual_hours }}h / {{ goal.target_hours }}h {{ goal.progress_percentage }}%
{% if goal.status == 'completed' %}
{% elif goal.status == 'failed' %}
{% else %}
{% endif %}

{{ _('Remaining Hours') }}

{{ goal.remaining_hours }}h

{{ _('Days Remaining') }}

{{ goal.days_remaining }}

{{ _('Avg Hours/Day Needed') }}

{{ goal.average_hours_per_day }}h

{{ _('Daily Breakdown') }}

{% for date, hours in daily_hours.items() %} {% set is_weekend = date.weekday() >= 5 %} {% if not goal.exclude_weekends or not is_weekend %}

{{ date|format_date }} {% if is_weekend and goal.exclude_weekends %} ({{ _('excluded') }}) {% endif %}

{{ "%.2f"|format(hours) }} hours
{% set work_days = 5 if goal.exclude_weekends else 7 %} {% set daily_target = goal.target_hours / work_days %} {% set daily_percentage = (hours / daily_target * 100) if daily_target > 0 else 0 %}
{% endif %} {% endfor %}
{% if goal.notes %}

{{ _('Notes') }}

{{ goal.notes }}

{% endif %} {% if time_entries %}

{{ _('Time Entries This Week') }} ({{ time_entries|length }})

{% for entry in time_entries %}
{% if entry.project %} {{ entry.project.name }} {% elif entry.client %} {{ entry.client.name }} ({{ _('Direct') }}) {% else %} {{ _('No Project') }} {% endif %} {% if entry.task %} • {{ entry.task.name }} {% endif %}

{{ entry.start_time|user_datetime }} {% if entry.notes %} • {{ entry.notes[:50] }}{% if entry.notes|length > 50 %}...{% endif %} {% endif %}

{{ entry.duration_formatted }}

{{ "%.2f"|format(entry.duration_seconds / 3600) }}h

{% endfor %}
{% else %}

{{ _('No time entries recorded for this week yet') }}

{% endif %}
{% endblock %}