{% extends 'teamer/layout.html.twig' %} {% block title %}Einsatzübersicht{% endblock %} {% block content %}

Einsatzübersicht

{% if errors|length %}
{% endif %} {{ form_start(filterForm) }}
{{ form_row(filterForm.dateFrom) }} {{ form_row(filterForm.dateTo) }} {{ form_row(filterForm.jobProfile) }} {{ form_row(filterForm.destination) }} {{ form_row(filterForm.duration) }}
{{ form_widget(filterForm.apply, { 'attr': { 'class': 'btn btn--small' } }) }} {{ form_widget(filterForm.reset, { 'attr': { 'class': 'btn btn--small btn--secondary' } }) }}
{{ form_rest(filterForm) }} {{ form_end(filterForm) }}
{% for assignment in pagination %}
{{ icon('flag-' ~ assignment.destination.country, 'w-5 h-5 shrink-0') }} {{ assignment.destination.product }}
{{ icon('calendar', 'w-5 h-5 shrink-0') }} {{ assignment.effectivePeriod.start|date('d.m.Y') }} - {{ assignment.effectivePeriod.end|date('d.m.Y') }}
{{ icon('profile', 'w-5 h-5 shrink-0') }} {{ assignment.jobProfile.name }}
{{ icon('house', 'w-5 h-5 shrink-0') }} {{ assignment.destination.hotel }}
{% if assignment.pickup %}
{{ icon('bus', 'w-5 h-5 shrink-0') }} {{ assignment.pickup|bpn_pickup_label|default('-') }} {{ assignment.effectivePickupDate ? assignment.effectivePickupDate|date('d.m.Y') : '' }}
{% endif %}
{% if assignment.applications|length %} {% set application = assignment.applications[0] %} {% if application.status == constant('App\\Entity\\Application::STATUS_REJECTED') %} {% set icon = 'close' %} {% set class = 'bg-gray-100 text-gray-800 hover:bg-gray-50' %} {% set url = path('app_teamer_assignment', { 'uuid': assignment.uuid, 'r': return_url() }) %} {% set label = 'Bewerbung abgelehnt' %} {% else %} {% set icon = 'hourglass' %} {% set class = 'bg-yellow-100 text-yellow-800 hover:bg-yellow-50' %} {% set url = path('app_teamer_assignment', { 'uuid': assignment.uuid, 'r': return_url() }) %} {% set label = 'in Bearbeitung' %} {% endif %} {% elseif assignment.dispositions|length %} {% set icon = 'check' %} {% set class = 'bg-green-100 text-green-700 hover:bg-green-50' %} {% set url = path('app_teamer_disposition_detail', { 'uuid': assignment.dispositions[0].uuid }) %} {% set label = 'eingeteilt' %} {% else %} {% set icon = 'hand' %} {% set class = '' %} {% set url = path('app_teamer_assignment', { 'uuid': assignment.uuid, 'r': return_url() }) %} {% set label = 'bewerben' %} {% endif %} {{ icon(icon, 'w-4 h-4 shrink-0') }} {{ label }}
{% set isBookmarked = teamer.bookmarks.contains(assignment) %} {{ icon('star', html_classes('w-5 h-5', { 'text-yellow-500': isBookmarked, 'text-gray-200': not isBookmarked } )) }}
{% endfor %}
{{ knp_pagination_render(pagination, 'paginator/sliding_boxes.html.twig') }} {% endblock %}