feat: display new and pending feedbacks on admin dashboard
This commit is contained in:
@@ -3,10 +3,12 @@
|
||||
namespace App\Controller\Admin;
|
||||
|
||||
use App\Entity\Application;
|
||||
use App\Entity\Feedback;
|
||||
use App\Entity\Upload;
|
||||
use App\Repository\ApplicationRepository;
|
||||
use App\Repository\AssignmentRepository;
|
||||
use App\Repository\AvailabilityRepository;
|
||||
use App\Repository\FeedbackRepository;
|
||||
use App\Repository\UploadRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
@@ -17,6 +19,7 @@ class IndexController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ApplicationRepository $applicationRepository,
|
||||
private readonly FeedbackRepository $feedbackRepository,
|
||||
private readonly AssignmentRepository $assignmentRepository,
|
||||
private readonly AvailabilityRepository $availabilityRepository,
|
||||
private readonly UploadRepository $uploadRepository
|
||||
@@ -31,6 +34,9 @@ class IndexController extends AbstractController
|
||||
$newApplicationsCount = $this->applicationRepository->getCountByStatus(Application::STATUS_NEW);
|
||||
$pendingApplicationsCount = $this->applicationRepository->getCountByStatus(Application::STATUS_PENDING);
|
||||
|
||||
$feedbacks = $this->feedbackRepository->getNew();
|
||||
$pendingFeedbacksCount = $this->feedbackRepository->getCountByStatus(Feedback::STATUS_NEW);
|
||||
|
||||
$assignments = $this->assignmentRepository->getNew();
|
||||
|
||||
$availabilities = $this->availabilityRepository->getNew();
|
||||
@@ -43,6 +49,8 @@ class IndexController extends AbstractController
|
||||
'applications' => $applications,
|
||||
'newApplicationsCount' => $newApplicationsCount,
|
||||
'pendingApplicationsCount' => $pendingApplicationsCount,
|
||||
'feedbacks' => $feedbacks,
|
||||
'pendingFeedbacksCount' => $pendingFeedbacksCount,
|
||||
'assignments' => $assignments,
|
||||
'availabilities' => $availabilities,
|
||||
'documents' => $documents,
|
||||
|
||||
Reference in New Issue
Block a user