feat: enhance project data handling with new Jinja filters and update UI labels for clarity
This commit is contained in:
@@ -23,12 +23,26 @@
|
||||
<path d="M2 6a2 2 0 012-2h5l2 2h5a2 2 0 012 2v6a2 2 0 01-2 2H4a2 2 0 01-2-2V6z"></path>
|
||||
</svg>
|
||||
<div>
|
||||
{% set meta = session.session_metadata|fromjson if session.session_metadata else {} %}
|
||||
{% set is_manual = meta.get('source') in ('manual_upload', 'bulk_upload') %}
|
||||
<div class="font-semibold text-gray-900 dark:text-white">
|
||||
{{ session.started_at|local_datetime if session.started_at else 'Unknown Date' }}
|
||||
{% if location %}{{ location.name }}{% else %}Unknown Location{% endif %}
|
||||
{% if session.started_at %}
|
||||
—
|
||||
{% if session.stopped_at and not same_date(session.started_at, session.stopped_at) %}
|
||||
{{ session.started_at|local_date }} to {{ session.stopped_at|local_date }}
|
||||
{% else %}
|
||||
{{ session.started_at|local_date }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="text-xs text-gray-500 dark:text-gray-400">
|
||||
{% if unit %}{{ unit.id }}{% else %}Unknown Unit{% endif %}
|
||||
{% if location %} @ {{ location.name }}{% endif %}
|
||||
{% if is_manual %}
|
||||
{% set store = meta.get('store_name') %}
|
||||
Manual upload{% if store %} — Store {{ store }}{% endif %}
|
||||
{% elif unit %}
|
||||
{{ unit.id }}
|
||||
{% endif %}
|
||||
<span class="mx-2">•</span>
|
||||
{{ files|length }} file{{ 's' if files|length != 1 else '' }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user