{{ _('FabOMatic - Weekly Summary') }}

{{ _('Hello %(name)s,', name=user.name) }}

{{ _("Here's the summary of lab activities for last week.") }}

{{ _('Period:') }} {{ summary_data.week_start.strftime('%Y-%m-%d') }} - {{ summary_data.week_end.strftime('%Y-%m-%d') }}

{{ _('📊 Machine Usage') }}

{% if summary_data.machine_stats %} {% for stat in summary_data.machine_stats %} {% endfor %}
{{ _('Machine') }} {{ _('Usage Hours') }}
{{ stat.machine_name }} {{ "%.1f"|format(stat.total_hours) }} h
{% else %}

{{ _('No machine usage recorded this week.') }}

{% endif %}

{{ _('⚠️ Pending Maintenance') }}

{% if summary_data.pending_maintenances %} {% for maint in summary_data.pending_maintenances %}
{{ maint.machine_name }}
{{ maint.maintenance_description }}
{{ _('Overdue by %(hours).1f hours', hours=maint.overdue_hours) }} {% if maint.instructions_url %}
{{ _('Instructions') }} {% endif %}
{% endfor %} {% else %}

{{ _('No pending maintenance. Great job! 👍') }}

{% endif %}

{{ _('🔑 Unrecognized Cards') }}

{% if summary_data.unrecognized_cards %} {% for card in summary_data.unrecognized_cards %} {% endfor %}
{{ _('Card UUID') }} {{ _('Machines') }} {{ _('Attempts') }}
{{ card.card_uuid }} {{ card.machines|join(', ') }} {{ card.attempt_count }}

{{ _('Note: These cards attempted to access machines but were not recognized. They may need to be registered in the system.') }}

{% else %}

{{ _('No unrecognized cards this week.') }}

{% endif %}