diff --git a/.env b/.env index ca8dbe9..a667205 100644 --- a/.env +++ b/.env @@ -46,6 +46,7 @@ APP_BPN_ENDPOINT= APP_BPN_CRM_ID_ADMIN=1292 APP_BPN_CRM_ID_MANAGER=1293 +APP_BPN_CRM_ID_HOUSE_MANAGER=9999 APP_BPN_CRM_ID_TEAMER=1070 APP_DEFAULT_EMAIL_FROM=info@ep-reisen.de diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 3f86cbb..064a73a 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -21,7 +21,6 @@ security: path: app_security_logout target: app_security_login access_control: - - { path: '^/profile', roles: ROLE_USER, requires_channel: https } - { path: '^/', roles: PUBLIC_ACCESS, requires_channel: https } when@test: diff --git a/config/services.yaml b/config/services.yaml index 4602fa1..eb40662 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -5,6 +5,7 @@ parameters: bpn_crm_id_admin: '%env(int:APP_BPN_CRM_ID_ADMIN)%' bpn_crm_id_manager: '%env(int:APP_BPN_CRM_ID_MANAGER)%' + bpn_crm_id_house_manager: '%env(int:APP_BPN_CRM_ID_HOUSE_MANAGER)%' bpn_crm_id_teamer: '%env(int:APP_BPN_CRM_ID_TEAMER)%' default_email_from: '%env(APP_DEFAULT_EMAIL_FROM)%' @@ -32,13 +33,6 @@ services: - name: liip_imagine.cache.resolver resolver: format_extension - App\EventListener\LogoutListener: - tags: - - name: kernel.event_listener - event: Symfony\Component\Security\Http\Event\LogoutEvent - method: onLogout - dispatcher: security.event_dispatcher.main - App\Command\BpnImportCommand: arguments: $connection: '@doctrine.dbal.default_connection' @@ -47,11 +41,18 @@ services: App\BusProNet\ApiClient: arguments: $logger: '@monolog.logger.bpn' - $options: { 'bpn_username': '%bpn_username%', 'bpn_password': '%bpn_password%', 'bpn_url': '%bpn_url%' } + $options: + bpn_username: '%bpn_username%' + bpn_password: '%bpn_password%' + bpn_url: '%bpn_url%' App\BusProNet\ResponseParser: arguments: - $options: { 'bpn_crm_id_admin': '%bpn_crm_id_admin%', 'bpn_crm_id_manager': '%bpn_crm_id_manager%', 'bpn_crm_id_teamer': '%bpn_crm_id_teamer%' } + $options: + bpn_crm_id_admin: '%bpn_crm_id_admin%' + bpn_crm_id_manager: '%bpn_crm_id_manager%' + bpn_crm_id_house_manager: '%bpn_crm_id_house_manager%' + bpn_crm_id_teamer: '%bpn_crm_id_teamer%' App\Twig\AppRuntime: arguments: @@ -62,7 +63,8 @@ services: arguments: - '@security.helper' tags: - - { name: monolog.processor, channel: myep } + - name: monolog.processor + channel: myep App\Menu\AdminMenuBuilder: arguments: @@ -106,12 +108,16 @@ services: App\Service\Pdf\ContractRenderer: arguments: - $options: { 'project_dir': '%kernel.project_dir%' } + $options: + project_dir: '%kernel.project_dir%' App\Service\Pdf\InvoiceRenderer: arguments: - $options: { 'project_dir': '%kernel.project_dir%' } + $options: + project_dir: '%kernel.project_dir%' App\Email\Mailer: arguments: - $defaults: { 'from': '%default_email_from%', 'to': '%default_email_to%' } \ No newline at end of file + $defaults: + from: '%default_email_from%' + to: '%default_email_to%' \ No newline at end of file diff --git a/migrations/Version20231102162040.php b/migrations/Version20231102162040.php new file mode 100644 index 0000000..56482f6 --- /dev/null +++ b/migrations/Version20231102162040.php @@ -0,0 +1,43 @@ +addSql('CREATE TABLE feedback_set (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, items JSON NOT NULL COMMENT \'(DC2Type:json)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE feedback ADD assignment_id INT DEFAULT NULL, ADD ratings JSON NOT NULL COMMENT \'(DC2Type:json)\', DROP body, DROP author_name, DROP author_email'); + $this->addSql('ALTER TABLE feedback ADD CONSTRAINT FK_D2294458D19302F8 FOREIGN KEY (assignment_id) REFERENCES assignment (id) ON DELETE SET NULL'); + $this->addSql('CREATE INDEX IDX_D2294458D19302F8 ON feedback (assignment_id)'); + $this->addSql('ALTER TABLE job_profile ADD feedback_set_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE job_profile ADD CONSTRAINT FK_1BB81D942DB73956 FOREIGN KEY (feedback_set_id) REFERENCES feedback_set (id) ON DELETE SET NULL'); + $this->addSql('CREATE INDEX IDX_1BB81D942DB73956 ON job_profile (feedback_set_id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE job_profile DROP FOREIGN KEY FK_1BB81D942DB73956'); + $this->addSql('DROP TABLE feedback_set'); + $this->addSql('ALTER TABLE feedback DROP FOREIGN KEY FK_D2294458D19302F8'); + $this->addSql('DROP INDEX IDX_D2294458D19302F8 ON feedback'); + $this->addSql('ALTER TABLE feedback ADD body LONGTEXT NOT NULL, ADD author_name VARCHAR(255) NOT NULL, ADD author_email VARCHAR(255) NOT NULL, DROP assignment_id, DROP ratings'); + $this->addSql('DROP INDEX IDX_1BB81D942DB73956 ON job_profile'); + $this->addSql('ALTER TABLE job_profile DROP feedback_set_id'); + } +} diff --git a/migrations/Version20231102162226.php b/migrations/Version20231102162226.php new file mode 100644 index 0000000..a31bda1 --- /dev/null +++ b/migrations/Version20231102162226.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE user ADD hotel_bus_pro_id INT DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE user DROP hotel_bus_pro_id'); + } +} diff --git a/src/BusProNet/Model/CrmAttributesResponse.php b/src/BusProNet/Model/CrmAttributesResponse.php index 3073646..c5a836d 100644 --- a/src/BusProNet/Model/CrmAttributesResponse.php +++ b/src/BusProNet/Model/CrmAttributesResponse.php @@ -7,6 +7,7 @@ class CrmAttributesResponse private ?array $attributeGroups = null; private bool $admin = false; private bool $manager = false; + private bool $houseManager = false; private bool $teamer = false; public function getAttributeGroups(): ?array @@ -56,6 +57,18 @@ class CrmAttributesResponse return $this; } + public function isHouseManager(): bool + { + return $this->houseManager; + } + + public function setHouseManager(bool $houseManager): static + { + $this->houseManager = $houseManager; + + return $this; + } + public function toArray(): array { $crmSelections = []; diff --git a/src/BusProNet/ResponseParser.php b/src/BusProNet/ResponseParser.php index 5ef256d..db974c5 100644 --- a/src/BusProNet/ResponseParser.php +++ b/src/BusProNet/ResponseParser.php @@ -133,7 +133,7 @@ class ResponseParser public function createCrmAttributesResponse(\SimpleXMLElement $xml): CrmAttributesResponse { $groups = []; - $isAdmin = $isManager = $isTeamer = false; + $isAdmin = $isManager = $isHouseManager = $isTeamer = false; foreach ($xml->xpath('selektionsmerkmale/selektionsgruppe') as $item) { $group = new CrmAttributeGroup(); @@ -169,6 +169,7 @@ class ResponseParser ->setAdmin($isAdmin) ->setManager($isManager) ->setTeamer($isTeamer) + ->setHouseManager($isHouseManager) ; return $response; @@ -242,9 +243,10 @@ class ResponseParser private function resolveOptions(array $options): array { $optionsResolver = new OptionsResolver(); - $optionsResolver->setRequired(['bpn_crm_id_admin', 'bpn_crm_id_manager', 'bpn_crm_id_teamer']); + $optionsResolver->setRequired(['bpn_crm_id_admin', 'bpn_crm_id_manager', 'bpn_crm_id_house_manager', 'bpn_crm_id_teamer']); $optionsResolver->setAllowedTypes('bpn_crm_id_admin', 'int'); $optionsResolver->setAllowedTypes('bpn_crm_id_manager', 'int'); + $optionsResolver->setAllowedTypes('bpn_crm_id_house_manager', 'int'); $optionsResolver->setAllowedTypes('bpn_crm_id_teamer', 'int'); return $optionsResolver->resolve($options); diff --git a/src/BusProNet/UserDataHandler.php b/src/BusProNet/UserDataHandler.php index 232f482..63c72e8 100644 --- a/src/BusProNet/UserDataHandler.php +++ b/src/BusProNet/UserDataHandler.php @@ -30,6 +30,9 @@ class UserDataHandler if ($crmAttributes->isManager()) { $roles[] = 'ROLE_MANAGER'; } + if ($crmAttributes->isHouseManager()) { + $roles[] = 'ROLE_HOUSE_MANAGER'; + } if ($crmAttributes->isTeamer()) { $roles[] = 'ROLE_TEAMER'; } diff --git a/src/Controller/Admin/System/FeedbackSet/CreateController.php b/src/Controller/Admin/System/FeedbackSet/CreateController.php new file mode 100644 index 0000000..011b1d4 --- /dev/null +++ b/src/Controller/Admin/System/FeedbackSet/CreateController.php @@ -0,0 +1,48 @@ +createForm(FeedbackSetType::class, $feedbackSet); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $this->entityManager->persist($feedbackSet); + $this->entityManager->flush(); + + $this->addFlash('success', 'Die Feedback-Vorlage wurde angelegt'); + $this->logger->info('Create feedback set', [ + 'feedback_set_id' => $feedbackSet->getId(), + 'feedback_set_name' => $feedbackSet->getName(), + ]); + + return $this->redirectToRoute('app_admin_system_feedback_set_index'); + } + + return $this->render('admin/system/feedback_set/create.html.twig', [ + 'form' => $form + ]); + } +} \ No newline at end of file diff --git a/src/Controller/Admin/System/FeedbackSet/DeleteController.php b/src/Controller/Admin/System/FeedbackSet/DeleteController.php new file mode 100644 index 0000000..9796eba --- /dev/null +++ b/src/Controller/Admin/System/FeedbackSet/DeleteController.php @@ -0,0 +1,36 @@ +entityManager->remove($feedbackSet); + $this->entityManager->flush(); + + $this->addFlash('success', 'Die Feedback-Vorlage wurde gelöscht'); + $this->logger->info('Delete feedback set', [ + 'feedback_set_id' => $feedbackSet->getId(), + 'feedback_set_name' => $feedbackSet->getName(), + ]); + + return $this->redirectToRoute('app_admin_system_feedback_set_index'); + } +} \ No newline at end of file diff --git a/src/Controller/Admin/System/FeedbackSet/EditController.php b/src/Controller/Admin/System/FeedbackSet/EditController.php new file mode 100644 index 0000000..5fedb78 --- /dev/null +++ b/src/Controller/Admin/System/FeedbackSet/EditController.php @@ -0,0 +1,46 @@ +createForm(FeedbackSetType::class, $feedbackSet); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $this->entityManager->flush(); + + $this->addFlash('success', 'Die Feedback-Vorlage wurde aktualisiert'); + $this->logger->info('Edit feedback set', [ + 'feedback_set_id' => $feedbackSet->getId(), + 'feedback_set_name' => $feedbackSet->getName(), + ]); + + return $this->redirectToRoute('app_admin_system_feedback_set_index'); + } + + return $this->render('admin/system/feedback_set/edit.html.twig', [ + 'form' => $form + ]); + } +} \ No newline at end of file diff --git a/src/Controller/Admin/System/FeedbackSet/IndexController.php b/src/Controller/Admin/System/FeedbackSet/IndexController.php new file mode 100644 index 0000000..8537ee0 --- /dev/null +++ b/src/Controller/Admin/System/FeedbackSet/IndexController.php @@ -0,0 +1,29 @@ +feedbackSetRepository + ->findAll() + ; + + return $this->render('admin/system/feedback_set/index.html.twig', [ + 'feedbackSets' => $feedbackSets, + ]); + } +} \ No newline at end of file diff --git a/src/Controller/HouseManager/IndexController.php b/src/Controller/HouseManager/IndexController.php new file mode 100644 index 0000000..0a28f5d --- /dev/null +++ b/src/Controller/HouseManager/IndexController.php @@ -0,0 +1,16 @@ +render(''); + } +} \ No newline at end of file diff --git a/src/Entity/Assignment.php b/src/Entity/Assignment.php index eb42e98..d681cd4 100644 --- a/src/Entity/Assignment.php +++ b/src/Entity/Assignment.php @@ -84,6 +84,9 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa #[ORM\ManyToOne] private ?User $owner = null; + #[ORM\OneToMany(mappedBy: 'assignment', targetEntity: Feedback::class)] + private Collection $feedbacks; + public function __construct() { $this->uuid = Uuid::v4(); @@ -93,6 +96,7 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa $this->teamers = new ArrayCollection(); $this->benefits = "Anreise im E&P Reisebus\nUnterkunft\nVerpflegung\nSkipass\n"; $this->documents = new ArrayCollection(); + $this->feedbacks = new ArrayCollection(); } public static function duplicate(Assignment $assignment): static @@ -436,4 +440,34 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa return $this; } + + /** + * @return Collection + */ + public function getFeedbacks(): Collection + { + return $this->feedbacks; + } + + public function addFeedback(Feedback $feedback): static + { + if (!$this->feedbacks->contains($feedback)) { + $this->feedbacks->add($feedback); + $feedback->setAssignment($this); + } + + return $this; + } + + public function removeFeedback(Feedback $feedback): static + { + if ($this->feedbacks->removeElement($feedback)) { + // set the owning side to null (unless already changed) + if ($feedback->getAssignment() === $this) { + $feedback->setAssignment(null); + } + } + + return $this; + } } diff --git a/src/Entity/Feedback.php b/src/Entity/Feedback.php index b6fd600..0ff6e71 100644 --- a/src/Entity/Feedback.php +++ b/src/Entity/Feedback.php @@ -26,8 +26,9 @@ class Feedback implements BlameableEntityInterface, TimestampableEntityInterface #[ORM\ManyToOne(inversedBy: 'feedback')] private ?Teamer $teamer = null; - #[ORM\Column(type: Types::TEXT)] - private ?string $body = null; + #[ORM\ManyToOne(inversedBy: 'feedbacks')] + #[ORM\JoinColumn(onDelete: 'SET NULL')] + private ?Assignment $assignment = null; #[ORM\Column(length: 255)] private ?string $assignmentDestination = null; @@ -35,11 +36,8 @@ class Feedback implements BlameableEntityInterface, TimestampableEntityInterface #[ORM\Column(type: Types::DATE_IMMUTABLE)] private ?\DateTimeImmutable $assignmentDate = null; - #[ORM\Column(length: 255)] - private ?string $authorName = null; - - #[ORM\Column(length: 255)] - private ?string $authorEmail = null; + #[ORM\Column] + private array $ratings = []; public function __construct() { @@ -68,14 +66,14 @@ class Feedback implements BlameableEntityInterface, TimestampableEntityInterface return $this; } - public function getBody(): ?string + public function getAssignment(): ?Assignment { - return $this->body; + return $this->assignment; } - public function setBody(string $body): static + public function setAssignment(?Assignment $assignment): static { - $this->body = $body; + $this->assignment = $assignment; return $this; } @@ -104,26 +102,14 @@ class Feedback implements BlameableEntityInterface, TimestampableEntityInterface return $this; } - public function getAuthorName(): ?string + public function getRatings(): array { - return $this->authorName; + return $this->ratings; } - public function setAuthorName(string $authorName): static + public function setRatings(array $ratings): static { - $this->authorName = $authorName; - - return $this; - } - - public function getAuthorEmail(): ?string - { - return $this->authorEmail; - } - - public function setAuthorEmail(string $authorEmail): static - { - $this->authorEmail = $authorEmail; + $this->ratings = $ratings; return $this; } diff --git a/src/Entity/FeedbackSet.php b/src/Entity/FeedbackSet.php new file mode 100644 index 0000000..536d9f0 --- /dev/null +++ b/src/Entity/FeedbackSet.php @@ -0,0 +1,56 @@ +id; + } + + public function getName(): ?string + { + return $this->name; + } + + public function setName(string $name): static + { + $this->name = $name; + + return $this; + } + + public function getItems(): array + { + return $this->items; + } + + public function setItems(array $items): static + { + $this->items = $items; + + return $this; + } +} diff --git a/src/Entity/JobProfile.php b/src/Entity/JobProfile.php index 402080c..d178525 100644 --- a/src/Entity/JobProfile.php +++ b/src/Entity/JobProfile.php @@ -38,6 +38,10 @@ class JobProfile implements BlameableEntityInterface, TimestampableEntityInterfa #[ORM\ManyToMany(targetEntity: Training::class)] private Collection $requiredTrainings; + #[ORM\ManyToOne] + #[ORM\JoinColumn(onDelete: 'SET NULL')] + private ?FeedbackSet $feedbackSet = null; + public function __construct() { $this->uuid = Uuid::v4(); @@ -101,4 +105,16 @@ class JobProfile implements BlameableEntityInterface, TimestampableEntityInterfa return $this; } + + public function getFeedbackSet(): ?FeedbackSet + { + return $this->feedbackSet; + } + + public function setFeedbackSet(?FeedbackSet $feedbackSet): static + { + $this->feedbackSet = $feedbackSet; + + return $this; + } } diff --git a/src/Entity/User.php b/src/Entity/User.php index 2f71d2c..33f2d55 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -48,6 +48,9 @@ class User implements UserInterface, TimestampableEntityInterface #[ORM\OneToOne(inversedBy: 'user', cascade: ['persist', 'remove'])] private ?Contact $contact = null; + #[ORM\Column(nullable: true)] + private ?int $hotelBusProId = null; + public function __construct() { $this->uuid = Uuid::v4(); @@ -178,6 +181,8 @@ class User implements UserInterface, TimestampableEntityInterface return 'app_admin_index'; } elseif ($this->hasRole('ROLE_MANAGER')) { return 'app_manager_index'; + } elseif ($this->hasRole('ROLE_HOUSE_MANAGER')) { + return 'app_house_manager_index'; } else { return 'app_teamer_index'; } @@ -215,4 +220,16 @@ class User implements UserInterface, TimestampableEntityInterface return $this; } + + public function getHotelBusProId(): ?int + { + return $this->hotelBusProId; + } + + public function setHotelBusProId(?int $hotelBusProId): static + { + $this->hotelBusProId = $hotelBusProId; + + return $this; + } } diff --git a/src/EventListener/LogoutListener.php b/src/EventListener/LogoutListener.php index 1399dcd..1d0420c 100644 --- a/src/EventListener/LogoutListener.php +++ b/src/EventListener/LogoutListener.php @@ -3,8 +3,10 @@ namespace App\EventListener; use Psr\Log\LoggerInterface; +use Symfony\Component\EventDispatcher\Attribute\AsEventListener; use Symfony\Component\Security\Http\Event\LogoutEvent; +#[AsEventListener(event: LogoutEvent::class, method: 'onLogout')] class LogoutListener { public function __construct(private readonly LoggerInterface $logger) diff --git a/src/Form/FeedbackSetType.php b/src/Form/FeedbackSetType.php new file mode 100644 index 0000000..5c57bbb --- /dev/null +++ b/src/Form/FeedbackSetType.php @@ -0,0 +1,36 @@ +add('name', TextType::class, [ + 'label' => 'Bezeichnung', + ]) + ->add('items', CollectionType::class, [ + 'label' => 'Bewertungen', + 'entry_type' => TextType::class, + 'allow_add' => true, + 'allow_delete' => true, + 'error_bubbling' => false, + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => FeedbackSet::class, + ]); + } +} \ No newline at end of file diff --git a/src/Form/JobProfileType.php b/src/Form/JobProfileType.php index 518acfd..af6fdc1 100644 --- a/src/Form/JobProfileType.php +++ b/src/Form/JobProfileType.php @@ -2,6 +2,7 @@ namespace App\Form; +use App\Entity\FeedbackSet; use App\Entity\JobProfile; use App\Entity\License; use App\Entity\Training; @@ -45,6 +46,12 @@ class JobProfileType extends AbstractType 'Snowboardlehrer*in' => License::TYPE_SNOWBOARD, ], ]) + ->add('feedbackSet', EntityType::class, [ + 'label' => 'Feedback-Vorlage', + 'class' => FeedbackSet::class, + 'choice_label' => 'name', + 'placeholder' => 'Kein Feedback', + ]) ; } diff --git a/src/Menu/AdminMenuBuilder.php b/src/Menu/AdminMenuBuilder.php index a2ffb6b..ca3ec3c 100644 --- a/src/Menu/AdminMenuBuilder.php +++ b/src/Menu/AdminMenuBuilder.php @@ -76,6 +76,21 @@ class AdminMenuBuilder extends AbstractMenuBuilder ], ], ], + [ + 'route' => 'app_admin_system_feedback_set_index', + 'title' => 'Feedback-Vorlagen', + 'children' => [ + [ + 'route' => 'app_admin_system_feedback_set_create', + 'title' => 'Feedback-Vorlage anlegen', + ], + [ + 'route' => 'app_admin_system_feedback_set_edit', + 'routeParameters' => $this->getDefaultRouteParameters(), + 'title' => 'Feedback-Vorlage bearbeiten', + ], + ], + ], [ 'route' => 'app_admin_system_faq_index', 'title' => 'FAQ', diff --git a/src/Repository/FeedbackSetRepository.php b/src/Repository/FeedbackSetRepository.php new file mode 100644 index 0000000..88bf449 --- /dev/null +++ b/src/Repository/FeedbackSetRepository.php @@ -0,0 +1,23 @@ + + * + * @method FeedbackSet|null find($id, $lockMode = null, $lockVersion = null) + * @method FeedbackSet|null findOneBy(array $criteria, array $orderBy = null) + * @method FeedbackSet[] findAll() + * @method FeedbackSet[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class FeedbackSetRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, FeedbackSet::class); + } +} diff --git a/templates/admin/system/feedback_set/_form.html.twig b/templates/admin/system/feedback_set/_form.html.twig new file mode 100644 index 0000000..19b3a9b --- /dev/null +++ b/templates/admin/system/feedback_set/_form.html.twig @@ -0,0 +1,43 @@ +{% macro collectionRow(form) %} +
+
+ {{ form_widget(form) }} + +
+ {{ form_errors(form) }} +
+{% endmacro %} + +{{ form_start(form) }} +
+ {{ form_row(form.name) }} +
+

