{% from "components/ui.html" import empty_state_compact %}
{% if can_view_all %} {% endif %} {% if time_entries %} {% for entry in time_entries %} {% set can_edit_entry = current_user.is_admin or (entry.user_id == current_user.id) %} {% set can_row_schedule = current_user.is_admin or (entry.user_id == current_user.id and current_user.has_permission('edit_own_time_entries')) %} {% if can_view_all %} {% endif %} {% endfor %} {% else %} {% set has_filters = (filters.start_date or filters.end_date or filters.project_id or filters.client_id or filters.paid or filters.billable or (filters.search and filters.search|trim) or (filters.user_id if can_view_all else none) or (filters.client_custom_field and filters.client_custom_field|length > 0)) %} {% if has_filters %} {% set clear_filters_url = url_for('timer.time_entries_overview') %} {% set empty_actions = '' ~ _('Clear filters') ~ '' ~ _('Log Time') ~ '' %} {% else %} {% set log_time_actions = '' ~ _('Log Time') ~ '' %} {% endif %} {% endif %}
{{ _('Date') }}{{ _('User') }}{{ _('Project/Client') }} {{ _('Task') }} {{ _('Duration') }} {{ _('Notes') }} {{ _('Tags') }} {{ _('Invoice Ref') }} {{ _('Status') }} {{ _('Actions') }}
{{ entry.start_time|user_datetime if entry.start_time else '-' }} {{ entry.user.display_name if entry.user else '-' }} {% if entry.project %} {{ entry.project.name }} {% elif entry.client %} {{ entry.client.name }} {% else %} - {% endif %} {% if entry.task %} {{ entry.task.name }} {% else %} - {% endif %} {% if can_edit_entry and can_row_schedule and not entry.is_active and entry.end_time %} {% elif entry.is_active %} {{ entry.duration_formatted }} {% else %} {{ entry.duration_formatted }} {% endif %} {% if can_edit_entry %} {% else %} {% if entry.notes %}
{{ entry.notes|striptags|truncate(60) }}
{% else %} - {% endif %} {% endif %}
{% if entry.tags %} {% for tag in entry.tag_list %} {{ tag }} {% endfor %} {% else %} - {% endif %} {% if entry.invoice_number %} {% set link_template = link_templates_by_field.get('invoice_number') if link_templates_by_field else None %} {% if link_template %} {% set rendered_url = link_template.render_url(entry.invoice_number) %} {% if rendered_url %} {{ entry.invoice_number }} {% else %} {{ entry.invoice_number }} {% endif %} {% elif entry.invoice_number is string and (entry.invoice_number.startswith('http://') or entry.invoice_number.startswith('https://')) %} {{ entry.invoice_number }} {% elif entry.invoice_number is string and entry.invoice_number.startswith('www.') %} {{ entry.invoice_number }} {% else %} {{ entry.invoice_number }} {% endif %} {% else %} - {% endif %} {% if entry.paid %} {{ _('Paid') }} {% else %} {{ _('Unpaid') }} {% endif %} {% if entry.billable %} {{ _('Billable') }} {% endif %}
{% if (time_approvals_enabled|default(false)) and entry.end_time and entry.user_id == current_user.id and entry.id not in (entry_ids_with_pending_approval|default([])) %}
{% endif %}
{{ empty_state_compact('fas fa-search', _('No time entries match your filters'), _('Try adjusting your filters or clear them to see all entries. You can also log a new time entry.'), empty_actions, type='no-results') }}
{{ empty_state_compact('fas fa-clock', _('No time entries yet'), _('Log time to see your entries here. Use the timer on the dashboard or log time manually.'), log_time_actions, type='no-data') }}
{% if pagination.pages > 1 %} {% endif %}