Skip to content

Commit

Permalink
Display all shifts the next 6 days on login page
Browse files Browse the repository at this point in the history
  • Loading branch information
petitalb committed Aug 5, 2023
1 parent db02be0 commit fe65be1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/AppBundle/Controller/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ public function indexAction(Request $request)
}
}
} else {
$to = new \DateTime();
$to->modify('+7 days');
$shifts = $em->getRepository('AppBundle:Shift')->findFutures($to);
$from = (new \DateTime('now'))->setTime(0, 0, 0);
$to = (new \DateTime('now'))->modify('+6 days')->setTime(23, 59, 59);
$shifts = $em->getRepository('AppBundle:Shift')->findFrom($from, $to, null, null);
$bucketsByDay = $this->get('shift_service')->generateShiftBucketsByDayAndJob($shifts);

return $this->render('default/index_anon.html.twig', [
Expand Down

0 comments on commit fe65be1

Please sign in to comment.