mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 21:13:57 +00:00
activity: avoid existing entities being added in Users, ThirdParties, Persons
This commit is contained in:
@@ -408,7 +408,7 @@ final class ActivityController extends AbstractController
|
||||
|
||||
$activity_array = $this->serializer->normalize($entity, 'json', ['groups' => 'read']);
|
||||
|
||||
$defaultLocationId = $this->getUser()->getCurrentLocation()->getId();
|
||||
$defaultLocation = $this->getUser()->getCurrentLocation();
|
||||
|
||||
return $this->render($view, [
|
||||
'person' => $person,
|
||||
@@ -416,7 +416,7 @@ final class ActivityController extends AbstractController
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'activity_json' => $activity_array,
|
||||
'default_location_id' => $defaultLocationId,
|
||||
'default_location' => $defaultLocation,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@@ -23,6 +23,7 @@ class AdminActivityTypeController extends CRUDController
|
||||
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
|
||||
{
|
||||
/** @var \Doctrine\ORM\QueryBuilder $query */
|
||||
return $query->orderBy('e.ordering', 'ASC');
|
||||
return $query->orderBy('e.ordering', 'ASC')
|
||||
->addOrderBy('e.id', 'ASC');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user