feat: news messages to be displayed on teamers' dashboards

This commit is contained in:
Björn Fromme
2024-06-23 18:37:33 +02:00
parent b58bd9f34f
commit fbad0d4e06
18 changed files with 505 additions and 0 deletions
@@ -6,6 +6,7 @@ use App\Entity\Application;
use App\Entity\Assignment;
use App\Entity\Disposition;
use App\Entity\Feedback;
use App\Entity\News;
use App\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@@ -27,6 +28,12 @@ class IndexController extends AbstractController
$user = $this->getUser();
$teamer = $user->getTeamer();
$news = $this
->entityManager
->getRepository(News::class)
->getLatestForDashboard()
;
$matchingAssignments = $this
->entityManager
->getRepository(Assignment::class)
@@ -60,6 +67,7 @@ class IndexController extends AbstractController
$dispositionDocuments = $this->processDocuments($upcomingDispositions);
return $this->render('teamer/index.html.twig', [
'news' => $news,
'teamer' => $teamer,
'matchingAssignments' => $matchingAssignments,
'recentFeedback' => $recentFeedback,