+ Bewertungen +

+
+ {% do form.items.setRendered %} + {%- for item in form.items -%}{{- _self.collectionRow(item) -}}{%- endfor -%} +
+
+ +
+ {{ form_errors(form.items) }} +
+
+
+ + + Abbrechen + +
+{{ form_rest(form) }} +{{ form_end(form) }} diff --git a/templates/admin/system/feedback_set/create.html.twig b/templates/admin/system/feedback_set/create.html.twig new file mode 100644 index 0000000..b74fe86 --- /dev/null +++ b/templates/admin/system/feedback_set/create.html.twig @@ -0,0 +1,12 @@ +{% extends 'admin/layout.html.twig' %} + +{% block title %}Einstellungen - Feedback-Vorlage anlegen{% endblock %} + +{% block content %} +
+

+ Feedback-Vorlage +

+ {% include 'admin/system/feedback_set/_form.html.twig' %} +
+{% endblock %} \ No newline at end of file diff --git a/templates/admin/system/feedback_set/edit.html.twig b/templates/admin/system/feedback_set/edit.html.twig new file mode 100644 index 0000000..c634401 --- /dev/null +++ b/templates/admin/system/feedback_set/edit.html.twig @@ -0,0 +1,12 @@ +{% extends 'admin/layout.html.twig' %} + +{% block title %}Einstellungen - Feedback-Vorlage bearbeiten{% endblock %} + +{% block content %} +
+

