{% extends "client_portal/base.html" %} {% from "components/ui.html" import page_header %} {% block title %}{{ _('Time Entries') }} - {{ _('Client Portal') }}{% endblock %} {% block content %} {% set breadcrumbs = [ {'text': _('Client Portal'), 'url': url_for('client_portal.dashboard')}, {'text': _('Time Entries')} ] %} {{ page_header( icon_class='fas fa-clock', title_text=_('Time Entries'), subtitle_text=_('Time entries for %(client_name)s projects', client_name=client.name), breadcrumbs=breadcrumbs ) }}
{% if time_entries %}
{% for entry in time_entries %} {% endfor %}
{{ _('Date') }} {{ _('Project') }} {{ _('User') }} {{ _('Time') }} {{ _('Duration') }} {{ _('Description') }}
{{ entry.start_time|user_date }}
{{ entry.start_time|user_date }}
{% if entry.project %} {{ entry.project.name }} {% elif entry.client %} {{ entry.client.name }} ({{ _('Direct') }}) {% else %} {{ _('N/A') }} {% endif %}
{{ entry.user.display_name if entry.user else _('N/A') }}
{{ entry.start_time|user_time }}
{% if entry.end_time %}
{{ entry.end_time|user_time }}
{% endif %}
{{ "%.2f"|format(entry.duration_hours) }}h

{% if entry.description %} {{ entry.description }} {% else %} - {% endif %}

{{ _('Total entries') }}: {{ time_entries|length }}
{{ _('Total hours') }}: {{ "%.2f"|format(time_entries|sum(attribute='duration_hours')) }}h
{% else %}

{{ _('No time entries found') }}

{% if selected_project_id or date_from or date_to %} {{ _('No time entries match your current filters. Try adjusting your filter criteria.') }} {% else %} {{ _('There are no time entries available at this time. Time entries will appear here once they are logged for your projects.') }} {% endif %}

{% if selected_project_id or date_from or date_to %} {{ _('Clear Filters') }} {% endif %}
{% endif %} {% endblock %}