wip: functionality for new role 'management'
This commit is contained in:
@@ -77,6 +77,17 @@ services:
|
||||
method: createTeamerMenu
|
||||
alias: admin_teamer
|
||||
|
||||
App\Menu\ManagerMenuBuilder:
|
||||
arguments:
|
||||
$factory: '@knp_menu.factory'
|
||||
tags:
|
||||
- name: knp_menu.menu_builder
|
||||
method: createMainMenu
|
||||
alias: manager_main
|
||||
- name: knp_menu.menu_builder
|
||||
method: createTeamerMenu
|
||||
alias: manager_teamer
|
||||
|
||||
App\Menu\TeamerMenuBuilder:
|
||||
arguments:
|
||||
$factory: '@knp_menu.factory'
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\Assignment;
|
||||
namespace App\Controller\Administrative\Assignment;
|
||||
|
||||
use App\Entity\Assignment;
|
||||
use App\Entity\User;
|
||||
@@ -21,7 +21,7 @@ class CreateController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/assignment/create', name: 'app_admin_assignment_create')]
|
||||
#[Route('/administrative/assignment/create', name: 'app_administrative_assignment_create')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
@@ -34,7 +34,7 @@ class CreateController extends AbstractController
|
||||
AssignmentType::class,
|
||||
$assignment,
|
||||
[
|
||||
'pickup_form_url' => $this->generateUrl('app_admin_assignment_pickup_form'),
|
||||
'pickup_form_url' => $this->generateUrl('app_administrative_assignment_pickup_form'),
|
||||
]
|
||||
);
|
||||
$form->handleRequest($request);
|
||||
@@ -51,10 +51,10 @@ class CreateController extends AbstractController
|
||||
'job_profile' => $assignment->getJobProfile()->getName(),
|
||||
]);
|
||||
|
||||
return $this->redirectToRoute('app_admin_assignment_index');
|
||||
return $this->redirectToRoute('app_administrative_assignment_index');
|
||||
}
|
||||
|
||||
return $this->render('admin/assignment/create.html.twig', [
|
||||
return $this->render('administrative/assignment/create.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\Assignment;
|
||||
namespace App\Controller\Administrative\Assignment;
|
||||
|
||||
use App\Entity\Assignment;
|
||||
use App\Htmx\HxRedirectResponse;
|
||||
@@ -20,7 +20,7 @@ class DeleteController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/assignment/delete/{uuid}', name: 'app_admin_assignment_delete')]
|
||||
#[Route('/administrative/assignment/delete/{uuid}', name: 'app_administrative_assignment_delete')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Assignment $assignment, Request $request): Response
|
||||
{
|
||||
@@ -36,10 +36,10 @@ class DeleteController extends AbstractController
|
||||
|
||||
$this->addFlash('success', 'Der Einsatz wurde gelöscht');
|
||||
|
||||
return new HxRedirectResponse($this->generateUrl('app_admin_assignment_index'));
|
||||
return new HxRedirectResponse($this->generateUrl('app_administrative_assignment_index'));
|
||||
}
|
||||
|
||||
return $this->render('admin/assignment/modal_delete.html.twig', [
|
||||
return $this->render('administrative/assignment/modal_delete.html.twig', [
|
||||
'assignment' => $assignment,
|
||||
]);
|
||||
}
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\Assignment;
|
||||
namespace App\Controller\Administrative\Assignment;
|
||||
|
||||
use App\Controller\Traits\ReturnUrlTrait;
|
||||
use App\Entity\Assignment;
|
||||
@@ -22,7 +22,7 @@ class DetailController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/assignment/detail/{uuid}', name: 'app_admin_assignment_detail')]
|
||||
#[Route('/administrative/assignment/detail/{uuid}', name: 'app_administrative_assignment_detail')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Assignment $assignment, Request $request): Response
|
||||
{
|
||||
@@ -36,11 +36,11 @@ class DetailController extends AbstractController
|
||||
->findCurrentDispositionsByAssignment($assignment)
|
||||
;
|
||||
|
||||
return $this->render('admin/assignment/detail.html.twig', [
|
||||
return $this->render('administrative/assignment/detail.html.twig', [
|
||||
'assignment' => $assignment,
|
||||
'applications' => $applications,
|
||||
'dispositions' => $dispositions,
|
||||
'returnUrl' => $this->getReturnUrl($request, 'app_admin_assignment_index'),
|
||||
'returnUrl' => $this->getReturnUrl($request, 'app_administrative_assignment_index'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\Assignment;
|
||||
namespace App\Controller\Administrative\Assignment;
|
||||
|
||||
use App\Entity\Assignment;
|
||||
use App\Form\AssignmentType;
|
||||
@@ -20,7 +20,7 @@ class DuplicateController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/assignment/duplicate/{uuid}', name: 'app_admin_assignment_duplicate')]
|
||||
#[Route('/administrative/assignment/duplicate/{uuid}', name: 'app_administrative_assignment_duplicate')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Assignment $assignment, Request $request): Response
|
||||
{
|
||||
@@ -30,7 +30,7 @@ class DuplicateController extends AbstractController
|
||||
AssignmentType::class,
|
||||
$copy,
|
||||
[
|
||||
'pickup_form_url' => $this->generateUrl('app_admin_assignment_pickup_form'),
|
||||
'pickup_form_url' => $this->generateUrl('app_administrative_assignment_pickup_form'),
|
||||
]
|
||||
);
|
||||
$form->handleRequest($request);
|
||||
@@ -48,12 +48,12 @@ class DuplicateController extends AbstractController
|
||||
'job_profile' => $assignment->getJobProfile()->getName(),
|
||||
]);
|
||||
|
||||
return $this->redirectToRoute('app_admin_assignment_edit', [
|
||||
return $this->redirectToRoute('app_administrative_assignment_edit', [
|
||||
'uuid' => $copy->getUuid(),
|
||||
]);
|
||||
}
|
||||
|
||||
return $this->render('admin/assignment/duplicate.html.twig', [
|
||||
return $this->render('administrative/assignment/duplicate.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\Assignment;
|
||||
namespace App\Controller\Administrative\Assignment;
|
||||
|
||||
use App\Entity\Assignment;
|
||||
use App\Form\AssignmentType;
|
||||
@@ -20,7 +20,7 @@ class EditController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/assignment/edit/{uuid}', name: 'app_admin_assignment_edit')]
|
||||
#[Route('/administrative/assignment/edit/{uuid}', name: 'app_administrative_assignment_edit')]
|
||||
#[IsGranted('EDIT', subject: 'assignment')]
|
||||
public function index(Assignment $assignment, Request $request): Response
|
||||
{
|
||||
@@ -28,7 +28,7 @@ class EditController extends AbstractController
|
||||
AssignmentType::class,
|
||||
$assignment,
|
||||
[
|
||||
'pickup_form_url' => $this->generateUrl('app_admin_assignment_pickup_form'),
|
||||
'pickup_form_url' => $this->generateUrl('app_administrative_assignment_pickup_form'),
|
||||
]
|
||||
);
|
||||
$form->handleRequest($request);
|
||||
@@ -44,10 +44,10 @@ class EditController extends AbstractController
|
||||
'job_profile' => $assignment->getJobProfile()->getName(),
|
||||
]);
|
||||
|
||||
return $this->redirectToRoute('app_admin_assignment_index');
|
||||
return $this->redirectToRoute('app_administrative_assignment_index');
|
||||
}
|
||||
|
||||
return $this->render('admin/assignment/edit.html.twig', [
|
||||
return $this->render('administrative/assignment/edit.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\Assignment;
|
||||
namespace App\Controller\Administrative\Assignment;
|
||||
|
||||
use App\Repository\AssignmentRepository;
|
||||
use App\Service\Common\AssignmentFilterHandler;
|
||||
@@ -20,7 +20,7 @@ class IndexController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/assignment', name: 'app_admin_assignment_index')]
|
||||
#[Route('/administrative/assignment', name: 'app_administrative_assignment_index')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
@@ -41,7 +41,7 @@ class IndexController extends AbstractController
|
||||
]
|
||||
);
|
||||
|
||||
return $this->render('admin/assignment/index.html.twig', [
|
||||
return $this->render('administrative/assignment/index.html.twig', [
|
||||
'pagination' => $pagination,
|
||||
'filterDto' => $filterDto,
|
||||
]);
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\Assignment;
|
||||
namespace App\Controller\Administrative\Assignment;
|
||||
|
||||
use App\Entity\Assignment;
|
||||
use App\Form\AssignmentType;
|
||||
@@ -12,7 +12,7 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
class PickupFormController extends AbstractController
|
||||
{
|
||||
#[Route('/admin/assignment/pickup-form', name: 'app_admin_assignment_pickup_form')]
|
||||
#[Route('/administrative/assignment/pickup-form', name: 'app_administrative_assignment_pickup_form')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
@@ -21,7 +21,7 @@ class PickupFormController extends AbstractController
|
||||
$form = $this->createForm(AssignmentType::class, $assignment);
|
||||
$form->handleRequest($request);
|
||||
|
||||
return $this->renderBlock('admin/assignment/_form.html.twig',
|
||||
return $this->renderBlock('administrative/assignment/_form.html.twig',
|
||||
'partial_form',
|
||||
[
|
||||
'form' => $form->createView(),
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\Document;
|
||||
namespace App\Controller\Administrative\Document;
|
||||
|
||||
use App\Entity\Upload;
|
||||
use App\Event\DocumentRejectedEvent;
|
||||
@@ -29,7 +29,7 @@ class CheckController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/document/check/{uuid}', name: 'app_admin_document_check')]
|
||||
#[Route('/administrative/document/check/{uuid}', name: 'app_administrative_document_check')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
#[IsGranted('CHECK', subject: 'document')]
|
||||
public function index(Upload $document, Request $request): Response
|
||||
@@ -65,10 +65,10 @@ class CheckController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
return new HxRedirectResponse($this->generateUrl('app_admin_document_index'));
|
||||
return new HxRedirectResponse($this->generateUrl('app_administrative_document_index'));
|
||||
}
|
||||
|
||||
return $this->render('admin/document/modal_check.html.twig', [
|
||||
return $this->render('administrative/document/modal_check.html.twig', [
|
||||
'document' => $document,
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\Document;
|
||||
namespace App\Controller\Administrative\Document;
|
||||
|
||||
use App\Entity\Upload;
|
||||
use App\Htmx\HxRedirectResponse;
|
||||
@@ -20,7 +20,7 @@ class DeleteController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/document/delete/{uuid}', name: 'app_admin_document_delete')]
|
||||
#[Route('/administrative/document/delete/{uuid}', name: 'app_administrative_document_delete')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
#[IsGranted('DELETE', subject: 'document')]
|
||||
public function index(Upload $document, Request $request): Response
|
||||
@@ -35,10 +35,10 @@ class DeleteController extends AbstractController
|
||||
'owner' => $document->getOwner()->getFullName(),
|
||||
]);
|
||||
|
||||
return new HxRedirectResponse($this->generateUrl('app_admin_document_index'));
|
||||
return new HxRedirectResponse($this->generateUrl('app_administrative_document_index'));
|
||||
}
|
||||
|
||||
return $this->render('admin/document/modal_delete.html.twig', [
|
||||
return $this->render('administrative/document/modal_delete.html.twig', [
|
||||
'document' => $document,
|
||||
]);
|
||||
}
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\Document;
|
||||
namespace App\Controller\Administrative\Document;
|
||||
|
||||
use App\Repository\UploadRepository;
|
||||
use Knp\Component\Pager\PaginatorInterface;
|
||||
@@ -18,7 +18,7 @@ class IndexController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/document', name: 'app_admin_document_index')]
|
||||
#[Route('/administrative/document', name: 'app_administrative_document_index')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
@@ -37,7 +37,7 @@ class IndexController extends AbstractController
|
||||
]
|
||||
);
|
||||
|
||||
return $this->render('admin/document/index.html.twig', [
|
||||
return $this->render('administrative/document/index.html.twig', [
|
||||
'pagination' => $pagination,
|
||||
]);
|
||||
}
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\System\Document;
|
||||
namespace App\Controller\Administrative\System\Document;
|
||||
|
||||
use App\Entity\Upload;
|
||||
use App\Htmx\HxRedirectResponse;
|
||||
@@ -20,7 +20,7 @@ class DeleteController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/system/document/delete/{uuid}', name: 'app_admin_system_document_delete')]
|
||||
#[Route('/administrative/system/document/delete/{uuid}', name: 'app_administrative_system_document_delete')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
#[IsGranted('DELETE', subject: 'document')]
|
||||
public function index(Upload $document, Request $request): Response
|
||||
@@ -35,10 +35,10 @@ class DeleteController extends AbstractController
|
||||
'document_filename' => $document->getOriginalFilename(),
|
||||
]);
|
||||
|
||||
return new HxRedirectResponse($this->generateUrl('app_admin_system_document_index'));
|
||||
return new HxRedirectResponse($this->generateUrl('app_administrative_system_document_index'));
|
||||
}
|
||||
|
||||
return $this->render('admin/system/document/modal_delete.html.twig', [
|
||||
return $this->render('administrative/system/document/modal_delete.html.twig', [
|
||||
'document' => $document,
|
||||
]);
|
||||
}
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\System\Document;
|
||||
namespace App\Controller\Administrative\System\Document;
|
||||
|
||||
use App\Entity\Upload;
|
||||
use App\Htmx\HxRedirectResponse;
|
||||
@@ -21,7 +21,7 @@ class EditController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/system/document/edit/{uuid}', name: 'app_admin_system_document_edit')]
|
||||
#[Route('/administrative/system/document/edit/{uuid}', name: 'app_administrative_system_document_edit')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Upload $upload, Request $request): Response
|
||||
{
|
||||
@@ -50,10 +50,10 @@ class EditController extends AbstractController
|
||||
'document_name_after' => $upload->getDisplayName(),
|
||||
]);
|
||||
|
||||
return new HxRedirectResponse($this->generateUrl('app_admin_system_document_index'));
|
||||
return new HxRedirectResponse($this->generateUrl('app_administrative_system_document_index'));
|
||||
}
|
||||
|
||||
return $this->render('admin/system/document/modal_edit.html.twig', [
|
||||
return $this->render('administrative/system/document/modal_edit.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\System\Document;
|
||||
namespace App\Controller\Administrative\System\Document;
|
||||
|
||||
use App\Repository\UploadRepository;
|
||||
use Knp\Component\Pager\PaginatorInterface;
|
||||
@@ -18,7 +18,7 @@ class IndexController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/system/document', name: 'app_admin_system_document_index')]
|
||||
#[Route('/administrative/system/document', name: 'app_administrative_system_document_index')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
@@ -34,7 +34,7 @@ class IndexController extends AbstractController
|
||||
]
|
||||
);
|
||||
|
||||
return $this->render('admin/system/document/index.html.twig', [
|
||||
return $this->render('administrative/system/document/index.html.twig', [
|
||||
'pagination' => $pagination,
|
||||
]);
|
||||
}
|
||||
+5
-7
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\System\Document;
|
||||
namespace App\Controller\Administrative\System\Document;
|
||||
|
||||
use App\Entity\Upload;
|
||||
use App\Entity\User;
|
||||
@@ -23,7 +23,7 @@ class ReplaceController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/system/document/replace/{uuid}', name: 'app_admin_system_document_replace')]
|
||||
#[Route('/administrative/system/document/replace/{uuid}', name: 'app_administrative_system_document_replace')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Upload $upload, Request $request): Response
|
||||
{
|
||||
@@ -38,12 +38,10 @@ class ReplaceController extends AbstractController
|
||||
$this->uploadHandler->destroyUploadSession();
|
||||
}
|
||||
|
||||
$formAction = $this->generateUrl('app_admin_system_document_replace', ['uuid' => $upload->getUuid()]);
|
||||
|
||||
$filenameBefore = $upload->getOriginalFilename();
|
||||
|
||||
$form = $this
|
||||
->createFormBuilder(null, ['action' => $formAction, 'ajax_submit' => true])
|
||||
->createFormBuilder()
|
||||
->getForm()
|
||||
;
|
||||
$form->handleRequest($request);
|
||||
@@ -56,10 +54,10 @@ class ReplaceController extends AbstractController
|
||||
'document_filename_after' => $upload->getOriginalFilename(),
|
||||
]);
|
||||
|
||||
return new HxRedirectResponse($this->generateUrl('app_admin_system_document_index'));
|
||||
return new HxRedirectResponse($this->generateUrl('app_administrative_system_document_index'));
|
||||
}
|
||||
|
||||
return $this->render('admin/system/document/modal_replace.html.twig', [
|
||||
return $this->render('administrative/system/document/modal_replace.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\System\Document;
|
||||
namespace App\Controller\Administrative\System\Document;
|
||||
|
||||
use App\Entity\Upload;
|
||||
use App\Entity\User;
|
||||
@@ -23,7 +23,7 @@ class UploadController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/system/document/upload', name: 'app_admin_system_document_upload')]
|
||||
#[Route('/administrative/system/document/upload', name: 'app_administrative_system_document_upload')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
@@ -61,10 +61,10 @@ class UploadController extends AbstractController
|
||||
}
|
||||
$this->logger->info('Upload document(s)', $loggerContext);
|
||||
|
||||
return new HxRedirectResponse($this->generateUrl('app_admin_system_document_index'));
|
||||
return new HxRedirectResponse($this->generateUrl('app_administrative_system_document_index'));
|
||||
}
|
||||
|
||||
return $this->render('admin/system/document/modal_upload.html.twig', [
|
||||
return $this->render('administrative/system/document/modal_upload.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\System\Faq;
|
||||
namespace App\Controller\Administrative\System\Faq;
|
||||
|
||||
use App\Entity\Faq;
|
||||
use App\Form\FaqType;
|
||||
@@ -20,8 +20,8 @@ class CreateController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/system/faq/create', name: 'app_admin_system_faq_create')]
|
||||
#[IsGranted('ROLE_ADMIN')]
|
||||
#[Route('/administrative/system/faq/create', name: 'app_administrative_system_faq_create')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
$faq = new Faq();
|
||||
@@ -38,11 +38,11 @@ class CreateController extends AbstractController
|
||||
'faq_question' => $faq->getQuestion(),
|
||||
]);
|
||||
|
||||
return $this->redirectToRoute('app_admin_system_faq_index');
|
||||
return $this->redirectToRoute('app_administrative_system_faq_index');
|
||||
}
|
||||
|
||||
return $this->render('admin/system/faq/create.html.twig', [
|
||||
'form' => $form
|
||||
return $this->render('administrative/system/faq/create.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\System\Faq;
|
||||
namespace App\Controller\Administrative\System\Faq;
|
||||
|
||||
use App\Entity\Faq;
|
||||
use App\Htmx\HxRedirectResponse;
|
||||
@@ -20,8 +20,8 @@ class DeleteController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/system/faq/delete/{id}', name: 'app_admin_system_faq_delete')]
|
||||
#[IsGranted('ROLE_ADMIN')]
|
||||
#[Route('/administrative/system/faq/delete/{id}', name: 'app_administrative_system_faq_delete')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Faq $faq, Request $request): Response
|
||||
{
|
||||
if (true === $request->isMethod('POST')) {
|
||||
@@ -34,10 +34,10 @@ class DeleteController extends AbstractController
|
||||
'faq_question' => $faq->getQuestion(),
|
||||
]);
|
||||
|
||||
return new HxRedirectResponse($this->generateUrl('app_admin_system_faq_index'));
|
||||
return new HxRedirectResponse($this->generateUrl('app_administrative_system_faq_index'));
|
||||
}
|
||||
|
||||
return $this->render('admin/system/faq/modal_delete.html.twig', [
|
||||
return $this->render('administrative/system/faq/modal_delete.html.twig', [
|
||||
'faq' => $faq,
|
||||
]);
|
||||
}
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\System\Faq;
|
||||
namespace App\Controller\Administrative\System\Faq;
|
||||
|
||||
use App\Entity\Faq;
|
||||
use App\Form\FaqType;
|
||||
@@ -20,8 +20,8 @@ class EditController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/system/faq/edit/{id}', name: 'app_admin_system_faq_edit')]
|
||||
#[IsGranted('ROLE_ADMIN')]
|
||||
#[Route('/administrative/system/faq/edit/{id}', name: 'app_administrative_system_faq_edit')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Faq $faq, Request $request): Response
|
||||
{
|
||||
$form = $this->createForm(FaqType::class, $faq);
|
||||
@@ -36,11 +36,11 @@ class EditController extends AbstractController
|
||||
'faq_question' => $faq->getQuestion(),
|
||||
]);
|
||||
|
||||
return $this->redirectToRoute('app_admin_system_faq_index');
|
||||
return $this->redirectToRoute('app_administrative_system_faq_index');
|
||||
}
|
||||
|
||||
return $this->render('admin/system/faq/edit.html.twig', [
|
||||
'form' => $form
|
||||
return $this->render('administrative/system/faq/edit.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\System\Faq;
|
||||
namespace App\Controller\Administrative\System\Faq;
|
||||
|
||||
use App\Entity\Faq;
|
||||
use App\Repository\FaqRepository;
|
||||
@@ -20,18 +20,18 @@ class IndexController extends AbstractController
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/system/faq', name: 'app_admin_system_faq_index')]
|
||||
#[IsGranted('ROLE_ADMIN')]
|
||||
#[Route('/administrative/system/faq', name: 'app_administrative_system_faq_index')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(): Response
|
||||
{
|
||||
$faqs = $this->faqRepository->findBy([], ['sorting' => 'ASC']);
|
||||
|
||||
return $this->render('admin/system/faq/index.html.twig', [
|
||||
return $this->render('administrative/system/faq/index.html.twig', [
|
||||
'faqs' => $faqs,
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route('/admin/system/faq/sort', name: 'app_admin_system_faq_sort', methods: ['POST'])]
|
||||
#[Route('/administrative/system/faq/sort', name: 'app_administrative_system_faq_sort', methods: ['POST'])]
|
||||
public function sort(Request $request): JsonResponse
|
||||
{
|
||||
$data = json_decode($request->getContent(), true);
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Manager;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
|
||||
class IndexController extends AbstractController
|
||||
{
|
||||
#[Route('/management', name: 'app_manager_index')]
|
||||
public function index(): Response
|
||||
{
|
||||
return $this->render('manager/index.html.twig', [
|
||||
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -47,6 +47,22 @@ abstract class AbstractMenuBuilder
|
||||
}
|
||||
}
|
||||
|
||||
protected function addManagerItem(ItemInterface $menu): void
|
||||
{
|
||||
if ($this->security->isGranted('ROLE_MANAGER')) {
|
||||
$this->addDivider($menu);
|
||||
$menu->addChild('zum Managementbereich', [
|
||||
'route' => 'app_manager_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'zum Managementbereich',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'user',
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
protected function addTeamerItem(ItemInterface $menu): void
|
||||
{
|
||||
if ($this->security->isGranted('ROLE_TEAMER')) {
|
||||
|
||||
@@ -20,14 +20,14 @@ class AdminMenuBuilder extends AbstractMenuBuilder
|
||||
],
|
||||
]);
|
||||
$menu->addChild('Einsatzübersicht', [
|
||||
'route' => 'app_admin_assignment_index',
|
||||
'route' => 'app_administrative_assignment_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Einsatzübersicht',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'calendar',
|
||||
'routes' => [
|
||||
['pattern' => '/^app_admin_assignment_/'],
|
||||
['pattern' => '/^app_administrative_assignment_/'],
|
||||
],
|
||||
],
|
||||
]);
|
||||
@@ -41,7 +41,7 @@ class AdminMenuBuilder extends AbstractMenuBuilder
|
||||
],
|
||||
]);
|
||||
$menu->addChild('Dokumentenübersicht', [
|
||||
'route' => 'app_admin_document_index',
|
||||
'route' => 'app_administrative_document_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Dokumentenübersicht',
|
||||
],
|
||||
@@ -125,24 +125,24 @@ class AdminMenuBuilder extends AbstractMenuBuilder
|
||||
],
|
||||
]);
|
||||
$settingsMenu->addChild('FAQ', [
|
||||
'route' => 'app_admin_system_faq_index',
|
||||
'route' => 'app_administrative_system_faq_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'FAQ',
|
||||
],
|
||||
'extras' => [
|
||||
'routes' => [
|
||||
['pattern' => '/^app_admin_system_faq_/']
|
||||
['pattern' => '/^app_administrative_system_faq_/']
|
||||
],
|
||||
],
|
||||
]);
|
||||
$settingsMenu->addChild('Dokumente', [
|
||||
'route' => 'app_admin_system_document_index',
|
||||
'route' => 'app_administrative_system_document_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Dokumente',
|
||||
],
|
||||
'extras' => [
|
||||
'routes' => [
|
||||
['pattern' => '/^app_admin_system_document_/']
|
||||
['pattern' => '/^app_administrative_system_document_/']
|
||||
],
|
||||
],
|
||||
]);
|
||||
@@ -169,6 +169,7 @@ class AdminMenuBuilder extends AbstractMenuBuilder
|
||||
]);
|
||||
|
||||
$this->addTeamerItem($menu);
|
||||
$this->addManagerItem($menu);
|
||||
$this->addHouseManagerItem($menu);
|
||||
$this->addLogoutItem($menu);
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ class HouseManagerMenuBuilder extends AbstractMenuBuilder
|
||||
]);
|
||||
|
||||
$this->addAdminItem($menu);
|
||||
$this->addManagerItem($menu);
|
||||
$this->addTeamerItem($menu);
|
||||
$this->addLogoutItem($menu);
|
||||
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
namespace App\Menu;
|
||||
|
||||
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('Dokumentenübersicht', [
|
||||
'route' => 'app_administrative_document_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'Dokumentenübersicht',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'document',
|
||||
],
|
||||
]);
|
||||
// $menu->addChild('Teamübersicht', [
|
||||
// 'route' => 'app_admin_teamer_index',
|
||||
// 'linkAttributes' => [
|
||||
// 'title' => 'Teamübersicht',
|
||||
// ],
|
||||
// 'extras' => [
|
||||
// 'icon' => 'users',
|
||||
// 'routes' => [
|
||||
// ['pattern' => '/^app_admin_teamer_/']
|
||||
// ],
|
||||
// ],
|
||||
// ]);
|
||||
$settingsMenu = $menu->addChild('Einstellungen', [
|
||||
'linkAttributes' => [
|
||||
'title' => 'Einstellungen',
|
||||
],
|
||||
'extras' => [
|
||||
'icon' => 'settings',
|
||||
],
|
||||
]);
|
||||
$settingsMenu->addChild('FAQ', [
|
||||
'route' => 'app_administrative_system_faq_index',
|
||||
'linkAttributes' => [
|
||||
'title' => 'FAQ',
|
||||
],
|
||||
'extras' => [
|
||||
'routes' => [
|
||||
['pattern' => '/^app_administrative_system_faq_/']
|
||||
],
|
||||
],
|
||||
]);
|
||||
$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_admin_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_admin_teamer_recent_assignments',
|
||||
'routeParameters' => $this->getDefaultRouteParameters('uuid'),
|
||||
'linkAttributes' => [
|
||||
'title' => 'Vergangene Einsätze',
|
||||
],
|
||||
]);
|
||||
|
||||
$this->addDivider($menu);
|
||||
|
||||
$menu->addChild('zurück zur Übersicht', [
|
||||
'route' => 'app_admin_teamer_index',
|
||||
'extras' => [
|
||||
'icon' => 'arrow-left',
|
||||
],
|
||||
]);
|
||||
|
||||
return $menu;
|
||||
}
|
||||
}
|
||||
@@ -114,6 +114,7 @@ class TeamerMenuBuilder extends AbstractMenuBuilder
|
||||
]);
|
||||
|
||||
$this->addAdminItem($menu);
|
||||
$this->addManagerItem($menu);
|
||||
$this->addHouseManagerItem($menu);
|
||||
$this->addLogoutItem($menu);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{% for application in applications %}
|
||||
{% set assignment = application.assignment %}
|
||||
<li class="py-2 first:pt-0 last:pb-0">
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<div class="flex items-center space-x-1">
|
||||
{{ icon('hand', 'w-4 h-4 shrink-0') }}
|
||||
<div class="flex items-center space-x-1 truncate">
|
||||
@@ -49,7 +49,7 @@
|
||||
{% for document in documents %}
|
||||
<li class="py-2 first:pt-0 last:pb-0">
|
||||
{% if document.disposition %}
|
||||
{% set url = path('app_admin_assignment_detail', { 'uuid': document.disposition.assignment.uuid, 'r': return_url() }) %}
|
||||
{% set url = path('app_administrative_assignment_detail', { 'uuid': document.disposition.assignment.uuid, 'r': return_url() }) %}
|
||||
{% else %}
|
||||
{% set url = path('app_admin_teamer_profile', { 'uuid': document.owner.teamer.uuid, 'r': return_url() }) %}
|
||||
{% endif %}
|
||||
@@ -74,7 +74,7 @@
|
||||
<ul class="divide-y divide-gray-200">
|
||||
{% for assignment in assignments %}
|
||||
<li class="py-2 first:pt-0 last:pb-0">
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<div class="flex items-center space-x-1">
|
||||
{{ icon('calendar', 'w-4 h-4 shrink-0') }}
|
||||
<div class="flex items-center space-x-1 truncate">
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einsatz anlegen{% endblock %}
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Einsatz anlegen
|
||||
</h1>
|
||||
{% include 'admin/assignment/_form.html.twig' %}
|
||||
{% include 'administrative/assignment/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einsatzübersicht{% endblock %}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einsatz duplizieren{% endblock %}
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Einsatz duplizieren
|
||||
</h1>
|
||||
{% include 'admin/assignment/_form.html.twig' %}
|
||||
{% include 'administrative/assignment/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einsatz bearbeiten{% endblock %}
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Einsatz bearbeiten
|
||||
</h1>
|
||||
{% include 'admin/assignment/_form.html.twig' %}
|
||||
{% include 'administrative/assignment/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
+10
-10
@@ -1,4 +1,4 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einsatzübersicht{% endblock %}
|
||||
|
||||
@@ -56,14 +56,14 @@
|
||||
{% for assignment in pagination %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
{{ assignment.effectivePeriod.start|date('d.m.Y') }} -
|
||||
<br>
|
||||
{{ assignment.effectivePeriod.end|date('d.m.Y') }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
|
||||
class="flex items-start space-x-2">
|
||||
{{ icon('flag-' ~ assignment.destination.country, 'w-5 h-5 shrink-0') }}
|
||||
<div class="flex-1">
|
||||
@@ -74,14 +74,14 @@
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
{{ assignment.jobProfile.name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if assignment.pickup %}
|
||||
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<span class="whitespace-nowrap">ab {{ pickup.city }}</span>
|
||||
<br>
|
||||
{{ pickup.time }} Uhr
|
||||
@@ -91,7 +91,7 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="flex items-center space-x-2">
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="flex items-center space-x-2">
|
||||
<span>{{ assignment.validApplications|length }}/{{ assignment.availableDispositions - assignment.dispositions|length }}</span>
|
||||
{% if assignment.status == 'closed' %}
|
||||
{{ icon('locked', 'w-4 h-4 text-red-500') }}
|
||||
@@ -106,16 +106,16 @@
|
||||
<div class="flex items-center space-x-1 justify-end">
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
hx-get="{{ path('app_admin_assignment_delete', { 'uuid': assignment.uuid }) }}"
|
||||
hx-get="{{ path('app_administrative_assignment_delete', { 'uuid': assignment.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
<a href="{{ path('app_admin_assignment_duplicate', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<a href="{{ path('app_administrative_assignment_duplicate', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
{{ icon('copy', 'w-5 h-5') }}
|
||||
</a>
|
||||
{% if is_granted('EDIT', assignment) %}
|
||||
<a href="{{ path('app_admin_assignment_edit', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<a href="{{ path('app_administrative_assignment_edit', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
{{ icon('edit', 'w-5 h-5') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
@@ -134,7 +134,7 @@
|
||||
{{ knp_pagination_render(pagination) }}
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{ path('app_admin_assignment_create') }}" class="btn">
|
||||
<a href="{{ path('app_administrative_assignment_create') }}" class="btn">
|
||||
Neu
|
||||
</a>
|
||||
{% endblock %}
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Dokumentenübersicht{% endblock %}
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
{% if is_granted('DELETE', upload) %}
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
hx-get="{{ path('app_admin_document_delete', { 'uuid': upload.uuid }) }}"
|
||||
hx-get="{{ path('app_administrative_document_delete', { 'uuid': upload.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
@@ -77,7 +77,7 @@
|
||||
{% endif %}
|
||||
{% if is_granted('CHECK', upload) %}
|
||||
<button type="button"
|
||||
hx-get="{{ path('app_admin_document_check', { 'uuid': upload.uuid }) }}"
|
||||
hx-get="{{ path('app_administrative_document_check', { 'uuid': upload.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('edit') }}
|
||||
@@ -0,0 +1,17 @@
|
||||
{% extends 'layout.html.twig' %}
|
||||
|
||||
{% block main_menu %}
|
||||
{% if is_granted('ROLE_MANAGER') %}
|
||||
{{ knp_menu_render(knp_menu_get('manager_main')) }}
|
||||
{% elseif is_granted('ROLE_ADMIN') %}
|
||||
{{ knp_menu_render(knp_menu_get('admin_main')) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block mobile_menu %}
|
||||
{% if is_granted('ROLE_MANAGER') %}
|
||||
{{ knp_menu_render(knp_menu_get('manager_main')) }}
|
||||
{% elseif is_granted('ROLE_ADMIN') %}
|
||||
{{ knp_menu_render(knp_menu_get('admin_main')) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Dokumentenübersicht{% endblock %}
|
||||
|
||||
@@ -45,19 +45,19 @@
|
||||
<div class="flex items-center space-x-2 justify-end">
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
hx-get="{{ path('app_admin_system_document_delete', { 'uuid': document.uuid }) }}"
|
||||
hx-get="{{ path('app_administrative_system_document_delete', { 'uuid': document.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
<button type="button"
|
||||
hx-get="{{ path('app_admin_system_document_replace', { 'uuid': document.uuid }) }}"
|
||||
hx-get="{{ path('app_administrative_system_document_replace', { 'uuid': document.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('refresh') }}
|
||||
</button>
|
||||
<button type="button"
|
||||
hx-get="{{ path('app_admin_system_document_edit', { 'uuid': document.uuid }) }}"
|
||||
hx-get="{{ path('app_administrative_system_document_edit', { 'uuid': document.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('edit') }}
|
||||
@@ -83,7 +83,7 @@
|
||||
</div>
|
||||
<button type="button"
|
||||
class="btn"
|
||||
hx-get="{{ path('app_admin_system_document_upload') }}"
|
||||
hx-get="{{ path('app_administrative_system_document_upload') }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
Dokumente hinzufügen
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<button type="submit" class="btn">
|
||||
Speichern
|
||||
</button>
|
||||
<a href="{{ path('app_admin_system_faq_index') }}" class="btn btn--secondary">
|
||||
<a href="{{ path('app_administrative_system_faq_index') }}" class="btn btn--secondary">
|
||||
Abbrechen
|
||||
</a>
|
||||
</div>
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einstellungen - FAQ anlegen{% endblock %}
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
FAQ anlegen
|
||||
</h1>
|
||||
{% include 'admin/system/faq/_form.html.twig' %}
|
||||
{% include 'administrative/system/faq/_form.html.twig' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einstellungen - FAQ bearbeiten{% endblock %}
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
FAQ bearbeiten
|
||||
</h1>
|
||||
{% include 'admin/system/faq/_form.html.twig' %}
|
||||
{% include 'administrative/system/faq/_form.html.twig' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einstellungen - FAQ{% endblock %}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody {{ stimulus_controller('sortable', { 'endpoint': path('app_admin_system_faq_sort') }) }}>
|
||||
<tbody {{ stimulus_controller('sortable', { 'endpoint': path('app_administrative_system_faq_sort') }) }}>
|
||||
{% for faq in faqs %}
|
||||
<tr {{ stimulus_target('sortable', 'item') }} data-item-id="{{ faq.id }}">
|
||||
<td>
|
||||
@@ -34,12 +34,12 @@
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
title="FAQ löschen"
|
||||
hx-get="{{ path('app_admin_system_faq_delete', { 'id': faq.id }) }}"
|
||||
hx-get="{{ path('app_administrative_system_faq_delete', { 'id': faq.id }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
<a href="{{ path('app_admin_system_faq_edit', { 'id': faq.id }) }}">
|
||||
<a href="{{ path('app_administrative_system_faq_edit', { 'id': faq.id }) }}">
|
||||
{{ icon('edit') }}
|
||||
</a>
|
||||
<button type="button" class="cursor-move" {{ stimulus_target('sortable', 'handle') }}>
|
||||
@@ -59,7 +59,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{ path('app_admin_system_faq_create') }}" class="btn">
|
||||
<a href="{{ path('app_administrative_system_faq_create') }}" class="btn">
|
||||
Neu
|
||||
</a>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,4 @@
|
||||
{% extends 'manager/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,9 @@
|
||||
{% extends 'layout.html.twig' %}
|
||||
|
||||
{% block main_menu %}
|
||||
{{ knp_menu_render(knp_menu_get('manager_main')) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block mobile_menu %}
|
||||
{{ knp_menu_render(knp_menu_get('manager_main')) }}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user