mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-08 15:54:59 +00:00
Resolve "Fusion actions d'accompagnement"
This commit is contained in:
@@ -313,10 +313,24 @@ final class AccompanyingCourseApiController extends ApiController
|
||||
{
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::SEE, $accompanyingPeriod);
|
||||
|
||||
$works = $this->accompanyingPeriodWorkRepository->findBy(['accompanyingPeriod' => $accompanyingPeriod]);
|
||||
dump($works);
|
||||
$total = $this->accompanyingPeriodWorkRepository->countByAccompanyingPeriod($accompanyingPeriod);
|
||||
$paginator = $this->getPaginatorFactory()->create($total);
|
||||
|
||||
return $this->json($works, Response::HTTP_OK, [], ['groups' => ['read']]);
|
||||
$works = $this->accompanyingPeriodWorkRepository->findByAccompanyingPeriodOpenFirst(
|
||||
$accompanyingPeriod,
|
||||
[
|
||||
'types' => [],
|
||||
'before' => null,
|
||||
'after' => null,
|
||||
'user' => [],
|
||||
],
|
||||
$paginator->getItemsPerPage(),
|
||||
$paginator->getCurrentPageFirstItemNumber()
|
||||
);
|
||||
|
||||
$collection = new Collection($works, $paginator);
|
||||
|
||||
return $this->json($collection, Response::HTTP_OK, [], ['groups' => ['read']]);
|
||||
}
|
||||
|
||||
public function workApi($id, Request $request, string $_format): Response
|
||||
|
Reference in New Issue
Block a user