Show events in the past

This commit is contained in:
Tim Lappe 2025-03-15 09:06:01 +01:00
parent ec166854cb
commit 10e7c3fdfc

View File

@ -50,10 +50,10 @@ final class CalendarController extends AbstractController
return new Response('Kein Zugriff', Response::HTTP_FORBIDDEN); return new Response('Kein Zugriff', Response::HTTP_FORBIDDEN);
} }
$startDate = (new DateTime())->format('Y-m-d'); $startDate = (new DateTime('-1 year'))->format('Y-m-d');
$endDate = (new DateTime('+180 days'))->format('Y-m-d'); $endDate = (new DateTime('+180 days'))->format('Y-m-d');
$absences = $this->absenceManager->getAbsencesForUser('tim.lappe@check24.de', new DateTime('-1 day')); $absences = $this->absenceManager->getAbsencesForUser('tim.lappe@check24.de', new DateTime('-1 year'));
$days = $this->calendarService->getAllDays($startDate, $endDate); $days = $this->calendarService->getAllDays($startDate, $endDate);
$days = $this->calendarService->processAbsences($days, $absences); $days = $this->calendarService->processAbsences($days, $absences);
@ -66,4 +66,4 @@ final class CalendarController extends AbstractController
return $response; return $response;
} }
} }