mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
DX: Fix aggregator: "group activity by reason"
This commit is contained in:
parent
b05ed86d1e
commit
2883e085ed
5
.changes/unreleased/Fixed-20231120-174952.yaml
Normal file
5
.changes/unreleased/Fixed-20231120-174952.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
kind: Fixed
|
||||||
|
body: 'Export: fix loading of "group activity by reasons"'
|
||||||
|
time: 2023-11-20T17:49:52.416508936+01:00
|
||||||
|
custom:
|
||||||
|
Issue: "190"
|
@ -99,12 +99,6 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
|||||||
|
|
||||||
public function getLabels($key, array $values, $data)
|
public function getLabels($key, array $values, $data)
|
||||||
{
|
{
|
||||||
match ($data['level']) {
|
|
||||||
'reasons' => $this->activityReasonRepository->findBy(['id' => $values]),
|
|
||||||
'categories' => $this->activityReasonCategoryRepository->findBy(['id' => $values]),
|
|
||||||
default => throw new \RuntimeException(sprintf("The level data '%s' is invalid.", $data['level'])),
|
|
||||||
};
|
|
||||||
|
|
||||||
return function ($value) use ($data) {
|
return function ($value) use ($data) {
|
||||||
if ('_header' === $value) {
|
if ('_header' === $value) {
|
||||||
return 'reasons' === $data['level'] ? 'Group by reasons' : 'Group by categories of reason';
|
return 'reasons' === $data['level'] ? 'Group by reasons' : 'Group by categories of reason';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user