mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge remote-tracking branch 'origin/master' into workflow/fixes-2022-02
This commit is contained in:
commit
06c279627a
19
CHANGELOG.md
19
CHANGELOG.md
@ -14,7 +14,9 @@ and this project adheres to
|
||||
* [docstore] Add an API entrypoint for StoredObject (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/466)
|
||||
* [person] Add the possibility of uploading existing documents to AccPeriodWorkEvaluationDocument (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/466)
|
||||
* [person] Add title to AccPeriodWorkEvaluationDocument (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/466)
|
||||
|
||||
* [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)
|
||||
* [Person] Display suffixText in RenderPerson, PersonText.vue, RenderPersonBox.vue (was made for displaying "enfant confie") (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/441)
|
||||
|
||||
## Test releases
|
||||
|
||||
@ -30,6 +32,7 @@ and this project adheres to
|
||||
* [person]: AddPersons: add suggestion of name when creating new person or thirdparty (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/422)
|
||||
* [main] Address: fix small bug: when modifying an address without street (isNoAddress), also check errors if street is an empty string as back-end change null value to empty string for street (and streetNumber)
|
||||
* [main] Address: stronger client-side validation of addresses (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/449)
|
||||
* [thirdparty] Add a contact to a thirdparty from within onTheFly (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/345)
|
||||
* [person] accompanying course: filter suggested entities by open participations (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/415)
|
||||
[activity] can click through the cross icon for removing person in concerned group (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/476)
|
||||
[activity] correct associated persons by considering only open participations (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/476)
|
||||
@ -40,6 +43,8 @@ and this project adheres to
|
||||
* [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
|
||||
* [renderbox]: Fix display of address (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/462)
|
||||
* [renderbox]: Add email in personRenderBox, this was not yet displayed.
|
||||
|
||||
### test release 2022-02-14
|
||||
|
||||
@ -86,7 +91,19 @@ and this project adheres to
|
||||
* [AddAddress] disable multiselect search, and rely only on most pertinent Cities and Street computed backend
|
||||
* [fast_actions] improve fast-actions buttons override mechanism, fix https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/413
|
||||
* [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc.
|
||||
* [thirdparty] Add a contact to a thirdparty from within onTheFly (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/345)
|
||||
|
||||
|
||||
## Test releases
|
||||
=======
|
||||
* [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc.
|
||||
>>>>>>> issue422_and_others_on_AddPersons
|
||||
|
||||
=======
|
||||
* [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc.
|
||||
* [thirdparty] Add a contact to a thirdparty from within onTheFly (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/345)
|
||||
|
||||
>>>>>>> b0d50d315c8e00959a967badac9cf5057ab2b4bc
|
||||
### test release 2021-01-31
|
||||
|
||||
* [person] accompanying course: optimisation: do not fetch some resources for the banner (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/409)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<files psalm-version="v4.15.0@a1b5e489e6fcebe40cb804793d964e99fc347820">
|
||||
<files psalm-version="4.18.0.0">
|
||||
<file src="src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php">
|
||||
<UndefinedClass occurrences="4">
|
||||
<code>'ChillActivityBundle:ActivityReasonCategory'</code>
|
||||
@ -47,6 +47,11 @@
|
||||
<code>Activity[]|array</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/AppKernel.php">
|
||||
<DuplicateClass occurrences="1">
|
||||
<code>AppKernel</code>
|
||||
</DuplicateClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/autoload.php">
|
||||
<MissingFile occurrences="1">
|
||||
<code>require __DIR__ . '/../../../../../vendor/autoload.php'</code>
|
||||
@ -164,72 +169,18 @@
|
||||
<code>type</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Export/CountActivityTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Export/ListActivityTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Export/StatActivityDurationSumTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedDocblockClass occurrences="1">
|
||||
<code>\Chill\PersonBundle\Export\Filter\PersonHavingActivityBetweenDateFilter</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityReasonTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<TooFewArguments occurrences="2"/>
|
||||
<UndefinedDocblockClass occurrences="1">
|
||||
<code>Prophecy\Prophet</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedDocblockClass occurrences="1">
|
||||
<code>type</code>
|
||||
</UndefinedDocblockClass>
|
||||
@ -254,11 +205,6 @@
|
||||
<code>$asideActivityCategory</code>
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php">
|
||||
<InvalidStaticInvocation occurrences="3">
|
||||
<code>$calculator::getAlias()</code>
|
||||
@ -288,11 +234,6 @@
|
||||
<code>'ChillCalendarBundle:Calendar'</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>'ChillCustomFieldsBundle:CustomFieldsGroup'</code>
|
||||
@ -397,10 +338,6 @@
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php">
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public function tearDown()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedDocblockClass occurrences="4">
|
||||
<code>type</code>
|
||||
<code>type</code>
|
||||
@ -408,61 +345,6 @@
|
||||
<code>type</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Encoder/DocGenEncoderTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>'ChillDocStoreBundle:AccompanyingCourseDocument'</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillDocStoreBundle/Controller/DocumentCategoryController.php">
|
||||
<UndefinedClass occurrences="3">
|
||||
<code>'ChillDocStoreBundle:DocumentCategory'</code>
|
||||
@ -470,11 +352,6 @@
|
||||
<code>'ChillDocStoreBundle:DocumentCategory'</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>'ChillDocStoreBundle:PersonDocument'</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillDocStoreBundle/Entity/Document.php">
|
||||
<UndefinedDocblockClass occurrences="1">
|
||||
<code>\Chill\PersonBundle\Entity\user</code>
|
||||
@ -570,9 +447,6 @@
|
||||
<InvalidParamDefault occurrences="1">
|
||||
<code>type</code>
|
||||
</InvalidParamDefault>
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedClass occurrences="8">
|
||||
<code>'ChillEventBundle:Event'</code>
|
||||
<code>'ChillEventBundle:Event'</code>
|
||||
@ -588,10 +462,6 @@
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php">
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public function tearDown()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>'ChillMainBundle:Scope'</code>
|
||||
</UndefinedClass>
|
||||
@ -891,11 +761,6 @@
|
||||
<code>OptionsResolverInterface</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Notification/Mailer.php">
|
||||
<UndefinedDocblockClass occurrences="1">
|
||||
<code>\Symfony\Component\Mailer\Exception\TransportExceptionInterface</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Pagination/PageGenerator.php">
|
||||
<UndefinedVariable occurrences="1">
|
||||
<code>$current</code>
|
||||
@ -924,11 +789,6 @@
|
||||
<code>$onlyEnabled</code>
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/AppKernel.php">
|
||||
<DuplicateClass occurrences="1">
|
||||
<code>AppKernel</code>
|
||||
</DuplicateClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/autoload.php">
|
||||
<MissingFile occurrences="1">
|
||||
<code>require __DIR__ . '/../../../../../vendor/autoload.php'</code>
|
||||
@ -1056,158 +916,15 @@
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedDocblockClass occurrences="1">
|
||||
<code>type</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php">
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>protected function tearDown()</code>
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php">
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public function tearDown()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedDocblockClass occurrences="40">
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>$this->prophet</code>
|
||||
<code>Prophecy\Prophet</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Form/Type/PickCenterTypeTest.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>CenterType</code>
|
||||
</UndefinedClass>
|
||||
<UndefinedDocblockClass occurrences="1">
|
||||
<code>CenterType</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Pagination/PageTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Pagination/PaginatorTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Search/AbstractSearchTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedDocblockClass occurrences="1">
|
||||
<code>unknown</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php">
|
||||
<UndefinedDocblockClass occurrences="1">
|
||||
<code>unknown</code>
|
||||
@ -1412,20 +1129,6 @@
|
||||
<code>OptionsResolverInterface</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php">
|
||||
<UndefinedClass occurrences="6">
|
||||
<code>$qb</code>
|
||||
<code>$qb</code>
|
||||
<code>$qb</code>
|
||||
<code>QueryBuilder</code>
|
||||
<code>SocialAction</code>
|
||||
<code>SocialAction</code>
|
||||
</UndefinedClass>
|
||||
<UndefinedVariable occurrences="2">
|
||||
<code>$action</code>
|
||||
<code>$orderBy</code>
|
||||
</UndefinedVariable>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Resources/test/Fixtures/App/app/AppKernel.php">
|
||||
<DuplicateClass occurrences="1">
|
||||
<code>AppKernel</code>
|
||||
@ -1505,33 +1208,13 @@
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php">
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public static function setUpBeforeClass()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedClass occurrences="2">
|
||||
<code>AccompanyingPeriodRepository</code>
|
||||
<code>stdClass</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php">
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public static function setUpBeforeClass()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php">
|
||||
<InvalidThrow occurrences="1"/>
|
||||
<MethodSignatureMismatch occurrences="3">
|
||||
<code>public function setUp()</code>
|
||||
<code>public function tearDown()</code>
|
||||
<code>public static function setUpBeforeClass()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedClass occurrences="3">
|
||||
<code>'ChillMainBundle:Center'</code>
|
||||
<code>'ChillPersonBundle:AccompanyingPeriod\ClosingMotive'</code>
|
||||
@ -1543,40 +1226,19 @@
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function tearDown()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>User</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php">
|
||||
<InvalidScope occurrences="1">
|
||||
<code>$this</code>
|
||||
</InvalidScope>
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public static function setUpBeforeClass()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>'ChillPersonBundle:Person'</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public static function tearDownAfterClass()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php">
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public function tearDown()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedClass occurrences="2">
|
||||
<code>'ChillMainBundle:Country'</code>
|
||||
<code>'ChillPersonBundle:Person'</code>
|
||||
@ -1586,140 +1248,25 @@
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php">
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public function tearDown()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedClass occurrences="2">
|
||||
<code>'ChillMainBundle:Country'</code>
|
||||
<code>'ChillPersonBundle:Person'</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php">
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public function tearDown()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>'ChillPersonBundle:Person'</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php">
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public function tearDown()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>'ChillPersonBundle:Person'</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/SocialIssueApiControllerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php">
|
||||
<AssignmentToVoid occurrences="1">
|
||||
<code>$participationL</code>
|
||||
</AssignmentToVoid>
|
||||
<NullReference occurrences="1">
|
||||
<code>getEndDate</code>
|
||||
</NullReference>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AgeAggregatorTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/GenderAggregatorTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/NationalityAggregatorTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodFilterTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Filter/BirthdayFilterTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Filter/GenderFilterTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
@ -1820,20 +1367,13 @@
|
||||
<code>require __DIR__ . '/../../../../../vendor/autoload.php'</code>
|
||||
</MissingFile>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>public function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php">
|
||||
<InvalidParamDefault occurrences="1">
|
||||
<code>type</code>
|
||||
</InvalidParamDefault>
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public static function setUpBeforeClass()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedDocblockClass occurrences="29">
|
||||
<UndefinedDocblockClass occurrences="31">
|
||||
<code>$client</code>
|
||||
<code>$client</code>
|
||||
<code>$client</code>
|
||||
<code>$client</code>
|
||||
<code>$client</code>
|
||||
@ -1865,16 +1405,7 @@
|
||||
<code>type</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillReportBundle/Tests/DependencyInjection/ChillReportExtensionTest.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>Exception</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php">
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public static function setUpBeforeClass()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedDocblockClass occurrences="3">
|
||||
<code>type</code>
|
||||
<code>type</code>
|
||||
@ -1882,10 +1413,6 @@
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php">
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public function tearDown()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>'ChillCustomFieldsBundle:CustomFieldsGroup'</code>
|
||||
</UndefinedClass>
|
||||
@ -1958,11 +1485,6 @@
|
||||
<code>CacheItempPoolInterface</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillThirdPartyBundle/DependencyInjection/CompilerPass/ThirdPartyTypeCompilerPass.php">
|
||||
<UndefinedClass occurrences="1">
|
||||
<code>$taggedService->getClass()::getKey()</code>
|
||||
@ -1988,11 +1510,6 @@
|
||||
<code>$thirdParty</code>
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyJsonDenormalizerTest.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>protected function setUp()</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php">
|
||||
<UndefinedDocblockClass occurrences="6">
|
||||
<code>$object</code>
|
||||
|
@ -22,7 +22,7 @@ use Chill\DocStoreBundle\Repository\DocumentCategoryRepository;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRender;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
@ -43,7 +43,7 @@ class ActivityContext implements
|
||||
|
||||
private NormalizerInterface $normalizer;
|
||||
|
||||
private PersonRender $personRender;
|
||||
private PersonRenderInterface $personRender;
|
||||
|
||||
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||
|
||||
@ -54,7 +54,7 @@ class ActivityContext implements
|
||||
NormalizerInterface $normalizer,
|
||||
TranslatableStringHelperInterface $translatableStringHelper,
|
||||
EntityManagerInterface $em,
|
||||
PersonRender $personRender,
|
||||
PersonRenderInterface $personRender,
|
||||
TranslatorInterface $translator,
|
||||
BaseContextData $baseContextData
|
||||
) {
|
||||
|
@ -21,7 +21,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-10 col-xxl">
|
||||
<div class="document-list">
|
||||
<h1>{{ 'Documents' }}</h1>
|
||||
|
||||
{% if documents|length == 0 %}
|
||||
@ -29,7 +29,7 @@
|
||||
{% else %}
|
||||
<div class="flex-table chill-task-list">
|
||||
{% for document in documents %}
|
||||
{% include 'ChillDocStoreBundle:List:list_item.html.twig' %}
|
||||
{% include '@ChillDocStore/List/list_item.html.twig' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -29,7 +29,6 @@ use Chill\MainBundle\Security\ProvideRoleInterface;
|
||||
use Chill\MainBundle\Security\Resolver\CenterResolverInterface;
|
||||
use Chill\MainBundle\Security\Resolver\ScopeResolverInterface;
|
||||
use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface;
|
||||
use Chill\MainBundle\Templating\Entity\CompilerPass as RenderEntityCompilerPass;
|
||||
use Chill\MainBundle\Templating\UI\NotificationCounterInterface;
|
||||
use Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
@ -70,7 +69,6 @@ class ChillMainBundle extends Bundle
|
||||
$container->addCompilerPass(new MenuCompilerPass());
|
||||
$container->addCompilerPass(new ACLFlagsCompilerPass());
|
||||
$container->addCompilerPass(new GroupingCenterCompilerPass());
|
||||
$container->addCompilerPass(new RenderEntityCompilerPass());
|
||||
$container->addCompilerPass(new CRUDControllerCompilerPass());
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\CRUD\Controller\ApiController;
|
||||
use Chill\MainBundle\Pagination\PaginatorInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class CivilityApiController extends ApiController
|
||||
{
|
||||
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator, $_format)
|
||||
{
|
||||
return $query->addOrderBy('e.order', 'ASC');
|
||||
}
|
||||
}
|
@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\DependencyInjection;
|
||||
|
||||
use Chill\MainBundle\Controller\AddressApiController;
|
||||
use Chill\MainBundle\Controller\CivilityApiController;
|
||||
use Chill\MainBundle\Controller\LocationController;
|
||||
use Chill\MainBundle\Controller\LocationTypeController;
|
||||
use Chill\MainBundle\Controller\UserController;
|
||||
@ -559,6 +560,21 @@ class ChillMainExtension extends Extension implements
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'class' => \Chill\MainBundle\Entity\Civility::class,
|
||||
'name' => 'civility',
|
||||
'base_path' => '/api/1.0/main/civility',
|
||||
'base_role' => 'ROLE_USER',
|
||||
'controller' => CivilityApiController::class,
|
||||
'actions' => [
|
||||
'_index' => [
|
||||
'methods' => [
|
||||
Request::METHOD_GET => true,
|
||||
Request::METHOD_HEAD => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
/**
|
||||
* @ORM\Table(name="chill_main_civility")
|
||||
* @ORM\Entity
|
||||
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={"chill_main_civility": Civility::class})
|
||||
*/
|
||||
class Civility
|
||||
{
|
||||
@ -29,6 +30,7 @@ class Civility
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private bool $active = true;
|
||||
|
||||
|
@ -72,7 +72,7 @@ section.chill-entity {
|
||||
}
|
||||
}
|
||||
p {
|
||||
display: inline-block;
|
||||
// display: inline-block;
|
||||
margin: 0 0 0 1.5em;
|
||||
text-indent: -1.5em;
|
||||
|
||||
|
@ -77,8 +77,7 @@ export default {
|
||||
return this.$refs.castPerson.$data.person;
|
||||
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;
|
||||
|
@ -18,7 +18,8 @@
|
||||
@close="modal.showModal = false">
|
||||
|
||||
<template v-slot:header>
|
||||
<h3 class="modal-title">{{ $t(titleModal) }}</h3>
|
||||
<h3 v-if="parent" class="modal-title">{{ $t(titleModal, {q: parent.text}) }}</h3>
|
||||
<h3 v-else class="modal-title">{{ $t(titleModal) }}</h3>
|
||||
</template>
|
||||
|
||||
<template v-slot:body v-if="type === 'person'">
|
||||
@ -29,10 +30,10 @@
|
||||
ref="castPerson">
|
||||
</on-the-fly-person>
|
||||
<div v-if="hasResourceComment">
|
||||
<h3>{{ $t('onthefly.resource_comment_title') }}</h3>
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ parent.comment }}
|
||||
</blockquote>
|
||||
<h3>{{ $t('onthefly.resource_comment_title') }}</h3>
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ parent.comment }}
|
||||
</blockquote>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -44,13 +45,22 @@
|
||||
ref="castThirdparty">
|
||||
</on-the-fly-thirdparty>
|
||||
<div v-if="hasResourceComment">
|
||||
<h3>{{ $t('onthefly.resource_comment_title') }}</h3>
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ parent.comment }}
|
||||
</blockquote>
|
||||
<h3>{{ $t('onthefly.resource_comment_title') }}</h3>
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ parent.comment }}
|
||||
</blockquote>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:body v-else-if="parent">
|
||||
<on-the-fly-thirdparty
|
||||
:parent="parent"
|
||||
:action="action"
|
||||
type="thirdparty"
|
||||
ref="castThirdparty">
|
||||
</on-the-fly-thirdparty>
|
||||
</template>
|
||||
|
||||
<template v-slot:body v-else>
|
||||
<on-the-fly-create
|
||||
:action="action"
|
||||
@ -83,6 +93,7 @@ import Modal from 'ChillMainAssets/vuejs/_components/Modal.vue';
|
||||
import OnTheFlyCreate from './Create.vue';
|
||||
import OnTheFlyPerson from 'ChillPersonAssets/vuejs/_components/OnTheFly/Person.vue';
|
||||
import OnTheFlyThirdparty from 'ChillThirdPartyAssets/vuejs/_components/OnTheFly/ThirdParty.vue';
|
||||
import { postThirdparty } from "ChillThirdPartyAssets/vuejs/_api/OnTheFly";
|
||||
|
||||
export default {
|
||||
name: 'OnTheFly',
|
||||
@ -105,11 +116,11 @@ export default {
|
||||
computed: {
|
||||
hasResourceComment() {
|
||||
//console.log('hasResourceComment', this.parent);
|
||||
return (typeof this.parent !== 'undefined' && this.parent !== null)
|
||||
&& this.action === 'show'
|
||||
&& this.parent.type === 'accompanying_period_resource'
|
||||
&& (this.parent.comment !== null && this.parent.comment !== '')
|
||||
;
|
||||
return (typeof this.parent !== 'undefined' && this.parent !== null)
|
||||
&& this.action === 'show'
|
||||
&& this.parent.type === 'accompanying_period_resource'
|
||||
&& (this.parent.comment !== null && this.parent.comment !== '')
|
||||
;
|
||||
},
|
||||
classAction() {
|
||||
switch (this.action) {
|
||||
@ -119,6 +130,8 @@ export default {
|
||||
return 'btn-update';
|
||||
case 'create':
|
||||
return 'btn-create';
|
||||
case 'addContact':
|
||||
return 'btn-tpchild';
|
||||
}
|
||||
},
|
||||
titleAction() {
|
||||
@ -129,6 +142,8 @@ export default {
|
||||
return 'action.edit';
|
||||
case 'create':
|
||||
return 'action.create';
|
||||
case 'addContact':
|
||||
return 'action.addContact';
|
||||
}
|
||||
},
|
||||
titleCreate() {
|
||||
@ -146,6 +161,8 @@ export default {
|
||||
return 'onthefly.edit.' + this.type;
|
||||
case 'create':
|
||||
return this.titleCreate;
|
||||
case 'addContact':
|
||||
return 'onthefly.addContact.title';
|
||||
}
|
||||
},
|
||||
titleMessage() {
|
||||
@ -179,8 +196,8 @@ export default {
|
||||
this.modal.showModal = false;
|
||||
},
|
||||
openModal() {
|
||||
//console.log('## OPEN ON THE FLY MODAL');
|
||||
//console.log('## type:', this.type, ', action:', this.action);
|
||||
// console.log('## OPEN ON THE FLY MODAL');
|
||||
// console.log('## type:', this.type, ', action:', this.action);
|
||||
this.modal.showModal = true;
|
||||
this.$nextTick(function() {
|
||||
//this.$refs.search.focus();
|
||||
@ -190,7 +207,7 @@ export default {
|
||||
this.$data.action = action;
|
||||
},
|
||||
saveAction() {
|
||||
console.log('saveAction button: create/edit action with', this.type);
|
||||
// console.log('saveAction button: create/edit action with', this.type);
|
||||
let
|
||||
type = this.type,
|
||||
data = {} ;
|
||||
@ -202,17 +219,28 @@ export default {
|
||||
|
||||
case 'thirdparty':
|
||||
data = this.$refs.castThirdparty.$data.thirdparty;
|
||||
/* never executed ? */
|
||||
break;
|
||||
|
||||
default:
|
||||
if (typeof this.type === 'undefined') { // action=create
|
||||
type = this.$refs.castNew.radioType;
|
||||
data = this.$refs.castNew.castDataByType();
|
||||
if (typeof this.type === 'undefined') { // action=create or addContact
|
||||
console.log('will rewrite data');
|
||||
if (this.action === 'addContact') {
|
||||
type = 'thirdparty'
|
||||
data = this.$refs.castThirdparty.$data.thirdparty;
|
||||
console.log('data original', data);
|
||||
data.parent = {type: "thirdparty", id: this.parent.id};
|
||||
} else {
|
||||
type = this.$refs.castNew.radioType;
|
||||
data = this.$refs.castNew.castDataByType();
|
||||
console.log(data)
|
||||
}
|
||||
} else {
|
||||
throw 'error with object type';
|
||||
}
|
||||
}
|
||||
|
||||
console.log('type', type);
|
||||
console.log('data', data);
|
||||
// pass datas to parent
|
||||
this.$emit('saveFormOnTheFly', { type: type, data: data });
|
||||
},
|
||||
@ -232,4 +260,8 @@ export default {
|
||||
a {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* .btn-add-contact {
|
||||
background-color: pink;
|
||||
} */
|
||||
</style>
|
||||
|
@ -21,7 +21,13 @@ const ontheflyMessages = {
|
||||
person: "un nouvel usager",
|
||||
thirdparty: "un nouveau tiers professionnel"
|
||||
},
|
||||
resource_comment_title: "Un commentaire est associé à cet interlocuteur"
|
||||
addContact: {
|
||||
title: "Créer un contact pour {q}"
|
||||
},
|
||||
resource_comment_title: "Un commentaire est associé à cet interlocuteur",
|
||||
addContact: {
|
||||
title: "Créer un contact pour {q}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,8 @@ const messages = {
|
||||
person: "Quitter la page et ouvrir la fiche de l'usager",
|
||||
thirdparty: "Quitter la page et voir le tiers",
|
||||
},
|
||||
refresh: 'Rafraîchir'
|
||||
refresh: 'Rafraîchir',
|
||||
addContact: 'Ajouter un contact'
|
||||
},
|
||||
nav: {
|
||||
next: "Suivant",
|
||||
|
@ -25,21 +25,17 @@ class ChillEntityRenderExtension extends AbstractExtension
|
||||
protected $defaultRender;
|
||||
|
||||
/**
|
||||
* @var ChillEntityRenderInterface
|
||||
* @var iterable|ChillEntityRenderInterface[]
|
||||
*/
|
||||
protected $renders = [];
|
||||
|
||||
/**
|
||||
* ChillEntityRenderExtension constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
public function __construct(iterable $renders)
|
||||
{
|
||||
$this->defaultRender = new ChillEntityRender();
|
||||
}
|
||||
|
||||
public function addRender(ChillEntityRenderInterface $render)
|
||||
{
|
||||
$this->renders[] = $render;
|
||||
$this->renders = $renders;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Templating\Entity;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
/**
|
||||
* Add service tagged with `chill.render_entity` to appropriate service.
|
||||
*/
|
||||
class CompilerPass implements CompilerPassInterface
|
||||
{
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
$extension = $container->getDefinition(ChillEntityRenderExtension::class);
|
||||
|
||||
foreach ($container->findTaggedServiceIds('chill.render_entity') as $id => $tags) {
|
||||
$extension->addMethodCall('addRender', [new Reference($id)]);
|
||||
}
|
||||
}
|
||||
}
|
@ -788,6 +788,16 @@ paths:
|
||||
description: "accepted"
|
||||
403:
|
||||
description: "unauthorized"
|
||||
/1.0/main/civility.json:
|
||||
get:
|
||||
tags:
|
||||
- civility
|
||||
summary: Return all civility types
|
||||
responses:
|
||||
200:
|
||||
description: "ok"
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
/1.0/main/user-job.json:
|
||||
get:
|
||||
tags:
|
||||
|
@ -32,6 +32,8 @@ services:
|
||||
- { name: twig.extension }
|
||||
|
||||
Chill\MainBundle\Templating\Entity\ChillEntityRenderExtension:
|
||||
arguments:
|
||||
$renders: !tagged_iterator chill.render_entity
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
|
@ -356,6 +356,7 @@ By: Par
|
||||
For: Pour
|
||||
Created for: Créé pour
|
||||
Created by: Créé par
|
||||
Created on: Créé le
|
||||
|
||||
|
||||
# Workflows 💊
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ class Household
|
||||
$membership->getEndDate()
|
||||
)->filter(
|
||||
static function (HouseholdMember $m) use ($membership) {
|
||||
return $m !== $membership;
|
||||
return $m->getPerson() !== $membership->getPerson();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ use Chill\MainBundle\Form\Type\CommentType;
|
||||
use Chill\PersonBundle\Entity\Person\PersonResource;
|
||||
use Chill\PersonBundle\Entity\Person\PersonResourceKind;
|
||||
use Chill\PersonBundle\Form\Type\PickPersonDynamicType;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRender;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
|
||||
use Chill\PersonBundle\Templating\Entity\ResourceKindRender;
|
||||
use Chill\ThirdPartyBundle\Form\Type\PickThirdpartyDynamicType;
|
||||
use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender;
|
||||
@ -29,7 +29,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
final class PersonResourceType extends AbstractType
|
||||
{
|
||||
private PersonRender $personRender;
|
||||
private PersonRenderInterface $personRender;
|
||||
|
||||
private ResourceKindRender $resourceKindRender;
|
||||
|
||||
@ -37,7 +37,7 @@ final class PersonResourceType extends AbstractType
|
||||
|
||||
private TranslatorInterface $translator;
|
||||
|
||||
public function __construct(ResourceKindRender $resourceKindRender, PersonRender $personRender, ThirdPartyRender $thirdPartyRender, TranslatorInterface $translator)
|
||||
public function __construct(ResourceKindRender $resourceKindRender, PersonRenderInterface $personRender, ThirdPartyRender $thirdPartyRender, TranslatorInterface $translator)
|
||||
{
|
||||
$this->resourceKindRender = $resourceKindRender;
|
||||
$this->personRender = $personRender;
|
||||
|
@ -159,10 +159,10 @@ export default {
|
||||
.catch((error) => {
|
||||
if (error.name === 'ValidationException') {
|
||||
for (let v of error.violations) {
|
||||
this.$toast.open({message: v });
|
||||
this.$toast.open({message: v });
|
||||
}
|
||||
} else {
|
||||
this.$toast.open({message: 'An error occurred'});
|
||||
this.$toast.open({message: 'An error occurred'});
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -171,9 +171,7 @@ export default {
|
||||
body.name = payload.data.text;
|
||||
body.email = payload.data.email;
|
||||
body.telephone = payload.data.phonenumber;
|
||||
body.address = payload.data.address ? { id: payload.data.address.address_id } : null;
|
||||
|
||||
console.log('body', body)
|
||||
body.address = payload.data.address ? { id: payload.data.address.address_id } : null;
|
||||
|
||||
makeFetch('PATCH', `/api/1.0/thirdparty/thirdparty/${payload.data.id}.json`, body)
|
||||
.then(response => {
|
||||
@ -183,10 +181,10 @@ export default {
|
||||
.catch((error) => {
|
||||
if (error.name === 'ValidationException') {
|
||||
for (let v of error.violations) {
|
||||
this.$toast.open({message: v });
|
||||
this.$toast.open({message: v });
|
||||
}
|
||||
} else {
|
||||
this.$toast.open({message: 'An error occurred'});
|
||||
this.$toast.open({message: 'An error occurred'});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -57,6 +57,8 @@
|
||||
v-bind:item="item"
|
||||
v-bind:search="search"
|
||||
v-bind:type="checkUniq"
|
||||
@saveFormOnTheFly="saveFormOnTheFly"
|
||||
@newPriorSuggestion="newPriorSuggestion"
|
||||
@updateSelected="updateSelected">
|
||||
</person-suggestion>
|
||||
|
||||
@ -249,7 +251,7 @@ export default {
|
||||
}
|
||||
},
|
||||
newPriorSuggestion(entity) {
|
||||
console.log('newPriorSuggestion', entity);
|
||||
// console.log('newPriorSuggestion', entity);
|
||||
if (entity !== null) {
|
||||
let suggestion = {
|
||||
key: entity.type + entity.id,
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
<suggestion-third-party
|
||||
v-if="item.result.type === 'thirdparty'"
|
||||
@newPriorSuggestion="newPriorSuggestion"
|
||||
v-bind:item="item">
|
||||
</suggestion-third-party>
|
||||
|
||||
@ -26,10 +27,10 @@
|
||||
v-bind:item="item">
|
||||
</suggestion-user>
|
||||
|
||||
<suggestion-household
|
||||
v-if="item.result.type === 'household'"
|
||||
v-bind:item="item">
|
||||
</suggestion-household>
|
||||
<suggestion-household
|
||||
v-if="item.result.type === 'household'"
|
||||
v-bind:item="item">
|
||||
</suggestion-household>
|
||||
</label>
|
||||
|
||||
</div>
|
||||
@ -54,7 +55,7 @@ export default {
|
||||
'search',
|
||||
'type'
|
||||
],
|
||||
emits: ['updateSelected'],
|
||||
emits: ['updateSelected', 'newPriorSuggestion'],
|
||||
computed: {
|
||||
selected: {
|
||||
set(value) {
|
||||
@ -72,6 +73,9 @@ export default {
|
||||
methods: {
|
||||
setValueByType(value, type) {
|
||||
return (type === 'radio')? [value] : value;
|
||||
},
|
||||
newPriorSuggestion(response) {
|
||||
this.$emit('newPriorSuggestion', response)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2,12 +2,12 @@
|
||||
<div class="container tpartycontainer">
|
||||
<div class="tparty-identification">
|
||||
<span class="name">
|
||||
{{ item.result.text }}
|
||||
{{ item.result.text }}
|
||||
</span>
|
||||
<span class="location">
|
||||
<template v-if="hasAddress">
|
||||
{{ getAddress.text }} -
|
||||
{{ getAddress.postcode.name }}
|
||||
{{ getAddress.text }} -
|
||||
{{ getAddress.postcode.name }}
|
||||
</template>
|
||||
</span>
|
||||
</div>
|
||||
@ -19,21 +19,28 @@
|
||||
</div>
|
||||
|
||||
<div class="right_actions">
|
||||
<badge-entity
|
||||
:entity="item.result"
|
||||
:options="{ displayLong: true }">
|
||||
</badge-entity>
|
||||
<on-the-fly
|
||||
type="thirdparty"
|
||||
v-bind:id="item.result.id"
|
||||
action="show">
|
||||
</on-the-fly>
|
||||
<badge-entity
|
||||
:entity="item.result"
|
||||
:options="{ displayLong: true }">
|
||||
</badge-entity>
|
||||
<on-the-fly v-if="item.result.kind === 'company'"
|
||||
v-bind:parent="item.result"
|
||||
@saveFormOnTheFly="saveFormOnTheFly"
|
||||
action="addContact"
|
||||
ref="onTheFly"
|
||||
></on-the-fly>
|
||||
<on-the-fly
|
||||
type="thirdparty"
|
||||
v-bind:id="item.result.id"
|
||||
action="show">
|
||||
</on-the-fly>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OnTheFly from 'ChillMainAssets/vuejs/OnTheFly/components/OnTheFly.vue';
|
||||
import BadgeEntity from 'ChillMainAssets/vuejs/_components/BadgeEntity.vue';
|
||||
import { makeFetch } from 'ChillMainAssets/lib/api/apiMethods';
|
||||
|
||||
const i18n = {
|
||||
messages: {
|
||||
@ -48,36 +55,56 @@ const i18n = {
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'SuggestionThirdParty',
|
||||
components: {
|
||||
OnTheFly,
|
||||
BadgeEntity
|
||||
},
|
||||
props: ['item'],
|
||||
i18n,
|
||||
computed: {
|
||||
hasAddress() {
|
||||
if (this.$props.item.result.address !== null) {
|
||||
return true;
|
||||
}
|
||||
if (this.$props.item.result.parent !== null) {
|
||||
this.$props.item.result.parent.address !== null;
|
||||
}
|
||||
},
|
||||
hasParent() {
|
||||
return this.$props.item.result.parent !== null;
|
||||
},
|
||||
getAddress() {
|
||||
if (this.$props.item.result.address !== null) {
|
||||
return this.$props.item.result.address;
|
||||
}
|
||||
if (this.$props.item.result.parent.address !== null) {
|
||||
return this.$props.item.result.parent.address;
|
||||
}
|
||||
name: 'SuggestionThirdParty',
|
||||
components: {
|
||||
OnTheFly,
|
||||
BadgeEntity
|
||||
},
|
||||
props: ['item'],
|
||||
emits: ['newPriorSuggestion'],
|
||||
i18n,
|
||||
computed: {
|
||||
hasAddress() {
|
||||
if (this.$props.item.result.address !== null) {
|
||||
return true;
|
||||
}
|
||||
if (this.$props.item.result.parent !== null) {
|
||||
this.$props.item.result.parent.address !== null;
|
||||
}
|
||||
},
|
||||
hasParent() {
|
||||
return this.$props.item.result.parent !== null;
|
||||
},
|
||||
getAddress() {
|
||||
if (this.$props.item.result.address !== null) {
|
||||
return this.$props.item.result.address;
|
||||
}
|
||||
if (this.$props.item.result.parent.address !== null) {
|
||||
return this.$props.item.result.parent.address;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
saveFormOnTheFly({data, type}) {
|
||||
makeFetch('POST', '/api/1.0/thirdparty/thirdparty.json', data)
|
||||
.then(response => {
|
||||
this.$emit('newPriorSuggestion', response);
|
||||
this.$refs.onTheFly.closeModal();
|
||||
})
|
||||
.catch((error) => {
|
||||
if (error.name === 'ValidationException') {
|
||||
for (let v of error.violations) {
|
||||
this.$toast.open({message: v });
|
||||
}
|
||||
} else {
|
||||
this.$toast.open({message: 'An error occurred'});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
<!-- use person-text here to avoid code duplication ? TODO -->
|
||||
<span class="firstname">{{ person.firstName }}</span>
|
||||
<span class="lastname">{{ person.lastName }}</span>
|
||||
<span v-if="person.suffixText" class="suffixtext"> {{ person.suffixText }}</span>
|
||||
<span v-if="person.altNames && options.addAltNames == true" class="altnames">
|
||||
<span :class="'altname altname-' + altNameKey">{{ altNameLabel }}</span>
|
||||
</span>
|
||||
@ -20,6 +21,7 @@
|
||||
<!-- use person-text here to avoid code duplication ? TODO -->
|
||||
<span class="firstname">{{ person.firstName }}</span>
|
||||
<span class="lastname">{{ person.lastName }}</span>
|
||||
<span v-if="person.suffixText" class="suffixtext"> {{ person.suffixText }}</span>
|
||||
<span v-if="person.deathdate" class="deathdate"> (‡)</span>
|
||||
<span v-if="person.altNames && options.addAltNames == true" class="altnames">
|
||||
<span :class="'altname altname-' + altNameKey">{{ altNameLabel }}</span>
|
||||
@ -85,6 +87,15 @@
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li v-if="person.email">
|
||||
<i class="fa fa-li fa-envelope-o"></i>
|
||||
<a :href="'mailto: ' + person.email">{{ person.email }}</a>
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-envelope-o"></i>
|
||||
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
</li>
|
||||
|
||||
<li v-if="person.mobilenumber">
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<a :href="'tel: ' + person.mobilenumber">{{ person.mobilenumber }}</a>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<span v-if="person.altNames && person.altNames.length > 0" class="altnames">
|
||||
<span :class="'altname altname-' + altNameKey"> ({{ altNameLabel }})</span>
|
||||
</span>
|
||||
<span v-if="person.suffixText" class="suffixtext"> {{ person.suffixText }}</span>
|
||||
<span class="age" v-if="this.addAge && person.birthdate !== null && person.deathdate === null">{{ $tc('renderbox.years_old', person.age) }}</span>
|
||||
<span v-else-if="this.addAge && person.deathdate !== null"> (‡)</span>
|
||||
</span>
|
||||
|
@ -12,6 +12,7 @@
|
||||
* hLevel integer
|
||||
* addDeath bool
|
||||
* addAgeBadge bool
|
||||
* suffixText bool
|
||||
* address_multiline bool
|
||||
* customButtons [
|
||||
'before' Twig\Markup, (injected with macro)
|
||||
@ -46,6 +47,11 @@
|
||||
<span>({{- 'years_old'|trans({ 'age': person.age }) -}})</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{%- if options['suffixText'] is defined -%}
|
||||
{% for o in options['suffixText'] %}
|
||||
<span>{{ o }}</span>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endmacro raw %}
|
||||
|
||||
{% macro label(person, options) %}
|
||||
|
@ -3,10 +3,27 @@
|
||||
{{ 'Last updated on'|trans }}
|
||||
<span class="date">
|
||||
{{ entity.updatedAt|format_datetime('medium', 'short') }}
|
||||
</span>,
|
||||
{{ 'by_user'|trans }}
|
||||
<span class="user">
|
||||
{{ entity.updatedBy|chill_entity_render_box }}
|
||||
</span>
|
||||
{% if entity.updatedBy %}
|
||||
{{ ', ' ~ 'by_user'|trans }}
|
||||
<span class="user">
|
||||
{{ entity.updatedBy|chill_entity_render_box }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro createdBy(entity) %}
|
||||
<div class="updatedBy">
|
||||
{{ 'Created on'|trans }}
|
||||
<span class="date">
|
||||
{{ entity.createdAt|format_datetime('medium', 'short') }}
|
||||
</span>
|
||||
{% if entity.createdBy %}
|
||||
{{ ', ' ~ 'by_user'|trans }}
|
||||
<span class="user">
|
||||
{{ entity.createdBy|chill_entity_render_string }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
@ -15,7 +15,7 @@ use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Repository\PersonNotDuplicateRepository;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRender;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
|
||||
@ -39,7 +39,7 @@ class SimilarPersonMatcher
|
||||
|
||||
protected PersonNotDuplicateRepository $personNotDuplicateRepository;
|
||||
|
||||
protected PersonRender $personRender;
|
||||
protected PersonRenderInterface $personRender;
|
||||
|
||||
/**
|
||||
* @var TokenStorageInterface
|
||||
@ -51,7 +51,7 @@ class SimilarPersonMatcher
|
||||
AuthorizationHelper $authorizationHelper,
|
||||
TokenStorageInterface $tokenStorage,
|
||||
PersonNotDuplicateRepository $personNotDuplicateRepository,
|
||||
PersonRender $personRender
|
||||
PersonRenderInterface $personRender
|
||||
) {
|
||||
$this->em = $em;
|
||||
$this->authorizationHelper = $authorizationHelper;
|
||||
|
@ -19,7 +19,7 @@ use Chill\PersonBundle\Entity\Household\Household;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Entity\PersonAltName;
|
||||
use Chill\PersonBundle\Repository\Relationships\RelationshipRepository;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRender;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
|
||||
use DateTimeInterface;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
|
||||
@ -37,7 +37,7 @@ class PersonDocGenNormalizer implements
|
||||
{
|
||||
use NormalizerAwareTrait;
|
||||
|
||||
private PersonRender $personRender;
|
||||
private PersonRenderInterface $personRender;
|
||||
|
||||
private RelationshipRepository $relationshipRepository;
|
||||
|
||||
@ -46,7 +46,7 @@ class PersonDocGenNormalizer implements
|
||||
private TranslatorInterface $translator;
|
||||
|
||||
public function __construct(
|
||||
PersonRender $personRender,
|
||||
PersonRenderInterface $personRender,
|
||||
RelationshipRepository $relationshipRepository,
|
||||
TranslatorInterface $translator,
|
||||
TranslatableStringHelper $translatableStringHelper
|
||||
|
@ -23,21 +23,15 @@ use Doctrine\Common\Collections\Collection;
|
||||
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
|
||||
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
|
||||
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\ObjectToPopulateTrait;
|
||||
use function array_key_exists;
|
||||
|
||||
/**
|
||||
* Serialize a Person entity.
|
||||
*/
|
||||
class PersonJsonNormalizer implements
|
||||
DenormalizerAwareInterface,
|
||||
DenormalizerInterface,
|
||||
NormalizerAwareInterface,
|
||||
NormalizerInterface
|
||||
class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwareInterface, PersonJsonNormalizerInterface
|
||||
{
|
||||
use DenormalizerAwareTrait;
|
||||
|
||||
|
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Serializer\Normalizer;
|
||||
|
||||
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
/**
|
||||
* Serialize a Person entity.
|
||||
*/
|
||||
interface PersonJsonNormalizerInterface extends
|
||||
DenormalizerInterface,
|
||||
NormalizerInterface
|
||||
{
|
||||
}
|
@ -23,7 +23,7 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRender;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
@ -48,7 +48,7 @@ class AccompanyingPeriodContext implements
|
||||
|
||||
private NormalizerInterface $normalizer;
|
||||
|
||||
private PersonRender $personRender;
|
||||
private PersonRenderInterface $personRender;
|
||||
|
||||
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||
|
||||
@ -59,7 +59,7 @@ class AccompanyingPeriodContext implements
|
||||
NormalizerInterface $normalizer,
|
||||
TranslatableStringHelperInterface $translatableStringHelper,
|
||||
EntityManagerInterface $em,
|
||||
PersonRender $personRender,
|
||||
PersonRenderInterface $personRender,
|
||||
TranslatorInterface $translator,
|
||||
BaseContextData $baseContextData
|
||||
) {
|
||||
|
@ -22,7 +22,7 @@ use function array_key_exists;
|
||||
/**
|
||||
* Render a Person.
|
||||
*/
|
||||
class PersonRender extends AbstractChillEntityRender
|
||||
class PersonRender extends AbstractChillEntityRender implements PersonRenderInterface
|
||||
{
|
||||
private ConfigPersonAltNamesHelper $configAltNamesHelper;
|
||||
|
||||
@ -59,6 +59,7 @@ class PersonRender extends AbstractChillEntityRender
|
||||
'customArea' => $options['customArea'] ?? [],
|
||||
'addDeath' => $options['addDeath'] ?? true,
|
||||
'addAgeBadge' => $options['addAgeBadge'] ?? false,
|
||||
'suffixText' => $options['suffixText'] ?? [],
|
||||
];
|
||||
|
||||
return
|
||||
|
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Templating\Entity;
|
||||
|
||||
use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface;
|
||||
|
||||
/**
|
||||
* Render a Person.
|
||||
*/
|
||||
interface PersonRenderInterface extends ChillEntityRenderInterface
|
||||
{
|
||||
}
|
@ -12,7 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRender;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
use Symfony\Component\Validator\ConstraintValidator;
|
||||
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
@ -20,9 +20,9 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException;
|
||||
|
||||
class LocationValidityValidator extends ConstraintValidator
|
||||
{
|
||||
private PersonRender $render;
|
||||
private PersonRenderInterface $render;
|
||||
|
||||
public function __construct(PersonRender $render)
|
||||
public function __construct(PersonRenderInterface $render)
|
||||
{
|
||||
$this->render = $render;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ namespace Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod;
|
||||
|
||||
use Chill\MainBundle\Util\DateRangeCovering;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRender;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
|
||||
use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
@ -26,11 +26,11 @@ class ParticipationOverlapValidator extends ConstraintValidator
|
||||
{
|
||||
private const MAX_PARTICIPATION = 1;
|
||||
|
||||
private PersonRender $personRender;
|
||||
private PersonRenderInterface $personRender;
|
||||
|
||||
private ThirdPartyRender $thirdpartyRender;
|
||||
|
||||
public function __construct(PersonRender $personRender, ThirdPartyRender $thirdPartyRender)
|
||||
public function __construct(PersonRenderInterface $personRender, ThirdPartyRender $thirdPartyRender)
|
||||
{
|
||||
$this->personRender = $personRender;
|
||||
$this->thirdpartyRender = $thirdPartyRender;
|
||||
|
@ -12,7 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod;
|
||||
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRender;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
|
||||
use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
@ -24,11 +24,11 @@ use function in_array;
|
||||
|
||||
class ResourceDuplicateCheckValidator extends ConstraintValidator
|
||||
{
|
||||
private PersonRender $personRender;
|
||||
private PersonRenderInterface $personRender;
|
||||
|
||||
private ThirdPartyRender $thirdpartyRender;
|
||||
|
||||
public function __construct(PersonRender $personRender, ThirdPartyRender $thirdPartyRender)
|
||||
public function __construct(PersonRenderInterface $personRender, ThirdPartyRender $thirdPartyRender)
|
||||
{
|
||||
$this->personRender = $personRender;
|
||||
$this->thirdpartyRender = $thirdPartyRender;
|
||||
|
@ -13,7 +13,7 @@ namespace Chill\PersonBundle\Validator\Constraints\Household;
|
||||
|
||||
use Chill\MainBundle\Util\DateRangeCovering;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRender;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
use Symfony\Component\Validator\ConstraintValidator;
|
||||
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
@ -26,9 +26,9 @@ use function count;
|
||||
*/
|
||||
class HouseholdMembershipSequentialValidator extends ConstraintValidator
|
||||
{
|
||||
private PersonRender $render;
|
||||
private PersonRenderInterface $render;
|
||||
|
||||
public function __construct(PersonRender $render)
|
||||
public function __construct(PersonRenderInterface $render)
|
||||
{
|
||||
$this->render = $render;
|
||||
}
|
||||
|
@ -66,3 +66,4 @@ services:
|
||||
Chill\PersonBundle\Controller\RelationshipApiController:
|
||||
autowire: true
|
||||
tags: ['controller.service_arguments']
|
||||
|
||||
|
@ -126,6 +126,21 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'class' => \Chill\ThirdPartyBundle\Entity\ThirdPartyProfession::class,
|
||||
// 'controller' => \Chill\MainBundle\Controller\ProfessionApiController::class,
|
||||
'name' => 'profession',
|
||||
'base_path' => '/api/1.0/thirdparty/professions',
|
||||
'base_role' => 'ROLE_USER',
|
||||
'actions' => [
|
||||
'_index' => [
|
||||
'methods' => [
|
||||
Request::METHOD_GET => true,
|
||||
Request::METHOD_HEAD => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
@ -161,13 +161,14 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
||||
* @var Civility
|
||||
* @ORM\ManyToOne(targetEntity=Civility::class)
|
||||
* ORM\JoinColumn(name="civility", referencedColumnName="id", nullable=true)
|
||||
* @Groups({"docgen:read", "read", "docgen:read:3party:parent"})
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
* @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"})
|
||||
*/
|
||||
private ?Civility $civility = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="comment", type="text", nullable=true)
|
||||
* @Groups({"read", "write"})
|
||||
*/
|
||||
private ?string $comment = null;
|
||||
|
||||
@ -200,7 +201,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
* @Groups({"read", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
private ?int $id = null;
|
||||
|
||||
@ -235,7 +236,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty", inversedBy="children")
|
||||
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
|
||||
* @Groups({"read", "docgen:read"})
|
||||
* @Groups({"read", "write", "docgen:read"})
|
||||
* @Context(normalizationContext={"groups": "docgen:read:3party:parent"}, groups={"docgen:read"})
|
||||
*/
|
||||
private ?ThirdParty $parent = null;
|
||||
@ -246,7 +247,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
||||
* @var ThirdPartyProfession
|
||||
* @ORM\ManyToOne(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdPartyProfession")
|
||||
* ORM\JoinColumn(name="profession", referencedColumnName="id", nullable=true)
|
||||
* @Groups({"docgen:read", "docgen:read:3party:parent"})
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
* @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"})
|
||||
*/
|
||||
private ?ThirdPartyProfession $profession = null;
|
||||
@ -706,7 +707,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function setCivility(Civility $civility): ThirdParty
|
||||
public function setCivility(?Civility $civility): ThirdParty
|
||||
{
|
||||
$this->civility = $civility;
|
||||
|
||||
@ -811,7 +812,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function setProfession(ThirdPartyProfession $profession): ThirdParty
|
||||
public function setProfession(?ThirdPartyProfession $profession): ThirdParty
|
||||
{
|
||||
$this->profession = $profession;
|
||||
|
||||
|
@ -18,11 +18,14 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
/**
|
||||
* @ORM\Table(name="chill_3party.party_profession")
|
||||
* @ORM\Entity(repositoryClass=ThirdPartyProfessionRepository::class)
|
||||
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "third_party_profession": ThirdPartyProfession::class})
|
||||
*/
|
||||
class ThirdPartyProfession
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private bool $active = true;
|
||||
|
||||
@ -30,13 +33,13 @@ class ThirdPartyProfession
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
* @Serializer\Groups({"docgen:read", "read", "write"})
|
||||
*/
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
* @Serializer\Groups({"docgen:read", "read"})
|
||||
*/
|
||||
private array $name = [];
|
||||
|
||||
|
@ -19,9 +19,15 @@
|
||||
></third-party-render-box>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="action === 'edit' || action === 'create'">
|
||||
|
||||
<div class="form-floating mb-3" v-if="thirdparty.kind !== 'child'">
|
||||
<div v-else-if="action === 'edit' || action === 'create' || action === 'addContact'">
|
||||
<div v-if="parent">
|
||||
<div class="parent-info">
|
||||
<i class="fa fa-li fa-hand-o-right"></i>
|
||||
<b class="me-2">{{ $t('child_of') }}</b>
|
||||
<span class="chill-entity badge-thirdparty">{{ parent.text }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-floating mb-3" v-else-if="kind !== 'child'">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-0" type="radio" v-model="kind" value="company" id="tpartyKindInstitution">
|
||||
<label for="tpartyKindInstitution" class="required">
|
||||
@ -55,10 +61,30 @@
|
||||
addCenter: false,
|
||||
addNoData: true,
|
||||
isMultiline: false
|
||||
}"></third-party-render-box>
|
||||
}"></third-party-render-box>
|
||||
</div>
|
||||
|
||||
<div v-if="thirdparty.kind === 'child' || thirdparty.kind === 'contact'">
|
||||
<div id="child-info">
|
||||
<div class="input-group mb-3">
|
||||
<select class="form-select form-select-lg" id="profession"
|
||||
v-model="thirdparty.civility">
|
||||
<option selected disabled :value="null" >{{ $t('thirdparty.civility') }}</option>
|
||||
<option v-for="civility in civilities" :key="civility.id" :value="{type: 'chill_main_civility', id: civility.id }">{{ civility.name.fr }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<select class="form-select form-select-lg" id="civility"
|
||||
v-model="thirdparty.profession">
|
||||
<option selected disabled :value="null">{{ $t('thirdparty.profession') }}</option>
|
||||
<option v-for="profession in professions" :key="profession.id" :value="{type: 'third_party_profession', id: profession.id }">{{ profession.name.fr }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mb-3">
|
||||
<input class="form-control form-control-lg" id="name" v-model="thirdparty.text" v-bind:placeholder="$t('thirdparty.name')" />
|
||||
<input class="form-control form-control-lg" id="name" v-model="thirdparty.name" v-bind:placeholder="$t('thirdparty.name')" />
|
||||
<label for="name">{{ $t('thirdparty.name') }}</label>
|
||||
</div>
|
||||
<div v-if="query">
|
||||
@ -98,6 +124,15 @@
|
||||
aria-describedby="phonenumber" />
|
||||
</div>
|
||||
|
||||
<div v-if="parent">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text" id="comment"><i class="fa fa-fw fa-pencil"></i></span>
|
||||
<textarea class="form-control form-control-lg"
|
||||
v-bind:placeholder="$t('thirdparty.comment')"
|
||||
v-model="thirdparty.comment"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -106,10 +141,11 @@ import ThirdPartyRenderBox from '../Entity/ThirdPartyRenderBox.vue';
|
||||
import AddAddress from 'ChillMainAssets/vuejs/Address/components/AddAddress';
|
||||
import { getThirdparty } from '../../_api/OnTheFly';
|
||||
import BadgeEntity from 'ChillMainAssets/vuejs/_components/BadgeEntity.vue';
|
||||
import { makeFetch } from 'ChillMainAssets/lib/api/apiMethods';
|
||||
|
||||
export default {
|
||||
name: "OnTheFlyThirdParty",
|
||||
props: ['id', 'type', 'action', 'query'],
|
||||
props: ['id', 'type', 'action', 'query', 'parent'],
|
||||
components: {
|
||||
ThirdPartyRenderBox,
|
||||
AddAddress,
|
||||
@ -124,8 +160,11 @@ export default {
|
||||
kind: 'company',
|
||||
name: '',
|
||||
telephone: '',
|
||||
|
||||
civility: null,
|
||||
profession: null,
|
||||
},
|
||||
professions: [],
|
||||
civilities: [],
|
||||
addAddress: {
|
||||
options: {
|
||||
openPanesInModal: true,
|
||||
@ -177,10 +216,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadData(){
|
||||
getThirdparty(this.id).then(thirdparty => new Promise((resolve, reject) => {
|
||||
return getThirdparty(this.id).then(thirdparty => new Promise((resolve, reject) => {
|
||||
this.thirdparty = thirdparty;
|
||||
this.thirdparty.kind = thirdparty.kind;
|
||||
//console.log('get thirdparty', thirdparty);
|
||||
console.log('get thirdparty', thirdparty);
|
||||
if (this.action !== 'show') {
|
||||
if (thirdparty.address !== null) {
|
||||
// bof! we force getInitialAddress because addressId not available when mounted
|
||||
@ -190,6 +229,30 @@ export default {
|
||||
resolve();
|
||||
}));
|
||||
},
|
||||
loadCivilities() {
|
||||
const url = `/api/1.0/main/civility.json`;
|
||||
return makeFetch('GET', url)
|
||||
.then(response => {
|
||||
this.$data.civilities = response.results;
|
||||
return Promise.resolve();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
this.$toast.open({message: error.body})
|
||||
})
|
||||
},
|
||||
loadProfessions() {
|
||||
const url = `/api/1.0/thirdparty/professions.json`;
|
||||
return makeFetch('GET', url)
|
||||
.then(response => {
|
||||
this.$data.professions = response.results;
|
||||
return Promise.resolve();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
this.$toast.open({message: error.body})
|
||||
})
|
||||
},
|
||||
submitAddress(payload) {
|
||||
console.log('submitAddress', payload);
|
||||
if (typeof payload.addressId !== 'undefined') { // <--
|
||||
@ -200,13 +263,24 @@ export default {
|
||||
}
|
||||
},
|
||||
addQuery(query) {
|
||||
this.thirdparty.text = query;
|
||||
}
|
||||
this.thirdparty.name = query;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//console.log('mounted', this.action);
|
||||
mounted() {
|
||||
let dependencies = [];
|
||||
dependencies.push(this.loadProfessions());
|
||||
dependencies.push(this.loadCivilities());
|
||||
if (this.action !== 'create') {
|
||||
this.loadData();
|
||||
if (this.id) {
|
||||
dependencies.push(this.loadData());
|
||||
// here we can do something when all promises are resolve, with
|
||||
// Promise.all(dependencies).then(() => { /* do something */ });
|
||||
}
|
||||
if (this.action === 'addContact') {
|
||||
this.$data.thirdparty.kind = 'child'
|
||||
// this.$data.thirdparty.parent = this.parent.id
|
||||
this.$data.thirdparty.address = null
|
||||
}
|
||||
} else {
|
||||
this.thirdparty.kind = 'company';
|
||||
}
|
||||
@ -229,5 +303,16 @@ dl {
|
||||
margin-left: 1em;
|
||||
}
|
||||
}
|
||||
.parent-info {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
#child-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
div {
|
||||
width: 49%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
@ -4,7 +4,12 @@ const thirdpartyMessages = {
|
||||
name: "Dénomination",
|
||||
email: "Courriel",
|
||||
phonenumber: "Téléphone",
|
||||
}
|
||||
comment: "Commentaire",
|
||||
profession: "Qualité",
|
||||
civility: "Civilité"
|
||||
},
|
||||
child_of: "Contact de: ",
|
||||
children: "Personnes de contact: ",
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -36,6 +36,7 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf
|
||||
{
|
||||
return [
|
||||
'type' => 'thirdparty',
|
||||
'name' => $thirdParty->getName(),
|
||||
'text' => $this->thirdPartyRender->renderString($thirdParty, []),
|
||||
'id' => $thirdParty->getId(),
|
||||
'kind' => $thirdParty->getKind(),
|
||||
@ -45,6 +46,7 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf
|
||||
'isChild' => $thirdParty->isChild(),
|
||||
'parent' => $this->normalizer->normalize($thirdParty->getParent(), $format, $context),
|
||||
'civility' => $this->normalizer->normalize($thirdParty->getCivility(), $format, $context),
|
||||
'profession' => $this->normalizer->normalize($thirdParty->getProfession(), $format, $context),
|
||||
'contactDataAnonymous' => $thirdParty->isContactDataAnonymous(),
|
||||
];
|
||||
}
|
||||
|
@ -110,3 +110,14 @@ paths:
|
||||
description: "OK"
|
||||
422:
|
||||
description: "Object with validation errors"
|
||||
|
||||
/1.0/thirdparty/professions.json:
|
||||
get:
|
||||
tags:
|
||||
- thirdparty
|
||||
summary: Return all thirdparty professions
|
||||
responses:
|
||||
200:
|
||||
description: "ok"
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
|
Loading…
x
Reference in New Issue
Block a user