Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)

This commit is contained in:
Kevin Papst
2022-12-31 21:19:55 +01:00
committed by GitHub
parent 95e06746bd
commit 90a0fd8a22
2164 changed files with 83700 additions and 86426 deletions

View File

@@ -19,10 +19,8 @@ use Symfony\Component\Routing\Annotation\Route;
final class ProjectInactiveController extends AbstractController
{
/**
* @Route(path="/reporting/project_inactive", name="report_project_inactive", methods={"GET","POST"})
* @Security("is_granted('view_reporting') and is_granted('budget_any', 'project')")
*/
#[Route(path: '/reporting/project_inactive', name: 'report_project_inactive', methods: ['GET', 'POST'])]
#[Security("is_granted('report:project') and is_granted('budget_any', 'project')")]
public function __invoke(Request $request, ProjectStatisticService $service)
{
$dateFactory = $this->getDateTimeFactory();
@@ -30,7 +28,7 @@ final class ProjectInactiveController extends AbstractController
$now = $dateFactory->createDateTime();
$query = new ProjectInactiveQuery($dateFactory->createDateTime('-1 year'), $user);
$form = $this->createForm(ProjectInactiveForm::class, $query, [
$form = $this->createFormForGetRequest(ProjectInactiveForm::class, $query, [
'timezone' => $user->getTimezone()
]);
$form->submit($request->query->all(), false);
@@ -47,10 +45,10 @@ final class ProjectInactiveController extends AbstractController
$byCustomer[$customer->getId()]['projects'][] = $entry;
}
return $this->render('reporting/project_view.html.twig', [
return $this->render('reporting/project_inactive.html.twig', [
'entries' => $byCustomer,
'form' => $form->createView(),
'title' => 'report_inactive_project',
'report_title' => 'report_inactive_project',
'tableName' => 'inactive_project_reporting',
'now' => $now,
'skipColumns' => ['today', 'week', 'month', 'projectStart', 'projectEnd', 'comment'],