diff --git a/src/Controller/Dashboard/IndexController.php b/src/Controller/Dashboard/IndexController.php index 2ba1a23..b0554cb 100644 --- a/src/Controller/Dashboard/IndexController.php +++ b/src/Controller/Dashboard/IndexController.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace App\Controller\Dashboard; use App\Controller\Traits\CurrentUserTrait; -use App\Entity\Booking; use App\Entity\User; use App\Enum\ResourceType; use App\Repository\BookingRepository; @@ -15,7 +14,8 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Attribute\Route; /** - * The landing screen: one tile per bookable kind, plus what this person has coming up. + * The landing screen: one tile per bookable kind, plus tiles for the bookings list and, for an + * administrator, the admin screens. * * It replaces the sidebar navigation, so it is also the only route to the booking boards and the * bookings list -- which is why the tiles are generated from ResourceType rather than written @@ -39,7 +39,6 @@ final class IndexController extends AbstractController return $this->render('dashboard/index.html.twig', [ 'tiles' => $this->tiles($user, $today), - 'upcoming' => $this->upcoming($user, $today), 'today' => $today, ]); } @@ -83,14 +82,4 @@ final class IndexController extends AbstractController return $tiles; } - - /** - * @return list - */ - private function upcoming(User $user, \DateTimeImmutable $from, int $limit = 5): array - { - $bookings = $this->bookings->findForUserInRange($user, $from, $from->modify('+1 year')); - - return \array_slice($bookings, 0, $limit); - } } diff --git a/templates/dashboard/index.html.twig b/templates/dashboard/index.html.twig index 2b05905..7ff14f6 100644 --- a/templates/dashboard/index.html.twig +++ b/templates/dashboard/index.html.twig @@ -76,33 +76,4 @@ {% endif %} - -

Als Nächstes

- - {% if upcoming is empty %} -

Nichts gebucht.

- {% else %} - - {% endif %} {% endblock %}