feat: dedicated dashboard widgets for contracts and invoices
This commit is contained in:
@@ -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,
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user