{% extends "client_portal/base.html" %} {% from "components/ui.html" import page_header %} {% block title %}{{ _('Time Entry Approvals') }} - {{ _('Client Portal') }}{% endblock %} {% block content %} {% set breadcrumbs = [ {'text': _('Client Portal'), 'url': url_for('client_portal.dashboard')}, {'text': _('Approvals')} ] %} {{ page_header( icon_class='fas fa-check-circle', title_text=_('Time Entry Approvals'), subtitle_text=_('Review and approve time entries'), breadcrumbs=breadcrumbs ) }}
{{ _('Pending') }} {% if status_filter == 'pending' and pending_count > 0 %} {{ pending_count }} {% endif %} {{ _('Approved') }} {{ _('Rejected') }} {{ _('All') }}
{% if approvals %}
{% for approval in approvals %}

{{ _('Time Entry') }} #{{ approval.time_entry_id }}

{{ _('Requested on') }} {{ approval.requested_at|user_datetime if approval.requested_at else _('N/A') }}

{{ approval.status.value|title }}
{% if approval.time_entry %}

{{ _('Project') }}

{{ approval.time_entry.project.name if approval.time_entry.project else _('N/A') }}

{{ _('Duration') }}

{{ "%.2f"|format(approval.time_entry.duration_hours) }} {{ _('hours') }}

{{ _('Date') }}

{{ approval.time_entry.start_time|user_date if approval.time_entry.start_time else _('N/A') }}

{% if approval.time_entry.description %}

{{ _('Description') }}

{{ approval.time_entry.description }}

{% endif %} {% endif %} {% if approval.request_comment %}

{{ _('Request Comment') }}

{{ approval.request_comment }}

{% endif %}
{% endfor %}
{% else %}

{{ _('No Approvals') }}

{% if status_filter == 'pending' %} {{ _('You have no pending time entry approvals. All caught up!') }} {% else %} {{ _('No approvals found for this status.') }} {% endif %}

{% endif %} {% endblock %}