309 lines
10 KiB
PHP
309 lines
10 KiB
PHP
<?php
|
|
|
|
namespace App\Menu;
|
|
|
|
use App\Entity\Upload;
|
|
use Knp\Menu\ItemInterface;
|
|
|
|
class AdminMenuBuilder extends AbstractMenuBuilder
|
|
{
|
|
public function createMainMenu(array $options): ItemInterface
|
|
{
|
|
$menu = $this->createRootElement();
|
|
|
|
$menu->addChild('Dashboard', [
|
|
'route' => 'app_admin_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Dashboard',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'chart',
|
|
],
|
|
]);
|
|
$menu->addChild('Einsatzübersicht', [
|
|
'route' => 'app_administrative_assignment_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Einsatzübersicht',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'calendar',
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_assignment_/'],
|
|
],
|
|
],
|
|
]);
|
|
$menu->addChild('Bewerbungsübersicht', [
|
|
'route' => 'app_admin_application_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Bewerbungsübersicht',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'mail',
|
|
],
|
|
]);
|
|
$documentMenu = $menu->addChild('Dokumente', [
|
|
'extras' => [
|
|
'icon' => 'document',
|
|
],
|
|
]);
|
|
$documentMenu->addChild('Übersicht', [
|
|
'route' => 'app_administrative_document_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Übersicht',
|
|
],
|
|
]);
|
|
$documentMenu->addChild('akzeptierte Honorarnoten', [
|
|
'route' => 'app_administrative_document_accepted',
|
|
'routeParameters' => [
|
|
'type' => Upload::TYPE_INVOICE,
|
|
],
|
|
'linkAttributes' => [
|
|
'title' => 'akzeptierte Honorarnoten',
|
|
],
|
|
]);
|
|
$documentMenu->addChild('geprüfte Honorverträge', [
|
|
'route' => 'app_administrative_document_accepted',
|
|
'routeParameters' => [
|
|
'type' => Upload::TYPE_CONTRACT,
|
|
],
|
|
'linkAttributes' => [
|
|
'title' => 'geprüfte Honorverträge',
|
|
],
|
|
]);
|
|
$menu->addChild('Feedbackübersicht', [
|
|
'route' => 'app_administrative_feedback_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Feedbackübersicht',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'feedback',
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_feedback_/']
|
|
],
|
|
],
|
|
]);
|
|
$menu->addChild('Teamübersicht', [
|
|
'route' => 'app_administrative_teamer_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Teamübersicht',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'users',
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_teamer_/'],
|
|
['pattern' => '/^app_admin_teamer_/']
|
|
],
|
|
],
|
|
]);
|
|
$menu->addChild('Verfügbarkeiten', [
|
|
'route' => 'app_administrative_availability_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Verfügbarkeiten',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'calendar',
|
|
],
|
|
]);
|
|
$settingsMenu = $menu->addChild('Einstellungen', [
|
|
'linkAttributes' => [
|
|
'title' => 'Einstellungen',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'settings',
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('Verfügbarkeiten', [
|
|
'route' => 'app_admin_system_availability_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Verfügbarkeiten',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_admin_system_availability_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('Honorare', [
|
|
'route' => 'app_admin_system_fee_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Honorare',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_admin_system_fee_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('Fortbildungen', [
|
|
'route' => 'app_admin_system_training_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Fortbildungen',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_admin_system_training_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('Jobprofile', [
|
|
'route' => 'app_admin_system_job_profile_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Jobprofile',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_admin_system_job_profile_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('Reisen', [
|
|
'route' => 'app_administrative_system_destination_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Reisen',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_system_destination_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('Feedbackvorlagen', [
|
|
'route' => 'app_admin_system_feedback_set_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Feedbackvorlagen',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_admin_system_feedback_set_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('FAQ', [
|
|
'route' => 'app_administrative_system_faq_index',
|
|
'linkAttributes' => [
|
|
'title' => 'FAQ',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_system_faq_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('News', [
|
|
'route' => 'app_administrative_system_news_index',
|
|
'linkAttributes' => [
|
|
'title' => 'News',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_system_news_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('Dokumente', [
|
|
'route' => 'app_administrative_system_document_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Dokumente',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_system_document_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('Ansprechpersonen', [
|
|
'route' => 'app_admin_system_contact_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Ansprechpersonen',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_admin_system_contact_/']
|
|
],
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('Administrative Benutzer:innen', [
|
|
'route' => 'app_admin_system_user_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Administrative Benutzer:innen',
|
|
],
|
|
]);
|
|
$menu->addChild('Logs', [
|
|
'route' => 'app_admin_log_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Logs',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'list',
|
|
],
|
|
]);
|
|
|
|
$this->addTeamerItem($menu);
|
|
$this->addManagerItem($menu);
|
|
$this->addHouseManagerItem($menu);
|
|
$this->addLogoutItem($menu);
|
|
|
|
return $menu;
|
|
}
|
|
|
|
public function createTeamerMenu(array $options): ItemInterface
|
|
{
|
|
$menu = $this->createRootElement();
|
|
|
|
$menu->addChild('Stammdaten & Foto', [
|
|
'route' => 'app_administrative_teamer_profile',
|
|
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
|
'linkAttributes' => [
|
|
'title' => 'Stammdaten & Foto',
|
|
],
|
|
]);
|
|
$menu->addChild('Jobprofile & Skills', [
|
|
'route' => 'app_admin_teamer_skills',
|
|
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
|
'linkAttributes' => [
|
|
'title' => 'Jobprofile & Skills',
|
|
],
|
|
]);
|
|
$menu->addChild('Verfügbarkeit', [
|
|
'route' => 'app_admin_teamer_availability',
|
|
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
|
'linkAttributes' => [
|
|
'title' => 'Verfügbarkeit',
|
|
],
|
|
]);
|
|
$menu->addChild('Selektionsmerkmale', [
|
|
'route' => 'app_admin_teamer_crm_selections',
|
|
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
|
'linkAttributes' => [
|
|
'title' => 'Selektionsmerkmale',
|
|
],
|
|
]);
|
|
$menu->addChild('Vergangene Einsätze', [
|
|
'route' => 'app_administrative_teamer_recent_assignments',
|
|
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
|
'linkAttributes' => [
|
|
'title' => 'Vergangene Einsätze',
|
|
],
|
|
]);
|
|
$menu->addChild('Anmerkungen (intern)', [
|
|
'route' => 'app_admin_teamer_remarks_internal',
|
|
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
|
'linkAttributes' => [
|
|
'title' => 'Anmerkungen (intern)',
|
|
],
|
|
]);
|
|
|
|
$this->addDivider($menu);
|
|
|
|
$request = $this->requestStack->getMainRequest();
|
|
|
|
$menu->addChild('zurück zur Übersicht', [
|
|
'uri' => rawurldecode($request->get('r')),
|
|
'extras' => [
|
|
'icon' => 'arrow-left',
|
|
],
|
|
]);
|
|
|
|
return $menu;
|
|
}
|
|
} |