+ Feedback-Vorlage bearbeiten +

+ {% include 'admin/system/feedback_set/_form.html.twig' %} +
+{% endblock %} \ No newline at end of file diff --git a/templates/admin/system/feedback_set/index.html.twig b/templates/admin/system/feedback_set/index.html.twig new file mode 100644 index 0000000..99f48a5 --- /dev/null +++ b/templates/admin/system/feedback_set/index.html.twig @@ -0,0 +1,64 @@ +{% extends 'admin/layout.html.twig' %} + +{% block title %}Einstellungen - Feedback-Vorlagen{% endblock %} + +{% block content %} +

+ Feedback-Vorlagen +

+
+
+ + + + + + + + + + {% for feedbackSet in feedbackSets %} + + + + + + {% else %} + + + + {% endfor %} + +
+ Bezeichnung + + Bewertungen +
+ {{ feedbackSet.name }} + + {{ feedbackSet.items|length }} + +
+ + + {{ icon('edit') }} + +
+
+ Keine Daten... +
+
+
+ + Neu + +{% endblock %} \ No newline at end of file diff --git a/templates/admin/system/job_profile/_form.html.twig b/templates/admin/system/job_profile/_form.html.twig index 74c6c91..fc77261 100644 --- a/templates/admin/system/job_profile/_form.html.twig +++ b/templates/admin/system/job_profile/_form.html.twig @@ -1,6 +1,7 @@ {{ form_start(form) }}
{{ form_row(form.name) }} + {{ form_row(form.feedbackSet) }} {{ form_row(form.requiredTrainings) }} {{ form_row(form.requiredLicenses) }}