Merge branch 'export/allow-check-multiple-geographical-zones' into 'master'

Feature: [export] allow to check multiple geographical layers in geographical aggregators

See merge request Chill-Projet/chill-bundles!532
This commit is contained in:
Julien Fastré 2023-05-19 09:54:25 +00:00
commit ca7be4ecd0
2 changed files with 5 additions and 1 deletions

View File

@ -98,7 +98,7 @@ final class GeographicalUnitStatAggregator implements AggregatorInterface
'acp_geog_units' 'acp_geog_units'
); );
$qb->andWhere($qb->expr()->eq('acp_geog_units.layer', ':acp_geog_unit_layer')); $qb->andWhere($qb->expr()->in('acp_geog_units.layer', ':acp_geog_unit_layer'));
$qb->setParameter('acp_geog_unit_layer', $data['level']); $qb->setParameter('acp_geog_unit_layer', $data['level']);
@ -129,6 +129,8 @@ final class GeographicalUnitStatAggregator implements AggregatorInterface
'class' => GeographicalUnitLayer::class, 'class' => GeographicalUnitLayer::class,
'choices' => $this->geographicalUnitLayerRepository->findAllHavingUnits(), 'choices' => $this->geographicalUnitLayerRepository->findAllHavingUnits(),
'choice_label' => fn (GeographicalUnitLayer $item) => $this->translatableStringHelper->localize($item->getName()), 'choice_label' => fn (GeographicalUnitLayer $item) => $this->translatableStringHelper->localize($item->getName()),
'multiple' => true,
'expanded' => true,
]); ]);
} }

View File

@ -101,6 +101,8 @@ class GeographicalUnitAggregator implements AggregatorInterface
'class' => GeographicalUnitLayer::class, 'class' => GeographicalUnitLayer::class,
'choices' => $this->geographicalUnitLayerRepository->findAllHavingUnits(), 'choices' => $this->geographicalUnitLayerRepository->findAllHavingUnits(),
'choice_label' => fn (GeographicalUnitLayer $item) => $this->translatableStringHelper->localize($item->getName()), 'choice_label' => fn (GeographicalUnitLayer $item) => $this->translatableStringHelper->localize($item->getName()),
'multiple' => true,
'expanded' => true,
]); ]);
} }