feat: news messages to be displayed on teamers' dashboards
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user