mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
only display active centers in center form for exports
This commit is contained in:
parent
80ea712475
commit
370c9c6d74
@ -57,12 +57,14 @@ final class PickCenterType extends AbstractType
|
||||
$export->requiredRole()
|
||||
);
|
||||
|
||||
$centersActive = array_filter($centers, fn(Center $c) => $c->getIsActive());
|
||||
|
||||
// order alphabetically
|
||||
usort($centers, fn (Center $a, Center $b) => $a->getCenter() <=> $b->getName());
|
||||
usort($centersActive, fn (Center $a, Center $b) => $a->getCenter() <=> $b->getName());
|
||||
|
||||
$builder->add('center', EntityType::class, [
|
||||
'class' => Center::class,
|
||||
'choices' => $centers,
|
||||
'choices' => $centersActive,
|
||||
'label' => 'center',
|
||||
'multiple' => true,
|
||||
'expanded' => true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user