feat: dedicated dashboard widgets for contracts and invoices

This commit is contained in:
Björn Fromme
2025-01-15 16:17:55 +01:00
parent 6af42e5703
commit b62cf18ede
5 changed files with 194 additions and 97 deletions
+20 -6
View File
@@ -22,16 +22,30 @@ class IndexController extends AbstractController
{
$dispositions = $this->dispositionRepository->getNew();
$documents = $this->uploadRepository->getNew();
$newDocumentsCount = $this->uploadRepository->getCountByStatus(Upload::STATUS_NEW);
$pendingDocumentsCount = $this->uploadRepository->getCountByStatus(Upload::STATUS_PENDING);
$newContracts = $this->uploadRepository->getNewByType(Upload::TYPE_CONTRACT);
$newContractsCount = $this
->uploadRepository
->getCountByStatusAndType(Upload::STATUS_NEW, Upload::TYPE_CONTRACT);
$pendingContractsCount = $this
->uploadRepository
->getCountByStatusAndType(Upload::STATUS_PENDING, Upload::TYPE_CONTRACT);
$newInvoices = $this->uploadRepository->getNewByType(Upload::TYPE_INVOICE);
$newInvoicesCount = $this
->uploadRepository
->getCountByStatusAndType(Upload::STATUS_NEW, Upload::TYPE_INVOICE);
$pendingInvoicesCount = $this
->uploadRepository
->getCountByStatusAndType(Upload::STATUS_PENDING, Upload::TYPE_INVOICE);
$overdueFeedbacks = $this->dispositionRepository->findDispositionsWithOverdueFeedback(7);
return $this->render('manager/index.html.twig', [
'dispositions' => $dispositions,
'documents' => $documents,
'newDocumentsCount' => $newDocumentsCount,
'pendingDocumentsCount' => $pendingDocumentsCount,
'newContracts' => $newContracts,
'newContractsCount' => $newContractsCount,
'pendingContractsCount' => $pendingContractsCount,
'newInvoices' => $newInvoices,
'newInvoicesCount' => $newInvoicesCount,
'pendingInvoicesCount' => $pendingInvoicesCount,
'overdueFeedbacks' => $overdueFeedbacks,
]);
}