{% extends "resources/base.html" %} {% import "site_shell/_macros.html" as ui %} {% block title %}Allocation History - Pychestrate Resources{% endblock %} {% block content %}
to Clear
{{ ui.icon("download") }} Download CSV {{ ui.icon("assignment") }} Active Allocations
{% if resource_total > resources | length %}

Resource filter shows the first {{ resources | length }} of {{ resource_total }} resources.

{% endif %}
{% for alloc in allocations %} {% else %} {% if filters_active %} {% else %} {{ ui.empty_state("No allocation history found", colspan=9) }} {% endif %} {% endfor %}
ID Resource User Job ID Mode Status Check Out Check In Duration
{{ alloc.id }} {{ alloc.resource_name }} {{ alloc.username or '—' }}{% if alloc.reason %}
{{ alloc.reason }}
{% endif %}
{{ alloc.job_id or '—' }} {% set mode = alloc.mode %} {% if mode == 'exclusive' %} Exclusive {% else %} Shared {% endif %} {% set status = alloc.status %} {% if status == 'active' %} Active {% elif status == 'released' %} Released {% elif status == 'expired' %} Expired {% elif status == 'forced' %} Forced {% if alloc.forced_by %}
by {{ alloc.forced_by }}{% if alloc.force_reason %}: {{ alloc.force_reason }}{% endif %}
{% endif %} {% else %} {{ status }} {% endif %}
{{ alloc.checkout_time | local_datetime(false, '—') }} {{ alloc.actual_checkin | local_datetime(false, '—') }} {% if alloc.duration_minutes is not none %}{{ alloc.duration_minutes }} min{% else %}-{% endif %}
No allocation history matches the current filters. Clear filters
{{ ui.pagination('resources.allocation_history', page, total_pages, {'per_page': per_page, 'resource_id': selected_resource_id, 'user_id': selected_user_id, 'start_date': (start_date or none), 'end_date': (end_date or none)}, total=total) }} {% include "site_shell/_local_times.html" %} {% endblock %}