mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
fix: Fix wrong repository.
This commit is contained in:
parent
5a6a15a351
commit
693b59c484
@ -7,6 +7,7 @@ namespace Chill\ActivityBundle\Controller;
|
|||||||
use Chill\ActivityBundle\Entity\ActivityReason;
|
use Chill\ActivityBundle\Entity\ActivityReason;
|
||||||
use Chill\ActivityBundle\Repository\ActivityACLAwareRepositoryInterface;
|
use Chill\ActivityBundle\Repository\ActivityACLAwareRepositoryInterface;
|
||||||
use Chill\ActivityBundle\Repository\ActivityRepository;
|
use Chill\ActivityBundle\Repository\ActivityRepository;
|
||||||
|
use Chill\ActivityBundle\Repository\ActivityTypeCategoryRepository;
|
||||||
use Chill\ActivityBundle\Repository\ActivityTypeRepository;
|
use Chill\ActivityBundle\Repository\ActivityTypeRepository;
|
||||||
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
|
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
|
||||||
use Chill\MainBundle\Repository\LocationRepository;
|
use Chill\MainBundle\Repository\LocationRepository;
|
||||||
@ -54,9 +55,12 @@ final class ActivityController extends AbstractController
|
|||||||
|
|
||||||
private AccompanyingPeriodRepository $accompanyingPeriodRepository;
|
private AccompanyingPeriodRepository $accompanyingPeriodRepository;
|
||||||
|
|
||||||
|
private ActivityTypeCategoryRepository $activityTypeCategoryRepository;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
ActivityACLAwareRepositoryInterface $activityACLAwareRepository,
|
ActivityACLAwareRepositoryInterface $activityACLAwareRepository,
|
||||||
ActivityTypeRepository $activityTypeRepository,
|
ActivityTypeRepository $activityTypeRepository,
|
||||||
|
ActivityTypeCategoryRepository $activityTypeCategoryRepository,
|
||||||
PersonRepository $personRepository,
|
PersonRepository $personRepository,
|
||||||
ThirdPartyRepository $thirdPartyRepository,
|
ThirdPartyRepository $thirdPartyRepository,
|
||||||
LocationRepository $locationRepository,
|
LocationRepository $locationRepository,
|
||||||
@ -69,6 +73,7 @@ final class ActivityController extends AbstractController
|
|||||||
) {
|
) {
|
||||||
$this->activityACLAwareRepository = $activityACLAwareRepository;
|
$this->activityACLAwareRepository = $activityACLAwareRepository;
|
||||||
$this->activityTypeRepository = $activityTypeRepository;
|
$this->activityTypeRepository = $activityTypeRepository;
|
||||||
|
$this->activityTypeCategoryRepository = $activityTypeCategoryRepository;
|
||||||
$this->personRepository = $personRepository;
|
$this->personRepository = $personRepository;
|
||||||
$this->thirdPartyRepository = $thirdPartyRepository;
|
$this->thirdPartyRepository = $thirdPartyRepository;
|
||||||
$this->locationRepository = $locationRepository;
|
$this->locationRepository = $locationRepository;
|
||||||
@ -136,10 +141,17 @@ final class ActivityController extends AbstractController
|
|||||||
|
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
$activityTypeCategories = $this->activityTypeRepository->findBy(['active' => true], ['ordering' => 'ASC']);
|
$activityTypeCategories = $this
|
||||||
|
->activityTypeCategoryRepository
|
||||||
|
->findBy(['active' => true], ['ordering' => 'ASC']);
|
||||||
|
|
||||||
foreach ($activityTypeCategories as $activityTypeCategory) {
|
foreach ($activityTypeCategories as $activityTypeCategory) {
|
||||||
$activityTypes = $this->activityTypeRepository->findBy(['active' => true, 'category' => $activityTypeCategory], ['ordering' => 'ASC']);
|
$activityTypes = $this
|
||||||
|
->activityTypeRepository
|
||||||
|
->findBy(
|
||||||
|
['active' => true, 'category' => $activityTypeCategory],
|
||||||
|
['ordering' => 'ASC']
|
||||||
|
);
|
||||||
|
|
||||||
$data[] = [
|
$data[] = [
|
||||||
'activityTypeCategory' => $activityTypeCategory,
|
'activityTypeCategory' => $activityTypeCategory,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user