diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e12a54d4..0661724f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to * AddPersons: remove ul-li html tags from AddPersons (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/419) +* [person] Order social issues by the field "ordering" (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/388) * [Person/Household list] when listing other simultaneous members of an household, exclude the members on person, not on members (avoid to show two membersship with the same person) ## Test releases @@ -36,7 +37,7 @@ and this project adheres to * [Household]: Add end date in HouseholdMember form for 'enfant hors menage' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/434) * [homepage_widget]: If no sender then display as 'notification automatique' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/435) * [parcours]: Order social activities and only display most recent three in parcours resumé (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/481) -* [3party]: 3party: redirect to parent when contact (child) is opened in view page +* [3party]: 3party: redirect to parent when contact (child) is opened in view page * [parcours / addresses]: launch an event when a person change address (either through changing household or because the household is associated to a new address). If the person is localising a course, the course location go back to a temporarily address. * Creation of PickCivilityType, and implementation in PersonType and ThirdpartyType diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 33107d40b..392b3026a 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + 'ChillActivityBundle:ActivityReasonCategory' @@ -47,6 +47,11 @@ Activity[]|array + + + AppKernel + + require __DIR__ . '/../../../../../vendor/autoload.php' @@ -164,72 +169,18 @@ type - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - public function setUp() - \Chill\PersonBundle\Export\Filter\PersonHavingActivityBetweenDateFilter - - - public function setUp() - - - - public function setUp() - Prophecy\Prophet - - - public function setUp() - - - - public function setUp() - type @@ -254,11 +205,6 @@ $asideActivityCategory - - - public function setUp() - - $calculator::getAlias() @@ -288,11 +234,6 @@ 'ChillCalendarBundle:Calendar' - - - public function setUp() - - 'ChillCustomFieldsBundle:CustomFieldsGroup' @@ -397,10 +338,6 @@ - - public function setUp() - public function tearDown() - type type @@ -408,61 +345,6 @@ type - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - - - - - 'ChillDocStoreBundle:AccompanyingCourseDocument' - - 'ChillDocStoreBundle:DocumentCategory' @@ -470,11 +352,6 @@ 'ChillDocStoreBundle:DocumentCategory' - - - 'ChillDocStoreBundle:PersonDocument' - - \Chill\PersonBundle\Entity\user @@ -570,9 +447,6 @@ type - - public function setUp() - 'ChillEventBundle:Event' 'ChillEventBundle:Event' @@ -588,10 +462,6 @@ - - public function setUp() - public function tearDown() - 'ChillMainBundle:Scope' @@ -891,11 +761,6 @@ OptionsResolverInterface - - - \Symfony\Component\Mailer\Exception\TransportExceptionInterface - - $current @@ -924,11 +789,6 @@ $onlyEnabled - - - AppKernel - - require __DIR__ . '/../../../../../vendor/autoload.php' @@ -1056,158 +916,15 @@ - - public function setUp() - type - - - public function setUp() - - - - - public function setUp() - - - - - protected function tearDown() - public function setUp() - - - - - public function setUp() - public function tearDown() - - - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - Prophecy\Prophet - - - - - CenterType - - - CenterType - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - public function setUp() - unknown - - - public function setUp() - - - - - public function setUp() - - - - - protected function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - protected function setUp() - - - - - public function setUp() - - - - - protected function setUp() - - unknown @@ -1412,20 +1129,6 @@ OptionsResolverInterface - - - $qb - $qb - $qb - QueryBuilder - SocialAction - SocialAction - - - $action - $orderBy - - AppKernel @@ -1505,33 +1208,13 @@ - - public function setUp() - public static function setUpBeforeClass() - AccompanyingPeriodRepository stdClass - - - public function setUp() - public static function setUpBeforeClass() - - - - - public function setUp() - - - - public function setUp() - public function tearDown() - public static function setUpBeforeClass() - 'ChillMainBundle:Center' 'ChillPersonBundle:AccompanyingPeriod\ClosingMotive' @@ -1543,40 +1226,19 @@ - - protected function tearDown() - User - - - protected function setUp() - - $this - - public function setUp() - public static function setUpBeforeClass() - 'ChillPersonBundle:Person' - - - public static function tearDownAfterClass() - - - - public function setUp() - public function tearDown() - 'ChillMainBundle:Country' 'ChillPersonBundle:Person' @@ -1586,140 +1248,25 @@ - - public function setUp() - public function tearDown() - 'ChillMainBundle:Country' 'ChillPersonBundle:Person' - - public function setUp() - public function tearDown() - 'ChillPersonBundle:Person' - - public function setUp() - public function tearDown() - 'ChillPersonBundle:Person' - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - $participationL - - getEndDate - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - protected function setUp() - - - - - public function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - @@ -1820,20 +1367,13 @@ require __DIR__ . '/../../../../../vendor/autoload.php' - - - public function setUp() - - type - - public function setUp() - public static function setUpBeforeClass() - - + + $client + $client $client $client $client @@ -1865,16 +1405,7 @@ type - - - Exception - - - - public function setUp() - public static function setUpBeforeClass() - type type @@ -1882,10 +1413,6 @@ - - public function setUp() - public function tearDown() - 'ChillCustomFieldsBundle:CustomFieldsGroup' @@ -1958,11 +1485,6 @@ CacheItempPoolInterface - - - protected function setUp() - - $taggedService->getClass()::getKey() @@ -1988,11 +1510,6 @@ $thirdParty - - - protected function setUp() - - $object diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/Create.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/Create.vue index 061d728a0..dcc12bc5f 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/Create.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/Create.vue @@ -78,11 +78,13 @@ export default { case 'thirdparty': let data = this.$refs.castThirdparty.$data.thirdparty; data.name = data.text; - if (data.address !== null) { + /* + if (data.address !== undefined && data.address !== null) { data.address = { id: data.address.address_id } } else { data.address = null; } + */ return data; default: diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialIssueApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialIssueApiController.php index d154c8e2e..fc11f7f52 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialIssueApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialIssueApiController.php @@ -12,12 +12,9 @@ declare(strict_types=1); namespace Chill\PersonBundle\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; -use Chill\MainBundle\Doctrine\ORM\Hydration\FlatHierarchyEntityHydrator; use Chill\MainBundle\Pagination\PaginatorInterface; use DateTimeImmutable; -use Doctrine\ORM\Query; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; class SocialIssueApiController extends ApiController { @@ -32,22 +29,10 @@ class SocialIssueApiController extends ApiController $query->setParameter('now', new DateTimeImmutable()); } - protected function getQueryResult(string $action, Request $request, string $_format, int $totalItems, PaginatorInterface $paginator, $query) + protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator, $_format) { - // In order to work, this hydrator only works with - // entities having the field "children" set up. - return $query - ->getQuery() - ->setHint(Query::HINT_INCLUDE_META_COLUMNS, true) - ->getResult(FlatHierarchyEntityHydrator::LIST); - } + $query->addOrderBy('e.ordering', 'ASC'); - protected function onPostIndexBuildQuery(string $action, Request $request, string $_format, int $totalItems, PaginatorInterface $paginator, $query): ?Response - { - $query - ->orderBy('GET_JSON_FIELD_BY_KEY(e.title, :locale)', 'ASC') - ->setParameter(':locale', $request->getLocale()); - - return null; + return $query; } } diff --git a/src/Bundle/ChillPersonBundle/config/services/controller.yaml b/src/Bundle/ChillPersonBundle/config/services/controller.yaml index 421e13e93..22d58ccbe 100644 --- a/src/Bundle/ChillPersonBundle/config/services/controller.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/controller.yaml @@ -66,3 +66,4 @@ services: Chill\PersonBundle\Controller\RelationshipApiController: autowire: true tags: ['controller.service_arguments'] +