Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/660-task-custom-reports-tree-lis…
Browse files Browse the repository at this point in the history
…ting-endpoint' into 660-task-custom-reports-tree-listing-endpoint
  • Loading branch information
mcop1 committed Jan 10, 2025
2 parents 1ae62d4 + 7715574 commit 26ac797
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/CustomReport/Controller/Config/TreeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\Serializer\SerializerInterface;
use function count;

/**
* @internal
Expand Down Expand Up @@ -73,6 +74,7 @@ public function __construct(
public function getCustomReports(): JsonResponse
{
$items = $this->customReportService->getCustomReportConfigTree();

return $this->getPaginatedCollection($this->serializer, $items, count($items));
}
}
2 changes: 2 additions & 0 deletions src/CustomReport/Controller/TreeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\Serializer\SerializerInterface;
use function count;

/**
* @internal
Expand Down Expand Up @@ -73,6 +74,7 @@ public function __construct(
public function getCustomReports(): JsonResponse
{
$items = $this->customReportService->getCustomReportTree();

return $this->getPaginatedCollection($this->serializer, $items, count($items));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
interface CustomReportHydratorInterface
{
public function hydrateCustomReportTree(array $reports): array;

public function hydrateCustomReportConfigTree(array $reports): array;
public function hydrateCustomReportDetails(Config $reportConfig): array;
}
1 change: 0 additions & 1 deletion src/CustomReport/Schema/CustomReportConfigTreeNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,4 @@ public function getWriteable(): string
{
return $this->writeable;
}

}
1 change: 1 addition & 0 deletions src/CustomReport/Service/CustomReportServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
interface CustomReportServiceInterface
{
public function getCustomReportTree(): array;

public function getCustomReportConfigTree(): array;

/**
Expand Down

0 comments on commit 26ac797

Please sign in to comment.