improve activity

This commit is contained in:
2021-06-29 20:51:08 +02:00
parent 7dc70baf57
commit d9c1f52894
7 changed files with 60 additions and 29 deletions

View File

@@ -72,6 +72,7 @@ class ActivityController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$view = null;
// TODO: add pagination
[$person, $accompanyingPeriod] = $this->getEntity($request);
@@ -80,10 +81,9 @@ class ActivityController extends AbstractController
->getReachableCircles($this->getUser(), new Role('CHILL_ACTIVITY_SEE'),
$person->getCenter());
$activities = $em->getRepository('ChillActivityBundle:Activity')->findBy(
['person' => $person, 'scope' => $reachableScopes],
['date' => 'DESC'],
);
$activities = $em->getRepository(Activity::class)
->findByPersonImplied($person, $reachableScopes)
;
$event = new PrivacyEvent($person, array(
'element_class' => Activity::class,