mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
prepare vue_visgraph component, with store, dataset and display basic graph
This commit is contained in:
@@ -9,6 +9,8 @@ use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Chill\PersonBundle\Entity\Household\Household;
|
||||
@@ -24,11 +26,16 @@ class HouseholdController extends AbstractController
|
||||
|
||||
private PositionRepository $positionRepository;
|
||||
|
||||
public function __construct(TranslatorInterface $translator, PositionRepository $positionRepository)
|
||||
private SerializerInterface $serializer;
|
||||
|
||||
{
|
||||
public function __construct(
|
||||
TranslatorInterface $translator,
|
||||
PositionRepository $positionRepository,
|
||||
SerializerInterface $serializer
|
||||
) {
|
||||
$this->translator = $translator;
|
||||
$this->positionRepository = $positionRepository;
|
||||
$this->serializer = $serializer;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -177,9 +184,13 @@ class HouseholdController extends AbstractController
|
||||
*/
|
||||
public function showRelationship(Request $request, Household $household)
|
||||
{
|
||||
$jsonString = $this->serializer->serialize($household->getCurrentPersons(),
|
||||
'json', [ AbstractNormalizer::GROUPS => ['read']]);
|
||||
|
||||
return $this->render('@ChillPerson/Household/relationship.html.twig',
|
||||
[
|
||||
'household' => $household
|
||||
'household' => $household,
|
||||
'persons' => $jsonString
|
||||
]
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user