mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch '365-correct-activities-works-counters' into 'master'
#365 correct works counter in acc course summary Closes #365 See merge request Chill-Projet/chill-bundles!826
This commit is contained in:
commit
6d7a6932a9
@ -207,7 +207,6 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
|
|||||||
$works = $this->workRepository->findByAccompanyingPeriod(
|
$works = $this->workRepository->findByAccompanyingPeriod(
|
||||||
$accompanyingCourse,
|
$accompanyingCourse,
|
||||||
['startDate' => 'DESC', 'endDate' => 'DESC'],
|
['startDate' => 'DESC', 'endDate' => 'DESC'],
|
||||||
3
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$counters = [
|
$counters = [
|
||||||
@ -220,7 +219,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
|
|||||||
'accompanyingCourse' => $accompanyingCourse,
|
'accompanyingCourse' => $accompanyingCourse,
|
||||||
'withoutHousehold' => $withoutHousehold,
|
'withoutHousehold' => $withoutHousehold,
|
||||||
'participationsByHousehold' => $accompanyingCourse->actualParticipationsByHousehold(),
|
'participationsByHousehold' => $accompanyingCourse->actualParticipationsByHousehold(),
|
||||||
'works' => $works,
|
'works' => \array_slice($works, 0, 3),
|
||||||
'activities' => \array_slice($activities, 0, 3),
|
'activities' => \array_slice($activities, 0, 3),
|
||||||
'counters' => $counters,
|
'counters' => $counters,
|
||||||
]);
|
]);
|
||||||
|
@ -87,7 +87,7 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
], ])
|
], ])
|
||||||
->setExtras([
|
->setExtras([
|
||||||
'order' => 40,
|
'order' => 40,
|
||||||
'counter' => count($period->getOpenWorks()) > 0 ? count($period->getOpenWorks()) : null,
|
'counter' => count($period->getWorks()) > 0 ? count($period->getWorks()) : null,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user