diff --git a/config/packages/liip_imagine.yaml b/config/packages/liip_imagine.yaml index b618e5d..1c3c4d2 100644 --- a/config/packages/liip_imagine.yaml +++ b/config/packages/liip_imagine.yaml @@ -23,3 +23,8 @@ liip_imagine: jpeg_quality: 75 filters: thumbnail: { size: [ 128, 128 ], mode: outbound } + contact: + format: jpeg + jpeg_quality: 75 + filters: + thumbnail: { size: [ 256, 256 ], mode: outbound } diff --git a/src/Controller/Teamer/ContactController.php b/src/Controller/Teamer/ContactController.php index 33c3562..fd2b6d6 100644 --- a/src/Controller/Teamer/ContactController.php +++ b/src/Controller/Teamer/ContactController.php @@ -2,6 +2,7 @@ namespace App\Controller\Teamer; +use App\Entity\Contact; use App\Repository\ContactRepository; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; @@ -15,19 +16,23 @@ class ContactController extends AbstractController #[Route('/teamer/contact', name: 'app_teamer_contact')] public function index(): Response { - $generalContacts = $this + $allContacts = $this ->contactRepository - ->getGeneralContacts() + ->findAll() ; - $destinationContacts = $this - ->contactRepository - ->getDestinationContacts() - ; + $contacts = [ + Contact::CATEGORY_HR => [], + Contact::CATEGORY_MANAGEMENT => [], + Contact::CATEGORY_HOUSE_MANAGEMENT => [], + ]; + + foreach ($allContacts as $contact) { + $contacts[$contact->getCategory()][] = $contact; + } return $this->render('teamer/contact/index.html.twig', [ - 'generalContacts' => $generalContacts, - 'destinationContacts' => $destinationContacts, + 'contacts' => $contacts, ]); } } \ No newline at end of file diff --git a/templates/teamer/contact/index.html.twig b/templates/teamer/contact/index.html.twig index 371a73b..8828d05 100644 --- a/templates/teamer/contact/index.html.twig +++ b/templates/teamer/contact/index.html.twig @@ -2,37 +2,32 @@ {% block title %}Kontakt{% endblock %} -{% macro contacts(contacts, email) %} -
-
-
- {% for contact in contacts %} -
- {% if contact.photo %} - {{ contact.name }} - {% endif %} -
- {{ contact.name }} -
- {% if contact.destination %} -
- {{ contact.destination }} -
-
- {{ contact.email }} -
- {% endif %} -
- {% endfor %} -
-
- {% if email %} -
- {{ email }} +{% macro contact(contact) %} +
+ {% if contact.photo %} +
+ {{ contact.name }} +
{% endif %} +
+ {{ contact.name }} + {% if contact.category %}
{{ ('label.contact.category.' ~ contact.category) | trans }}{% endif %} + {% if contact.destination %}
{{ contact.destination }}{% endif %} +
{% endmacro %} @@ -48,11 +43,30 @@

Ansonsten melde dich gerne beim Team Personalplanung!

- {{ _self.contacts(generalContacts, 'team@ep-reisen.de') }} +
+
+ {% for contact in contacts.hr %} + {{ _self.contact(contact) }} + {% endfor %} +
+

Hast du Fragen zu deinem nächsten Einsatz in einer konkreten Destination? Dann melde dich gerne bei den - zuständigen Büromitarbeitenden. + zuständigen Büromitarbeitenden oder Hausleitungen.

- {{ _self.contacts(destinationContacts) }} +
+
+ {% for contact in contacts.management %} + {{ _self.contact(contact) }} + {% endfor %} +
+
+
+
+ {% for contact in contacts.house_management %} + {{ _self.contact(contact) }} + {% endfor %} +
+
{% endblock %} \ No newline at end of file diff --git a/translations/messages.de.yaml b/translations/messages.de.yaml index f1e7691..e00f8a4 100644 --- a/translations/messages.de.yaml +++ b/translations/messages.de.yaml @@ -23,6 +23,11 @@ label: checked: geprüft paid: bezahlt rejected: abgelehnt + contact: + category: + hr: Personalplanung + management: Management + house_management: Hausmanagement message: confirm_contract: