Compare commits

..

3 Commits

Author SHA1 Message Date
da3c6f2dd1 php cs fix 2023-09-14 17:17:36 +02:00
c72af4d7db update changelog 2023-09-14 17:14:46 +02:00
370c9c6d74 only display active centers in center form for exports 2023-09-14 17:01:58 +02:00
3 changed files with 11 additions and 2 deletions

3
.changes/v2.6.1.md Normal file
View File

@@ -0,0 +1,3 @@
## v2.6.1 - 2023-09-14
### Fixed
* Filter out active centers in exports, which uses a different PickCenterType.

View File

@@ -6,6 +6,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
## v2.6.1 - 2023-09-14
### Fixed
* Filter out active centers in exports, which uses a different PickCenterType.
## v2.6.0 - 2023-09-14
### Feature
* ([#133](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/133)) Add locations in Aside Activity. By default, suggest user location, otherwise a select with all locations.

View File

@@ -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,