{{ 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_team %} ({{ swap.target_team.name }}){% endif %}.
{% if swap.message %}{{ swap.message }}
{% endif %} {% if swap.accepted_by %}Aceite por {{ swap.accepted_by.name }}.
{% endif %}
{% set eligible = swap.requester_id not in my_team_ids and (swap.target_team_id is none or swap.target_team_id in my_team_ids) %}
{% 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 in my_team_ids 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 %}