{{ swap.assignment.date|dia_longo }}
{{ swap.assignment.schedule.name }}
{{ swap.requester.name }} passa o turno de {{ swap.assignment.date|dia }} {%- if swap.target_assignment %} e fica com o de {{ swap.target_assignment.date|dia }}{% endif %} {%- if swap.target_user %} ({{ swap.target_user.name }}){% endif %}.
{% if swap.message %}{{ swap.message }}
{% endif %} {% if swap.accepted_by %}Aceite por {{ swap.accepted_by.name }}.
{% endif %}
{% set eligible = swap.requester_id != current_user.id and (swap.target_user_id is none or swap.target_user_id == current_user.id) %}
{% set can_accept = swap.status == 'open' and eligible %}
{% set can_decline = swap.status in ['open', 'pending_approval'] and (current_user.is_admin or (swap.status == 'open' and eligible)) %}
{% if can_accept %}
{% endif %}
{% if can_decline %}
{% set decline_action = '/swaps/' ~ swap.id ~ ('/admin-reject' if current_user.is_admin else '/reject') %}
{% endif %}
{% if swap.requester_id == current_user.id and swap.status in ['open', 'pending_approval'] %}
{% endif %}
{% if current_user.is_admin and swap.status == 'approved' and swap.target_assignment %}
{% endif %}
{% if current_user.is_admin and swap.status in ['open', 'pending_approval'] %}
{% endif %}