From 1f4438690e82dfd319b2f8b24604c57a9e5b6880 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 22 Feb 2023 11:36:57 +0100 Subject: [PATCH 01/17] FEATURE [email] add a line notifying referrer which user has moved a person or household --- .../notification_location_user_on_period_has_moved.fr.txt.twig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/notification_location_user_on_period_has_moved.fr.txt.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/notification_location_user_on_period_has_moved.fr.txt.twig index e4509d78a..df932067c 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/notification_location_user_on_period_has_moved.fr.txt.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/notification_location_user_on_period_has_moved.fr.txt.twig @@ -3,6 +3,7 @@ #}{{ period.user.label }}, L'usager {{ oldPersonLocation|chill_entity_render_string }} a déménagé. +{{ app.user|chill_entity_render_string }} a enregistré ce déménagement. Son adresse était utilisée pour localiser le parcours n°{{ period.id }}, dont vous êtes le référent. From f07ea3259ef229c212ddca2f35bc263134994b96 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 22 Feb 2023 11:54:03 +0100 Subject: [PATCH 02/17] php cs fixes --- .../Filter/ACPFilters/LocationFilter.php | 2 +- .../src/Export/Export/ListAsideActivity.php | 63 +++++----- .../src/Export/Filter/ByDateFilter.php | 1 - .../src/Export/Filter/ByUserFilter.php | 1 - .../Form/Admin/ChargeKindType.php | 2 +- .../Form/Admin/ResourceKindType.php | 2 +- .../Repository/ChargeKindRepository.php | 3 +- .../ChargeKindRepositoryInterface.php | 4 +- .../Repository/ResourceKindRepository.php | 3 +- .../Repository/ResourceRepository.php | 2 +- .../Service/Summary/SummaryBudget.php | 2 - .../Service/Summary/SummaryBudgetTest.php | 31 ++--- .../migrations/Version20230209161546.php | 19 ++- .../DocGeneratorTemplateController.php | 3 +- .../Service/Generator/Generator.php | 33 +++-- .../Service/Generator/GeneratorException.php | 23 +++- .../Generator/ObjectReadyException.php | 15 ++- .../RelatedEntityNotFoundException.php | 20 ++- .../Messenger/RequestGenerationMessage.php | 25 ++-- .../Context/Generator/GeneratorTest.php | 115 ++++++++++-------- .../Entity/StoredObject.php | 35 +++--- .../Export/ExportInterface.php | 1 - .../Export/Helper/DateTimeHelper.php | 3 +- .../UserJobFilter.php | 1 - .../ParticipationOverlapValidatorTest.php | 50 ++++---- 25 files changed, 273 insertions(+), 186 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationFilter.php index ed591e957..5cdce5b31 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationFilter.php @@ -50,7 +50,7 @@ class LocationFilter implements FilterInterface { $builder->add('accepted_location', PickUserLocationType::class, [ 'multiple' => true, - 'label' => 'pick location' + 'label' => 'pick location', ]); } diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php index bf370f71b..976f4171c 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php @@ -1,10 +1,18 @@ format('H:i:s'); } @@ -118,7 +122,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface case 'createdAt': case 'updatedAt': case 'date': - return $this->dateTimeHelper->getLabel('export.aside_activity.'.$key); + return $this->dateTimeHelper->getLabel('export.aside_activity.' . $key); case 'agent_id': case 'creator_id': @@ -165,7 +169,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface }; default: - throw new \LogicException('this key is not supported : ' . $key); + throw new LogicException('this key is not supported : ' . $key); } } @@ -182,7 +186,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface 'aside_activity_type', 'date', 'duration', - 'note' + 'note', ]; } @@ -195,6 +199,11 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface return $query->getQuery()->getResult(AbstractQuery::HYDRATE_ARRAY); } + public function getTitle() + { + return 'export.aside_activity.List of aside activities'; + } + public function getType(): string { return Declarations::ASIDE_ACTIVITY_TYPE; @@ -204,8 +213,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface { $qb = $this->em->createQueryBuilder() ->from(AsideActivity::class, 'aside') - ->leftJoin('aside.agent', 'agent') - ; + ->leftJoin('aside.agent', 'agent'); $qb ->addSelect('aside.id AS id') @@ -218,8 +226,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface ->addSelect('IDENTITY(aside.type) AS aside_activity_type') ->addSelect('aside.date') ->addSelect('aside.duration') - ->addSelect('aside.note') - ; + ->addSelect('aside.note'); return $qb; } diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php index 2d49b3d57..7a1b6f4dc 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php @@ -17,7 +17,6 @@ use Chill\MainBundle\Form\Type\Export\FilterType; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface; -use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormError; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php index c2a3b4c54..795c813cd 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php @@ -15,7 +15,6 @@ use Chill\AsideActivityBundle\Export\Declarations; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Templating\Entity\UserRender; -use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; diff --git a/src/Bundle/ChillBudgetBundle/Form/Admin/ChargeKindType.php b/src/Bundle/ChillBudgetBundle/Form/Admin/ChargeKindType.php index 59adf49af..c3c2a66bf 100644 --- a/src/Bundle/ChillBudgetBundle/Form/Admin/ChargeKindType.php +++ b/src/Bundle/ChillBudgetBundle/Form/Admin/ChargeKindType.php @@ -30,7 +30,7 @@ class ChargeKindType extends AbstractType ]) ->add('kind', TextType::class, [ 'label' => 'budget.admin.form.Charge_kind_key', - 'help' => 'budget.admin.form.This kind must contains only alphabeticals characters, and dashes. This string is in use during document generation. Changes may have side effect on document' + 'help' => 'budget.admin.form.This kind must contains only alphabeticals characters, and dashes. This string is in use during document generation. Changes may have side effect on document', ]) ->add('ordering', NumberType::class) ->add('isActive', CheckboxType::class, [ diff --git a/src/Bundle/ChillBudgetBundle/Form/Admin/ResourceKindType.php b/src/Bundle/ChillBudgetBundle/Form/Admin/ResourceKindType.php index 0605b8731..41d3a8b53 100644 --- a/src/Bundle/ChillBudgetBundle/Form/Admin/ResourceKindType.php +++ b/src/Bundle/ChillBudgetBundle/Form/Admin/ResourceKindType.php @@ -30,7 +30,7 @@ class ResourceKindType extends AbstractType ]) ->add('kind', TextType::class, [ 'label' => 'budget.admin.form.Resource_kind_key', - 'help' => 'budget.admin.form.This kind must contains only alphabeticals characters, and dashes. This string is in use during document generation. Changes may have side effect on document' + 'help' => 'budget.admin.form.This kind must contains only alphabeticals characters, and dashes. This string is in use during document generation. Changes may have side effect on document', ]) ->add('ordering', NumberType::class) ->add('isActive', CheckboxType::class, [ diff --git a/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepository.php b/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepository.php index 10d02749a..01f5cd737 100644 --- a/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepository.php +++ b/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepository.php @@ -49,8 +49,7 @@ final class ChargeKindRepository implements ChargeKindRepositoryInterface ->where($qb->expr()->eq('c.isActive', 'true')) ->orderBy('c.ordering', 'ASC') ->getQuery() - ->getResult() - ; + ->getResult(); } /** diff --git a/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepositoryInterface.php b/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepositoryInterface.php index 5099a5674..fb8c9dc35 100644 --- a/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepositoryInterface.php +++ b/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepositoryInterface.php @@ -28,8 +28,6 @@ interface ChargeKindRepositoryInterface extends ObjectRepository */ public function findAllActive(): array; - public function findOneByKind(string $kind): ?ChargeKind; - /** * @return ChargeType[] */ @@ -45,5 +43,7 @@ interface ChargeKindRepositoryInterface extends ObjectRepository public function findOneBy(array $criteria): ?ChargeKind; + public function findOneByKind(string $kind): ?ChargeKind; + public function getClassName(): string; } diff --git a/src/Bundle/ChillBudgetBundle/Repository/ResourceKindRepository.php b/src/Bundle/ChillBudgetBundle/Repository/ResourceKindRepository.php index 140bb7cc7..f7935c5b7 100644 --- a/src/Bundle/ChillBudgetBundle/Repository/ResourceKindRepository.php +++ b/src/Bundle/ChillBudgetBundle/Repository/ResourceKindRepository.php @@ -49,8 +49,7 @@ final class ResourceKindRepository implements ResourceKindRepositoryInterface ->where($qb->expr()->eq('r.isActive', 'true')) ->orderBy('r.ordering', 'ASC') ->getQuery() - ->getResult() - ; + ->getResult(); } /** diff --git a/src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php b/src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php index b3f0a41da..12f9fd52f 100644 --- a/src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php +++ b/src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php @@ -34,7 +34,7 @@ class ResourceRepository extends EntityRepository //->andWhere('c.startDate < :date') // TODO: there is a misconception here, the end date must be lower or null. startDate are never null //->andWhere('c.startDate < :date OR c.startDate IS NULL'); - ; +; if (null !== $sort) { $qb->orderBy($sort); diff --git a/src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php b/src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php index 2f401f1ec..ad2a014ed 100644 --- a/src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php +++ b/src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php @@ -13,9 +13,7 @@ namespace Chill\BudgetBundle\Service\Summary; use Chill\BudgetBundle\Entity\ChargeKind; use Chill\BudgetBundle\Entity\ResourceKind; -use Chill\BudgetBundle\Repository\ChargeKindRepository; use Chill\BudgetBundle\Repository\ChargeKindRepositoryInterface; -use Chill\BudgetBundle\Repository\ResourceKindRepository; use Chill\BudgetBundle\Repository\ResourceKindRepositoryInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\PersonBundle\Entity\Household\Household; diff --git a/src/Bundle/ChillBudgetBundle/Tests/Service/Summary/SummaryBudgetTest.php b/src/Bundle/ChillBudgetBundle/Tests/Service/Summary/SummaryBudgetTest.php index cf8c00efe..7fcda6b11 100644 --- a/src/Bundle/ChillBudgetBundle/Tests/Service/Summary/SummaryBudgetTest.php +++ b/src/Bundle/ChillBudgetBundle/Tests/Service/Summary/SummaryBudgetTest.php @@ -20,12 +20,15 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\PersonBundle\Entity\Household\Household; use Chill\PersonBundle\Entity\Household\HouseholdMember; use Chill\PersonBundle\Entity\Person; +use DateTimeImmutable; use Doctrine\ORM\AbstractQuery; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Query; use PHPUnit\Framework\TestCase; use Prophecy\Argument; use Prophecy\PhpUnit\ProphecyTrait; +use ReflectionClass; +use RuntimeException; /** * @internal @@ -47,10 +50,9 @@ final class SummaryBudgetTest extends TestCase ], ]); $queryCharges->setParameters(Argument::type('array')) - ->will(function ($args, $query) { + ->will(static function ($args, $query) { return $query; - }) - ; + }); $queryResources = $this->prophesize(AbstractQuery::class); $queryResources->getResult()->willReturn([ @@ -61,23 +63,23 @@ final class SummaryBudgetTest extends TestCase ], ]); $queryResources->setParameters(Argument::type('array')) - ->will(function ($args, $query) { + ->will(static function ($args, $query) { return $query; - }) - ; + }); $em = $this->prophesize(EntityManagerInterface::class); $em->createNativeQuery(Argument::type('string'), Argument::type(Query\ResultSetMapping::class)) - ->will(function ($args) use ($queryResources, $queryCharges) { + ->will(static function ($args) use ($queryResources, $queryCharges) { if (false !== strpos($args[0], 'chill_budget.resource')) { return $queryResources->reveal(); } + if (false !== strpos($args[0], 'chill_budget.charge')) { return $queryCharges->reveal(); } - throw new \RuntimeException('this query does not have a stub counterpart: '.$args[0]); - }) - ; + + throw new RuntimeException('this query does not have a stub counterpart: ' . $args[0]); + }); $chargeRepository = $this->prophesize(ChargeKindRepositoryInterface::class); $chargeRepository->findAll()->willReturn([ @@ -98,24 +100,23 @@ final class SummaryBudgetTest extends TestCase $resourceRepository->findOneByKind('misc')->willReturn($misc); $translatableStringHelper = $this->prophesize(TranslatableStringHelperInterface::class); - $translatableStringHelper->localize(Argument::type('array'))->will(function ($arg) { + $translatableStringHelper->localize(Argument::type('array'))->will(static function ($arg) { return $arg[0]['fr']; }); $person = new Person(); - $personReflection = new \ReflectionClass($person); + $personReflection = new ReflectionClass($person); $personIdReflection = $personReflection->getProperty('id'); $personIdReflection->setAccessible(true); $personIdReflection->setValue($person, 1); $household = new Household(); - $householdReflection = new \ReflectionClass($household); + $householdReflection = new ReflectionClass($household); $householdId = $householdReflection->getProperty('id'); $householdId->setAccessible(true); $householdId->setValue($household, 1); $householdMember = (new HouseholdMember())->setPerson($person) - ->setStartDate(new \DateTimeImmutable('1 month ago')) - ; + ->setStartDate(new DateTimeImmutable('1 month ago')); $household->addMember($householdMember); $summaryBudget = new SummaryBudget( diff --git a/src/Bundle/ChillBudgetBundle/migrations/Version20230209161546.php b/src/Bundle/ChillBudgetBundle/migrations/Version20230209161546.php index 618b0c982..4495db8a7 100644 --- a/src/Bundle/ChillBudgetBundle/migrations/Version20230209161546.php +++ b/src/Bundle/ChillBudgetBundle/migrations/Version20230209161546.php @@ -2,6 +2,13 @@ declare(strict_types=1); +/* + * Chill is a software for social workers + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\Migrations\Budget; use Doctrine\DBAL\Schema\Schema; @@ -9,6 +16,12 @@ use Doctrine\Migrations\AbstractMigration; final class Version20230209161546 extends AbstractMigration { + public function down(Schema $schema): void + { + $this->addSql('DROP INDEX resource_kind_unique_type_idx'); + $this->addSql('DROP INDEX charge_kind_unique_type_idx'); + } + public function getDescription(): string { return 'Budget: add unique constraint on kind for charge_kind and resource_kind'; @@ -21,10 +34,4 @@ final class Version20230209161546 extends AbstractMigration $this->addSql('CREATE UNIQUE INDEX resource_kind_unique_type_idx ON chill_budget.resource_type (kind);'); $this->addSql('CREATE UNIQUE INDEX charge_kind_unique_type_idx ON chill_budget.charge_type (kind);'); } - - public function down(Schema $schema): void - { - $this->addSql('DROP INDEX resource_kind_unique_type_idx'); - $this->addSql('DROP INDEX charge_kind_unique_type_idx'); - } } diff --git a/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php b/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php index d618f758a..f65cb5d86 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php +++ b/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php @@ -41,6 +41,7 @@ use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; use Symfony\Contracts\HttpClient\HttpClientInterface; use Throwable; use function strlen; +use const JSON_PRETTY_PRINT; final class DocGeneratorTemplateController extends AbstractController { @@ -273,7 +274,7 @@ final class DocGeneratorTemplateController extends AbstractController if ($isTest && isset($form) && $form['show_data']->getData()) { return $this->render('@ChillDocGenerator/Generator/debug_value.html.twig', [ - 'datas' => json_encode($context->getData($template, $entity, $contextGenerationData), JSON_PRETTY_PRINT) + 'datas' => json_encode($context->getData($template, $entity, $contextGenerationData), JSON_PRETTY_PRINT), ]); } diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php index 755e608ba..c1f2f0631 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php @@ -1,5 +1,14 @@ getStatus()) { throw new ObjectReadyException(); @@ -63,8 +76,7 @@ class Generator $entity = $this ->entityManager - ->find($context->getEntityClass(), $entityId) - ; + ->find($context->getEntityClass(), $entityId); if (null === $entity) { throw new RelatedEntityNotFoundException($entityClassName, $entityId); @@ -97,8 +109,7 @@ class Generator $destinationStoredObject ->setType($template->getFile()->getType()) ->setFilename(sprintf('%s_odt', uniqid('doc_', true))) - ->setStatus(StoredObject::STATUS_READY) - ; + ->setStatus(StoredObject::STATUS_READY); $this->storedObjectManager->write($destinationStoredObject, $generatedResource); @@ -110,7 +121,7 @@ class Generator $entity, $contextGenerationData ); - } catch (\Exception $e) { + } catch (Exception $e) { $this ->logger ->error( diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/GeneratorException.php b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/GeneratorException.php index 423d59dd4..98e493c29 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/GeneratorException.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/GeneratorException.php @@ -1,18 +1,33 @@ */ private array $errors; - public function __construct(array $errors = [], \Throwable $previous = null) + public function __construct(array $errors = [], ?Throwable $previous = null) { $this->errors = $errors; - parent::__construct("Could not generate the document", 15252, - $previous); + parent::__construct( + 'Could not generate the document', + 15252, + $previous + ); } } diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/ObjectReadyException.php b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/ObjectReadyException.php index 85c82cf95..37540a2f8 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/ObjectReadyException.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/ObjectReadyException.php @@ -1,11 +1,22 @@ creatorId; } - public function getTemplateId(): int + public function getEntityClassName(): string { - return $this->templateId; + return $this->entityClassName; } public function getEntityId(): int @@ -38,8 +47,8 @@ class RequestGenerationMessage return $this->entityId; } - public function getEntityClassName(): string + public function getTemplateId(): int { - return $this->entityClassName; + return $this->templateId; } } diff --git a/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/Generator/GeneratorTest.php b/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/Generator/GeneratorTest.php index 2e68b443c..54fbce115 100644 --- a/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/Generator/GeneratorTest.php +++ b/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/Generator/GeneratorTest.php @@ -1,5 +1,14 @@ setFile($templateStoredObject = (new StoredObject()) - ->setType('application/test')); - $destinationStoredObject = (new StoredObject())->setStatus(StoredObject::STATUS_PENDING); - $entity = new class {}; - $data = []; - - $context = $this->prophesize(DocGeneratorContextInterface::class); - $context->getData($template, $entity, Argument::type('array'))->willReturn($data); - $context->storeGenerated($template, $destinationStoredObject, $entity, Argument::type('array')) - ->shouldBeCalled(); - $context->getName()->willReturn('dummy_context'); - $context->getEntityClass()->willReturn('DummyClass'); - $context = $context->reveal(); - - $contextManagerInterface = $this->prophesize(ContextManagerInterface::class); - $contextManagerInterface->getContextByDocGeneratorTemplate($template) - ->willReturn($context); - - $driver = $this->prophesize(DriverInterface::class); - $driver->generateFromString('template', 'application/test', $data, Argument::any()) - ->willReturn('generated'); - - $entityManager = $this->prophesize(EntityManagerInterface::class); - $entityManager->find(Argument::type('string'), Argument::type('int')) - ->willReturn($entity); - $entityManager->flush()->shouldBeCalled(); - - $storedObjectManager = $this->prophesize(StoredObjectManagerInterface::class); - $storedObjectManager->read($templateStoredObject)->willReturn('template'); - $storedObjectManager->write($destinationStoredObject, 'generated')->shouldBeCalled(); - - - $generator = new Generator( - $contextManagerInterface->reveal(), - $driver->reveal(), - $entityManager->reveal(), - new NullLogger(), - $storedObjectManager->reveal() - ); - - $generator->generateDocFromTemplate( - $template, - 'DummyEntity', - 1, - $destinationStoredObject - ); - } - public function testPreventRegenerateDocument(): void { $this->expectException(ObjectReadyException::class); @@ -131,4 +94,54 @@ class GeneratorTest extends TestCase $destinationStoredObject ); } + + public function testSuccessfulGeneration(): void + { + $template = (new DocGeneratorTemplate())->setFile($templateStoredObject = (new StoredObject()) + ->setType('application/test')); + $destinationStoredObject = (new StoredObject())->setStatus(StoredObject::STATUS_PENDING); + $entity = new class() { + }; + $data = []; + + $context = $this->prophesize(DocGeneratorContextInterface::class); + $context->getData($template, $entity, Argument::type('array'))->willReturn($data); + $context->storeGenerated($template, $destinationStoredObject, $entity, Argument::type('array')) + ->shouldBeCalled(); + $context->getName()->willReturn('dummy_context'); + $context->getEntityClass()->willReturn('DummyClass'); + $context = $context->reveal(); + + $contextManagerInterface = $this->prophesize(ContextManagerInterface::class); + $contextManagerInterface->getContextByDocGeneratorTemplate($template) + ->willReturn($context); + + $driver = $this->prophesize(DriverInterface::class); + $driver->generateFromString('template', 'application/test', $data, Argument::any()) + ->willReturn('generated'); + + $entityManager = $this->prophesize(EntityManagerInterface::class); + $entityManager->find(Argument::type('string'), Argument::type('int')) + ->willReturn($entity); + $entityManager->flush()->shouldBeCalled(); + + $storedObjectManager = $this->prophesize(StoredObjectManagerInterface::class); + $storedObjectManager->read($templateStoredObject)->willReturn('template'); + $storedObjectManager->write($destinationStoredObject, 'generated')->shouldBeCalled(); + + $generator = new Generator( + $contextManagerInterface->reveal(), + $driver->reveal(), + $entityManager->reveal(), + new NullLogger(), + $storedObjectManager->reveal() + ); + + $generator->generateDocFromTemplate( + $template, + 'DummyEntity', + 1, + $destinationStoredObject + ); + } } diff --git a/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php b/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php index 21abc1f56..d02a94e82 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php @@ -18,6 +18,7 @@ use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate; use Chill\MainBundle\Doctrine\Model\TrackCreationInterface; use Chill\MainBundle\Doctrine\Model\TrackCreationTrait; use DateTime; +use DateTimeImmutable; use DateTimeInterface; use Doctrine\ORM\Mapping as ORM; use Ramsey\Uuid\Uuid; @@ -35,12 +36,14 @@ use Symfony\Component\Serializer\Annotation as Serializer; */ class StoredObject implements AsyncFileInterface, Document, TrackCreationInterface { - public const STATUS_READY = "ready"; - public const STATUS_PENDING = "pending"; - public const STATUS_FAILURE = "failure"; - use TrackCreationTrait; + public const STATUS_FAILURE = 'failure'; + + public const STATUS_PENDING = 'pending'; + + public const STATUS_READY = 'ready'; + /** * @ORM\Column(type="datetime", name="creation_date") * @Serializer\Groups({"read", "write"}) @@ -80,6 +83,16 @@ class StoredObject implements AsyncFileInterface, Document, TrackCreationInterfa */ private array $keyInfos = []; + /** + * @ORM\Column(type="text", options={"default": "ready"}) + */ + private string $status; + + /** + * @ORM\ManyToOne(targetEntity=DocGeneratorTemplate::class) + */ + private ?DocGeneratorTemplate $template; + /** * @ORM\Column(type="text", name="title") * @Serializer\Groups({"read", "write"}) @@ -98,20 +111,10 @@ class StoredObject implements AsyncFileInterface, Document, TrackCreationInterfa */ private UuidInterface $uuid; - /** - * @ORM\ManyToOne(targetEntity=DocGeneratorTemplate::class) - */ - private ?DocGeneratorTemplate $template; - - /** - * @ORM\Column(type="text", options={"default": "ready"}) - */ - private string $status; - /** * @param StoredObject::STATUS_* $status */ - public function __construct(string $status = "ready") + public function __construct(string $status = 'ready') { $this->uuid = Uuid::uuid4(); $this->status = $status; @@ -188,7 +191,7 @@ class StoredObject implements AsyncFileInterface, Document, TrackCreationInterfa */ public function setCreationDate(DateTime $creationDate): self { - $this->createdAt = \DateTimeImmutable::createFromMutable($creationDate); + $this->createdAt = DateTimeImmutable::createFromMutable($creationDate); return $this; } diff --git a/src/Bundle/ChillMainBundle/Export/ExportInterface.php b/src/Bundle/ChillMainBundle/Export/ExportInterface.php index 79b59d241..95122ec0a 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportInterface.php +++ b/src/Bundle/ChillMainBundle/Export/ExportInterface.php @@ -11,7 +11,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Export; -use Closure; use Doctrine\ORM\QueryBuilder; /** diff --git a/src/Bundle/ChillMainBundle/Export/Helper/DateTimeHelper.php b/src/Bundle/ChillMainBundle/Export/Helper/DateTimeHelper.php index 648632e15..1c2c99083 100644 --- a/src/Bundle/ChillMainBundle/Export/Helper/DateTimeHelper.php +++ b/src/Bundle/ChillMainBundle/Export/Helper/DateTimeHelper.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\MainBundle\Export\Helper; use DateTime; +use DateTimeInterface; use Exception; use Symfony\Contracts\Translation\TranslatorInterface; @@ -35,7 +36,7 @@ class DateTimeHelper return ''; } - if ($value instanceof \DateTimeInterface) { + if ($value instanceof DateTimeInterface) { return $value; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php index 2b69c528b..744c41735 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php @@ -11,7 +11,6 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; -use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\UserJob; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/ParticipationOverlapValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/ParticipationOverlapValidatorTest.php index 181834b6a..1110bbe7b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/ParticipationOverlapValidatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/ParticipationOverlapValidatorTest.php @@ -24,10 +24,36 @@ use Prophecy\Argument; use Prophecy\PhpUnit\ProphecyTrait; use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; -class ParticipationOverlapValidatorTest extends ConstraintValidatorTestCase +/** + * @internal + * @coversNothing + */ +final class ParticipationOverlapValidatorTest extends ConstraintValidatorTestCase { use ProphecyTrait; + /** + * @return mixed + */ + public function getConstraint() + { + return new ParticipationOverlap(); + } + + public function testOneParticipation() + { + $period = new AccompanyingPeriod(); + $person = new Person(); + + $collection = new ArrayCollection([ + new AccompanyingPeriodParticipation($period, $person), + ]); + + $this->validator->validate($collection, $this->getConstraint()); + + $this->assertNoViolation(); + } + protected function createValidator() { $personRender = $this->prophesize(PersonRenderInterface::class); @@ -37,26 +63,4 @@ class ParticipationOverlapValidatorTest extends ConstraintValidatorTestCase return new ParticipationOverlapValidator($personRender->reveal(), $thirdPartyRender->reveal()); } - - public function testOneParticipation() - { - $period = new AccompanyingPeriod(); - $person = new Person(); - - $collection = new ArrayCollection([ - new AccompanyingPeriodParticipation($period, $person) - ]); - - $this->validator->validate($collection, $this->getConstraint()); - - $this->assertNoViolation(); - } - - /** - * @return mixed - */ - public function getConstraint() - { - return new ParticipationOverlap(); - } } From 678defdee79d55c0e13b0bea1994924e935a4891 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 2 Mar 2023 10:52:48 +0100 Subject: [PATCH 03/17] FIX [regroupment][form] add check to display regroupment field in the form or not. Only if regroupments exist --- .../ChillMainBundle/Form/Type/Export/PickCenterType.php | 8 +++++--- .../Resources/views/Export/new_centers_step.html.twig | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php index 55157b1ab..8287a8814 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php @@ -11,7 +11,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Form\Type\Export; -use Chill\MainBundle\Center\GroupingCenterInterface; use Chill\MainBundle\Entity\Center; use Chill\MainBundle\Entity\Regroupment; use Chill\MainBundle\Export\ExportManager; @@ -72,8 +71,10 @@ final class PickCenterType extends AbstractType return $c->getName(); }, 'data' => $centers, - ]) - ->add('regroupment', EntityType::class, [ + ]); + + if (count($this->regroupmentRepository->findAllActive()) > 0) { + $builder->add('regroupment', EntityType::class, [ 'class' => Regroupment::class, 'label' => 'regroupment', 'multiple' => true, @@ -83,6 +84,7 @@ final class PickCenterType extends AbstractType return $r->getName(); }, ]); + } $builder->setDataMapper(new ExportPickCenterDataMapper()); } diff --git a/src/Bundle/ChillMainBundle/Resources/views/Export/new_centers_step.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Export/new_centers_step.html.twig index e08ec84d9..9e37dc2cd 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Export/new_centers_step.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Export/new_centers_step.html.twig @@ -41,9 +41,10 @@

