diff --git a/assets/images/icons.svg b/assets/images/icons.svg index cc4265b..cbdcedd 100644 --- a/assets/images/icons.svg +++ b/assets/images/icons.svg @@ -75,9 +75,6 @@ - - - @@ -93,12 +90,6 @@ - - - - - - @@ -136,6 +127,9 @@ + + + diff --git a/src/Controller/Teamer/IndexController.php b/src/Controller/Teamer/IndexController.php index ea718b8..3ab08a6 100644 --- a/src/Controller/Teamer/IndexController.php +++ b/src/Controller/Teamer/IndexController.php @@ -48,6 +48,7 @@ class IndexController extends AbstractController ); return $this->render('teamer/index.html.twig', [ + 'teamer' => $teamer, 'pagination' => $pagination, 'errors' => $errors, ]); diff --git a/src/Repository/AssignmentRepository.php b/src/Repository/AssignmentRepository.php index 5d3660e..d0ee3a7 100644 --- a/src/Repository/AssignmentRepository.php +++ b/src/Repository/AssignmentRepository.php @@ -55,7 +55,7 @@ class AssignmentRepository extends ServiceEntityRepository $qb = $this->createQueryBuilder('assignment'); $qb - ->select('assignment', 'destination', 'job_profile') + ->select('assignment', 'destination', 'job_profile', 'application') ->innerJoin('assignment.teamers', 'teamer', Join::WITH, 'teamer = :teamer') ->innerJoin('assignment.destination', 'destination') ->innerJoin('assignment.jobProfile', 'job_profile') diff --git a/templates/layout.html.twig b/templates/layout.html.twig index 4e80944..ee91835 100644 --- a/templates/layout.html.twig +++ b/templates/layout.html.twig @@ -2,7 +2,7 @@ {% block body %}
-
+
My E&P Team diff --git a/templates/teamer/application/create.html.twig b/templates/teamer/application/create.html.twig index 145c2fc..9ebbd03 100644 --- a/templates/teamer/application/create.html.twig +++ b/templates/teamer/application/create.html.twig @@ -6,7 +6,7 @@

Bewerbung

-
+
{% include '_partials/_assignment_info.html.twig' %}
diff --git a/templates/teamer/assignment/index.html.twig b/templates/teamer/assignment/index.html.twig index 76bf4f4..b44a588 100644 --- a/templates/teamer/assignment/index.html.twig +++ b/templates/teamer/assignment/index.html.twig @@ -6,7 +6,7 @@

Einsatzübersicht

-
+
{% include '_partials/_assignment_info.html.twig' %}
diff --git a/templates/teamer/bookmark/index.html.twig b/templates/teamer/bookmark/index.html.twig index 663fef9..60bc4f5 100644 --- a/templates/teamer/bookmark/index.html.twig +++ b/templates/teamer/bookmark/index.html.twig @@ -6,71 +6,60 @@

Meine Merkliste

-
-
- - - - - - - - - - - - - {% for assignment in pagination %} - - - - - - - - - {% else %} - - - - {% endfor %} - -
- {{ knp_pagination_sortable(pagination, 'Einsatz­beginn', 'assignment.dateFrom') }} - - {{ knp_pagination_sortable(pagination, 'Einsatz­ende', 'assignment.dateTo') }} - - {{ knp_pagination_sortable(pagination, 'Jobprofil', 'assignment.jobProfile') }} - - {{ knp_pagination_sortable(pagination, 'Destination', 'destination.dateFrom') }} - - {{ knp_pagination_sortable(pagination, 'Busbegleitung ab', 'assignment.pickup') }} -
- {% set dateFrom = assignment.dateFrom ? assignment.dateFrom : assignment.destination.dateFrom %} - {{ dateFrom|date('d.m.Y') }} - - {% set dateTo = assignment.dateTo ? assignment.dateTo : assignment.destination.dateTo %} - {{ dateTo|date('d.m.Y') }} - - {{ assignment.jobProfile.name }} - - {{ assignment.destination.product }} -
- {{ assignment.destination.hotel }} -
- {{ assignment.pickup ? assignment.pickup|bpn_pickup_label|default('-') : '-' }} -
- {{ assignment.pickupDate ? assignment.pickupDate|date('d.m.Y') : '' }} -
- -
- Keine Daten... -
- {{ knp_pagination_render(pagination) }} -
+
+ {% 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 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' %} + {% 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 = 'info' %} + {% set class = 'btn--info' %} + {% set url = path('app_teamer_assignment', { 'uuid': assignment.uuid, 'r': return_url() }) %} + {% set label = 'bewerben' %} + {% endif %} + + {{ icon(icon, 'w-4 h-4') }} + {{ label }} + +
+
+ {% else %} + ... ist leer + {% endfor %}
+ {{ knp_pagination_render(pagination) }} {% endblock %} \ No newline at end of file diff --git a/templates/teamer/index.html.twig b/templates/teamer/index.html.twig index 567d5d5..830908f 100644 --- a/templates/teamer/index.html.twig +++ b/templates/teamer/index.html.twig @@ -20,7 +20,7 @@
{% for assignment in pagination %} -
+
{{ icon('flag-' ~ assignment.destination.country, 'w-5 h-5 shrink-0') }} @@ -68,6 +68,9 @@ {{ label }}
+ {% if teamer.bookmarks.contains(assignment) %} + {{ icon('star', 'w-5 h-5 text-yellow-500 absolute top-0 right-0 mt-2 mr-2') }} + {% endif %}
{% endfor %}