Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/661-task-load-chart-data-for-cus…
Browse files Browse the repository at this point in the history
…tom-reports' into 661-task-load-chart-data-for-custom-reports
  • Loading branch information
mcop1 committed Jan 14, 2025
2 parents 37e5f52 + 4e58f01 commit 0774267
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/CustomReport/Controller/Chart/GetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Config\Tags;
use Pimcore\Bundle\StudioBackendBundle\Util\Constant\CustomReportPermissions;
use Pimcore\Bundle\StudioBackendBundle\Util\Constant\HttpResponseCodes;
use Pimcore\Bundle\StudioBackendBundle\Util\Trait\PaginatedResponseTrait;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpKernel\Attribute\MapQueryString;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\Serializer\SerializerInterface;
use function count;

/**
* @internal
Expand Down
5 changes: 4 additions & 1 deletion src/CustomReport/Hydrator/CustomReportHydrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Pimcore\Bundle\StudioBackendBundle\CustomReport\Schema\CustomReportDetails;
use Pimcore\Bundle\StudioBackendBundle\CustomReport\Schema\CustomReportTreeConfigNode;
use Pimcore\Bundle\StudioBackendBundle\CustomReport\Schema\CustomReportTreeNode;

/**
* @internal
*/
Expand Down Expand Up @@ -86,7 +87,8 @@ public function extractChartData(array $chartData): CustomReportChartData
);
}

private function getCustomReportColumnConfiguration(array $columns): array {
private function getCustomReportColumnConfiguration(array $columns): array
{
$columnConfig = [];
foreach ($columns as $column) {
$columnConfig[] = new CustomReportColumnConfiguration(
Expand All @@ -98,6 +100,7 @@ private function getCustomReportColumnConfiguration(array $columns): array {
$column['id'] ?? ''
);
}

return $columnConfig;
}
}
4 changes: 2 additions & 2 deletions src/CustomReport/Service/CustomReportService.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function getCustomReportTree(): array
$treeData = [];
$reportTree = $this->customReportRepository->loadForCurrentUser();

foreach($reportTree as $report) {
foreach ($reportTree as $report) {
$data = $this->customReportHydrator->extractTreeData($report);

$this->eventDispatcher->dispatch(
Expand All @@ -65,7 +65,7 @@ public function getCustomReportConfigTree(): array
$treeConfigData = [];
$reportTree = $this->customReportRepository->loadForCurrentUser();

foreach($reportTree as $report) {
foreach ($reportTree as $report) {
$data = $this->customReportHydrator->extractConfigTreeData($report);

$this->eventDispatcher->dispatch(
Expand Down

0 comments on commit 0774267

Please sign in to comment.