{{ _('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 %}• {{ stat.machine_name }}: {{ "%.1f"|format(stat.total_hours) }} {{ _('hours') }}
{% endfor %}{% 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') }}: {{ maint.instructions_url }}{% endif %}

{% endfor %}{% else %}{{ _('No pending maintenance. Great job! 👍') }}
{% endif %}

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

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

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

{% endfor %}
{{ _('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 %}

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

{{ _('Visit %(link)s for more details', link='FabOMatic (https://' + base_url + ')') }}

{{ _('This is an automated email generated by FabOMatic. Please do not reply.') }}
