financial year setting + new users working time per year report (#2547)

This commit is contained in:
Kevin Papst
2021-05-14 18:40:48 +02:00
committed by GitHub
parent a9da5f8476
commit f7aa3c1e13
59 changed files with 1690 additions and 217 deletions

View File

@@ -70,7 +70,11 @@ final class ProfileController extends AbstractController
public function indexAction(User $profile, TimesheetRepository $repository, LocaleSettings $localeSettings)
{
$userStats = $repository->getUserStatistics($profile);
$monthlyStats = $repository->getMonthlyStats($profile);
$begin = $userStats->getFirstEntry() ?? $this->getDateTimeFactory()->getStartOfMonth();
$end = $this->getDateTimeFactory()->getEndOfMonth();
$monthlyStats = $repository->getMonthlyStats($begin, $end, $profile);
arsort($monthlyStats);
$viewVars = [
'tab' => 'charts',