Listing of mes parcours changed to only display confirmed or closed

draft parcours are displayed in mes parcours brouillon
This commit is contained in:
Julie Lenaerts 2022-02-09 16:02:21 +01:00
parent d60095987c
commit dee6ed6707

View File

@ -34,10 +34,10 @@ class UserAccompanyingPeriodController extends AbstractController
*/
public function listAction(Request $request)
{
$total = $this->accompanyingPeriodRepository->countBy(['user' => $this->getUser()]);
$total = $this->accompanyingPeriodRepository->countBy(['user' => $this->getUser(), 'step' => ['CONFIRMED', 'CLOSED']]);
$pagination = $this->paginatorFactory->create($total);
$accompanyingPeriods = $this->accompanyingPeriodRepository->findBy(
['user' => $this->getUser()],
['user' => $this->getUser(), 'step' => ['CONFIRMED', 'CLOSED']],
['openingDate' => 'DESC'],
$pagination->getItemsPerPage(),
$pagination->getCurrentPageFirstItemNumber()