212 lines
6.9 KiB
PHP
212 lines
6.9 KiB
PHP
<?php
|
|
|
|
namespace App\Menu;
|
|
|
|
use App\Entity\Upload;
|
|
use Knp\Menu\ItemInterface;
|
|
|
|
class ManagerMenuBuilder extends AbstractMenuBuilder
|
|
{
|
|
public function createMainMenu(array $options): ItemInterface
|
|
{
|
|
$menu = $this->createRootElement();
|
|
|
|
$menu->addChild('Dashboard', [
|
|
'route' => 'app_manager_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('Zeitleiste', [
|
|
'route' => 'app_administrative_timeline',
|
|
'linkAttributes' => [
|
|
'title' => 'Zeitleiste',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'table',
|
|
],
|
|
]);
|
|
$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('Teamübersicht', [
|
|
'route' => 'app_administrative_teamer_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Teamübersicht',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'users',
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_teamer_/'],
|
|
],
|
|
],
|
|
]);
|
|
$menu->addChild('Feedbackübersicht', [
|
|
'route' => 'app_administrative_feedback_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Feedbackübersicht',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'feedback',
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_feedback_/'],
|
|
],
|
|
],
|
|
]);
|
|
$statisticsMenu = $menu->addChild('Statistiken', [
|
|
'extras' => [
|
|
'icon' => 'chart',
|
|
],
|
|
]);
|
|
$statisticsMenu->addChild('Bewertungen nach Kategorie', [
|
|
'route' => 'app_administrative_statistics_feedback_ratings',
|
|
'linkAttributes' => [
|
|
'title' => 'Bewertungen nach Kategorie',
|
|
],
|
|
]);
|
|
$statisticsMenu->addChild('Feedback pro Destination', [
|
|
'route' => 'app_administrative_statistics_feedback_by_destination',
|
|
'linkAttributes' => [
|
|
'title' => 'Feedback pro Destination',
|
|
],
|
|
]);
|
|
$statisticsMenu->addChild('Bewertungen nach Destination', [
|
|
'route' => 'app_administrative_statistics_feedback_ratings_by_destination',
|
|
'linkAttributes' => [
|
|
'title' => 'Bewertungen nach Destination',
|
|
],
|
|
]);
|
|
$settingsMenu = $menu->addChild('Einstellungen', [
|
|
'linkAttributes' => [
|
|
'title' => 'Einstellungen',
|
|
],
|
|
'extras' => [
|
|
'icon' => 'settings',
|
|
],
|
|
]);
|
|
$settingsMenu->addChild('Reisen', [
|
|
'route' => 'app_administrative_system_destination_index',
|
|
'linkAttributes' => [
|
|
'title' => 'Reisen',
|
|
],
|
|
'extras' => [
|
|
'routes' => [
|
|
['pattern' => '/^app_administrative_system_destination_/'],
|
|
],
|
|
],
|
|
]);
|
|
$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_/'],
|
|
],
|
|
],
|
|
]);
|
|
|
|
$this->addAdminItem($menu);
|
|
$this->addTeamerItem($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('Vergangene Einsätze', [
|
|
'route' => 'app_administrative_teamer_recent_assignments',
|
|
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
|
'linkAttributes' => [
|
|
'title' => 'Vergangene Einsätze',
|
|
],
|
|
]);
|
|
$menu->addChild('Bevorstehende Einsätze', [
|
|
'route' => 'app_administrative_teamer_upcoming_assignments',
|
|
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
|
'linkAttributes' => [
|
|
'title' => 'Bevorstehende Einsätze',
|
|
],
|
|
]);
|
|
|
|
$this->addBackItem($menu, $options);
|
|
|
|
return $menu;
|
|
}
|
|
}
|