Files
kimai2/src/Controller/ReportingController.php
Kevin Papst 0e91dd886e release 2.0 beta 2 (#3757)
* do not traverse into invoice template subdirectories (#3735)
* fix security open api definition
* fix currency can be null, removed fluent interface
* merged release 1.30.3
* allow to pre-fill timesheet metafields via URL
* fix api description
* added test accounts with simpler names and password
* upgrade to Symfony 6.2
* removed FrameworkExtraBundle (by Sensio) and replaced with new native SF annotations
* fixed symfony 6.2 deprecations
* fixed #3768
2023-01-18 14:47:48 +01:00

37 lines
1.0 KiB
PHP

<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Controller;
use App\Reporting\ReportingService;
use App\Utils\PageSetup;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
/**
* Controller used to render reports.
*/
#[Route(path: '/reporting')]
#[IsGranted('view_reporting')]
final class ReportingController extends AbstractController
{
#[Route(path: '/', name: 'reporting', methods: ['GET'])]
public function defaultReport(ReportingService $reportingService): Response
{
$page = new PageSetup('menu.reporting');
$page->setHelp('reporting.html');
return $this->render('reporting/index.html.twig', [
'page_setup' => $page,
'reports' => $reportingService->getAvailableReports($this->getUser()),
]);
}
}