mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 09:03:48 +00:00
Fixed: [Activity] fix appearance of reason list in Activity form
Fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/44
This commit is contained in:
@@ -43,6 +43,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use function array_key_exists;
|
||||
|
||||
final class ActivityController extends AbstractController
|
||||
@@ -73,6 +74,8 @@ final class ActivityController extends AbstractController
|
||||
|
||||
private ThirdPartyRepository $thirdPartyRepository;
|
||||
|
||||
private TranslatorInterface $translator;
|
||||
|
||||
private UserRepositoryInterface $userRepository;
|
||||
|
||||
public function __construct(
|
||||
@@ -89,7 +92,8 @@ final class ActivityController extends AbstractController
|
||||
LoggerInterface $logger,
|
||||
SerializerInterface $serializer,
|
||||
UserRepositoryInterface $userRepository,
|
||||
CenterResolverManagerInterface $centerResolver
|
||||
CenterResolverManagerInterface $centerResolver,
|
||||
TranslatorInterface $translator
|
||||
) {
|
||||
$this->activityACLAwareRepository = $activityACLAwareRepository;
|
||||
$this->activityTypeRepository = $activityTypeRepository;
|
||||
@@ -105,6 +109,7 @@ final class ActivityController extends AbstractController
|
||||
$this->serializer = $serializer;
|
||||
$this->userRepository = $userRepository;
|
||||
$this->centerResolver = $centerResolver;
|
||||
$this->translator = $translator;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -160,7 +165,7 @@ final class ActivityController extends AbstractController
|
||||
$this->entityManager->remove($activity);
|
||||
$this->entityManager->flush();
|
||||
|
||||
$this->addFlash('success', $this->get('translator')
|
||||
$this->addFlash('success', $this->translator
|
||||
->trans('The activity has been successfully removed.'));
|
||||
|
||||
$params = $this->buildParamsToUrl($person, $accompanyingPeriod);
|
||||
@@ -245,7 +250,7 @@ final class ActivityController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
$this->addFlash('success', $this->get('translator')->trans('Success : activity updated!'));
|
||||
$this->addFlash('success', $this->translator->trans('Success : activity updated!'));
|
||||
|
||||
return $this->redirectToRoute('chill_activity_activity_show', $params);
|
||||
}
|
||||
@@ -473,7 +478,7 @@ final class ActivityController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
$this->addFlash('success', $this->get('translator')->trans('Success : activity created!'));
|
||||
$this->addFlash('success', $this->translator->trans('Success : activity created!'));
|
||||
|
||||
$params = $this->buildParamsToUrl($person, $accompanyingPeriod);
|
||||
|
||||
|
Reference in New Issue
Block a user