mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
[main] filter user jobs by active jobs
This commit is contained in:
@@ -82,6 +82,11 @@ class UserType extends AbstractType
|
||||
'choice_label' => function (UserJob $c) {
|
||||
return $this->translatableStringHelper->localize($c->getLabel());
|
||||
},
|
||||
'query_builder' => static function (EntityRepository $er) {
|
||||
$qb = $er->createQueryBuilder('uj');
|
||||
$qb->where('uj.active = TRUE');
|
||||
return $qb;
|
||||
},
|
||||
])
|
||||
->add('mainLocation', EntityType::class, [
|
||||
'label' => 'Main location',
|
||||
|
Reference in New Issue
Block a user