Task: Remove obsolete functionality
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\Assignment;
|
||||
|
||||
use App\Entity\Assignment;
|
||||
use App\Form\AssignmentType;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
class EditController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $entityManager,
|
||||
private readonly LoggerInterface $logger
|
||||
) {
|
||||
}
|
||||
|
||||
#[Route('/admin/assignment/edit/{uuid}', name: 'app_admin_assignment_edit')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Assignment $assignment, Request $request): Response
|
||||
{
|
||||
$form = $this->createForm(AssignmentType::class, $assignment);
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$this->entityManager->flush();
|
||||
|
||||
$this->addFlash('success', 'Der Einsatz wurde aktualisiert');
|
||||
|
||||
$this->logger->info('Edit assignment', [
|
||||
'assignment' => $assignment->getUuid(),
|
||||
]);
|
||||
|
||||
return $this->redirectToRoute('app_admin_assignment_index');
|
||||
}
|
||||
|
||||
return $this->render('admin/assignment/edit.html.twig', [
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Teamer\Document;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
class IndexController extends AbstractController
|
||||
{
|
||||
#[Route('/teamer/document', name: 'app_teamer_document_index')]
|
||||
#[IsGranted('ROLE_TEAMER')]
|
||||
public function index(): Response
|
||||
{
|
||||
return $this->render('teamer/document/index.html.twig');
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Teamer\Feedback;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
class IndexController extends AbstractController
|
||||
{
|
||||
#[Route('/teamer/feedback', name: 'app_teamer_feedback_index')]
|
||||
#[IsGranted('ROLE_TEAMER')]
|
||||
public function index(): Response
|
||||
{
|
||||
return $this->render('teamer/feedback/index.html.twig');
|
||||
}
|
||||
}
|
||||
@@ -69,14 +69,6 @@ class TeamerMenuBuilder extends AbstractMenuBuilder
|
||||
'route' => 'app_teamer_disposition_recent',
|
||||
'title' => 'Letzte Einsätze',
|
||||
],
|
||||
[
|
||||
'route' => 'app_teamer_document_index',
|
||||
'title' => 'Meine Dokumente',
|
||||
],
|
||||
[
|
||||
'route' => 'app_teamer_feedback_index',
|
||||
'title' => 'Mein Feedback',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{% extends 'teamer/layout.html.twig' %}
|
||||
|
||||
{% block title %}Meine Dokumente{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Meine Dokumente
|
||||
</h1>
|
||||
{% endblock %}
|
||||
@@ -1,9 +0,0 @@
|
||||
{% extends 'teamer/layout.html.twig' %}
|
||||
|
||||
{% block title %}Mein Feedback{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Mein Feedback
|
||||
</h1>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user