{{ 'Center'|trans }}

{{ form_widget(form.centers.center) }} -

{{ 'Pick aggregated centers'|trans }}

- {{ form_widget(form.centers.regroupment) }} - + {% if form.centers.regroupment is defined %} +

{{ 'Pick aggregated centers'|trans }}

+ {{ form_widget(form.centers.regroupment) }} + {% endif %}

{{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-action btn-create' }, 'label' : 'Go to export options' } ) }}

From 26a6169b958df8f90293e60ea6f02b64eea31b26 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 2 Mar 2023 11:11:40 +0100 Subject: [PATCH 04/17] FIX [budget][calculator] fix method call getAlias() --- .../ChillBudgetBundle/Calculator/CalculatorManager.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php b/src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php index a37ac68dc..934c22e36 100644 --- a/src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php +++ b/src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php @@ -29,10 +29,10 @@ class CalculatorManager public function addCalculator(CalculatorInterface $calculator, bool $default) { - $this->calculators[$calculator::getAlias()] = $calculator; + $this->calculators[$calculator->getAlias()] = $calculator; if ($default) { - $this->defaultCalculator[] = $calculator::getAlias(); + $this->defaultCalculator[] = $calculator->getAlias(); } } @@ -50,7 +50,7 @@ class CalculatorManager $result = $calculator->calculate($elements); if (null !== $result) { - $results[$calculator::getAlias()] = $result; + $results[$calculator->getAlias()] = $result; } } From ef75deda26b277699da94442ce009fabcd98b16a Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 2 Mar 2023 11:23:29 +0100 Subject: [PATCH 05/17] FIX [regroupment] remove CenterCompilerPass - no longer in use --- .../ChillMainBundle/ChillMainBundle.php | 1 - .../GroupingCenterCompilerPass.php | 37 ------------------- 2 files changed, 38 deletions(-) delete mode 100644 src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/GroupingCenterCompilerPass.php diff --git a/src/Bundle/ChillMainBundle/ChillMainBundle.php b/src/Bundle/ChillMainBundle/ChillMainBundle.php index 9fd6a9891..9e276311d 100644 --- a/src/Bundle/ChillMainBundle/ChillMainBundle.php +++ b/src/Bundle/ChillMainBundle/ChillMainBundle.php @@ -72,7 +72,6 @@ class ChillMainBundle extends Bundle $container->addCompilerPass(new NotificationCounterCompilerPass()); $container->addCompilerPass(new MenuCompilerPass()); $container->addCompilerPass(new ACLFlagsCompilerPass()); - $container->addCompilerPass(new GroupingCenterCompilerPass()); $container->addCompilerPass(new CRUDControllerCompilerPass()); $container->addCompilerPass(new ShortMessageCompilerPass()); } diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/GroupingCenterCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/GroupingCenterCompilerPass.php deleted file mode 100644 index f0c06564b..000000000 --- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/GroupingCenterCompilerPass.php +++ /dev/null @@ -1,37 +0,0 @@ -hasDefinition('chill.main.form.pick_centers_type')) { - throw new LogicException('The service chill.main.form.pick_centers_type does ' - . 'not exists in container'); - } - - $pickCenterType = $container->getDefinition('chill.main.form.pick_centers_type'); - - foreach ($container->findTaggedServiceIds('chill.grouping_center') as $serviceId => $tagged) { - $pickCenterType->addMethodCall( - 'addGroupingCenter', - [new Reference($serviceId)] - ); - } - } -} From 73f332927db7215343ce8199658879079973b5a1 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 2 Mar 2023 11:45:41 +0100 Subject: [PATCH 06/17] FIX [personMatcher] wrong syntax was used to setParameter for query in similar person matcher --- .../Search/SimilarPersonMatcher.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php b/src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php index b8209eaeb..6555f7835 100644 --- a/src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php +++ b/src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php @@ -79,6 +79,11 @@ class SimilarPersonMatcher ->where('SIMILARITY(p.fullnameCanonical, UNACCENT(LOWER(:fullName))) >= :precision') ->andWhere($qb->expr()->in('p.center', ':centers')); + $qb + ->setParameter('fullName', $this->personRender->renderString($person, [])) + ->setParameter('centers', $centers) + ->setParameter('precision', $precision); + if (null !== $person->getBirthdate()) { $qb->andWhere($qb->expr()->orX( $qb->expr()->eq('p.birthdate', ':personBirthdate'), @@ -90,13 +95,13 @@ class SimilarPersonMatcher if ($person->getId() !== null) { $qb->andWhere($qb->expr()->neq('p.id', ':personId')); - $query->setParameter('personId', $person->getId()); + $qb->setParameter('personId', $person->getId()); $notDuplicatePersons = $this->personNotDuplicateRepository->findNotDuplicatePerson($person); if (count($notDuplicatePersons)) { $qb->andWhere($qb->expr()->notIn('p.id', ':notDuplicatePersons')); - $query->setParameter('notDuplicatePersons', $notDuplicatePersons); + $qb->setParameter('notDuplicatePersons', $notDuplicatePersons); } } @@ -109,13 +114,10 @@ class SimilarPersonMatcher case self::SIMILAR_SEARCH_ORDER_BY_SIMILARITY: default: $qb->orderBy('SIMILARITY(p.fullnameCanonical, UNACCENT(LOWER(:fullName)))', 'DESC'); + $qb->setParameter('fullName', $this->personRender->renderString($person, [])); } - $qb - ->setParameter('fullName', $this->personRender->renderString($person, [])) - ->setParameter('centers', $centers) - ->setParameter('precision', $precision); - + dump($qb->getQuery()); return $qb->getQuery()->getResult(); } } From ac4c82129093d37c6fe840e1224e037e64bddff1 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 15 Feb 2023 20:08:04 +0100 Subject: [PATCH 07/17] FEATURE [profession] change field type of profession into string --- .../Entity/ThirdParty.php | 13 ++++----- .../migrations/Version20230215175150.php | 29 +++++++++++++++++++ 2 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 src/Bundle/ChillThirdPartyBundle/migrations/Version20230215175150.php diff --git a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php index 2e8cebfb6..43f053c77 100644 --- a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php +++ b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php @@ -250,14 +250,11 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface /** * [fr] Qualité. - * - * @var ThirdPartyProfession - * @ORM\ManyToOne(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdPartyProfession") - * ORM\JoinColumn(name="profession", referencedColumnName="id", nullable=true) + * @ORM\Column(name="profession", type="string", length=255, nullable=false) * @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"}) * @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"}) */ - private ?ThirdPartyProfession $profession = null; + private string $profession = ''; /** * @ORM\Column(name="telephone", type="phone_number", nullable=true) @@ -491,9 +488,9 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface } /** - * @return ThirdPartyProfession + * @return string */ - public function getProfession(): ?ThirdPartyProfession + public function getProfession(): string { return $this->profession; } @@ -811,7 +808,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface /** * @return $this */ - public function setProfession(?ThirdPartyProfession $profession): ThirdParty + public function setProfession(string $profession): self { $this->profession = $profession; diff --git a/src/Bundle/ChillThirdPartyBundle/migrations/Version20230215175150.php b/src/Bundle/ChillThirdPartyBundle/migrations/Version20230215175150.php new file mode 100644 index 000000000..b87e722b4 --- /dev/null +++ b/src/Bundle/ChillThirdPartyBundle/migrations/Version20230215175150.php @@ -0,0 +1,29 @@ +addSql('ALTER TABLE chill_3party.third_party ADD profession VARCHAR(255) DEFAULT \'\' NOT NULL'); + +// $this->addSql('ALTER TABLE chill_3party.third_party DROP profession_id'); + } + + public function down(Schema $schema): void + { +// $this->addSql('ALTER TABLE chill_3party.third_party ADD profession_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE chill_3party.third_party DROP profession'); + } +} From bea839663f022736f4292f92c40ee72c903f6c60 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 15 Feb 2023 20:08:53 +0100 Subject: [PATCH 08/17] FEATURE [form] adjust symfony form to use text type --- .../ChillThirdPartyBundle/Form/ThirdPartyType.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php index 79f107575..384c743c2 100644 --- a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php +++ b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php @@ -20,14 +20,10 @@ use Chill\MainBundle\Form\Type\PickCivilityType; use Chill\MainBundle\Security\Authorization\AuthorizationHelper; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\ThirdPartyBundle\Entity\ThirdParty; -use Chill\ThirdPartyBundle\Entity\ThirdPartyProfession; use Chill\ThirdPartyBundle\Form\Type\PickThirdPartyTypeCategoryType; use Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter; use Chill\ThirdPartyBundle\ThirdPartyType\ThirdPartyTypeManager; use Doctrine\ORM\EntityManagerInterface; -use Doctrine\ORM\EntityRepository; -use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; @@ -111,17 +107,8 @@ class ThirdPartyType extends AbstractType 'placeholder' => 'thirdparty.choose civility', 'required' => false, ]) - ->add('profession', EntityType::class, [ + ->add('profession', TextType::class, [ 'label' => 'thirdparty.Profession', - 'class' => ThirdPartyProfession::class, - 'choice_label' => function (ThirdPartyProfession $profession): string { - return $this->translatableStringHelper->localize($profession->getName()); - }, - 'query_builder' => static function (EntityRepository $er): QueryBuilder { - return $er->createQueryBuilder('p') - ->where('p.active = true'); - }, - 'placeholder' => 'thirdparty.choose profession', 'required' => false, ]) ->add('contactDataAnonymous', CheckboxType::class, [ From e50b02a8c7c73c030ca07a493fa3aa9a2946e5ce Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 22 Feb 2023 17:56:28 +0100 Subject: [PATCH 09/17] FIX [rendering] adjust vue components to correctly render profession string --- .../public/vuejs/_components/AddPersons/TypeThirdParty.vue | 2 +- .../public/vuejs/_components/Entity/ThirdPartyRenderBox.vue | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue index 0c8251e4a..7fb77226d 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue @@ -1,7 +1,7 @@