Compare commits

...

448 Commits

Author SHA1 Message Date
197d69ef4a release v2.4.0 2023-07-07 13:21:22 +02:00
9423f4d055 Merge branch '124-sync-user-absence-ms-graph' into 'master'
Feature: sync user absence with microsoft graph api

Closes #124

See merge request Chill-Projet/chill-bundles!571
2023-07-07 11:07:08 +00:00
99d6e9e6b8 Merge branch 'accompanying_period_voter' into 'master'
rights for reassigning and accessing confidential parcours

Closes #99 and #121

See merge request Chill-Projet/chill-bundles!483
2023-07-07 11:06:37 +00:00
8929f4b8a3 Merge branch '116-course-index-link-action-to-view-if-closed' into 'master'
Fixed: rights on the action list in accompanying period main's page

Closes #116

See merge request Chill-Projet/chill-bundles!566
2023-07-06 20:05:25 +00:00
43b7139488 One more changie [ci-skip] 2023-07-06 22:01:45 +02:00
d3251075e9 fix loading of kernel if ms calendar is not created 2023-07-06 21:55:29 +02:00
93a598b549 improve php applying rector rules 2023-07-06 21:45:29 +02:00
9b6e6ec20f add a changie 2023-07-06 21:34:43 +02:00
77d4b13c1b Sync user absence / presence within MapAndSubscribeUserCalendarCommand 2023-07-06 21:33:01 +02:00
2861945a52 Syncer for user absence, from the msgraph reader 2023-07-06 17:29:10 +02:00
5b42b85b50 Read absence from MS graph api 2023-07-06 16:58:24 +02:00
e40b1b9853 Merge branch 'master' into accompanying_period_voter 2023-07-05 22:39:22 +02:00
c19232de35 DX: fix phpstan issues 2023-07-05 22:37:51 +02:00
c95dc23c51 Merge remote-tracking branch 'origin/master' into accompanying_period_voter 2023-07-05 22:27:47 +02:00
0361743ae0 Merge branch '113-add-missing-filters' into 'master'
Add missing aggregators and filters

Closes #113

See merge request Chill-Projet/chill-bundles!567
2023-07-05 20:08:20 +00:00
af4e7f1226 Add changie entry 2023-07-05 22:06:36 +02:00
ff1629cbb7 Separate role "see confidential course" from "reassign bulk" 2023-07-05 22:06:21 +02:00
779eb812b0 Add new role to see confidential right on method AccompanyingPeriodACLAwareRepositoryInterface::findByUserAndPostalCodeOpenedAccompanyingPeriod 2023-07-05 21:56:50 +02:00
a990591e0c handle right to see confidential course on regulation list 2023-07-05 16:23:14 +02:00
a56370d851 DX: fix phpstan issues with more strict type hinting in AuthorizationHelperInterface 2023-07-04 17:02:36 +02:00
dd344aed52 Implements right "see confidential course" on method findByPerson
Add unit tests for that
2023-07-04 15:59:39 +02:00
a7dbdc2b9d FEATURE [voter][confidential] voter adapted. repository changes left to do 2023-07-03 13:35:34 +02:00
b3d993165d FEATURE: [confidential][voter] bulk assign right should also give right to access confidential parcours 2023-07-03 13:35:34 +02:00
9ccc57bbcb FEATURE [config][voter] config set for relation between bulk_assign and see_confidential 2023-07-03 13:35:34 +02:00
cc0e832cc9 FEATURE [voter][confidential] added right to see confidential periods 2023-07-03 13:35:33 +02:00
c8b62d990a fixes for exports and list 2023-06-30 17:12:09 +02:00
b7df62d4f5 [export] use a rolling date on age aggregator (Person)
This query allow to detects the saved export which won't work any more:

```sql
select
s.id, user_id, description, title, u.label
from chill_main_saved_export s join users u on u.id = s.user_id
WHERE
options->'export'->'export'->'aggregators'->'person_age_aggregator'->'enabled' is not null;
```
2023-06-29 23:15:15 +02:00
5a395b160f [export] add aggregator and filter related to AccompanyingPeriodInfo +
Center aggregator for Person

see #113
2023-06-29 17:53:47 +02:00
393e59e22b DX: Rolling date: allow to receive a null parameter (RollingDate)
When receiving a null parameter (a null rolling date), it will return
null
2023-06-29 17:53:47 +02:00
4a5ac170ba [export] add dates for filter "user working on course" 2023-06-29 17:53:47 +02:00
c019fffbe7 fix cs 2023-06-29 17:53:15 +02:00
31745bc252 [export] order center alphabetically when generating an export 2023-06-29 17:53:15 +02:00
56940d830c fix typos 2023-06-29 17:45:50 +02:00
347eda05df Fix: force the consistency of location in accompanying period
- internally, the entity remove the addressLocation when the
  personLocation is set, and vice-versa;
- this commit add a migration which may solve the case when both case
  happens (priority to personLocation + keep the history)
- add a constraint on the database to avoid such situation
2023-06-29 12:44:28 +02:00
90e8687799 Fixed: [export] rename label on CurrentActionFilter 2023-06-28 17:01:42 +02:00
da50fbc1fb update for release v2.3.0 2023-06-27 18:46:04 +02:00
5bbc50976e Merge branch '103-document-page' into 'master'
Liste unifiée des documents

Closes #103

See merge request Chill-Projet/chill-bundles!545
2023-06-27 16:35:29 +00:00
01dee54fab Merge branch '110-export-editable' into 'master'
Feature: make saved export editables ( OP#203 )

Closes #110

See merge request Chill-Projet/chill-bundles!554
2023-06-27 16:32:37 +00:00
abe020f116 Merge remote-tracking branch 'origin/master' into 103-document-page 2023-06-27 18:31:14 +02:00
4632c18d93 restore feature: generate a document from period 2023-06-27 18:26:41 +02:00
7a1feaa8cb show documents from person in list of document from course 2023-06-27 18:20:41 +02:00
687ff63ce7 Rename label of filter in French: "parcours actif" => "parcours ouvert", and "filtrer les parcours ouverts" => "Filtrer les parcours dont la date d''ouverture" 2023-06-27 16:00:05 +02:00
a7c3089736 Feature: avoid duplicates for the same period in acc period user history 2023-06-27 15:47:48 +02:00
90be68002a add possibility to add long text in changelog 2023-06-27 15:47:48 +02:00
a93051d157 [export] set the default date for accompanying period list 2023-06-27 15:14:19 +02:00
f19b939bd4 Fixed: rights on the action list in accompanying period main's page
Add is_granted check on the action:

- if update action is allowed, open in update mode;
- if see action is allowed, open in see mode;
- fallback to an inactive link (should not happens)
2023-06-27 11:04:22 +02:00
c0ae2f8ed9 publish on version 2.2.2 2023-06-26 14:27:07 +02:00
cd7a80b680 Do a release automatically using ci/cd when tag is created 2023-06-26 11:05:20 +00:00
9f0fdb031a Merge remote-tracking branch 'origin/master' into 110-export-editable 2023-06-26 11:06:52 +02:00
0e9597bf77 fix handling of DirectExportInterface 2023-06-25 15:47:30 +02:00
9978b6a6e4 Fix: fix the loading of pickCenterType when no regroupments exists and
defaults of SocialWorkTypeFilter
2023-06-23 13:09:19 +02:00
27f797d736 add changie entry for fixing filiation bug 2023-06-21 14:30:22 +02:00
471898e6d8 Fixed: filter social action to keep only currently activated 2023-06-21 14:17:54 +02:00
146103e87c Fixed: Accompanyingperiod / comment: order by newest to oldest 2023-06-21 14:17:54 +02:00
45724100d4 Merge branch '82_bundles_filiation_delete_fix' into 'master'
#82 filiation delete/patch fix

See merge request Chill-Projet/chill-bundles!548
2023-06-21 12:17:34 +00:00
9d2dfbe610 DX: publish release 2.2.1 2023-06-19 21:02:19 +02:00
70e6aee3c5 Merge branch '114-fix-notify-new-document-in-action' into 'master'
Resolve "Le `relatedEntityId` n'est pas transmis, et la page de redirection n'est pas correcte lorsqu'on notifie un document d'une action que l'on vient d'ajouter"

See merge request Chill-Projet/chill-bundles!565
2023-06-19 19:00:59 +00:00
6c16967cdc Fix: Fix entityId and return path when add a notification on a document's evaluation 2023-06-19 21:00:19 +02:00
4359c2dddc DX: add a space between issue number and description in changie 2023-06-19 20:21:50 +02:00
5a102d4989 publish new 2.2.0 version 2023-06-18 21:44:10 +02:00
9073f118db [rector] add form default data rule: handle case when there are method call on builder without add 2023-06-18 21:37:52 +02:00
21f11fb034 execute rector run on filters and aggregators 2023-06-18 21:36:40 +02:00
50de389bc7 Revert "apply fixes for list"
This reverts commit 938027cc
2023-06-18 11:58:42 +02:00
960acb8c0a Revert "apply rector rules for exports"
This reverts commit 3adf3625
2023-06-18 11:57:26 +02:00
c52ba06ea0 adapt rector rules for chained builder->add 2023-06-16 15:26:49 +02:00
3fb97c3945 DX: comment the examples in rule definition
As this is genearte error in both phpunits and php-cs-fixer
2023-06-16 14:07:49 +02:00
88a544fabe Merge branch '113-regroupements-filters' into 'master'
Regenerate data from saved export on formatter test

See merge request Chill-Projet/chill-bundles!564
2023-06-16 12:05:39 +00:00
bf2a4bafd8 Merge branch '709-notification-eval-action' into 'master'
[Feature] add notification to social work and document in social work's evaluations

Closes champs-libres/departement-de-la-vendee/chill#709

See merge request Chill-Projet/chill-bundles!509
2023-06-16 12:02:30 +00:00
fe936ac0f2 Feature: [export][course] filter course by step, between two dates 2023-06-16 13:56:43 +02:00
398b633863 DX: simplify overlapsI expression in postgresql 2023-06-16 13:56:43 +02:00
8fabfdd5c0 Feature: [export] filter on accompanying period step: allow to check multiple steps 2023-06-16 13:56:41 +02:00
8a91be4ef3 add changelog [ci-skip] 2023-06-13 23:09:08 +02:00
3b9fae3b49 add changelog 2023-06-13 23:06:50 +02:00
7349be94c8 Merge remote-tracking branch 'origin/master' into 709-notification-eval-action 2023-06-13 23:05:51 +02:00
d815b44280 DX: more type-hinting on AccompanyingPeriodWork 2023-06-13 23:05:34 +02:00
56957250ba re-use the display of workflow for the notification on evaluation document 2023-06-13 23:05:09 +02:00
a6b451df98 Fix counter on notification for document, using "more" parameter
The counter now show results for embedded document, in the accompanying period work list.
2023-06-13 23:04:41 +02:00
3879e5cd9b Notification: fix counter, and allow to add more related entity in a single query
Sometimes, there are entities which embed other entities, which in turn have notification. This more parameter allow to fetch notification and counter for those embedded entities in a single query.
2023-06-13 23:03:15 +02:00
cb4de1f3d2 Fixes for work rendering without "onlyone" parameter 2023-06-13 22:58:08 +02:00
21f0f70350 Merge branch 'fix-association-person-current-center' into 'master'
Fix association's annotation between PersonCenterCurrent and Person entities

See merge request Chill-Projet/chill-bundles!558
2023-06-13 13:58:22 +00:00
fadc007bfe add changelog entry 2023-06-13 15:55:05 +02:00
1b664d0be2 Merge branch '58-birthdate-precede' 2023-06-13 15:54:09 +02:00
a136a278da remove console.log 2023-06-13 15:53:50 +02:00
e0c21e46ae add changelog entry 2023-06-13 15:49:16 +02:00
270e068ace Merge branch '710_vendee_document_workflow_scroll' 2023-06-13 15:48:02 +02:00
c683123eca set blinking animation on item-row, not just on the input 2023-06-13 15:47:06 +02:00
5495b1cb44 fix condition 2023-06-13 15:33:10 +02:00
24049b9dfc remove unused file 2023-06-13 15:33:03 +02:00
34a333f6a3 Merge branch 'master' into 103-document-page 2023-06-13 15:27:58 +02:00
c4dd46a03c fix phpstan issues 2023-06-13 15:26:21 +02:00
29140d9374 add changelog entry 2023-06-13 15:16:03 +02:00
5cbdea29e9 Merge remote-tracking branch 'origin/master' into 103-document-page 2023-06-13 15:14:17 +02:00
909d2dfb60 layout for rendering list 2023-06-13 15:00:16 +02:00
1f1ebb6adb fix mismatch for key in different providers 2023-06-13 11:30:00 +02:00
4456fb3749 Fixing generic doc providers from calendar + fix cs 2023-06-13 11:01:40 +02:00
1d7279c022 release v2.1.0 2023-06-12 18:03:39 +02:00
727e9d0f74 WIP: fix loading of activity document 2023-06-12 17:58:27 +02:00
c2a734b30b Merge branch '110-adapt-exports' into '110-export-editable'
Apply rector rules to make saved exports editable

See merge request Chill-Projet/chill-bundles!555
2023-06-12 15:54:55 +00:00
eb41293c96 Merge branch '111-list-my-acc-period-incomplete' into 'master'
fix list of "my accompanying periods"

Closes #111

See merge request Chill-Projet/chill-bundles!557
2023-06-09 10:21:24 +00:00
68c850026b Merge branch '103b-document-page-julie' into '103-document-page'
103b document page julie

See merge request Chill-Projet/chill-bundles!551
2023-06-08 10:01:52 +00:00
37e92ca58d Merge branch 'fix_parcours_creation_rights_in_household' into 'master'
Fix parcours creation rights in household

See merge request Chill-Projet/chill-bundles!560
2023-06-07 15:59:02 +00:00
593adadef1 Merge branch 'fix_parcours_creation_rights_in_household' of gitlab.com:Chill-Projet/chill-bundles into fix_parcours_creation_rights_in_household 2023-06-07 17:47:45 +02:00
f5b71a0c41 DX [changie] entry added 2023-06-07 17:47:23 +02:00
f42e1723ab FIX [php-cs-fixer] 2023-06-07 17:39:28 +02:00
2178833da7 Merge branch 'repository-for-regroupment' into 'master'
Repository for regroupment

See merge request Chill-Projet/chill-bundles!559
2023-06-07 11:44:43 +00:00
23ee29ab0d Apply 1 suggestion(s) to 1 file(s) 2023-06-07 11:39:19 +00:00
199223293e rename method 2023-06-07 13:36:26 +02:00
520d5ab6d4 FIX [rights][menu] dont show menu item parcours if user doesn't have the proper rights 2023-06-07 13:30:53 +02:00
c73beef3af FIX [rights][household] check rights to be able to create a parcours from within household 2023-06-07 13:25:48 +02:00
73b95732db Add new methods to RegroupmentRepository and fix association
Regroupment/Center
2023-06-07 13:06:10 +02:00
88f48d474f fix association's annotation between PersonCenterCurrent and Person entities 2023-06-06 17:08:38 +02:00
0fd36a3196 fix list of "my accompanying periods" 2023-06-06 14:40:24 +02:00
aa6479fbf9 doc for rector rule [ci-skip] 2023-06-06 11:14:14 +02:00
05822e7e4a add changelog 2023-06-06 10:52:12 +02:00
b4614974c0 allow to edit existing saved export with new export options 2023-06-06 10:49:48 +02:00
c3ac382711 link to update aggregator and filters from saved export and then execute 2023-06-06 10:49:34 +02:00
ad82685c02 allow to edit existing saved export with new export options 2023-06-06 10:49:00 +02:00
7e8dbbe873 link to update aggregator and filters from saved export and then execute 2023-06-06 09:57:06 +02:00
12fdfd81c4 remove empty data which sparkle a bug in RadioListMapper 2023-06-06 09:37:43 +02:00
cf576dca7b fix missing choices in getFormDefaultData with automatic generation 2023-06-05 18:16:32 +02:00
7fab411b96 remove stubs 2023-06-05 18:10:55 +02:00
88d363fc0c apply rector rules on list interfaces 2023-06-05 18:05:23 +02:00
a28740c46c change chill rule namespace 2023-06-05 18:03:54 +02:00
1a03718014 fix cs 2023-06-05 18:02:49 +02:00
1e8fec5cbd move rector rules to a shareable namespace 2023-06-05 18:02:41 +02:00
fb1b28407a publish namespace to every app using this package 2023-06-05 18:02:31 +02:00
cc30c81fd7 change chill rule namespace 2023-06-05 17:54:25 +02:00
938027cc1e apply fixes for list 2023-06-05 17:54:00 +02:00
db14221729 fix cs 2023-06-05 17:42:37 +02:00
f10c50231f apply rector rules on list interfaces 2023-06-05 17:40:44 +02:00
73bc95306e move rector rules to a shareable namespace 2023-06-05 17:29:37 +02:00
933e9f75b3 publish namespace to every app using this package 2023-06-05 17:21:43 +02:00
3adf3625dc apply rector rules for exports 2023-06-05 17:21:21 +02:00
ea77adc640 [edit export] add required method on export's interface
The method "getFormDefaultData" is applyied on every interface which
will use it:

- ExportInterface
- AggregatorInterface
- DirectExportInterface
- FilterInterface

The method buildForm is moved to those interfaces.

[ci-skip]
2023-06-05 17:09:58 +02:00
d5ee158caa [export][rector] rector rules to add get form default data on export, aggregator, direct export 2023-06-05 16:41:55 +02:00
c8bab1218f FIX [filiation][validator] adjust validation condition 2023-06-05 10:01:35 +02:00
02afcb30d4 [export][rector] first rector rule to add new method to filters 2023-06-04 01:11:38 +02:00
cb0a6bbd21 Regenerate data from saved export on formatter test
[ci-skip]
2023-06-04 01:10:50 +02:00
fb0afc7e0a [WIP] get default data from saved exports for center and export steps 2023-06-02 15:32:38 +02:00
d1e1b1c4ce [export form] decouple data from PickCenter form 2023-06-01 14:07:31 +02:00
2aeb72811a [activity][docs] attempt to implement generic doc for activity documents in person context 2023-06-01 13:31:35 +02:00
7eb4fb4e56 FEATURE [calendar][docs] fix query to display rendez-vous documents from person and parcours contexts 2023-06-01 13:09:51 +02:00
5dc1cbce48 FEATURE [activity][docs] generic doc for activity documents in person context 2023-06-01 11:01:29 +02:00
59e1e02b92 FEATURE [calendar][docs] try to implement showing calendar docs from parcours context in person context 2023-06-01 10:45:55 +02:00
5196d26a3e FEATURE [translations] add translations 2023-06-01 10:44:14 +02:00
77f8cf0e1a Merge branch '109-initialize-changie' into 'master'
[changies] fixes and allow multiline messages

Closes #109

See merge request Chill-Projet/chill-bundles!553
2023-06-01 08:27:22 +00:00
1b9fea04ce [changies] fixes and allow multiline messages 2023-06-01 10:26:35 +02:00
78b19efe86 Merge branch '109-initialize-changie' into 'master'
Initialize .changie and backup previous changelog

See merge request Chill-Projet/chill-bundles!552
2023-06-01 08:24:04 +00:00
07ff425bfc initialize .changie and backup previous changelog 2023-06-01 09:39:40 +02:00
c77dd011b8 Merge branch 'issue712_add_thirdparty_docgen_context' into 'master'
Issue712 add thirdparty docgen context

See merge request Chill-Projet/chill-bundles!540
2023-05-31 21:51:40 +00:00
9c109d2efd DX: use array spred instead of array_merge 2023-05-31 23:47:02 +02:00
80dfa092db fixes: add tests for generation and fix some situation 2023-05-31 23:29:34 +02:00
9a3fcf081e FEATURE [personCalendar][genericDoc] implement genericDoc for calendar objects linked to a person 2023-05-31 17:10:38 +02:00
ef04a04056 FEATURE [genericDoc][calendar] minor changes to template and provider 2023-05-31 16:54:21 +02:00
ba55fa349b FEATURE [genericDoc][activity] finalize implementation 2023-05-31 16:53:38 +02:00
eea5cedc5f Merge branch '103b-document-page-julie' of gitlab.com:Chill-Projet/chill-bundles into 103b-document-page-julie 2023-05-31 14:38:35 +02:00
c07e26785e WIP [genericDoc][activity] add repository method to get activity linked to storedObject 2023-05-31 14:38:05 +02:00
4155af6686 FEATURE [genericDoc][calendar] use metadatas 2023-05-31 14:38:05 +02:00
9eb9a9a214 WIP [genericDoc][activity] implementing generic doc for activities 2023-05-31 14:38:05 +02:00
47a3e30ec5 FEATURE [genericDoc] generic doc interface implemented for rendez-vous 2023-05-31 14:38:05 +02:00
20489813f0 FIX [route] adjust to using new route name in redirect 2023-05-31 14:38:05 +02:00
4489098add FIX [calculator] type cast result to a float 2023-05-31 14:20:54 +02:00
cb718a80de Add accompanying period work evaluation documents to the list of documents for person 2023-05-31 12:23:34 +02:00
ed556d9ee8 FIX [review] process review and make minor visual changes 2023-05-31 09:47:48 +02:00
2b57807565 show generic doc accompanying course document in person generic doc list 2023-05-30 22:14:13 +02:00
da36c59616 refactor: rename class providing AccompanyingCourseDocument Generic doc 2023-05-30 21:52:36 +02:00
40ddd1f1ee Add license 2023-05-30 21:25:33 +02:00
e9fdabf931 Remove old list for person document 2023-05-30 21:24:53 +02:00
40af1e64ac [generic doc] listing generic doc for person 2023-05-30 21:24:04 +02:00
c245ffe559 WIP [genericDoc][activity] add repository method to get activity linked to storedObject 2023-05-30 18:14:32 +02:00
bd074ebade FEATURE [genericDoc][calendar] use metadatas 2023-05-30 17:50:32 +02:00
d09e5d33db WIP [genericDoc][activity] implementing generic doc for activities 2023-05-30 16:59:16 +02:00
101cca8662 FEATURE [genericDoc] generic doc interface implemented for rendez-vous 2023-05-30 16:58:36 +02:00
90a5a735aa FIX [route] adjust to using new route name in redirect 2023-05-30 14:38:16 +02:00
eb107f5a15 add filter for generic doc + fix issues in filter 2023-05-30 12:46:05 +02:00
a3d3588b75 DX: fix json_decode signature 2023-05-26 22:01:02 +02:00
08874d734e [generic doc] add doc provider and renderer for evaluation document 2023-05-26 21:58:52 +02:00
bd5dab2215 Merge branch '106-fix-keys-generation-doc-filtering-activities' into 'master'
Fix: force list of activities to be a list with incremental keys

Closes #106

See merge request Chill-Projet/chill-bundles!543
2023-05-25 19:19:38 +00:00
ff03299f80 FEATURE [workflow][doc] scroll immediately to document in workflow and let background flash 2023-05-25 17:06:10 +02:00
5749660760 Merge branch '108-fix-acc-period-transition-notification' into 'master'
Fixed: Do not send a confirmation message when the accompanying period is back to CONFIRM state

Closes #108

See merge request Chill-Projet/chill-bundles!549
2023-05-25 13:30:15 +00:00
b679dbe26c Fixed: Do not send a confirmation message when period is mark_active back 2023-05-25 15:24:14 +02:00
6c3fa5cb98 Fixed: [UI] in designation and redispatch list, the period's statuses
were'nt shown correctly
2023-05-25 15:22:52 +02:00
nobohan
1b0569c974 Feature: add thirdParty choice in docgen context - use array_values 2023-05-25 13:58:46 +02:00
72f5b0b275 DX [cs-fix] 2023-05-25 12:52:23 +02:00
60aeb57c45 FIX [filiation] change validator to allow delete and patch of relationship 2023-05-25 12:43:09 +02:00
6bdd1f31d3 Merge branch '98-rewrite-download-button' into 'master'
Fixed: vue downloadButton: add more log and various improvements

See merge request Chill-Projet/chill-bundles!547
2023-05-25 10:42:10 +00:00
ff3dab0934 Fixed: vue downloadButton: add more log and various improvements
- create a dedicated button for opening
- use nextTick before clicking on the "opening" button
2023-05-25 12:36:47 +02:00
2b5d007fda Remove old doc index page, replace by the generic doc index page 2023-05-25 11:09:26 +02:00
nobohan
9593cfde36 Feature: add thirdParty choice in docgen accperiodworkevaluation context - phpcs fix again 2023-05-25 10:32:52 +02:00
nobohan
ad1b28ff11 Feature: add thirdParty choice in docgen accperiodworkevaluation context - phpcs fix again 2023-05-25 10:15:22 +02:00
nobohan
6232dabae5 Feature: add thirdParty choice in docgen accperiodworkevaluation context - phpstan 2023-05-25 10:10:52 +02:00
nobohan
ef59e6dc1c Feature: add thirdParty choice in docgen accperiodworkevaluation context - phpcs fix 2023-05-25 09:59:16 +02:00
e550817ded Render for generic doc 2023-05-25 09:55:46 +02:00
nobohan
303666b30d Feature: add thirdParty choice in docgen accperiodworkevaluation context - clean code 2023-05-25 09:52:23 +02:00
nobohan
d0867f9aa3 Feature: add thirdParty choice in docgen person context 2023-05-25 09:52:23 +02:00
nobohan
db33fab097 Feature: add thirdParty choice in docgen accperiodworkevaluation context (WIP) 2023-05-25 09:52:23 +02:00
nobohan
91a19b9e99 Feature: add thirdParty choice in docgen accperiod context 2023-05-25 09:52:23 +02:00
nobohan
c6658aa2f3 Feature: add thirdParty choice in docgen activityContext 2023-05-25 09:52:23 +02:00
9c85ad74ce [vue] Fix birthdate with wrong date in winter (UNCHECKED) 2023-05-25 09:33:11 +02:00
fec2dd0f74 enable debug 2023-05-24 20:23:59 +02:00
8dbe2d6ec2 GenericDoc: add provider for AccompanyingCourseDocument, without filtering 2023-05-24 17:09:29 +02:00
afcd6e0605 bootstrap generic doc manager and associated services 2023-05-24 17:05:56 +02:00
977299192f Merge branch 'deselect-checkbox-exports' into 'master'
Add button to deselect all centers in export

See merge request Chill-Projet/chill-bundles!544
2023-05-24 14:34:57 +00:00
77997e2b6f FIX [review] fix review comments 2023-05-24 16:24:58 +02:00
6e618e688b DX [php-cs-fixer] 2023-05-24 15:50:25 +02:00
dad36927f3 FEATURE [export] uncheck all centers button 2023-05-24 15:34:39 +02:00
664bf743f9 Fix: force list of activities to be a list with incremental keys 2023-05-24 15:08:59 +02:00
f5448f9d95 DX [phpstan] fixes 2023-05-24 14:02:49 +02:00
a31c4063a1 DX [cs-fixer] fixes 2023-05-24 14:02:05 +02:00
c8f95528c0 Merge branch '98-fix-download-document' into 'master'
Resolve "Dans certaines situations, le téléchargement et déchiffrement des documents ne fonctionne pas"

See merge request Chill-Projet/chill-bundles!541
2023-05-24 11:40:03 +00:00
20023dff67 DX: fix cs 2023-05-24 13:35:35 +02:00
d82a3e0ff6 Fixed: [download document] add a target when downloading document 2023-05-24 13:13:57 +02:00
04359f27c6 Revert "Revert "FIX [duplicates] reinstate gestion des doublons""
This reverts commit 5109490aad.
2023-05-24 13:11:40 +02:00
5109490aad Revert "FIX [duplicates] reinstate gestion des doublons"
This reverts commit 5351223d44.
2023-05-24 13:09:04 +02:00
8b82e0c535 FIX [rights] user shouldn't be allowed to see accompanyingperiods from within household 2023-05-23 18:19:31 +02:00
5351223d44 FIX [duplicates] reinstate gestion des doublons 2023-05-23 18:18:44 +02:00
53aa887da5 Fixed: [vue] add condition to use dropdown or single button 2023-05-23 18:10:29 +02:00
ef6a5e0b6b UX: [vue] Change single button notification by dropdown button (edit workAction) 2023-05-23 16:32:08 +02:00
5931b2f709 UX: [vue] Fix picto color in document actions dropdown 2023-05-23 16:30:26 +02:00
9d1e54d3a0 Add drowndown on notification button for Documents Evaluations 2023-05-23 11:29:27 +02:00
a8945f5701 Merge branch 'master' into 709-notification-eval-action 2023-05-22 10:52:59 +02:00
674e057f67 fixes for user permission list 2023-05-20 00:54:35 +02:00
b2e79b677b Feature: [admin] add an export list of all permissions associated to
each user
2023-05-20 00:34:53 +02:00
748e566c7e Feature: [admin] list of users on csv format 2023-05-20 00:03:25 +02:00
1f4c51f3bc Merge branch '96-worflow-regression' into 'master'
Workflow regression in accompanying period work

See merge request Chill-Projet/chill-bundles!538
2023-05-19 10:17:58 +00:00
dc6eeccaab Merge branch 'permission-page/modernize' into 'master'
DX et UX: permissions page

See merge request Chill-Projet/chill-bundles!530
2023-05-19 10:03:08 +00:00
0083842509 DX: modernize controller for permissions groups and order them alphabetically 2023-05-19 11:58:11 +02:00
ca7be4ecd0 Merge branch 'export/allow-check-multiple-geographical-zones' into 'master'
Feature: [export] allow to check multiple geographical layers in geographical aggregators

See merge request Chill-Projet/chill-bundles!532
2023-05-19 09:54:25 +00:00
785c70fe92 Merge branch 'exports/filters-on-work-date' into 'master'
Feature: [exports] add filters for start and end date for accompanying period works

See merge request Chill-Projet/chill-bundles!533
2023-05-19 09:51:06 +00:00
8bbca7e61a Merge branch 'master' into export/allow-check-multiple-geographical-zones 2023-05-19 11:50:12 +02:00
5d21612c2e Merge branch '98-fix-download-document' into 'master'
Fix: [document download] better memory management and introduce delay

See merge request Chill-Projet/chill-bundles!539
2023-05-19 09:45:57 +00:00
fb9f182edd Merge branch 'docgen-add-household-composition' into 'master'
Feature: add Household composition on household in docgen

See merge request Chill-Projet/chill-bundles!537
2023-05-19 09:39:56 +00:00
bbd3d2a83f Fix: [document download] better memory management and introduce delay
before opening

Related to https://gitlab.com/Chill-Projet/chill-bundles/-/issues/98
2023-05-19 11:34:25 +02:00
e87420dc57 Merge branch '20-finalisation-cire' into 'master'
Finalisation cire

See merge request Chill-Projet/chill-bundles!529
2023-05-19 08:26:39 +00:00
f1bf02d2b4 css classes 2023-05-17 19:38:48 +02:00
8a35c2e2ee Fix workflow regression with accompanying period work (introduced by commit 6b90a7d2a7 24/01/2023) 2023-05-17 16:33:07 +02:00
fbd555e89a Feature: add Household composition on household in docgen 2023-05-17 16:05:53 +02:00
66dc027354 Fixed: fix first execution of accompanying period step change cronjob 2023-05-17 13:27:20 +02:00
8863e0a92e Fixed: force string on username 2023-05-17 13:24:44 +02:00
db9fef095a Fixed: force default values for cc users in workflow 2023-05-17 13:24:15 +02:00
1df2342c49 Merge branch 'master' into 20-finalisation-cire 2023-05-17 10:40:01 +02:00
addbdacee8 Merge branch 'feature/change-parcours-status' into 'master'
Feature/change parcours status

See merge request Chill-Projet/chill-bundles!527
2023-05-17 08:13:18 +00:00
8a684734e7 Fixed: fix docgen normalization on household with "old" members
When a household had old members, the indexes of each "current" members
should be numerical and contiguous, to be transformed in a list. If this
is not the case, the members are mapped to an associative array.

This commit alter the generic DocGenObjectNormalizer to ensure that
the ReadableCollection are normalized using the
CollectionDocGenNormalizer as default, which do not preserve keys.
2023-05-16 23:30:02 +02:00
1abaf2acb0 DX: add help and description to use ImportSocialWorkMetadata command 2023-05-10 10:28:36 +02:00
a0ae1f0d0f FIX [budget] display budget element comment if it is of kind 'autre' 2023-05-03 12:11:00 +02:00
2554da9dd8 Fix: urgent fix for EntityToJsonTransformer
The throw on error flag imposes us to propose a valid json string for decoding
2023-04-28 23:19:23 +02:00
3e3f20993d fix migration after test on real data 2023-04-28 15:55:41 +02:00
997f3cdb09 Feature: [exports] add filters for start and end date for accompanying period works 2023-04-28 12:37:28 +02:00
ab5ad7ae14 fix cs 2023-04-28 12:02:31 +02:00
36413f16c3 DX: convert closure to arrow function 2023-04-28 11:51:16 +02:00
f75b90cb26 Feature: [export] add filters regarding to accompanying period infos 2023-04-28 11:49:37 +02:00
1956836f88 add migration to fix existing period steps 2023-04-28 11:49:37 +02:00
ea4294d12d add start date's accompanying period in accompanyingperiod info 2023-04-28 11:49:36 +02:00
c73e57ad73 doc: add info about syncrhonizing views 2023-04-28 11:49:36 +02:00
5b729e1cb1 add dev docs 2023-04-28 11:49:36 +02:00
229af2e4f9 Feature: Adapt filters and aggregators with new steps 2023-04-28 11:49:36 +02:00
e80a6e417b Feature: Track update of entities if no user is associated to the request
This happens in scripts/cli (messenger, ...)
2023-04-28 11:49:35 +02:00
c5989de120 Feature: Adapt UI to show new steps 2023-04-28 11:49:35 +02:00
fcbc00d0f1 Feature: force to add updatedAt and createdAt even if no user iss associated 2023-04-28 11:49:35 +02:00
722f053f06 Feature: Change accompanying period info step in a cronjob 2023-04-28 11:49:35 +02:00
97b7ff2e43 Feature: takes activity into account for AccompanyingPeriodInfo 2023-04-28 11:49:34 +02:00
f3e0302f3f Feature: takes document and evaluation update into account for AccompanyingPeriodInfo 2023-04-28 11:49:34 +02:00
4974995ea2 Feature: add evaluation info to accompangyin preiod info 2023-04-28 11:49:34 +02:00
f2e1c73f37 Build parts to track info on accompanying period 2023-04-28 11:49:33 +02:00
7e3295c71f Merge branch 'rector/rules-up-to-php74' into 'master'
Rector/rules up to php74

See merge request Chill-Projet/chill-bundles!522
2023-04-27 21:42:31 +00:00
b3d881c675 Merge branch 'refactor-using-rector-202303' into 'master'
DX: rector rules up to PHP7.3

See merge request Chill-Projet/chill-bundles!513
2023-04-27 21:35:30 +00:00
47d0334b9e Merge remote-tracking branch 'origin/master' into rector/rules-up-to-php74 2023-04-27 23:32:31 +02:00
c94653a388 Merge remote-tracking branch 'origin/master' into refactor-using-rector-202303 2023-04-27 23:23:49 +02:00
Lucas Silva
1a66a08142 Button in vue edit 2023-04-27 16:01:35 +02:00
Lucas Silva
71e8e2baee [Fix] Case where two evaluation showed in the same time in notification 2023-04-27 15:00:26 +02:00
Lucas Silva
0a2f41c8a0 adding button notification in edit view of a work. 2023-04-27 10:59:09 +02:00
Lucas Silva
67b32341d1 adding referer in list action 2023-04-27 10:58:31 +02:00
Lucas Silva
cb37e8c006 Merge branch 'master' into 709-notification-eval-action 2023-04-26 13:46:41 +02:00
ba43b6b025 Fix: align ux design styles to chill theme 2023-04-25 17:57:33 +02:00
cdaca533a0 Feature: [export] allow to check multiple geographical layers in
geographical aggregators

BC: saved exports which activated this layers won't work any more. This
is the query to find them:

```sql
SELECT * FROM chill_main_saved_export
WHERE
    options->'export'->'export'->'aggregators'->'accompanyingcourse_geographicalunitstat_aggregator'->>'enabled' = '1'
```
2023-04-25 17:37:27 +02:00
00e62442cc Fix: fix typo in translation 2023-04-25 17:10:07 +02:00
a539febcfe Merge branch 'geographical-units/force-make-valid-during-import' into 'master'
Fix: make geographical units valid during imports

See merge request Chill-Projet/chill-bundles!524
2023-04-25 12:34:21 +00:00
1eb78d7273 Merge branch 'draft-periods-without-creator' into 'master'
Display too draft periods without creator in periods of a person

See merge request Chill-Projet/chill-bundles!526
2023-04-25 12:30:22 +00:00
1e2ca764c1 UX: more precision for the explanation of course draft pages 2023-04-25 14:20:24 +02:00
a859b7ea93 Merge branch '92-detail-address-button' into 'master'
Intégration bouton address details

See merge request Chill-Projet/chill-bundles!528
2023-04-25 10:38:18 +00:00
49094ff54a Merge branch 'improve-budget-template' into 'master'
improve Budget template

See merge request Chill-Projet/chill-bundles!514
2023-04-25 10:37:42 +00:00
1d2b6e167f improve Budget template 2023-04-25 10:37:41 +00:00
73c0dd0e9e Merge branch 'fix-event-bundle' into 20-finalisation-cire 2023-04-24 17:24:44 +02:00
8fd9010ea5 fix event bundle stuffs
- adapt event templates
- event bundle: fix deprecated deps injections
- fix error with n=0 not iterated into querybuilder with centers loop
2023-04-24 17:22:01 +02:00
488a0e5f0c Merge branch 'improve-budget-template' into 20-finalisation-cire 2023-04-24 16:22:30 +02:00
9918cf2d58 Fix: authorization helper won't send a list of center if an admin is authenticated 2023-04-24 15:50:27 +02:00
0c5a06c678 Fix: correct usage of badRequestHttpException signature 2023-04-24 15:50:08 +02:00
cb0ff88318 Fix action column width 2023-04-24 13:29:45 +02:00
be965e8698 - improve title hierarchy and ergonomie 2023-04-24 13:01:58 +02:00
241e605ea6 - style of h3 subtitle 2023-04-24 12:22:41 +02:00
fe3d437096 improve title hierarchy coherence 2023-04-24 12:12:10 +02:00
c1f5f02c41 Merge branch 'master' into improve-budget-template 2023-04-24 11:51:58 +02:00
13feb3b212 [twig][templates] introduce an option in adress_entity_render to display or not the address details button 2023-04-21 21:15:35 +02:00
dc22c94b95 Fix person banner contact details responsive placement 2023-04-21 21:10:51 +02:00
7cb7897e12 Align address detail button style with banner context buttons 2023-04-21 20:20:55 +02:00
01f2697b8d Merge branch 'admin-permissionsgroup-templates' into 'master'
Improve permissionsgroup page in admin templates

See merge request Chill-Projet/chill-bundles!504
2023-04-21 15:36:00 +00:00
025ee2ea95 UX: [Admin][persmissionsgroup] complete in template: content wrapper with bootstrap classes 2023-04-20 20:24:23 +02:00
631d65a57f improve indentation 2023-04-20 18:09:25 +02:00
dde35be9c3 hide pagination if no periods 2023-04-20 18:05:39 +02:00
a59e84b029 Display too draft periods without creator in periods of a person 2023-04-20 16:37:10 +02:00
60ada2edce Merge branch 'maintenance/deprecate-swiftmailer' into 'master'
DX: [mailer] deprecate the chill mailer based on swift mailer + fix RoleScopePickerType

Closes #90

See merge request Chill-Projet/chill-bundles!525
2023-04-19 11:09:09 +00:00
e6163b2bc3 DX: fix cs 2023-04-19 13:05:21 +02:00
906d1fdab5 DX: remove usage of deprecated Role class 2023-04-19 13:01:48 +02:00
a1421ea99f Fix: fix usage of scope picker with unactives scopes 2023-04-19 13:00:31 +02:00
cb1ea8c622 DX: [mailer] deprecate the chill mailer based on swift mailer 2023-04-19 12:23:15 +02:00
b985e1c93e Merge branch 'fixes-for-imports' into 'master'
Fix: fix import of address and problematiques

See merge request Chill-Projet/chill-bundles!518
2023-04-18 19:17:58 +00:00
929c9f4f72 Merge branch 'calendar/fix-loading-msgraph-events' into 'master'
Fix: small fixes for remote calendars

See merge request Chill-Projet/chill-bundles!521
2023-04-18 19:17:44 +00:00
eaeab4ed2b Merge branch 'exports/fixes-202304' into 'master'
Fix: fix exports

See merge request Chill-Projet/chill-bundles!520
2023-04-18 19:17:32 +00:00
034e2553bc Fix option with RoleWithoutScope distinction. Remove flag. 2023-04-18 21:13:24 +02:00
a0d0c3840f Fix deprecated Role call 2023-04-18 19:04:30 +02:00
b69fb740b1 Fix: make geographical units valid during imports 2023-04-18 11:36:46 +02:00
d31021247b Merge branch '73-user-manual-link' into 'master'
Feature [manual] update user manual link in footer

See merge request Chill-Projet/chill-bundles!523
2023-04-18 09:18:55 +00:00
d898f3ffce Feature [manual] update user manual link in footer 2023-04-17 10:44:43 +02:00
25c033be61 DX: apply rector rules 2023-04-15 00:47:06 +02:00
746ed4f5e5 DX: fix cs 2023-04-15 00:43:55 +02:00
80647147ee Merge branch 'refactor-using-rector-202303' into rector/rules-up-to-php74 2023-04-15 00:43:39 +02:00
a9db133a7b DX: fix typing in SearchProvider 2023-04-15 00:33:31 +02:00
858ade467c DX: rector rules upt to PHP 74 2023-04-15 00:20:19 +02:00
a68190f0c6 DX: set rector config: rules up to PHP74 2023-04-15 00:19:57 +02:00
459b91001f fix rector issues 2023-04-15 00:08:04 +02:00
19034ac1d8 Merge remote-tracking branch 'origin/master' into refactor-using-rector-202303 2023-04-15 00:07:09 +02:00
4c2e78ada7 DX: set rector back to php73 2023-04-15 00:02:39 +02:00
bef1d6b4a3 Merge branch '88-replace-activity-translations' into 'master'
Replace 'activité' by 'échange'

See merge request Chill-Projet/chill-bundles!519
2023-04-14 21:51:27 +00:00
c48c5875c6 DX: fix phpstan issues 2023-04-14 23:47:33 +02:00
ffa94dbe40 Fix: [msgraph calendar subscription] fix infinite iterating on calendar subscription
When the total of user to subscribe is a multiple of offset, the subscription was an infinite loop
2023-04-14 23:41:37 +02:00
33051366d4 Fix: [remote calendar ms graph] set another date format
The previous date format was compliant with the spec described here:

https://learn.microsoft.com/en-us/graph/api/user-list-calendarview?view=graph-rest-1.0&tabs=http

However, the date format was not accepted. This should be fix the date format.
2023-04-14 23:20:59 +02:00
2b42db87dc fix: [referrer scope aggregator] fix period overlapping 2023-04-14 21:59:25 +02:00
ffc3a97651 Permissions more readables with scope before role 2023-04-14 17:17:41 +02:00
499417aea5 permissiongroup: complete translation, remove itself role in 'which implies' 2023-04-14 17:04:04 +02:00
91d40d9153 remove (⚑) mark in added roles table (use flag only in form select) 2023-04-14 16:44:38 +02:00
ec7f59fc03 UX [translations] batch replace 'activité' by 'échange' + check !
note: fix some others mistakes
2023-04-14 15:58:27 +02:00
83ce3b3e92 Use ⚑ char to mark roles without scopes 2023-04-14 15:28:43 +02:00
324a350bf1 UX: [permissiongroup] improve transition between form and behind content 2023-04-14 15:14:08 +02:00
27415ce868 UX: [permissiongroup] sticky form more compact, and with help text 2023-04-14 14:38:23 +02:00
8042edc13c UX: [permissiongroup] fix form with new sticky-form class 2023-04-14 13:55:54 +02:00
318a84e04d permissiongroup: complete translation, remove itself role in 'which implies' 2023-04-14 13:22:31 +02:00
d759b9c727 Fixed: [import social work metadata] make association from parent/child SocialIssue and SocialAction on the owning side 2023-04-14 13:14:41 +02:00
0af13b028e UX: improve admin templates 2023-04-14 13:02:36 +02:00
91ba0c983d UX: improve admin > permissiongroup templates 2023-04-14 12:25:09 +02:00
78d3c6f1be Merge branch 'master' into admin-permissionsgroup-templates 2023-04-14 12:22:32 +02:00
19e51cc74c Fix: new column name in hexasmal data for geographical coordinates 2023-04-14 12:11:04 +02:00
48f5e7d21f Merge branch 'issue706_cc_in_workflow-2' into 'master'
Feature: [workflow] add users in cc

Closes champs-libres/departement-de-la-vendee/chill#706

See merge request Chill-Projet/chill-bundles!517
2023-04-13 14:51:32 +00:00
a9fe834978 Fixed: [homepage] count also workflows in cc 2023-04-13 12:25:06 +02:00
a21637331f Fixed: [workflow] validation of users in cc and dest
The validation is processed at the form step, so before the transition is processed
2023-04-13 12:24:44 +02:00
63759a940f Feature: [homepage] group the counter of tasks in warning and alert state into one counter 2023-04-13 12:21:48 +02:00
1cd153fb78 DX: fix CS 2023-04-13 09:58:22 +02:00
0335986326 Merge remote-tracking branch 'origin/master' into issue706_cc_in_workflow-2 2023-04-13 09:53:23 +02:00
1ecb285687 Merge branch 'issue707_docgen_filter_activity_by_user' into 'master'
Feature: allow filtering activities in docgen for acc course by logged user

See merge request Chill-Projet/chill-bundles!507
2023-04-12 16:25:58 +00:00
a553dc9aab UI: fix replacement Activité => échange in french translations 2023-04-12 18:18:08 +02:00
d0830079da DX: fix generation in test mode 2023-04-12 18:17:48 +02:00
2a4b73457b DX: fix phpstan issues 2023-04-12 17:48:02 +02:00
d04011ca07 Merge remote-tracking branch 'origin/master' into issue707_docgen_filter_activity_by_user 2023-04-12 13:49:37 +02:00
796608b399 Merge branch 'track-address-reference-update' into 'master'
Feature: Track address reference update

See merge request Chill-Projet/chill-bundles!500
2023-04-12 07:54:06 +00:00
b0ac8ce5af Merge remote-tracking branch 'origin/master' into track-address-reference-update 2023-04-12 09:45:19 +02:00
d70a0fa08b Merge branch 'fix-phpstan-issues-202303' into 'master'
DX: fix phpstan issues (2023-03)

See merge request Chill-Projet/chill-bundles!510
2023-04-11 20:11:18 +00:00
8bec6feb96 DX: fix ci and phpstan issues 2023-04-11 22:01:47 +02:00
4db1ff405e fix new phpstan issues 2023-04-11 13:04:08 +02:00
841bdb0ebf fix issues from master 2023-04-11 11:43:01 +02:00
d9dd8d7317 Merge remote-tracking branch 'origin/master' into fix-phpstan-issues-202303 2023-04-11 11:36:11 +02:00
98aad8c4b6 Fixed: [accompanying period work / edit] allow endDate to be equal to startDate, and show validation errors to users
Fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/79
2023-04-11 10:45:10 +02:00
ef13833966 Fixed: [create person] handle case when the user has two differents groups in the same center
Fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/72
2023-04-11 10:16:09 +02:00
9853845c9c Fixed: [workflow] show error message when applying a transition and no dest users are chosen
fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/80
2023-04-07 17:38:57 +02:00
a42a4ab9bd Fixed: fix empty result in household api search
fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/85
2023-04-07 17:34:12 +02:00
839b0fc826 Fixed: [section] remove hardcoded link to phonecall aside activity 2023-04-07 16:24:28 +02:00
cc69a3e86b Fixed: [Activity] allow to set a user null
Fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/74
2023-04-06 17:29:05 +02:00
4d734714a8 Fixed: [person search] forward missing parameter city
Fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/84
2023-04-05 20:31:19 +02:00
1c19d01b60 Fixed: [calendar doc] Add a return path to the calendar edit's form when the document has been generated
Fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/81
2023-04-05 20:23:43 +02:00
3df8ee6dc4 fix cs 2023-04-05 19:31:27 +02:00
386d1e44d0 Fixed: [accompanying course document] fix access to accompanying course document
The entity AccompanyingCourseDocument didn't had any center associated with this entity. Implementing the interface `HasCenterInterface` fixed the problem.

Fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/83
2023-04-05 19:29:33 +02:00
907c724047 Feature: [calendar doc] re-introduce button to edit document title and remove document 2023-04-03 21:30:50 +02:00
4cf6721e35 Feature: [calendar] convert calendar to activity in the context of a person 2023-04-03 19:59:31 +02:00
46e1891386 Fixed: fix error when displaying calendar list with invite in person context 2023-04-03 19:17:30 +02:00
380ad2e2e6 UI: replace "période" by "parcours" in french 2023-04-03 18:54:11 +02:00
cba2bd8260 Merge branch 'renaming-work' into 'master'
Rename "Personne" to "Usager" in French translations

See merge request Chill-Projet/chill-bundles!516
2023-03-31 12:58:57 +00:00
ee61d131ec UI: Replace "personne" by usager in french translation 2023-03-31 14:58:07 +02:00
70141fd0e3 UI: rename 'liste des échanges' to "échanges" in person menu 2023-03-31 14:36:55 +02:00
94c8b571f0 Merge branch 'change_activity_translation' into 'master'
Change activity translation

See merge request Chill-Projet/chill-bundles!515
2023-03-31 12:29:20 +00:00
94a099c30c fix typo in échange gender 2023-03-31 12:29:00 +00:00
3ce6af4c36 FIX [translations] last fixes for translations créé instead of créée 2023-03-31 12:01:35 +02:00
c8e33daf4b change all translations using activité to using échange to make all chill versions coherent 2023-03-30 20:25:59 +02:00
0f635847f2 Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2023-03-30 19:43:01 +02:00
d290572ca8 FIX [translation] add hardcoded text into a translation 2023-03-30 19:41:55 +02:00
3c88630edc fix: [calendar list on person page] add scripts to download documents 2023-03-30 17:13:25 +02:00
866b92f7e5 Fixed: loading of main user through pick entity in calendar form 2023-03-30 16:29:02 +02:00
Lucas Silva
3576f7f14f Finishing evaluation document view and fixing dropdown in show 2023-03-30 14:32:00 +02:00
Lucas Silva
d8d517017d switching to new syntax 2023-03-30 14:31:02 +02:00
e84a93bd0c wip prepare rector config for up to PHP74 ruleset 2023-03-30 11:49:04 +02:00
087ada2250 UX: Better use of flex-table and tables in budget twig templates 2023-03-30 00:07:38 +02:00
4c5dae60a8 DX: apply rector rulesets up to PHP 73 2023-03-29 22:39:11 +02:00
b9a7530f7a DX: apply rector rulesset up to PHP72 2023-03-29 22:32:52 +02:00
64b8ae3df1 DX: temporarily allow failure on unit tests 2023-03-29 22:15:20 +02:00
nobohan
c9f26f3635 Feature: filter activities by user: add denormalize method 2023-03-29 22:12:59 +02:00
a943639cf1 Feature: [reassign] by default, see and reassign 50 courses at once 2023-03-29 22:11:45 +02:00
40e751c783 DX: clean classe 2023-03-29 22:08:41 +02:00
nobohan
6d6aa689d0 Feature: filter activities by user in docgen: use creator as user 2023-03-29 22:05:36 +02:00
nobohan
03fe9210a9 upd CHANGELOG 2023-03-29 21:23:18 +02:00
nobohan
f3ede8122d remove commented lines 2023-03-29 21:23:18 +02:00
nobohan
801853e60a Feature: translation for docgen + php cs fix 2023-03-29 21:23:18 +02:00
nobohan
3927a7f62b Feature: allow filtering for users in the public form for docgen acc course - php code fix 2023-03-29 21:19:53 +02:00
nobohan
1167ff25b1 Feature: allow filtering for users in the public form for docgen acc course 2023-03-29 21:19:53 +02:00
nobohan
5bba1aca93 Feature: allow filtering works in docgen for acc course by logged user - php cs fixer 2023-03-29 21:19:53 +02:00
nobohan
9ded3eb631 Feature: allow filtering works in docgen for acc course by logged user 2023-03-29 21:19:53 +02:00
nobohan
bf79e0afdb Feature: allow filtering activities in docgen for acc course by logged user 2023-03-29 21:19:53 +02:00
nobohan
6bf8789f85 Feature: add cc users in workflow: correct constraint validation 2023-03-29 21:07:25 +02:00
nobohan
8c37afa3a9 Feature: add cc users in workflow: add constraint validation on EntityWorkflowStep 2023-03-29 12:09:12 +02:00
nobohan
a8c2750ac8 Feature: add cc users in workflow: move isNotificationCc to WorkflowNotificationHandler 2023-03-29 11:19:52 +02:00
e45952f28c Feature: add cc users in workflow: add suggested users in form type 2023-03-29 11:19:52 +02:00
nobohan
3de5d29fe8 Feature: show 'Cc' for notications as Cc 2023-03-29 11:19:52 +02:00
nobohan
94046aab81 Feature: add cc users in workflow: show in workflow history and breadcrumb 2023-03-29 11:19:52 +02:00
nobohan
a3db67fd1e Add users in cc in workflow: fix code style 2023-03-29 11:19:52 +02:00
nobohan
295406d9b7 Feature: add cc users in workflow form: not required 2023-03-29 11:19:52 +02:00
nobohan
35174e4241 Feature: show my workflows in Cc in my workflow page 2023-03-29 11:19:52 +02:00
nobohan
7580565e08 Feature: show my workflows in Cc in homepage vue widget 2023-03-29 11:19:51 +02:00
nobohan
a992c45720 Feature: create a new API endpoint for my workflows in Cc 2023-03-29 11:19:51 +02:00
nobohan
1789a75216 Feature: send notification on ccuser for workflows 2023-03-29 11:19:51 +02:00
nobohan
2b3d7f34fc Feature: Add new field ccuser in workflow step form 2023-03-29 11:19:51 +02:00
nobohan
cbc3ee68b5 Feature: Add new field ccuser in workflow step entity 2023-03-29 11:19:51 +02:00
58faac5bca DX: fix cs 2023-03-28 23:27:25 +02:00
ea10565e17 DX: [rector] apply rector rule InlineConstructorDefaultToPropertyRector 2023-03-28 23:20:37 +02:00
c5ec0e77ff DX: bootstrap rector 2023-03-28 23:20:10 +02:00
2a303c7ba4 DX: fix contravariant type-hinting on ThirdPartyNormalizer 2023-03-28 23:01:00 +02:00
e935bc20aa DX: fix baseline from removed classes 2023-03-28 22:58:30 +02:00
4f2355b313 DX: increase memory in phpstan execution 2023-03-28 22:58:13 +02:00
48772efd54 DX: fix phpstan issues 2023-03-28 22:32:08 +02:00
331443ae12 fix cs 2023-03-28 18:12:47 +02:00
561d069a3e DX: [budget calculator] restore previous budget's element type to Charge/Resource kind
+ improve typing
2023-03-28 18:11:41 +02:00
0133e202d2 More doc for CalculatorInterface 2023-03-28 16:59:54 +02:00
59147b2217 Fix: more consistency in Resource and Charge repositories 2023-03-28 16:59:08 +02:00
Lucas Silva
afb25276ee enleve l'id en bas de page 2023-03-23 15:32:30 +01:00
Lucas Silva
e850f67b00 rajout du voter, pour document et action dans la notif -> affiche les documents mais aussi le fais de partager dans notification create 2023-03-23 14:59:32 +01:00
Lucas Silva
f4a7145627 Merge remote-tracking branch 'origin/master' into 709-notification-eval-action 2023-03-23 13:34:59 +01:00
Lucas Silva
6b5423ded3 Merge remote-tracking branch 'origin/master' into 709-notification-eval-action 2023-03-23 11:35:53 +01:00
Lucas Silva
eb765585b2 Merge remote-tracking branch 'origin/master' into 709-notification-eval-action 2023-03-23 10:47:46 +01:00
Lucas Silva
1a759cabe4 changing evaluation for document -> no render for twig 2023-03-22 18:11:41 +01:00
99cdf0ebaf Feature: [update accompanying course] do not show "locate to person" button if the person is already locating the course 2023-03-22 15:32:43 +01:00
204c28d373 Feature: [address reference] adapt vue app AccompanyingCourse to allow to open address details modal 2023-03-22 15:32:43 +01:00
adc80d5080 Feature: [address reference] add a filter to filter person by ref status 2023-03-22 15:32:42 +01:00
f256dda6fe Feature: [address] apply details button on address-render-box 2023-03-22 15:32:42 +01:00
8177a0fcce Feature: Provide api endpoint for reviewing addresses
Feature: show warning when address does not match the reference

Feature: [address] do update the address from address reference when clicked inside address details
2023-03-22 15:32:42 +01:00
21e24c60c7 Feature: show list of geographical units which covers address in address details modal 2023-03-22 15:32:41 +01:00
71d0785ab4 Feature: add api endpoint for listing all geographical units covering an address 2023-03-22 15:32:40 +01:00
b740a88ae3 Feature: bootstrapping an app to show a modal for address details and showing it inside twig address's render box
Feature: showing map and link to external map, and address details inside address details modal

Feature: AddressDetailsMap show a warning if the address is incomplete
2023-03-22 15:32:40 +01:00
c56ae08fae Feature: [address reference] write logic to match existing addresses with updates
Feature: [address reference] match addresses with reference after import

fix sql query for address reference matcher
2023-03-22 15:32:37 +01:00
c9fe5a393f DX: [Address] fix inconsistencies between doctrine mapping and sql schema
DX: [Address] fix inconsistencies between doctrine mapping and sql schema

Fixed: Address vue module do now set empty value to empty string instead of null

DX: fixed AddressReferenceBaseImporterTest
2023-03-22 11:38:48 +01:00
8e0d144dd1 Feature: add columns into Address to track the matching with AddressReference 2023-03-22 11:36:03 +01:00
Lucas Silva
457d71b4f3 add service + template pour documents 2023-03-21 16:03:22 +01:00
Lucas Silva
ecb8ef0146 add notification service for AccompanyingPeriodWork in show 2023-03-21 14:34:38 +01:00
2fe77f2610 UX [admin][templates] fix styles on permissionsgroup pages for standard acl model (not vendee) 2023-03-08 20:05:51 +01:00
899 changed files with 19939 additions and 6417 deletions

6
.changes/header.tpl.md Normal file
View File

@@ -0,0 +1,6 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).

View File

677
.changes/v2.0.0.md Normal file
View File

@@ -0,0 +1,677 @@
## 2.0.0
* this is a release to relaunch our proceess of release with semantic versioning
## Test releases
### 2.0.0-beta3
* [person][export] Fixed: rename the alias for `accompanying_period` to `acp` in filter associated with person
* [activity][export] Feature: improve label for aliases in "Filter by activity type"
* [activity][export] DX/Feature: use of an `ActivityTypeRepositoryInterface` instead of the old-style EntityRepository
* [person][export] Fixed: some inconsistency with date filter on accompanying courses
* [person][export] Fixed: use left join for related entities in accompanying course aggregators
* [workflow] Feature: allow user to copy and send manually the access link for the workflow
* [workflow] Feature: show the email addresses that received an access link for the workflow
### 2.0.0-beta2
* [workflow]: Fixed: the notification is sent when the user is added to the first step.
* [budget] Feature: allow to desactivate some charges and resources, adding an `active` key in the configuration
* [person] Feature: on Evaluation, allow to configure an URL from the admin
### 2022-06
* [workflow]: added pagination to workflow list page
* [homepage_widget]: null error on tasks widget fixed
* [person-thirdparty]: fix quick-add of names that consist of multiple parts (eg. De Vlieger) within onthefly modal person/thirdparty
* [search]: Order of birthdate fields changed in advanced search to avoid confusion.
* [workflow]: Constraint added to workflow (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/675)
* [social_action]: only show active objectives (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/625)
* [household]: Reposition and cut button for enfant hors menage have been deleted (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/620)
* [admin]: Add crud for composition type in admin (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/611)
* [social_action]: only show active objectives (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/625)
## Test releases
### 2022-05-30
* fix creating a new AccompanyingPeriodWorkEvaluationDocument when replacing the document (the workflow was lost)
### 2022-05-27
* [storedobject] add title field on StoredObject entity + use it in activity documents (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/604)
* [main] add a "read more..." on comment embeddable when overflown (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/604)
* [person] add closing motive to closed acc course (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/603)
* [person] household filiation: fetch person info when unfolding person (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/586)
* [admin] repair edit of social action in the admin (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/601)
* [admin]: add select2 to Goal form type entity fields (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/702)
* [main] allow hide permissions group list menu (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
* [main] allow hide change user password menu (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
* [main] filter user jobs by active jobs (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
* [main] add civility to User (entity, migration and form type) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
* [admin] refactorisation of the admin section: reorganisation of the menu, translations, form types, new entities (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/592)
* [admin] add admin section for languages and countries (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/596)
* [activity] activity admin: translations + remove label field for comment on admin activity type (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/587)
* [main] admin user_job: improvements (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/588)
* [address] can add extra address info even if noAddress (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/576)
### 2022-05-06
* [person] add civility when creating a person (with the on-the-fly component or in the php form) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/557)
* [person] add address when creating a person (with the on-the-fly component or in the php form) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/557)
* [person] add household creation API point (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/557)
### 2021-04-29
* [person] prevent circular references in PersonDocGenNormalizer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/527)
* [person] add maritalStatusComment to PersonDocGenNormalizer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/582)
* Load relationships without gender in french fixtures
* Add command to remove old draft accompanying periods
* [parcours]: If users assings him/herself as referrer and job is not null. Update parcours job (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/578)
### 2021-04-28
* [address] fix bug when editing address: update location and addressreferenceId + better update of the map in edition (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/593)
* [main] avoid address reference search on undefined post code (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/561)
* [person] prevent duplicate relationship in filiation/household graph (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/560)
* [Documents] Validate storedObject and allow for null data (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/565)
* [parcours]: Comments can be unpinned + edit/delete for all users that are allowed to edit parcours (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/566)
### 2021-04-26
* [Datepickers] datepickers fixed when using keyboard to enter date (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/545)
* [social_action] Display 'agents traitants' in parcours resumé and social action list (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/568)
* [Person_search] Closed parcours shown within an accordeon that can be opened/closed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/574)
### 2021-04-24
* [notification email on course designation] allow raw string in email content generation
* [Accompanying period work] list evaluations associated to a work by startDate, and then by id, from the most recent to older
* [Documents] Change wording 'créer' to 'enregistrer' (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/634)
* [Parcours]: The number of 'mes parcours' displayed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/572)
* [Hompage_widget]: Renaming of tabs and removal of social actions tab (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/570)
* [activity]: Ignore thirdparties when creating a social action via an activity (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/573)
* [parcours]: change wording of warning message and button when user is not associated to a household yet (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/590#note_918370943)
* [Accompanying period work evaluations] list documents associated to a work by creation date, and then by id, from the most recent to older
* [Course comment] add validationConstraint NotNull and NotBlank on comment content, to avoid sql error
* [Notifications] delay the sending of notificaiton to kernel.terminate
* [Notifications / Period user change] fix the sending of notification when user changes
* [Activity form] invert 'incoming' and 'receiving' in Activity form
* [Activity form] keep the same order for 'attendee' field in new and edit form
* [list with period] use "sameas" test operator to introduce requestor in list
* [notification email on course designation] allow raw string in email content generation
* [Accompanying period work] list evaluations associated to a work by startDate, and then by id, from the most recent to older
* [evaluation_document] changing date to datetime in order to display the time at which document was created (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/569)
### 2021-04-13
* [person] household address: add a form for editing the validFrom date (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/541)
* [person] householdmemberseditor: fix composition type bug in select form (vuejs) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/543)
* [docgen] add more persons choices in docgen for course: amongst requestor (if person), resources of course (if person), and PersonResource (if person);
* [docgen] add a new context with a list of activities in course
* [docgen] add a comment in budget lines
* [notifications] allow to send a notification to an email address. The address receive an access link
* [adresses] add constraints in database to avoid errors later: postcode not null, and validfrom <= validto
* [accompanying work editor] add a label on document title input
### 2021-04-07
* notification list: move action buttons outside of the toggle
* fix detecting of non-read notification
* filter users which are disabled in search user api
* order query for location and add pagination in list
* allow every person which has part for a workflow to see the workflow page
* able to see the workflow if the evaluation document has been deleted
* hardcode the list of supported mime types for edition with collabora
* list of accompanying course: allow to see the pinned comment in list_item
### 2021-04-06
* [main] notification toggle read: correct js syntax for compilation in production (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/548)
* [parcours] Display of interlocuteurs changed to flex-table in parcours edit page to prevent cut-off of information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/535)
* [activity] espace entre les boutons pour supprimer les documents
### continuous release in February and March
* Creation of PickCivilityType, and implementation in PersonType and ThirdpartyType
* [person] Accompanying course evaluation documents: disable the WOPI edit link if mimetype not supported and if no keyInfos
(https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/585)
* [activity] display error messages above the form in creating a new location (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/481)
* [activity] show required field in activity edit/new by an asterix in the vuejs fields (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/494)
* [ACL] fix allow to see the course, event if the scope'course does not contains the scope's user
* [search] enforce limit of results for fetching rsults by search api https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/576
* [activity] Fix delete button for document (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/554)
* [activity] Add return path the document generation (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/553)
* [person] add person ressource to person docgen normaliser (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/517)
* [person] AccompanyingCourseWorkEdit: fix deleting evaluation documents (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/546)
* [person] AccompanyingCourseWorkEdit: download existing documents (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/512)
* [person] AccompanyingCourseWorkEdit: replace document by a new one (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/511)
* [person] AccompanyingPeriodWork: add referrers to work, add doctrine event listener to add logged user to referrers collection and display a referrers list in work list (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/502)
* [person] AccompanyingPeriodWorkEvaluation: fix circular reference when serialising (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/495)
* [person] order accompanying period by opening date in search persons, person and household period lists (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/493)
* [parcours] autosave of the pinned comment for draft accompanying course (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/477)
* [main] filter user job in undispatch acc period to assign (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/472)
* [main] filter user job in undispatch acc period to assign (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/472)
* [person] Add url in accompanying period work evaluations entity and form (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/476)
* [person] Add document generation in admin and in person/{id}/document (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/464)
* [activity] do not override location if already exist (when validating new activity) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/470)
* [parcours] Toggle emergency/intensity only by referrer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/442)
* [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)
* [draft periods] add a delete button (if acl granted) on each draft period listed on draft period page (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/463)
* [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)
* [budget]: budget enabled for persons and households (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/469)
* [person] residential address: show residential address or info in PersonRenderBox, refactor Residential Address (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/439)
* [thirdparty] Add a contact to a thirdparty from within onTheFly (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/345)
* [documents] Improve flex-table item-col placement when long buttons and long metadata
* [thirdparty] Fix display of multiple contact badges so they wrap onto next line (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/482)
* [confidential] Fix position of toggle button so it does not cover text nor fall outside of box (no issue)
* [parcours] Fix edit of both thirdparty and contact name (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/474)
* [template] do not list inactive templates (for doc generator)
* [household] bugfix if position of member is null, renderbox no longer throws an error (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/480)
* [parcours] location cannot be removed if linked to a user (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/478)
* [person] email added to twig personRenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/490)
* [activity] Only youngest descendant is kept for social issues and actions (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/471)
* [person] Add link to current household in person banner (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/484)
* [address] person badge in address history changed to open OnTheFly with all person info (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/489)
* [person] Change 'personne' with 'usager' and '&' with 'ET' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/499)
* [thirdparty] Add parameter condition to display centers or not (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/500)
* [phonenumber] Remove placeholder in phonenumber field (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/496)
* [person_resource] separate create page created to avoid confusion (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/504)
* [contact] add contact button color changed plus the pipe at the side removed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/506)
* [thirdparty] For contacts show current civility/profession in edit form + fix saving of edited information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/491)
* [household] create-edit household composition placed in separate page to avoid confusion (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/505)
* [blur] Improved positioning of toggle icon (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/486)
* [thirdparty] add firstname field to thirdparty 'child' or 'contact' types (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/508)
* [household] create-edit household composition placed in separate page to avoid confusion (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/505)
* [blur] Improved positioning of toggle icon (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/486)
* [parcours] List of parcours for a specific user so they can be reassigned in case of absence (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/509)
* [thirdparty] Thirdparty view page, english text translated (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/534)
* [social_action] Translation changed in evaluation section (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/512)
* [filiation] Possible to add person (or create onthefly) to add to filiation graph + add relation (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/519)
* [household] Within parcours listing page of household add create button (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/560)
* [person_resource] bugfix when adding thirdparty or freetext resource + prevent personOwner themselves to be added. (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/526)
* [aside_activity] style correction + sticky-form create button (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/529)
* [budget] order within the menu adjusted (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/592)
* [onthefly] fix create person. Bug was noticed in filiation (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/591)
* [parcours] Create document buttons made sticky (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/532)
* [person] Trailing guillemet removed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/530)
* [notification] Display of social action within workflow notification set to display block (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/537)
* [onthefly] trim trailing whitespace in email of person and thirdparty (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/542)
* [action] Only youngest descendant is kept for social issues and actions (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/471)
## Test releases
### test release 2022-02-21
* [notifications] Word 'un' changed to number '1' for notifications in user menu (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/483)
* [documents] 'gabarit' changed to 'modèle' (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/405)
* [person_resources] Menu name and order changed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/460)
* workflow: fix sending notifications
* [thirdparty] Extend the thirdparty search to thirdparty children (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/448)
* [person]: AddPersons: allow creation of person or thirdparty only (no users) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/422)
* [person]: AddPersons: allow creation of person or thirdparty depending on allowed types (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/422)
* [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)
* [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)
* [person_resources]: Renderboxes used to display person/thirdparty info (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/465)
* [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
* [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.
* [thirdparty]: address/phonenumber/email/fonction displayed in thirdpartyrenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/401)
* [thirdparty_contact]: in search results the 'qualité' is displayed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/465)
* [bug]: fix confidential toggle of address in thirdpartyrenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/460)
### test release 2022-02-14
* AddPersons: remove ul-li html tags from AddPersons (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/419)
* [doc-generator] do not set required fields for mainPerson, person1, person2 (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement#456)
* [doc-generation] add age and obele in the mainPerson, person1 and person2 list + add obele in person renderString if addAge (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/370)
* [person] accompanying course work: fix on-the-fly update of thirdParty
* fix normalisation of accompanying course requestor api (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/378)
* [person] add a returnPath when clicking on some Person or ThirdParty badge (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/427)
* [person] accompanying course work: fix on-the-fly update of thirdParty
* [on-the-fly] close modal only after validation
* [person] correct thirdparty PATCH url + add email and altnames in AddPerson and serializer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/433)
* change order for accompanying course work list
* [parcours]: Mes parcours brouillon added to user menu (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/440)
* [Documents]: List view adapted to display more information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/414)
* [person]: style fix in parcours listing per person. (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/432)
* [parcours]: Only the referrer can toggle the intensity of the parcours (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/442)
* [household]: display address of current household (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/415)
* ajoute un ordre dans les localisation (api)
* [pick entity]: fix translations in modal (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/419)
* [homepage_widget]: fix translation on emergency badge (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/440)
* [person]: create person and household added to button dropdown (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/454)
* display full address in address.text in normalization. Adapt AddressRenderBox
* [address]: Correction residential address 'depuis le' (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/459)
* [Documents]: List view adapted to display more information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/414)
* [Thirdparty_contact]: address blurred if confidential in view page (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/450)
* [thirdparty] Add a contact to a thirdparty from within onTheFly (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/345)
### test release 2021-02-01
* renommer "dossier numéro" en "parcours numéro" dans les résultats de recherche
* renomme date de début en date d'ouverture dans le formulaire parcours
* [homepage widget] improve content tables, improve counter pluralization with style on number
* [notification lists] add comments counter information
* [workflows] fix popover header with previous transition
* [parcours]: validation + message for closing parcours adjusted.
* [household]: household composition double edit button replaced by a delete action (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/426)
[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.
* [person]: Comment on marital status is possible even if marital status is not defined (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/421)
* [parcours]: In the list of person results the requestor is not displayed if defined as anonymous (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/424)
* [bugfix]: modal closes and newly created person/thirdparty is selected when multiple persons/thirdparties are created through the modal (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/429)
* [person_resource]: Onthefly button added to view person/thirdparty and badge differentiation for a contact-thirdparty (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/428)
* [workflow][notification] improve how notifications and workflows are 'attached' to entities: contextual list, counter, buttons and vue modal
* [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)
* [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc.
### 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)
* [person] accompanying course: close modal when edit participation (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/420)
* [person] accompanying course: treat validation error when editing on-the-fly entities (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/420)
* [activity] show activity attendee (présence) in the activity list (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/412)
* [activity] admin: change validation rule for social action visible field (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/413)
* [parcours]: component added to change the opening date of a parcours (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/411)
* [search]: listing of parcours display changed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/410)
* [user]: page with accompanying periods to which is user is referent (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/408)
* [person] age added to renderstring + renderbox/ vue component created to display person text (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/389)
* [household member editor] allow to push to existing household
### test release 2021-01-28
* [person] improve filiations vis graph: disable physics, use chill colors for persons-households-course, increase label of relations, remove labels on household arrows and other improvements (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/286, https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/362)
* [activity] Order activity by date and by id (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/364)
* [main] increase length of 4 Address fields (change to TEXT, no size limits) (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/277)
* [main] Add confidential option for address, in edit and view (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/165)
* [person] name suggestions within create person form when person is created departing from a search input (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/377)
* [person] Add residential address entity, form and list for each person
* [aside_activity]: dynamicUserPickerType used (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/399)
* dispatching list
### test release 2021-01-26
* [parcours] comments truncated if too long + link added (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/406)
* [person]: possibility to add person resources (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/382)
* [person ressources]: module added
### test release 2022-01-24
* [person] name suggestions within create person form when person is created departing from a search input (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/377)
* [notification: formulaire création] descend la box avec la description dans le bas du formulaire
* [notification for activity]: fix link to activity
* [notification] add "URGENT" before accompanying course with emergency = true
* [notification] add a "read more" button on system notification
* [notification] add `[Chill]` in the subject of each notification, automatically
* [notification] add a counter for notification in activity list and accompanying period list, and search results
* [parcours] bugfix if deathdate is not defined (eg. for a thirdparty) parcours is still displayed. Gave error before.
* [workflow] add breadcrumb to show steps
* [popover] add popover html popup mechanism (used by workflow breadcrumb)
* [templates] improve updatedBy macro in item metadatas
* [parcours]: bug fix when comment is pinned all other comments remain in the collection (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/385)
* [workflow]
* add My workflow section with my opened subscriptions
* apply workflow on documents, accompanyingCourseWork and Evaluations
* [wopi-link] a new vue component allow to open wopi link in a fullscreen chill-themed modal
### test release 2022-01-19
* vuejs: add dead information on all on-the-fly person render boxes, in vis graph and other templates (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/271)
* [thirdparty] fix bug in 3rd party view: types was replaced by thirdPartyTypes
* [main] location form type: fix unmapped address field (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/246)
* [activity] fix wrong import of js assets for adding and viewing documents in activity (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/83 & https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/176)
* [person]: space added between deathdate and age in twig renderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/380)
* [forms] dynamic picker types for user/person/thirdparty types created (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/386)
### test release 2022-01-17
* [main] Add editableByUser field to locationType entity, adapt the admin template and add this condition in the location-type endpoint (see https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/297)
* [main] Add mainLocation field to User entity and add it in user form type
* rewrite page which allow to select activity
* [main] Add mainLocation field to User entity and add it in user form type
* [course list in person context] show full username/label for ref
* [accompanying period work] remove the possibility to generate document from an accompanying period work
* vuejs: add validation on required fields for AddPerson, Address and Location components
* vuejs: treat 422 validation errors in locations and AddPerson components
* [person]: space added between deathdate and age in twig renderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/380)
## Test releases
* vuejs: add validation on required fields for AddPerson, Address and Location components
* vuejs: treat 422 validation errors in locations and AddPerson components
* [person]: space added between deathdate and age in twig renderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/380)
### test release 2022-01-12
* fix thirdparty normalizer on telephone field: https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/322
### test release 2022-01-11
* vuejs: translate in French all multiselect widgets
* [address] define address lines according postal standards for France and Belgium (default) and change AddressRender, chill_entity_render_box and AddressRenderBox.vue
* [household] change translations (champs-libres/departement-de-la-vendee/accent-suivi-developpement#109)
* [household] add address i18n in household component (champs-libres/departement-de-la-vendee/accent-suivi-developpement#158)
* [household] add on the fly i18n in household component
* [household] redirect to the household page when a household is created from a person (champs-libres/departement-de-la-vendee/accent-suivi-developpement#175)
* [household] household member editor: display alert if some members have already an household (champs-libres/departement-de-la-vendee/accent-suivi-developpement#172)
* [household] household member editor: do not add in new members if the member is included in the members of household (champs-libres/departement-de-la-vendee/accent-suivi-developpement#123)
* [household] household member editor: remove markNoAddress button (champs-libres/departement-de-la-vendee/accent-suivi-developpement#109)
* [person]: ordering fields in add person (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/61)
* [person]: Add email and alt names in add person (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/61)
* [accompanyingCourse] Add a delete action and delete buttons to delete a accompanying course when step = DRAFT (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/64)
* [accompanyingCourse] Add a administrative location in the accompanying course, set the user current location as default, allow to select a location in a select field and do not allow to confirm the accompanying course if location is empty.
* [accompanyingCourse] Add the administrative location in the available variables for document generation
* AddAddress: optimize loading: wait for the user finish typing;
* UserPicker: fix bug with deprecated role
* docgen: add base context + tests
* docgen: add age for person
* [household menu] fix filiation order https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/265
* [AddAddress]: optimize loading: wait for the user finish typing;
* [UserPicker]: fix bug with deprecated role
* [docgen]: add base context + tests
* [docgen]: add age for person
* [task]: fix dropdown menu style + fix bug in singleTaskController (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/338)
* Household: fix bug when moving person on the same day (see https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/281)
* Household: show date validFrom and validTo when moving
* address reference: add index for refid
* [accompanyingCourse_work] fix styles conflicts + fix bug with remove goal (remove goals one at a time)
* [accompanyingCourse] improve masonry on resume page, add origin
* [notification] new notification interface, can be associated to AccompanyingCourse/Period, Activities.
* List notifications, show, and comment in User section
* Notify button and contextual notification box on associated objects pages
* [accompanyingCourse] add a comment for each resource associated. A modal allow to save comment. Comment is displayed in on-the-fly show modal of the accompanyingCourse context (edit page + resume page).
### test release 2021-12-14
* [asideactivity] creation of aside activity category fixed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/262)
* [vendee/person] fix typo "situation professionelle" => "situation professionnelle"
* [main] add availableForUsers condition from locationType in the location API endpoint (champs-libres/departement-de-la-vendee/accent-suivi-developpement#248)
* [main] add the current location of the user as API point + add it in the activity location list (champs-libres/departement-de-la-vendee/accent-suivi-developpement#247)
* [activity] improve show/new/edit templates, fix SEE and SEE_DETAILS acl
* [badges] create specific badge for TMS, and make person/thirdparty badges clickable with on-the-fly modal in :
* concerned groups items (activity, calendar)
* accompanyingCourseWork lists
* accompanyingCourse lists
* [acompanyingCourse] add initial comment on Resume page
* [person] create button full width (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/330)
### test release 2021-12-11
* [main] add order field to civility
* [main] change address format in case the country is France, in Address render box and address normalizer
* [person] add validator for accompanying period with a test on social issues (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/76)
* [activity] fix visibility for location
* [origin] fix origin: use correctly the translatable strings
* /!\ everyone must update the origin table. As there is only one row, execute `update chill_person_accompanying_period_origin set label = jsonb_build_object('fr', 'appel téléphonique');`
* [person] redirect bug fixed.
* [action] add an unrelated issue within action creation.
* [origin] fix origin: use correctly the translatable strings
* /!\ everyone must update the origin table. As there is only one row, execute `update chill_person_accompanying_period_origin set label = jsonb_build_object('fr', 'appel téléphonique');`
* [main] change order of civilities in civility fixtures (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191)
* [person] set min attr in the minimum of children field (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191)
* [person] add marital status date in person view (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191)
* [person] show number of children + allow set number of children to null (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191)
* [person] show acceptSMS option (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191)
* [person] add death information in person render box in twig and vue render boxes (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191)
* [asideactivity] creation of aside activity category fixed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/262)
* [vendee/person] fix typo "situation professionelle" => "situation professionnelle"
* [accompanyingcourse_work] Changes in layout/behavior of edit form (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/321)
* [badge-entity] design coherency between pills badge-person and 3 kinds of badge-thirdparty
* [AddPersons] suggestions row are clickable, not only checkbox
### test release 2021-12-06
* [main] address: use search API end points for getting postal code and reference address (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/316)
* [main] address: in edit mode, select the encoded values in multiselect for address reference and city (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/316)
* [person search] fix bug when using birthdate after and birthdate before
* [person search] increase pertinence when lastname begins with search pattern
* [activity/actions] Améliore la cohérence du design entre
* la page résumé d'un parcours (liste d'actions récentes et liste d'activités récentes)
* la page liste des actions
* la page liste des activités (contexte personne / contexte parcours)
* [household] field to edit wheter person is titulaire of household or not removed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/322)
* [activity] create work if a work with same social action is not associated to the activity
* [visgraph] improve and fix bugs on vis-network relationship graph
* [bugfix] posting of birth- and deathdate through api fixed.
* [suggestions] improve suggestions lists
### Test release 2021-11-19 - bis
* [household] do not allow to create two addresses on the same date
* [activity] handle case when there is no social action associated to social issue
* [activity] layout for issues / actions
* [activity][bugfix] in edit mode, the form will now load the social action list
### Test release 2021-11-29
* [person] suggest entities (person | thirdparty) when creating/editing the accompanying course (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/119)
* [activity] add custom validation on the Activity class, based on what is required from the ActivityType (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/188)
* [main] translate multiselect messages when selecting/creating address
* [main] set the coordinates of the city when creating a new address OR choosing "pas d'adresse complète"
* Use the user.label in accompanying course banner, instead of username;
* fix: show validation message when closing accompanying course;
* [thirdparty] link from modal to thirdparty detail page fixed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/228)
* [assets] new asset to style suggestions lists (with add/remove item link) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/258)
* [accompanyingCourseWorkEdit] improves hyphenation and line breaks for long badges
* [acompanyingCourse] improve Resume page
* complete all needed informations,
* actions and activities are clickables,
* better placement with js masonry blocks on top of content area,
* https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/101
* https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/295
* [activity/calendar] on show page, concerned groups of persons table adapt itself to isVisibles options
* [activity] remove the "plus" button in activity list
* [activity] check ACL on activity list in person context
* [list for accompanying course in person] filter list using ACL
* [validation] toasts are displayed for errors when modifying accompanying course (generalization required).
* [period] only the user can enable confidentiality
* add an endpoint for checking permissions. See https://gitlab.com/Chill-Projet/chill-bundles/-/merge_requests/232
* [activity] for a new activity: suggest and create on-the-fly locations based on the accompanying course location + location of the suggested parties
* [calendar] for a new rdv: suggest and create on-the-fly locations based on the accompanying course location + location of the suggested parties
* [period] Validation added when period is confidential and confirmed -> user cannot be null.
## Test releases
### Test release 2021-11-22
* [activity] delete admin_user_show in twig template because this route is not defined and should be defined
* [activity] suggest requestor, user and ressources for adding persons|user|3rdparty
* [calendar] suggest persons, professionals and invites for adding persons|3rdparty|user
* [activity] take into account the restrictions on person|thirdparties|users visibilities defined in ActivityType
* [main] Add currentLocation to the User entity + add a page for selecting this location + add in the user menu (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/133)
* [activity] add user current location as default location for a new activity (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/133)
* [task] Select2 field in task form to allow search for a user (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/167)
* remove "search by phone configuration option": search by phone is now executed by default
* remplacer le classement par ordre alphabétique par un classement par ordre de pertinence, qui tient compte:
* de la présence d'une string avec le nom de la ville;
* de la similarité;
* du fait que la recherche commence par une partie du mot recherché
* ajouter la recherche par numéro de téléphone directement dans la barre de recherche et dans le formulaire recherche avancée;
* ajouter la recherche par date de naissance directement dans la barre de recherche;
* ajouter la recherche par ville dans la recherche avancée
* ajouter un lien vers le ménage dans les résultats de recherche
* ajouter l'id du parcours dans les résultats de recherche
* ajouter le demandeur dans les résultats de recherche
* ajout d'un bouton "recherche avancée" sur la page d'accueil
* [person] create an accompanying course: add client-side validation if no origin (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/210)
* [person] fix bounds for computing current person address: the new address appears immediatly
* [docgen] create a normalizer and serializer for normalization on doc format
* [person normalization] the key center is now "centers" and is an array. Empty array if no center
* [accompanyingCourse] Ability to close accompanying course (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/296)
* [task] Select2 field in task form to allow search for a user (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/167)
* [list result] show all courses, except ones with period closed
* [accompanyingCourse] improve banner with small carousel to display slide social-issues or slide associated persons (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/69)
### Test release 2021-11-15
* [main] fix adding multiple AddresseDeRelais (combine PickAddressType with ChillCollection)
* [person]: do not suggest the current household of the person (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/51)
* [person]: display other phone numbers in view + add message in case no others phone numbers (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/184)
* unnecessary whitespace removed from person banner after person-id + double parentheses removed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/290)
* [person]: delete accompanying period work, including related objects (cascade) (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/36)
* [address]: Display of incomplete address adjusted.
* [household]: improve relationship graph
* add form to create/edit/delete relationship link,
* improve graph refresh mechanism
* add feature to export canvas as image (png)
* [person suggest] In widget "add person", improve the pertinence of persons when one of the names starts with the pattern;
* [person] do not ask for center any more on person creation
* [3party] do not ask for center any more on 3party creation
## Test releases
### Test release 2021-11-08
* [person]: Display the name of a user when searching after a User (TMS)
* [person]: Add civility to the person
* [person]: Various improvements on the edit person form
* [person]: Set available_languages and available_countries as parameters for use in the edit person form
* [activity] Bugfix: documents can now be added to an activity.
* [tasks] improve tasks with filter order
* [tasks] refactor singleControllerTasks: limit the number of conditions from the context
* [validations] validation of accompanying period added: no duplicate participations or resources (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/60).
* [renderbox] If gender of person is not defined, no icon is displayed instead of neuter-icon (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/129).
* [confidential information] module added to blur confidential information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/248).
* refactor `AuthorizationHelper` and `UserACLAwareRepository` to fix constructor, and separate logic for parent role helper into `ParentRoleHelper`
* [main]: filter location and locationType in backend: exclude NULL names, only active and availableToUsers
* [activity]: perform client-side validation & show/hide fields in the "new location" modal
* [person]: normalize person with CenterResolverDispatcher and handle case where center is null or multiple in PersonRenderBox
* [docstore] voter for PersonDocument and AccompanyingCourseDocument on the 2.0 way (using VoterHelperFactory)
* [docstore] add authorization check inside controller and menu
* [activity]: fix inheritance for role `ACTIVITY FULL` and add missing acl in menu
* [person] show current address in search results
* [person] show alt names in search results
* [admin]: links to activity admin section added again.
* [household]: endDate field deleted from household edit form.
* [household]: View accompanying periods of current and old household members.
* [tasks]: different layout for task list / my tasks, and fix link to tasks in alert or in warning
* [admin]: links to activity admin section added again.
* [household]: household addresses ordered by ValidFrom date and by id to show the last created address on top.
* [socialWorkAction]: display of social issue and parent issues + banner context added.
* [DBAL dependencies] Upgrade to DBAL 3.1
### Test release 2021-10-27
* [person]: delete double actions buttons on search person page
* [person]: accompanying course work: remove creation date display the list of work + handle case when end date is null
* [main]: Add new pages with a menu for managing location and location type in the admin
* [main]: Add some fixtures for location type
* [calendar]: Pass the location when transforming a calendar item (rdv) into an activity
* [calendar]: Add a user menu for "my calendar"
### Test release 2021-10-18
* [3party]: french translation of contact and company
* [3party]: show parent in list
* [3party]: change color for badge "child"
* [3party]: fix address creation
* [household members editor] finalisation of editor
* [AccompanyingCourse banner]: replace translation referrer (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/70)
* [Location]: add location system in activity and RV (calendar). User can choose in location list or create a new location.
* [household]: add relationship page with dynamic data visualisation graph
## Test releases
### Test release 2021-10-11
* Address: zoom on postal code geometry + fix origin of manually entered postal code
* in the Address vue component, order the postal code and street address by alphabetic and numeric order
* add 3 new fields to PostalCode and adapt postal code command and fixtures
* [Aside activity] Fixes for aside activity
* categories with child
* fast creation buttons
* add ordering for types
* [AccompanyingCourse Resume page] dashboard for AccompanyingCourseWork and for Activities;
* Improve badges behaviour with small screens;
* [ThirdParty]:
* third party list
* create a kind contact/institution when create a new thirdparty, and set contact embedded as kind=child;
* filter thirdparties in list
* [FilterOrder]: add development kit for generating filter and ordering in list
* [Capitalization of names] person names are capitalized on creation, on prePersist event
* [On-The-Fly] modale works for showing, editing and creating person or thirdparty ;
* [AccompanyingCourse Resume page] associated persons list, can see household when hover, and with show on-the-fly modale when clicking person ;
### test release 2021-10-04
* [Household editor][UI] Update how household suggestion and addresses are picked;
See https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/80
* [AddAddress] Handle address suggestion;
* [CenterType][Create a person] when overriding the ACL rules, allow to show a PickCenterType
when no centers are reachable by the default ACL.
* [Household] Show comment event if no address are associated with the household;
* [Person results] Add requestor into search results:
* a badge "requestor" is shown into search results;
* periods where the person is only requestor (without participating) are also shown;
Issues:
* https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/13
* https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/199
* [Person form] "accept sms" not required:
https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/37
https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/221
* [Household editor] suggest only temporarily addresses;
See https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/82
* On-The-Fly modale works for showing, editing and creating person and thirdparty ;
* AccompanyingCourse Resume page: list associated persons by household, see household when hover, and show on-the-fly modale when clicking on person ;
* [AddAddress] Handle address suggestion;
* [AddAddress][Entity address]: add a link between address and address reference;
* [Household editor] suggest household by comparing the temporary addresses from courses;
See https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/81
* On-The-Fly modale works for showing, editing and creating person and thirdparty
## Test released
<!--
Coming soon...
DO NOT ADD unreleased items here. Add them under "Unreleased" title
### Test release yyyy-mm-dd
-->
## Stable releases
No stable releases for v2+

17
.changes/v2.1.0.md Normal file
View File

@@ -0,0 +1,17 @@
## v2.1.0 - 2023-06-12
### Feature
* [docgen] allow to pick a third party when generating a document in context Activity, AccompanyingPeriod
### Fixed
* ([#111](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/111)) List of "my accompanying periods": separate the active and closed periods in two different lists, and show the inactive_long and inactive_short periods
### Security
* ([#105](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/105)) Rights are checked for display of 'accompanying period' tab in household menu. Rights are also checked for creation of 'accompanying period' from within household context
### DX
* Add methods to RegroupmentRepository and fullfill Center / Regroupment Doctrine mapping

12
.changes/v2.2.0.md Normal file
View File

@@ -0,0 +1,12 @@
## v2.2.0 - 2023-06-18
### Feature
* When navigating from a workflow regarding to an evaluation's document to an accompanying course, scroll directly to the document, and blink to highlight this document
* Add notification to accompanying period work and work's evaluation's documents
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113))[Export] Filter accompanying period by step at date: allow to pick multiple steps
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113))[export] add a filter on accompanying period: filter by step between two dates
### Fixed
* use the correct annotation for the association between PersonCurrentCenter and Person
* ([#58](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/58))Fix birthdate timezone in PersonRenderBox
* ([#55](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/55))Fix the notification counter
### DX
* DQL function OVERLAPSI: simplify expression in postgresql

3
.changes/v2.2.1.md Normal file
View File

@@ -0,0 +1,3 @@
## v2.2.1 - 2023-06-19
### Fixed
* ([#114](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/114)) [notification on document evaluation] fix entityId and return path when adding a notification on a document in an evaluation

5
.changes/v2.2.2.md Normal file
View File

@@ -0,0 +1,5 @@
## v2.2.2 - 2023-06-26
### Fixed
* [Accompanying period comments]: order comments from the most recent to the oldest, in the list
* Api: filter social action to keep only the currently activated
* ([#82](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/82)) Fix deletion and re-creation of filiation relationship

42
.changes/v2.3.0.md Normal file
View File

@@ -0,0 +1,42 @@
## v2.3.0 - 2023-06-27
### Feature
* ([#110](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/110)) Edit saved exports options: the saved exports options (forms, filters, aggregators) are now editable.
* ([#103](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/103)) Get an unified list of document in person and accompanying period context
* [export] Set the default date of calculation of the accompanying period's list as "today"
* Force accompanying period user history to be unique for the same period and stardate/enddate [:warning: may encounter migration issue]
If some issue is encountered during migration, use this SQL to find the line which are in conflict, examine the problem and delete some of the concerning line
*
```sql
-- to see the line which are in conflict with another one
SELECT o.*
FROM chill_person_accompanying_period_user_history o
JOIN chill_person_accompanying_period_user_history c ON o.id < c.id AND o.accompanyingperiod_id = c.accompanyingperiod_id
WHERE tsrange(o.startdate, o.enddate, '[)') && tsrange(c.startdate, c.enddate, '[)')
ORDER BY accompanyingperiod_id;
-- to examine line in conflict for a given accompanyingperiod_id (given by the previous query)
SELECT * FROM chill_person_accompanying_period_user_history WHERE accompanyingperiod_id = IIIIDDDD order by startdate, enddate;
```
* Rename label of filter in French: "parcours actif" => "parcours ouvert", and "filtrer les parcours ouverts" => "Filtrer les parcours dont la date d'ouverture"
### Traduction francophone des principaux changements
* Les exports enregistrés sont éditables par l'utilisateur;
* L'onglet "Document" dans les parcours et les dossiers d'usager affiche désormais les documents ajoutés à différents endroits.
Pour les parcours, il s'agit de:
- documents ajoutés directement dans le parcours;
- documents des échanges;
- documents des rendez-vous;
- documents des évaluations;
- documents directement ajoutés dans le dossier des usagers concernés par le parcours;
Pour les usagers, il s'agit de:
- documents des échanges;
- documents des parcours;
- documents des rendez-vous;
- documents des actions, des échanges, des rendez-vous, des évaluations ajoutés dans les parcours.
* Dans la liste des parcours, la date de calcul des éléments associés est "aujourd'hui" par défaut.
* Dans les exports, renommage des libellés des filtres: "parcours actif" => "parcours ouvert", et "filtrer les parcours ouverts" => "Filtrer les parcours dont la date d'ouverture"

36
.changes/v2.4.0.md Normal file
View File

@@ -0,0 +1,36 @@
## v2.4.0 - 2023-07-07
### Feature
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] on "filter by user working" on accompanying period, add two dates to filters intervention within a period
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] Add an aggregator by user's job working on a course
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] add an aggregator by user's scope working on a course
* [export] on aggregator "user working on a course"
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] add a center aggregator for Person
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] add a filter on "job working on a course"
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] Add a filter on "scope working on a course"
* ([#121](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/121)) Create a role "See Confidential Periods", separated from the "Reassign courses" role
* ([#124](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/124)) Sync user absence / presence through microsoft outlook / graph api.
### Fixed
* ([#116](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/116)) On the accompanying course page, open the action on view mode if the user does not have right to update them (i.e. if the accompanying period is closed)
* [export] Rename label for CurrentActionFilter (on accompanying period work) to make precision between "ouvert" and "sans date de fin"
* Force the db to have either a person_location or a address_location, and avoid to have both also internally in the entity
* [export] set rolling date on person age aggregator
* [export] fix list when a person locating a course is without address
* [export] remove unused condition on course about duration participation
* Command to subscribe on MS Graph users calendars: improve the loop to be more efficient
### DX
* Rolling Date: can receive a null parameter
### Traduction francophone des principaux changements
- sur le "filtre par intervenant", ajoute deux dates pour limiter la période d'intervention;
- ajout d'un regroupement par métier des intervenants sur un parcours;
- ajout d'un regroupement par service des intervenants sur un parcours;
- ajout d'un regroupement par utilisateur intervenant sur un parcours
- ajout d'un regroupement "par centre de l'usager";
- ajout d'un filtre "par métier intervenant sur un parcours";
- ajout d'un filtre "par service intervenant sur un parcours";
- création d'un rôle spécifique pour voir les parcours confidentiels (et séparer de celui de la liste qui permet de ré-assigner les parcours en lot);
- synchronisation de l'absence des utilisateurs par microsoft graph api

37
.changie.yaml Normal file
View File

@@ -0,0 +1,37 @@
changesDir: .changes
unreleasedDir: unreleased
headerPath: header.tpl.md
changelogPath: CHANGELOG.md
versionExt: md
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}'
kindFormat: '### {{.Kind}}'
# Note: it is possible to add a `.custom.Long` text manually into the yaml file produced by `changie new`. This will add a long description.
changeFormat: >-
* {{ if not (eq .Custom.Issue "") }}([#{{ .Custom.Issue }}](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/{{ .Custom.Issue }})) {{ end }}{{.Body}} {{ if not (eq .Custom.Long "") }}
{{ .Custom.Long }}{{ end }}
custom:
- key: Issue
label: Issue number (on chill-bundles repository) (optional)
optional: true
type: int
minInt: 1
body:
# allow multiline messages
block: true
kinds:
- label: Feature
auto: minor
- label: Deprecated
auto: minor
- label: Fixed
auto: patch
- label: Security
auto: patch
- label: DX
auto: patch
newlines:
afterChangelogHeader: 1
beforeChangelogVersion: 1
endOfVersion: 1
envPrefix: CHANGIE_

View File

@@ -34,6 +34,7 @@ variables:
stages:
- Composer install
- Tests
- Deploy
build:
stage: Composer install
@@ -69,7 +70,7 @@ phpstan_tests:
stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
script:
- bin/phpstan
- bin/phpstan analyze --memory-limit=2G
cache:
paths:
- .cache/
@@ -79,21 +80,37 @@ phpstan_tests:
- bin
- tests/app/vendor/
psalm_tests:
rector_tests:
stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
script:
- bin/psalm
allow_failure: true
- bin/rector --dry-run
cache:
paths:
- .cache/
artifacts:
expire_in: 30 min
paths:
- bin
- tests/app/vendor/
# psalm_tests:
# stage: Tests
# image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
# script:
# - bin/psalm
# allow_failure: true
# artifacts:
# expire_in: 30 min
# paths:
# - bin
# - tests/app/vendor/
unit_tests:
stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
# until we fix testes
allow_failure: true
script:
- php tests/app/bin/console doctrine:migrations:migrate -n
- php -d memory_limit=2G tests/app/bin/console cache:clear --env=dev
@@ -105,3 +122,14 @@ unit_tests:
paths:
- bin
- tests/app/vendor/
release:
stage: Deploy
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
script:
- echo "running release_job"
release:
tag_name: '$CI_COMMIT_TAG'
description: "./.changes/v$CI_COMMIT_TAG.md"

View File

@@ -13,6 +13,7 @@ $finder = PhpCsFixer\Finder::create();
$finder
->in(__DIR__.'/src')
->in(__DIR__.'/utils')
->append([__FILE__])
->exclude(['docs/', 'tests/app'])
->notPath('tests/app')

View File

@@ -1,16 +1,140 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
* [Semantic Versioning](https://semver.org/spec/v2.0.0.html) for stable releases;
* date versioning for test releases
## Unreleased
## v2.4.0 - 2023-07-07
### Feature
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] on "filter by user working" on accompanying period, add two dates to filters intervention within a period
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] Add an aggregator by user's job working on a course
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] add an aggregator by user's scope working on a course
* [export] on aggregator "user working on a course"
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] add a center aggregator for Person
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] add a filter on "job working on a course"
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] Add a filter on "scope working on a course"
* ([#121](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/121)) Create a role "See Confidential Periods", separated from the "Reassign courses" role
* ([#124](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/124)) Sync user absence / presence through microsoft outlook / graph api.
### Fixed
* ([#116](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/116)) On the accompanying course page, open the action on view mode if the user does not have right to update them (i.e. if the accompanying period is closed)
* [export] Rename label for CurrentActionFilter (on accompanying period work) to make precision between "ouvert" and "sans date de fin"
* Force the db to have either a person_location or a address_location, and avoid to have both also internally in the entity
* [export] set rolling date on person age aggregator
* [export] fix list when a person locating a course is without address
* [export] remove unused condition on course about duration participation
* Command to subscribe on MS Graph users calendars: improve the loop to be more efficient
### DX
* Rolling Date: can receive a null parameter
### Traduction francophone des principaux changements
- sur le "filtre par intervenant", ajoute deux dates pour limiter la période d'intervention;
- ajout d'un regroupement par métier des intervenants sur un parcours;
- ajout d'un regroupement par service des intervenants sur un parcours;
- ajout d'un regroupement par utilisateur intervenant sur un parcours
- ajout d'un regroupement "par centre de l'usager";
- ajout d'un filtre "par métier intervenant sur un parcours";
- ajout d'un filtre "par service intervenant sur un parcours";
- création d'un rôle spécifique pour voir les parcours confidentiels (et séparer de celui de la liste qui permet de ré-assigner les parcours en lot);
- synchronisation de l'absence des utilisateurs par microsoft graph api
## v2.3.0 - 2023-06-27
### Feature
* ([#110](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/110)) Edit saved exports options: the saved exports options (forms, filters, aggregators) are now editable.
* ([#103](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/103)) Get an unified list of document in person and accompanying period context
* [export] Set the default date of calculation of the accompanying period's list as "today"
* Force accompanying period user history to be unique for the same period and stardate/enddate [:warning: may encounter migration issue]
If some issue is encountered during migration, use this SQL to find the line which are in conflict, examine the problem and delete some of the concerning line
*
```sql
-- to see the line which are in conflict with another one
SELECT o.*
FROM chill_person_accompanying_period_user_history o
JOIN chill_person_accompanying_period_user_history c ON o.id < c.id AND o.accompanyingperiod_id = c.accompanyingperiod_id
WHERE tsrange(o.startdate, o.enddate, '[)') && tsrange(c.startdate, c.enddate, '[)')
ORDER BY accompanyingperiod_id;
-- to examine line in conflict for a given accompanyingperiod_id (given by the previous query)
SELECT * FROM chill_person_accompanying_period_user_history WHERE accompanyingperiod_id = IIIIDDDD order by startdate, enddate;
```
* Rename label of filter in French: "parcours actif" => "parcours ouvert", and "filtrer les parcours ouverts" => "Filtrer les parcours dont la date d'ouverture"
### Traduction francophone des principaux changements
* Les exports enregistrés sont éditables par l'utilisateur;
* L'onglet "Document" dans les parcours et les dossiers d'usager affiche désormais les documents ajoutés à différents endroits.
Pour les parcours, il s'agit de:
- documents ajoutés directement dans le parcours;
- documents des échanges;
- documents des rendez-vous;
- documents des évaluations;
- documents directement ajoutés dans le dossier des usagers concernés par le parcours;
Pour les usagers, il s'agit de:
- documents des échanges;
- documents des parcours;
- documents des rendez-vous;
- documents des actions, des échanges, des rendez-vous, des évaluations ajoutés dans les parcours.
* Dans la liste des parcours, la date de calcul des éléments associés est "aujourd'hui" par défaut.
* Dans les exports, renommage des libellés des filtres: "parcours actif" => "parcours ouvert", et "filtrer les parcours ouverts" => "Filtrer les parcours dont la date d'ouverture"
## v2.2.2 - 2023-06-26
### Fixed
* [Accompanying period comments]: order comments from the most recent to the oldest, in the list
* Api: filter social action to keep only the currently activated
* ([#82](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/82)) Fix deletion and re-creation of filiation relationship
## v2.2.1 - 2023-06-19
### Fixed
* ([#114](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/114)) [notification on document evaluation] fix entityId and return path when adding a notification on a document in an evaluation
## v2.2.0 - 2023-06-18
### Feature
* When navigating from a workflow regarding to an evaluation's document to an accompanying course, scroll directly to the document, and blink to highlight this document
* Add notification to accompanying period work and work's evaluation's documents
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113))[Export] Filter accompanying period by step at date: allow to pick multiple steps
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113))[export] add a filter on accompanying period: filter by step between two dates
### Fixed
* use the correct annotation for the association between PersonCurrentCenter and Person
* ([#58](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/58))Fix birthdate timezone in PersonRenderBox
* ([#55](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/55))Fix the notification counter
### DX
* DQL function OVERLAPSI: simplify expression in postgresql
## v2.1.0 - 2023-06-12
### Feature
* [docgen] allow to pick a third party when generating a document in context Activity, AccompanyingPeriod
### Fixed
* ([#111](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/111)) List of "my accompanying periods": separate the active and closed periods in two different lists, and show the inactive_long and inactive_short periods
### Security
* ([#105](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/105)) Rights are checked for display of 'accompanying period' tab in household menu. Rights are also checked for creation of 'accompanying period' from within household context
### DX
* Add methods to RegroupmentRepository and fullfill Center / Regroupment Doctrine mapping
## 2.0.0
* this is a release to relaunch our proceess of release with semantic versioning
## Test releases
### 2.0.0-beta3
<!-- write down unreleased development here -->
* [person][export] Fixed: rename the alias for `accompanying_period` to `acp` in filter associated with person
* [activity][export] Feature: improve label for aliases in "Filter by activity type"
* [activity][export] DX/Feature: use of an `ActivityTypeRepositoryInterface` instead of the old-style EntityRepository
@@ -18,9 +142,6 @@ and this project adheres to
* [person][export] Fixed: use left join for related entities in accompanying course aggregators
* [workflow] Feature: allow user to copy and send manually the access link for the workflow
* [workflow] Feature: show the email addresses that received an access link for the workflow
## Test releases
### 2.0.0-beta2
* [workflow]: Fixed: the notification is sent when the user is added to the first step.

View File

@@ -34,6 +34,7 @@
"sensio/framework-extra-bundle": "^5.5",
"spomky-labs/base64url": "^2.0",
"symfony/browser-kit": "^4.4",
"symfony/clock": "^6.2",
"symfony/css-selector": "^4.4",
"symfony/expression-language": "^4.4",
"symfony/form": "^4.4",
@@ -47,7 +48,6 @@
"symfony/monolog-bundle": "^3.5",
"symfony/security-bundle": "^4.4",
"symfony/serializer": "^5.3",
"symfony/swiftmailer-bundle": "^3.5",
"symfony/templating": "^4.4",
"symfony/translation": "^4.4",
"symfony/twig-bundle": "^4.4",
@@ -67,6 +67,7 @@
"fakerphp/faker": "^1.13",
"jangregor/phpstan-prophecy": "^1.0",
"nelmio/alice": "^3.8",
"nikic/php-parser": "^4.15",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.9",
@@ -75,6 +76,7 @@
"phpunit/phpunit": ">= 7.5",
"psalm/plugin-phpunit": "^0.18.4",
"psalm/plugin-symfony": "^4.0.2",
"rector/rector": "^0.15.23",
"symfony/debug-bundle": "^5.1",
"symfony/dotenv": "^4.4",
"symfony/maker-bundle": "^1.20",
@@ -102,14 +104,16 @@
"Chill\\ReportBundle\\": "src/Bundle/ChillReportBundle",
"Chill\\TaskBundle\\": "src/Bundle/ChillTaskBundle",
"Chill\\ThirdPartyBundle\\": "src/Bundle/ChillThirdPartyBundle",
"Chill\\WopiBundle\\": "src/Bundle/ChillWopiBundle/src"
"Chill\\WopiBundle\\": "src/Bundle/ChillWopiBundle/src",
"Chill\\Utils\\Rector\\": "utils/rector/src"
}
},
"autoload-dev": {
"psr-4": {
"App\\": "tests/app/src/",
"Chill\\DocGeneratorBundle\\Tests\\": "src/Bundle/ChillDocGeneratorBundle/tests",
"Chill\\WopiBundle\\Tests\\": "src/Bundle/ChillDocGeneratorBundle/tests"
"Chill\\WopiBundle\\Tests\\": "src/Bundle/ChillDocGeneratorBundle/tests",
"Chill\\Utils\\Rector\\Tests\\": "utils/rector/tests"
}
},
"config": {

View File

@@ -62,7 +62,6 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
{
$builder->add('date_from', DateType::class, [
'label' => 'Born after this date',
'data' => new DateTime(),
'attr' => ['class' => 'datepicker'],
'widget' => 'single_text',
'format' => 'dd-MM-yyyy',
@@ -70,12 +69,15 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
$builder->add('date_to', DateType::class, [
'label' => 'Born before this date',
'data' => new DateTime(),
'attr' => ['class' => 'datepicker'],
'widget' => 'single_text',
'format' => 'dd-MM-yyyy',
]);
}
public function getFormDefaultData(): array
{
return ['date_from' => new DateTime(), 'date_to' => new DateTime()];
}
// here, we create a simple string which will describe the action of
// the filter in the Response

View File

@@ -36,6 +36,10 @@ class CountPerson implements ExportInterface
{
// this export does not add any form
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes()
{
@@ -90,9 +94,7 @@ class CountPerson implements ExportInterface
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
// we gather all center the user choose.
$centers = array_map(static function ($el) {
return $el['center'];
}, $acl);
$centers = array_map(static fn($el) => $el['center'], $acl);
$qb = $this->entityManager->createQueryBuilder();

View File

@@ -0,0 +1,203 @@
.. Copyright (C) 2014 Champs Libres Cooperative SCRLFS
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
.. _entity-info:
Stats about event on entity in php world
########################################
It is necessary to be able to gather information about events for some entities:
- when the event has been done;
- who did it;
- ...
Those "infos" are not linked with right management, like describe in :ref:`timelines`.
“infos” for some stats and info about an entity
-----------------------------------------------
Building an info means:
- create an Entity, and map this entity to a SQL view (not a regular table);
- use the framework to build this entity dynamically.
A framework api is built to be able to build multiple “infos” entities
through “union” views:
- use a command ``bin/console chill:db:sync-views`` to synchronize view (create view if it does not exists, or update
views when new SQL parts are added in the UNION query. Internally, this command call a new ``ViewEntityInfoManager``,
which iterate over available views to build the SQL;
- one can create a new “view entity info” by implementing a
``ViewEntityInfoProviderInterface``
- this implementation of the interface is free to create another
interface for building each part of the UNION query. This interface
is created for AccompanyingPeriodInfo:
``Chill\PersonBundle\Service\EntityInfo\AccompanyingPeriodInfoUnionQueryPartInterface``
So, converting new “events” into rows for ``AccompanyingPeriodInfo`` is
just implementing this interface!
Implementation for AccompanyingPeriod (``AccompanyingPeriod/AccompanyingPeriodInfo``)
-------------------------------------------------------------------------------------
A class is created for computing some statistical info for an
AccompanyingPeriod: ``AccompanyingPeriod/AccompanyingPeriodInfo``. This
contains information about “something happens”, who did it and when.
Having those info in table answer some questions like:
- when is the last and the first action (AccompanyingPeriodWork,
Activity, AccompanyingPeriodWorkEvaluation, …) on the period;
- who is “acting” on the period, and when is the last “action” for each
user.
The AccompanyingPeriod info is mapped to a SQL view, not a table. The
sql view is built dynamically (see below), and gather infos from
ActivityBundle, PersonBundle, CalendarBundle, … It is possible to create
custom bundle and add info on this view.
.. code:: php
/**
*
* @ORM\Entity()
* @ORM\Table(name="view_chill_person_accompanying_period_info") <==== THIS IS A VIEW, NOT A TABLE
*/
class AccompanyingPeriodInfo
{
// ...
}
Why do we need this ?
~~~~~~~~~~~~~~~~~~~~~
For multiple jobs in PHP world:
- moving the accompanying period to another steps when inactive,
automatically;
- listing all the users which are intervening on the action on a new
“Liste des intervenants” page;
- filtering on exports
Later, we will launch automatic anonymise for accompanying period and
all related entities through this information.
How is built the SQL views which is mapped to “info” entities ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The AccompanyingPeriodInfo entity is mapped by a SQL view (not a regular
table).
The sql view is built dynamically, it is a SQL view like this, for now (April 2023):
.. code:: sql
create view view_chill_person_accompanying_period_info
(accompanyingperiod_id, relatedentity, relatedentityid, user_id, infodate, discriminator, metadata) as
SELECT w.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork'::text AS relatedentity,
w.id AS relatedentityid,
cpapwr.user_id,
w.enddate AS infodate,
'accompanying_period_work_end'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work w
LEFT JOIN chill_person_accompanying_period_work_referrer cpapwr ON w.id = cpapwr.accompanyingperiodwork_id
WHERE w.enddate IS NOT NULL
UNION
SELECT cpapw.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation'::text AS relatedentity,
e.id AS relatedentityid,
e.updatedby_id AS user_id,
e.updatedat AS infodate,
'accompanying_period_work_evaluation_updated_at'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work_evaluation e
JOIN chill_person_accompanying_period_work cpapw ON cpapw.id = e.accompanyingperiodwork_id
WHERE e.updatedat IS NOT NULL
UNION
SELECT cpapw.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation'::text AS relatedentity,
e.id AS relatedentityid,
cpapwr.user_id,
e.maxdate AS infodate,
'accompanying_period_work_evaluation_start'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work_evaluation e
JOIN chill_person_accompanying_period_work cpapw ON cpapw.id = e.accompanyingperiodwork_id
LEFT JOIN chill_person_accompanying_period_work_referrer cpapwr ON cpapw.id = cpapwr.accompanyingperiodwork_id
WHERE e.maxdate IS NOT NULL
UNION
SELECT cpapw.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation'::text AS relatedentity,
e.id AS relatedentityid,
cpapwr.user_id,
e.startdate AS infodate,
'accompanying_period_work_evaluation_start'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work_evaluation e
JOIN chill_person_accompanying_period_work cpapw ON cpapw.id = e.accompanyingperiodwork_id
LEFT JOIN chill_person_accompanying_period_work_referrer cpapwr ON cpapw.id = cpapwr.accompanyingperiodwork_id
UNION
SELECT cpapw.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument'::text AS relatedentity,
doc.id AS relatedentityid,
doc.updatedby_id AS user_id,
doc.updatedat AS infodate,
'accompanying_period_work_evaluation_document_updated_at'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work_evaluation_document doc
JOIN chill_person_accompanying_period_work_evaluation e ON doc.accompanyingperiodworkevaluation_id = e.id
JOIN chill_person_accompanying_period_work cpapw ON cpapw.id = e.accompanyingperiodwork_id
WHERE doc.updatedat IS NOT NULL
UNION
SELECT cpapw.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation'::text AS relatedentity,
e.id AS relatedentityid,
cpapwr.user_id,
e.maxdate AS infodate,
'accompanying_period_work_evaluation_max'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work_evaluation e
JOIN chill_person_accompanying_period_work cpapw ON cpapw.id = e.accompanyingperiodwork_id
LEFT JOIN chill_person_accompanying_period_work_referrer cpapwr ON cpapw.id = cpapwr.accompanyingperiodwork_id
WHERE e.maxdate IS NOT NULL
UNION
SELECT w.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork'::text AS relatedentity,
w.id AS relatedentityid,
cpapwr.user_id,
w.startdate AS infodate,
'accompanying_period_work_start'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work w
LEFT JOIN chill_person_accompanying_period_work_referrer cpapwr ON w.id = cpapwr.accompanyingperiodwork_id
UNION
SELECT activity.accompanyingperiod_id,
'Chill\ActivityBundle\Entity\Activity'::text AS relatedentity,
activity.id AS relatedentityid,
au.user_id,
activity.date AS infodate,
'activity_date'::text AS discriminator,
'{}'::jsonb AS metadata
FROM activity
LEFT JOIN activity_user au ON activity.id = au.activity_id
WHERE activity.accompanyingperiod_id IS NOT NULL;
As you can see, the view gather multiple SELECT queries and bind them
with UNION.
Each SELECT query is built dynamically, through a class implementing an
interface: ``Chill\PersonBundle\Service\EntityInfo\AccompanyingPeriodInfoUnionQueryPartInterface``, `like
here <https://gitlab.com/Chill-Projet/chill-bundles/-/blob/master/src/Bundle/ChillPersonBundle/Service/EntityInfo/AccompanyingPeriodInfoQueryPart/AccompanyingPeriodWorkEndQueryPartForAccompanyingPeriodInfo.php>`__
To add new `SELECT` query in different `UNION` parts in the sql view, create a
service and implements this interface: ``Chill\PersonBundle\Service\EntityInfo\AccompanyingPeriodInfoUnionQueryPartInterface``.

View File

@@ -35,6 +35,7 @@ As Chill rely on the `symfony <http://symfony.com>`_ framework, reading the fram
manual/index.rst
Assets <assets.rst>
Cron Jobs <cronjob.rst>
Info about entities <entity-info.rst>
Layout and UI
**************

View File

@@ -6,6 +6,8 @@
A copy of the license is included in the section entitled "GNU
Free Documentation License".
.. _timelines:
Timelines
*********

View File

@@ -151,6 +151,7 @@ This script will :
# mount into to container
./docker-php.sh
bin/console chill:db:sync-views
# and load fixtures
bin/console doctrine:migrations:migrate
@@ -161,7 +162,7 @@ Chill will be available at ``http://localhost:8001.`` Currently, there isn't any
# mount into to container
./docker-php.sh
# and load fixtures
# and load fixtures (do not this for production)
bin/console doctrine:fixtures:load --purge-with-truncate
There are several users available:
@@ -204,8 +205,10 @@ How to create the database schema (= run migrations) ?
# if a container is running
./docker-php.sh
bin/console doctrine:migrations:migrate
bin/console chill:db:sync-views
# if not
docker-compose run --user $(id -u) php bin/console doctrine:migrations:migrate
docker-compose run --user $(id -u) php bin/console chill:db:sync-views
How to read the email sent by the program ?
@@ -236,6 +239,23 @@ How to open a terminal in the project
# if not
docker-compose run --user $(id -u) php /bin/bash
How to run cron-jobs ?
======================
Some command must be executed in :ref:`cron jobs <cronjob>`. To execute them:
.. code-block:: bash
# if a container is running
./docker-php.sh
bin/console chill:cron-job:execute
# some of them are executed only during the night. So, we have to force the execution during the day:
bin/console chill:cron-job:execute 'name-of-the-cron'
# if not
docker-compose run --user $(id -u) php bin/console chill:cron-job:execute
# some of them are executed only during the night. So, we have to force the execution during the day:
docker-compose run --user $(id -u) php bin/console chill:cron-job:execute 'name-of-the-cron'
How to run composer ?
=====================

View File

@@ -38,6 +38,14 @@ This should be adapted to your needs:
* Think about how you will backup your database. Some adminsys find easier to store database outside of docker, which might be easier to administrate or replicate.
Run migrations on each update
=============================
Every time you start a new version, you should apply update the sql schema:
- running ``bin/console doctrine:migration:migrate`` to run sql migration;
- synchonizing sql views to the last state: ``bin/console chill:db:sync-views``
Cron jobs
=========

View File

@@ -18,6 +18,7 @@ These are alias conventions :
| | SocialIssue::class | acp.socialIssues | acpsocialissue |
| | User::class | acp.user | acpuser |
| | AccompanyingPeriopStepHistory::class | acp.stepHistories | acpstephistories |
| | AccompanyingPeriodInfo::class | not existing (using custom WITH clause) | acpinfo |
| AccompanyingPeriodWork::class | | | acpw |
| | AccompanyingPeriodWorkEvaluation::class | acpw.accompanyingPeriodWorkEvaluations | workeval |
| | User::class | acpw.referrers | acpwuser |
@@ -28,6 +29,8 @@ These are alias conventions :
| | Person::class | acppart.person | partperson |
| AccompanyingPeriodWorkEvaluation::class | | | workeval |
| | Evaluation::class | workeval.evaluation | eval |
| AccompanyingPeriodInfo::class | | | acpinfo |
| | User::class | acpinfo.user | acpinfo_user |
| Goal::class | | | goal |
| | Result::class | goal.results | goalresult |
| Person::class | | | person |

View File

@@ -41,6 +41,7 @@
"@fullcalendar/timegrid": "^6.1.4",
"@fullcalendar/vue3": "^6.1.4",
"@popperjs/core": "^2.9.2",
"@types/leaflet": "^1.9.3",
"dropzone": "^5.7.6",
"es6-promise": "^4.2.8",
"leaflet": "^1.7.1",

View File

@@ -442,11 +442,6 @@ parameters:
count: 2
path: src/Bundle/ChillMainBundle/Workflow/Validator/StepDestValidValidator.php
-
message: "#^Return type \\(int\\|void\\|null\\) of method Chill\\\\PersonBundle\\\\Command\\\\ImportPeopleFromCSVCommand\\:\\:execute\\(\\) should be covariant with return type \\(int\\) of method Symfony\\\\Component\\\\Console\\\\Command\\\\Command\\:\\:execute\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Parameter \\#3 \\$query \\(Doctrine\\\\ORM\\\\QueryBuilder\\) of method Chill\\\\PersonBundle\\\\Controller\\\\HouseholdCompositionTypeApiController\\:\\:customizeQuery\\(\\) should be contravariant with parameter \\$query \\(mixed\\) of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\AbstractCRUDController\\:\\:customizeQuery\\(\\)$#"
count: 1
@@ -788,16 +783,6 @@ parameters:
count: 1
path: src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php
-
message: "#^Parameter \\#1 \\$thirdParty \\(Chill\\\\ThirdPartyBundle\\\\Entity\\\\ThirdParty\\) of method Chill\\\\ThirdPartyBundle\\\\Serializer\\\\Normalizer\\\\ThirdPartyNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\ThirdPartyBundle\\\\Serializer\\\\Normalizer\\\\ThirdPartyNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php
-
message: "#^Parameter \\#1 \\$document \\(Chill\\\\DocStoreBundle\\\\Entity\\\\StoredObject\\) of method Chill\\\\WopiBundle\\\\Service\\\\Wopi\\\\ChillDocumentManager\\:\\:getBasename\\(\\) should be contravariant with parameter \\$document \\(ChampsLibres\\\\WopiLib\\\\Contract\\\\Entity\\\\Document\\) of method ChampsLibres\\\\WopiLib\\\\Contract\\\\Service\\\\DocumentManagerInterface\\:\\:getBasename\\(\\)$#"
count: 1

View File

@@ -2631,11 +2631,6 @@ parameters:
count: 2
path: src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
-
message: "#^Call to method getRoleScopes\\(\\) on an unknown class Chill\\\\MainBundle\\\\Entity\\\\PermissionGroup\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
-
message: "#^Empty array passed to foreach\\.$#"
count: 1
@@ -3026,111 +3021,6 @@ parameters:
count: 2
path: src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php
-
message: "#^Access to an undefined property Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:\\:\\$force\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Access to an undefined property Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:\\:\\$headers\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Access to an undefined property Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:\\:\\$helperSet\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Access to an undefined property Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:\\:\\$input\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Access to an undefined property Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:\\:\\$output\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Access to an undefined property Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:\\:\\$person\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Access to an undefined property Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:\\:\\$rawHeaders\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Access to an undefined property Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:\\:\\$row\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Access to an undefined property Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:\\:\\$skipPerson\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Call to an undefined method Doctrine\\\\Persistence\\\\ObjectManager\\:\\:createQuery\\(\\)\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Call to method buildForm\\(\\) on an unknown class Chill\\\\CustomFieldsBundle\\\\Service\\\\CustomFieldInterface\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Else branch is unreachable because previous condition is always true\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Elseif branch is unreachable because previous condition is always true\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Instanceof between \\*NEVER\\* and Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\View\\\\ChoiceGroupView will always evaluate to false\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Instanceof between Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\View\\\\ChoiceView and Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\View\\\\ChoiceView will always evaluate to true\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Method Chill\\\\PersonBundle\\\\Command\\\\ImportPeopleFromCSVCommand\\:\\:processTextType\\(\\) has invalid return type Chill\\\\PersonBundle\\\\Command\\\\type\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Method Symfony\\\\Component\\\\Console\\\\Helper\\\\Table\\:\\:render\\(\\) invoked with 1 parameter, 0 required\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) invoked with 2 parameters, 1 required\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^PHPDoc tag @var above foreach loop does not specify variable name\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Parameter \\$value of method Chill\\\\PersonBundle\\\\Command\\\\ImportPeopleFromCSVCommand\\:\\:processTextType\\(\\) has invalid type Chill\\\\PersonBundle\\\\Command\\\\type\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Strict comparison using \\=\\=\\= between false and false will always evaluate to true\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^PHPDoc tag @var for property Chill\\\\PersonBundle\\\\Command\\\\ImportSocialWorkMetadata\\:\\:\\$importer with type Psr\\\\Log\\\\LoggerInterface is not subtype of native type Chill\\\\PersonBundle\\\\Service\\\\Import\\\\ChillImporter\\.$#"
count: 1

View File

@@ -425,21 +425,6 @@ parameters:
count: 2
path: src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Parameter \\#1 \\$mobilenumber of method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:setMobilenumber\\(\\) expects libphonenumber\\\\PhoneNumber\\|null, string given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Parameter \\#1 \\$phonenumber of method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:setPhonenumber\\(\\) expects libphonenumber\\\\PhoneNumber\\|null, string given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 1

View File

@@ -310,11 +310,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 6
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1

View File

@@ -2,8 +2,9 @@ parameters:
level: 5
paths:
- src/
- utils/
tmpDir: .cache/
reportUnmatchedIgnoredErrors: true
reportUnmatchedIgnoredErrors: false
excludePaths:
- .php_cs*
- docs/

29
phpunit.rector.xml Normal file
View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
bootstrap="tests/app/vendor/autoload.php"
cacheResultFile=".cache/phpunit/test-results-rector"
executionOrder="depends,defects"
forceCoversAnnotation="true"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
convertDeprecationsToExceptions="true"
failOnRisky="true"
failOnWarning="true"
verbose="true"
colors="true"
>
<testsuites>
<testsuite name="default">
<directory>utils/rector/tests</directory>
</testsuite>
</testsuites>
<coverage cacheDirectory=".cache/phpunit/code-coverage-rector"
processUncoveredFiles="true">
<include>
<directory suffix=".php">utils/rector/src</directory>
</include>
</coverage>
</phpunit>

63
rector.php Normal file
View File

@@ -0,0 +1,63 @@
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/docs',
__DIR__ . '/src',
]);
//$rectorConfig->cacheClass(\Rector\Caching\ValueObject\Storage\FileCacheStorage::class);
//$rectorConfig->cacheDirectory(__DIR__ . '/.cache/rector');
// register a single rule
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
$rectorConfig->disableParallel();
//define sets of rules
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_74
]);
// chill rules
$rectorConfig->rule(\Chill\Utils\Rector\Rector\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector::class);
// skip some path...
$rectorConfig->skip([
// make rector stuck for some files
\Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector::class,
// we need to discuss this: are we going to have FALSE in tests instead of an error ?
\Rector\Php71\Rector\FuncCall\CountOnNullRector::class,
// must merge MR500 and review a typing of "ArrayCollection" in entities
\Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector::class,
// remove all PHP80 rules, in order to activate them one by one
\Rector\Php80\Rector\ClassMethod\AddParamBasedOnParentClassMethodRector::class,
\Rector\Php80\Rector\Class_\AnnotationToAttributeRector::class,
\Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector::class,
\Rector\Php80\Rector\FuncCall\ClassOnObjectRector::class,
\Rector\Php80\Rector\ClassConstFetch\ClassOnThisVariableObjectRector::class,
\Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector::class,
\Rector\Php80\Rector\Class_\DoctrineAnnotationClassToAttributeRector::class,
\Rector\Php80\Rector\ClassMethod\FinalPrivateToPrivateVisibilityRector::class,
\Rector\Php80\Rector\Ternary\GetDebugTypeRector::class,
\Rector\Php80\Rector\FunctionLike\MixedTypeRector::class,
\Rector\Php80\Rector\Property\NestedAnnotationToAttributeRector::class,
\Rector\Php80\Rector\FuncCall\Php8ResourceReturnToObjectRector::class,
\Rector\Php80\Rector\Catch_\RemoveUnusedVariableInCatchRector::class,
\Rector\Php80\Rector\ClassMethod\SetStateToStaticRector::class,
\Rector\Php80\Rector\NotIdentical\StrContainsRector::class,
\Rector\Php80\Rector\Identical\StrEndsWithRector::class,
\Rector\Php80\Rector\Identical\StrStartsWithRector::class,
\Rector\Php80\Rector\Class_\StringableForToStringRector::class,
\Rector\Php80\Rector\FuncCall\TokenGetAllToObjectRector::class,
\Rector\Php80\Rector\FunctionLike\UnionTypesRector::class
]);
};

View File

@@ -41,7 +41,6 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_key_exists;
@@ -213,7 +212,7 @@ final class ActivityController extends AbstractController
$form = $this->createForm(ActivityType::class, $entity, [
'center' => $this->centerResolver->resolveCenters($entity)[0] ?? null,
'role' => new Role('CHILL_ACTIVITY_UPDATE'),
'role' => 'CHILL_ACTIVITY_UPDATE',
'activityType' => $entity->getActivityType(),
'accompanyingPeriod' => $accompanyingPeriod,
]);
@@ -442,7 +441,7 @@ final class ActivityController extends AbstractController
$form = $this->createForm(ActivityType::class, $entity, [
'center' => $this->centerResolver->resolveCenters($entity)[0] ?? null,
'role' => new Role('CHILL_ACTIVITY_CREATE'),
'role' => 'CHILL_ACTIVITY_CREATE',
'activityType' => $entity->getActivityType(),
'accompanyingPeriod' => $accompanyingPeriod,
]);

View File

@@ -50,7 +50,7 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface
->findAll();
foreach ($persons as $person) {
$activityNbr = mt_rand(0, 3);
$activityNbr = random_int(0, 3);
for ($i = 0; $i < $activityNbr; ++$i) {
$activity = $this->newRandomActivity($person);
@@ -75,7 +75,7 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface
// ->setAttendee($this->faker->boolean())
for ($i = 0; mt_rand(0, 4) > $i; ++$i) {
for ($i = 0; random_int(0, 4) > $i; ++$i) {
$reason = $this->getRandomActivityReason();
if (null !== $reason) {

View File

@@ -26,7 +26,7 @@ class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('chill_activity');
$rootNode = $treeBuilder->getRootNode('chill_activity');
$rootNode = $treeBuilder->getRootNode();
$rootNode
->children()
@@ -59,9 +59,7 @@ class Configuration implements ConfigurationInterface
->info('The number of seconds of this duration. Must be an integer.')
->cannotBeEmpty()
->validate()
->ifTrue(static function ($data) {
return !is_int($data);
})->thenInvalid('The value %s is not a valid integer')
->ifTrue(static fn ($data) => !is_int($data))->thenInvalid('The value %s is not a valid integer')
->end()
->end()
->scalarNode('label')

View File

@@ -195,7 +195,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
* @Groups({"docgen:read"})
*/
private User $user;
private ?User $user = null;
/**
* @ORM\ManyToMany(targetEntity="Chill\MainBundle\Entity\User")
@@ -494,7 +494,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
return $this->activityType;
}
public function getUser(): User
public function getUser(): ?User
{
return $this->user;
}
@@ -681,14 +681,14 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
return $this;
}
public function setUser(UserInterface $user): self
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function setUsers(?Collection $users): self
public function setUsers(Collection $users): self
{
$this->users = $users;

View File

@@ -34,7 +34,7 @@ class ActivityPresence
* @ORM\GeneratedValue(strategy="AUTO")
* @Serializer\Groups({"docgen:read"})
*/
private ?int $id;
private ?int $id = null;
/**
* @ORM\Column(type="json")

View File

@@ -122,7 +122,7 @@ class ActivityType
* @ORM\GeneratedValue(strategy="AUTO")
* @Groups({"docgen:read"})
*/
private ?int $id;
private ?int $id = null;
/**
* @ORM\Column(type="string", nullable=false, options={"default": ""})

View File

@@ -40,6 +40,10 @@ class ByActivityNumberAggregator implements AggregatorInterface
{
// No form needed
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -52,6 +52,10 @@ class ByCreatorAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -57,6 +57,10 @@ class BySocialActionAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -57,6 +57,10 @@ class BySocialIssueAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -57,6 +57,10 @@ class ByThirdpartyAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -57,6 +57,10 @@ class CreatorScopeAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -29,14 +29,6 @@ class DateAggregator implements AggregatorInterface
private const DEFAULT_CHOICE = 'year';
private TranslatorInterface $translator;
public function __construct(
TranslatorInterface $translator
) {
$this->translator = $translator;
}
public function addRole(): ?string
{
return null;
@@ -84,9 +76,12 @@ class DateAggregator implements AggregatorInterface
'multiple' => false,
'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE,
'data' => self::DEFAULT_CHOICE,
]);
}
public function getFormDefaultData(): array
{
return ['frequency' => self::DEFAULT_CHOICE];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -57,6 +57,10 @@ class LocationTypeAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -60,6 +60,10 @@ class ActivityTypeAggregator implements AggregatorInterface
{
// no form required for this aggregator
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data): Closure
{

View File

@@ -58,6 +58,10 @@ class ActivityUserAggregator implements AggregatorInterface
{
// nothing to add
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, $values, $data): Closure
{

View File

@@ -56,6 +56,10 @@ class ActivityUsersAggregator implements AggregatorInterface
{
// nothing to add on the form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -55,6 +55,10 @@ class ActivityUsersJobAggregator implements \Chill\MainBundle\Export\AggregatorI
{
// nothing to add in the form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -55,6 +55,10 @@ class ActivityUsersScopeAggregator implements \Chill\MainBundle\Export\Aggregato
{
// nothing to add in the form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -110,6 +110,10 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
]
);
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -47,6 +47,10 @@ class SentReceivedAggregator implements AggregatorInterface
{
// No form needed
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data): callable
{

View File

@@ -39,6 +39,10 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface
public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array
{
@@ -86,9 +90,7 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static function ($el) {
return $el['center'];
}, $acl);
$centers = array_map(static fn ($el) => $el['center'], $acl);
$qb = $this->repository->createQueryBuilder('activity');

View File

@@ -40,6 +40,10 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac
{
// TODO: Implement buildForm() method.
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array
{
@@ -87,9 +91,7 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static function ($el) {
return $el['center'];
}, $acl);
$centers = array_map(static fn ($el) => $el['center'], $acl);
$qb = $this->repository->createQueryBuilder('activity');

View File

@@ -39,6 +39,10 @@ class CountActivity implements ExportInterface, GroupedExportInterface
public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array
{
@@ -86,9 +90,7 @@ class CountActivity implements ExportInterface, GroupedExportInterface
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static function ($el) {
return $el['center'];
}, $acl);
$centers = array_map(static fn ($el) => $el['center'], $acl);
$qb = $this->repository
->createQueryBuilder('activity')

View File

@@ -44,6 +44,10 @@ class ListActivity implements ListInterface, GroupedExportInterface
{
$this->helper->buildForm($builder);
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes()
{
@@ -109,9 +113,7 @@ class ListActivity implements ListInterface, GroupedExportInterface
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static function ($el) {
return $el['center'];
}, $acl);
$centers = array_map(static fn ($el) => $el['center'], $acl);
$qb = $this->entityManager->createQueryBuilder();

View File

@@ -40,6 +40,10 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface
{
// TODO: Implement buildForm() method.
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array
{
@@ -87,9 +91,7 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static function ($el) {
return $el['center'];
}, $acl);
$centers = array_map(static fn ($el) => $el['center'], $acl);
$qb = $this->repository
->createQueryBuilder('activity')

View File

@@ -40,6 +40,10 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac
{
// TODO: Implement buildForm() method.
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array
{
@@ -87,9 +91,7 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static function ($el) {
return $el['center'];
}, $acl);
$centers = array_map(static fn ($el) => $el['center'], $acl);
$qb = $this->repository
->createQueryBuilder('activity')

View File

@@ -35,6 +35,10 @@ class CountActivity implements ExportInterface, GroupedExportInterface
public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes()
{

View File

@@ -88,6 +88,10 @@ class ListActivity implements ListInterface, GroupedExportInterface
])],
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes()
{
@@ -137,13 +141,11 @@ class ListActivity implements ListInterface, GroupedExportInterface
$activity = $activityRepository->find($value);
return implode(', ', array_map(function (ActivityReason $r) {
return '"' .
return implode(', ', array_map(fn (ActivityReason $r) => '"' .
$this->translatableStringHelper->localize($r->getCategory()->getName())
. ' > ' .
$this->translatableStringHelper->localize($r->getName())
. '"';
}, $activity->getReasons()->toArray()));
. '"', $activity->getReasons()->toArray()));
};
case 'circle_name':
@@ -152,7 +154,7 @@ class ListActivity implements ListInterface, GroupedExportInterface
return 'circle';
}
return $this->translatableStringHelper->localize(json_decode($value, true));
return $this->translatableStringHelper->localize(json_decode($value, true, 512, JSON_THROW_ON_ERROR));
};
case 'type_name':
@@ -161,7 +163,7 @@ class ListActivity implements ListInterface, GroupedExportInterface
return 'activity type';
}
return $this->translatableStringHelper->localize(json_decode($value, true));
return $this->translatableStringHelper->localize(json_decode($value, true, 512, JSON_THROW_ON_ERROR));
};
default:
@@ -197,9 +199,7 @@ class ListActivity implements ListInterface, GroupedExportInterface
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static function ($el) {
return $el['center'];
}, $acl);
$centers = array_map(static fn ($el) => $el['center'], $acl);
// throw an error if any fields are present
if (!array_key_exists('fields', $data)) {

View File

@@ -53,6 +53,10 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes()
{

View File

@@ -179,7 +179,7 @@ class ListActivityHelper
}
}
$decoded = json_decode($value);
$decoded = json_decode($value, null, 512, JSON_THROW_ON_ERROR);
return implode(
'|',

View File

@@ -61,16 +61,17 @@ class ActivityTypeFilter implements FilterInterface
$builder->add('accepted_activitytypes', EntityType::class, [
'class' => ActivityType::class,
'choices' => $this->activityTypeRepository->findAllActive(),
'choice_label' => function (ActivityType $aty) {
return
($aty->hasCategory() ? $this->translatableStringHelper->localize($aty->getCategory()->getName()) . ' > ' : '')
'choice_label' => fn (ActivityType $aty) => ($aty->hasCategory() ? $this->translatableStringHelper->localize($aty->getCategory()->getName()) . ' > ' : '')
.
$this->translatableStringHelper->localize($aty->getName());
},
$this->translatableStringHelper->localize($aty->getName()),
'multiple' => true,
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -52,6 +52,10 @@ class ByCreatorFilter implements FilterInterface
'multiple' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -60,6 +60,10 @@ class BySocialActionFilter implements FilterInterface
'multiple' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -60,6 +60,10 @@ class BySocialIssueFilter implements FilterInterface
'multiple' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -68,9 +68,12 @@ class EmergencyFilter implements FilterInterface
'multiple' => false,
'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE,
'data' => self::DEFAULT_CHOICE,
]);
}
public function getFormDefaultData(): array
{
return ['accepted_emergency' => self::DEFAULT_CHOICE];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -44,6 +44,10 @@ class HasNoActivityFilter implements FilterInterface
{
//no form needed
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -20,13 +20,6 @@ use Symfony\Component\Form\FormBuilderInterface;
class LocationFilter implements FilterInterface
{
private TranslatableStringHelper $translatableStringHelper;
public function __construct(TranslatableStringHelper $translatableStringHelper)
{
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole(): ?string
{
return null;
@@ -53,6 +46,10 @@ class LocationFilter implements FilterInterface
'label' => 'pick location',
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -65,6 +65,10 @@ class LocationTypeFilter implements FilterInterface
//'label' => false,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -69,9 +69,12 @@ class SentReceivedFilter implements FilterInterface
'multiple' => false,
'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE,
'data' => self::DEFAULT_CHOICE,
]);
}
public function getFormDefaultData(): array
{
return ['accepted_sentreceived' => self::DEFAULT_CHOICE];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -61,6 +61,10 @@ class UserFilter implements FilterInterface
'label' => 'Creators',
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -64,15 +64,17 @@ class UserScopeFilter implements FilterInterface
{
$builder->add('accepted_userscope', EntityType::class, [
'class' => Scope::class,
'choice_label' => function (Scope $s) {
return $this->translatableStringHelper->localize(
'choice_label' => fn (Scope $s) => $this->translatableStringHelper->localize(
$s->getName()
);
},
),
'multiple' => true,
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -80,11 +80,9 @@ class ActivityDateFilter implements FilterInterface
$builder
->add('date_from', PickRollingDateType::class, [
'label' => 'Activities after this date',
'data' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
])
->add('date_to', PickRollingDateType::class, [
'label' => 'Activities before this date',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
$builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
@@ -127,6 +125,10 @@ class ActivityDateFilter implements FilterInterface
}
});
}
public function getFormDefaultData(): array
{
return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -61,12 +61,9 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
$builder->add('types', EntityType::class, [
'choices' => $this->activityTypeRepository->findAllActive(),
'class' => ActivityType::class,
'choice_label' => function (ActivityType $aty) {
return
($aty->hasCategory() ? $this->translatableStringHelper->localize($aty->getCategory()->getName()) . ' > ' : '')
'choice_label' => fn (ActivityType $aty) => ($aty->hasCategory() ? $this->translatableStringHelper->localize($aty->getCategory()->getName()) . ' > ' : '')
.
$this->translatableStringHelper->localize($aty->getName());
},
$this->translatableStringHelper->localize($aty->getName()),
'group_by' => function (ActivityType $type) {
if (!$type->hasCategory()) {
return null;
@@ -81,6 +78,10 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
],
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -56,6 +56,10 @@ class ActivityUsersFilter implements FilterInterface
'label' => 'Users',
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -82,6 +82,10 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
'expanded' => false,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -112,7 +112,6 @@ class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInt
{
$builder->add('date_from', DateType::class, [
'label' => 'Implied in an activity after this date',
'data' => new DateTime(),
'attr' => ['class' => 'datepicker'],
'widget' => 'single_text',
'format' => 'dd-MM-yyyy',
@@ -120,7 +119,6 @@ class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInt
$builder->add('date_to', DateType::class, [
'label' => 'Implied in an activity before this date',
'data' => new DateTime(),
'attr' => ['class' => 'datepicker'],
'widget' => 'single_text',
'format' => 'dd-MM-yyyy',
@@ -130,7 +128,6 @@ class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInt
'class' => ActivityReason::class,
'choice_label' => fn (ActivityReason $reason): ?string => $this->translatableStringHelper->localize($reason->getName()),
'group_by' => fn (ActivityReason $reason): ?string => $this->translatableStringHelper->localize($reason->getCategory()->getName()),
'data' => $this->activityReasonRepository->findAll(),
'multiple' => true,
'expanded' => false,
'label' => 'Activity reasons for those activities',
@@ -176,6 +173,10 @@ class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInt
}
});
}
public function getFormDefaultData(): array
{
return ['date_from' => new DateTime(), 'date_to' => new DateTime(), 'reasons' => $this->activityReasonRepository->findAll()];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -60,6 +60,10 @@ class UsersJobFilter implements FilterInterface
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -67,6 +67,10 @@ class UsersScopeFilter implements FilterInterface
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -32,7 +32,7 @@ class ActivityReasonCategoryType extends AbstractType
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => 'Chill\ActivityBundle\Entity\ActivityReasonCategory',
'data_class' => \Chill\ActivityBundle\Entity\ActivityReasonCategory::class,
]);
}

View File

@@ -211,13 +211,9 @@ class ActivityType extends AbstractType
'required' => $activityType->isRequired('attendee'),
'expanded' => true,
'class' => ActivityPresence::class,
'choice_label' => function (ActivityPresence $activityPresence) {
return $this->translatableStringHelper->localize($activityPresence->getName());
},
'query_builder' => static function (EntityRepository $er) {
return $er->createQueryBuilder('a')
->where('a.active = true');
},
'choice_label' => fn (ActivityPresence $activityPresence) => $this->translatableStringHelper->localize($activityPresence->getName()),
'query_builder' => static fn (EntityRepository $er) => $er->createQueryBuilder('a')
->where('a.active = true'),
]);
}
@@ -225,6 +221,7 @@ class ActivityType extends AbstractType
$builder->add('user', PickUserDynamicType::class, [
'label' => $activityType->getLabel('user'),
'required' => $activityType->isRequired('user'),
'multiple' => false,
]);
}
@@ -356,9 +353,7 @@ class ActivityType extends AbstractType
return (string) $location->getId();
},
function (?string $id): ?Location {
return $this->om->getRepository(Location::class)->findOneBy(['id' => (int) $id]);
}
fn (?string $id): ?Location => $this->om->getRepository(Location::class)->findOneBy(['id' => (int) $id])
));
}
@@ -400,9 +395,7 @@ class ActivityType extends AbstractType
// the datetimetransformer will then handle timezone as GMT
$timezoneUTC = new DateTimeZone('GMT');
/** @var DateTime $data */
$data = $formEvent->getData() === null ?
DateTime::createFromFormat('U', '300') :
$formEvent->getData();
$data = $formEvent->getData() ?? DateTime::createFromFormat('U', '300');
$seconds = $data->getTimezone()->getOffset($data);
$data->setTimeZone($timezoneUTC);
$data->add(new DateInterval('PT' . $seconds . 'S'));

View File

@@ -45,9 +45,7 @@ class ActivityTypeType extends AbstractType
])
->add('category', EntityType::class, [
'class' => ActivityTypeCategory::class,
'choice_label' => function (ActivityTypeCategory $activityTypeCategory) {
return $this->translatableStringHelper->localize($activityTypeCategory->getName());
},
'choice_label' => fn (ActivityTypeCategory $activityTypeCategory) => $this->translatableStringHelper->localize($activityTypeCategory->getName()),
])
->add('ordering', NumberType::class, [
'required' => true,

View File

@@ -45,9 +45,7 @@ class PickActivityReasonType extends AbstractType
$resolver->setDefaults(
[
'class' => ActivityReason::class,
'choice_label' => function (ActivityReason $choice) {
return $this->reasonRender->renderString($choice, []);
},
'choice_label' => fn (ActivityReason $choice) => $this->reasonRender->renderString($choice, []),
'group_by' => function (ActivityReason $choice): ?string {
if (null !== $category = $choice->getCategory()) {
return $this->translatableStringHelper->localize($category->getName());

View File

@@ -38,10 +38,8 @@ class TranslatableActivityReasonCategoryType extends AbstractType
$resolver->setDefaults(
[
'class' => ActivityReasonCategory::class,
'choice_label' => function (ActivityReasonCategory $category) {
return $this->translatableStringHelper->localize($category->getName())
. (!$category->getActive() ? ' (' . $this->translator->trans('inactive') . ')' : '');
},
'choice_label' => fn (ActivityReasonCategory $category) => $this->translatableStringHelper->localize($category->getName())
. (!$category->getActive() ? ' (' . $this->translator->trans('inactive') . ')' : ''),
]
);
}

View File

@@ -39,9 +39,7 @@ class TranslatableActivityType extends AbstractType
'class' => ActivityType::class,
'active_only' => true,
'choices' => $this->activityTypeRepository->findAllActive(),
'choice_label' => function (ActivityType $type) {
return $this->translatableStringHelper->localize($type->getName());
},
'choice_label' => fn (ActivityType $type) => $this->translatableStringHelper->localize($type->getName()),
]
);
}

View File

@@ -26,12 +26,12 @@ final class PersonMenuBuilder implements LocalMenuBuilderInterface
/**
* @var AuthorizationCheckerInterface
*/
protected $authorizationChecker;
private $authorizationChecker;
/**
* @var TranslatorInterface
*/
protected $translator;
private $translator;
public function __construct(
AuthorizationCheckerInterface $authorizationChecker,
@@ -48,7 +48,7 @@ final class PersonMenuBuilder implements LocalMenuBuilderInterface
if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) {
$menu->addChild(
$this->translator->trans('Activity list'),
$this->translator->trans('Activities'),
[
'route' => 'chill_activity_activity_list',
'routeParameters' => ['person_id' => $person->getId()],

View File

@@ -254,9 +254,7 @@ final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInte
$reachableScopes = $this->authorizationHelper->getReachableScopes($this->tokenStorage->getToken()->getUser(), ActivityVoter::SEE, $center);
// we get the ids for those scopes
$reachablesScopesId = array_map(
static function (Scope $scope) {
return $scope->getId();
},
static fn (Scope $scope) => $scope->getId(),
$reachableScopes
);

View File

@@ -0,0 +1,198 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ActivityBundle\Repository;
use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
use Chill\ActivityBundle\Service\GenericDoc\Providers\AccompanyingPeriodActivityGenericDocProvider;
use Chill\ActivityBundle\Service\GenericDoc\Providers\PersonActivityGenericDocProvider;
use Chill\DocStoreBundle\Entity\PersonDocument;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\DocStoreBundle\GenericDoc\FetchQuery;
use Chill\DocStoreBundle\GenericDoc\FetchQueryInterface;
use Chill\DocStoreBundle\GenericDoc\Providers\PersonDocumentGenericDocProvider;
use Chill\DocStoreBundle\Repository\PersonDocumentACLAwareRepositoryInterface;
use Chill\DocStoreBundle\Security\Authorization\PersonDocumentVoter;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Security\Authorization\AuthorizationHelperForCurrentUserInterface;
use Chill\MainBundle\Security\Resolver\CenterResolverManagerInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodWorkVoter;
use DateTimeImmutable;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping\MappingException;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\HttpKernel\HttpCache\Store;
use Symfony\Component\Security\Core\Security;
final readonly class ActivityDocumentACLAwareRepository implements ActivityDocumentACLAwareRepositoryInterface
{
public function __construct(
private EntityManagerInterface $em,
private CenterResolverManagerInterface $centerResolverManager,
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
private Security $security
) {
}
public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface
{
$query = $this->buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext($person, $startDate, $endDate, $content);
return $this->addFetchQueryByPersonACL($query, $person);
}
public function buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery
{
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
$activityMetadata = $this->em->getClassMetadata(Activity::class);
$query = new FetchQuery(
PersonActivityGenericDocProvider::KEY,
sprintf('jsonb_build_object(\'id\', stored_obj.%s, \'activity_id\', activity.%s)', $storedObjectMetadata->getSingleIdentifierColumnName(), $activityMetadata->getSingleIdentifierColumnName()),
sprintf('stored_obj.%s', $storedObjectMetadata->getColumnName('createdAt')),
sprintf('%s AS stored_obj', $storedObjectMetadata->getSchemaName().'.'.$storedObjectMetadata->getTableName())
);
$query->addJoinClause(
'JOIN public.activity_storedobject activity_doc ON activity_doc.storedobject_id = stored_obj.id'
);
$query->addJoinClause(
'JOIN public.activity activity ON activity.id = activity_doc.activity_id'
);
$query->addWhereClause(
sprintf('activity.%s = ?', $activityMetadata->getSingleAssociationJoinColumnName('person')),
[$person->getId()],
[Types::INTEGER]
);
return $this->addWhereClauses($query, $startDate, $endDate, $content);
}
public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery
{
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
$activityMetadata = $this->em->getClassMetadata(Activity::class);
$query = new FetchQuery(
AccompanyingPeriodActivityGenericDocProvider::KEY,
sprintf('jsonb_build_object(\'id\', stored_obj.%s, \'activity_id\', activity.%s)', $storedObjectMetadata->getSingleIdentifierColumnName(), $activityMetadata->getSingleIdentifierColumnName()),
sprintf('stored_obj.%s', $storedObjectMetadata->getColumnName('createdAt')),
sprintf('%s AS stored_obj', $storedObjectMetadata->getSchemaName().'.'.$storedObjectMetadata->getTableName())
);
$query->addJoinClause(
'JOIN public.activity_storedobject activity_doc ON activity_doc.storedobject_id = stored_obj.id'
);
$query->addJoinClause(
'JOIN public.activity activity ON activity.id = activity_doc.activity_id'
);
// add documents of activities from parcours context
$or = [];
$orParams = [];
$orTypes = [];
foreach ($person->getAccompanyingPeriodParticipations() as $participation) {
if (!$this->security->isGranted(ActivityVoter::SEE, $participation->getAccompanyingPeriod())) {
continue;
}
$or[] = sprintf(
'(activity.%s = ? AND stored_obj.%s BETWEEN ?::date AND COALESCE(?::date, \'infinity\'::date))',
$activityMetadata->getSingleAssociationJoinColumnName('accompanyingPeriod'),
$storedObjectMetadata->getColumnName('createdAt')
);
$orParams = [...$orParams, $participation->getAccompanyingPeriod()->getId(),
DateTimeImmutable::createFromInterface($participation->getStartDate()),
null === $participation->getEndDate() ? null : DateTimeImmutable::createFromInterface($participation->getEndDate())];
$orTypes = [...$orTypes, Types::INTEGER, Types::DATE_IMMUTABLE, Types::DATE_IMMUTABLE];
}
if ([] === $or) {
$query->addWhereClause('TRUE = FALSE');
return $query;
}
$query->addWhereClause(sprintf('(%s)', implode(' OR ', $or)), $orParams, $orTypes);
return $this->addWhereClauses($query, $startDate, $endDate, $content);
}
private function addWhereClauses(FetchQuery $query, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery
{
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
if (null !== $startDate) {
$query->addWhereClause(
sprintf('stored_obj.%s >= ?', $storedObjectMetadata->getColumnName('createdAt')),
[$startDate],
[Types::DATE_IMMUTABLE]
);
}
if (null !== $endDate) {
$query->addWhereClause(
sprintf('stored_obj.%s < ?', $storedObjectMetadata->getColumnName('createdAt')),
[$endDate],
[Types::DATE_IMMUTABLE]
);
}
if (null !== $content and '' !== $content) {
$query->addWhereClause(
'stored_obj.title ilike ?',
['%' . $content . '%'],
[Types::STRING]
);
}
return $query;
}
private function addFetchQueryByPersonACL(FetchQuery $fetchQuery, Person $person): FetchQuery
{
$activityMetadata = $this->em->getClassMetadata(Activity::class);
$reachableScopes = [];
foreach ($this->centerResolverManager->resolveCenters($person) as $center) {
$reachableScopes = [
...$reachableScopes,
...$this->authorizationHelperForCurrentUser->getReachableScopes(ActivityVoter::SEE, $center)
];
}
if ([] === $reachableScopes) {
$fetchQuery->addWhereClause('FALSE = TRUE');
return $fetchQuery;
}
$fetchQuery->addWhereClause(
sprintf(
'activity.%s IN (%s)',
$activityMetadata->getSingleAssociationJoinColumnName('scope'),
implode(', ', array_fill(0, count($reachableScopes), '?'))
),
array_map(static fn (Scope $s) => $s->getId(), $reachableScopes),
array_fill(0, count($reachableScopes), Types::INTEGER)
);
return $fetchQuery;
}
}

View File

@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ActivityBundle\Repository;
use Chill\DocStoreBundle\GenericDoc\FetchQuery;
use Chill\DocStoreBundle\GenericDoc\FetchQueryInterface;
use Chill\PersonBundle\Entity\Person;
use DateTimeImmutable;
/**
* Gives queries usable for fetching documents, with ACL aware
*/
interface ActivityDocumentACLAwareRepositoryInterface
{
/**
* Return a fetch query for querying document's activities for a person
*
* This method must check the rights to see a document: the user must be allowed to see the given activities
*/
public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface;
/**
* Return a fetch query for querying document's activities for an activity in accompanying periods, but for a given person
*
* This method must check the rights to see a document: the user must be allowed to see the given accompanying periods
*/
public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery;
}

View File

@@ -1,5 +1,7 @@
// Access to Bootstrap variables and mixins
@import '~ChillMainAssets/module/bootstrap/shared';
@import '~ChillPersonAssets/chill/scss/mixins.scss';
@import 'bootstrap/scss/_badge.scss';
//// ACTIVITY CREATION
// first step: select type page
@@ -96,3 +98,25 @@ li.document-list-item {
justify-content: space-between;
margin-bottom: 0.3rem;
}
.badge-activity-type {
display: inline-block;
background-color: #f3f3f3;
.title_label {
@include chill_badge(#9acd32);
}
.title_action {
padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x);
margin-right: 1rem;
font-size: var(--bs-badge-font-size);
font-weight: var(--bs-badge-font-weight);
line-height: 1;
color: var(--bs-badge-color);
text-align: center;
white-space: nowrap;
vertical-align: baseline;
}
}

View File

@@ -63,7 +63,7 @@
</div>
{% endif %}
{% if activity.user and t.userVisible %}
{% if activity.user is not null and t.userVisible %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Referrer'|trans }}</h3></div>
<div class="wl-col list">

View File

@@ -5,7 +5,7 @@
Maybe should we think about abstracting this file a bit more ? Moving it to PersonBundle ?
#}
{% if context == 'calendar_accompanyingCourse' %}
{% if context == 'calendar_accompanyingCourse' or context == 'calendar_person' %}
{% import "@ChillCalendar/_invite.html.twig" as invite %}
{% endif %}

View File

@@ -34,10 +34,12 @@
<div class="item-row separator">
<dl class="chill_view_data">
{%- if entity.user is not null %}
<dt class="inline">{{ 'Referrer'|trans|capitalize }}</dt>
<dd>
<span class="badge-user">{{ entity.user|chill_entity_render_box }}</span>
</dd>
{% endif %}
{%- if entity.scope -%}
<dt class="inline">{{ 'Scope'|trans }}</dt>

View File

@@ -0,0 +1,83 @@
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
{% import '@ChillPerson/Macro/updatedBy.html.twig' as mmm %}
{% set person_id = null %}
{% if activity.person %}
{% set person_id = activity.person.id %}
{% endif %}
{% set accompanying_course_id = null %}
{% if activity.accompanyingPeriod %}
{% set accompanying_course_id = activity.accompanyingPeriod.id %}
{% endif %}
<div class="item-bloc activity-item{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
<div class="item-row">
<div class="item-col" style="width: unset">
{% if document.isPending %}
<div class="badge text-bg-info" data-docgen-is-pending="{{ document.id }}">{{ 'docgen.Doc generation is pending'|trans }}</div>
{% elseif document.isFailure %}
<div class="badge text-bg-warning">{{ 'docgen.Doc generation failed'|trans }}</div>
{% endif %}
<div>
{% if activity.accompanyingPeriod is not null and context == 'person' %}
<span class="badge bg-primary">
<i class="fa fa-random"></i> {{ activity.accompanyingPeriod.id }}
</span>&nbsp;
{% endif %}
<div class="badge-activity-type">
<span class="title_label"></span>
<span class="title_action">
{{ activity.type.name | localize_translatable_string }}
{% if activity.emergency %}
<span class="badge bg-danger rounded-pill fs-6 float-end">{{ 'Emergency'|trans|upper }}</span>
{% endif %}
</span>
</div>
</div>
<div class="denomination h2">
{{ document.title|chill_print_or_message("No title") }}
</div>
{% if document.hasTemplate %}
<div>
<p>{{ document.template.name|localize_translatable_string }}</p>
</div>
{% endif %}
</div>
<div class="item-col">
<div class="container">
<div class="dates row text-end">
<span>{{ document.createdAt|format_date('short') }}</span>
</div>
</div>
</div>
</div>
<div class="item-row separator">
<div class="item-col item-meta">
{{ mmm.createdBy(document) }}
</div>
<ul class="item-col record_actions flex-shrink-1">
{% if is_granted('CHILL_ACTIVITY_SEE_DETAILS', activity) %}
<li>
{{ document|chill_document_button_group(document.title, is_granted('CHILL_ACTIVITY_UPDATE', activity), {small: false}) }}
</li>
{% endif %}
{% if is_granted('CHILL_ACTIVITY_SEE', activity)%}
<li>
<a href="{{ chill_path_add_return_path('chill_activity_activity_show', {'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}" class="btn btn-show"></a>
</li>
{% endif %}
{% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
<li>
<a href="{{ chill_path_add_return_path('chill_activity_activity_edit', {'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}" class="btn btn-edit"></a>
</li>
{% endif %}
</ul>
</div>
</div>

View File

@@ -24,6 +24,9 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Repository\PersonRepository;
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender;
use Chill\ThirdPartyBundle\Repository\ThirdPartyRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
@@ -55,6 +58,10 @@ class ActivityContext implements
private TranslatorInterface $translator;
private ThirdPartyRender $thirdPartyRender;
private ThirdPartyRepository $thirdPartyRepository;
public function __construct(
DocumentCategoryRepository $documentCategoryRepository,
NormalizerInterface $normalizer,
@@ -63,7 +70,9 @@ class ActivityContext implements
PersonRenderInterface $personRender,
PersonRepository $personRepository,
TranslatorInterface $translator,
BaseContextData $baseContextData
BaseContextData $baseContextData,
ThirdPartyRender $thirdPartyRender,
ThirdPartyRepository $thirdPartyRepository
) {
$this->documentCategoryRepository = $documentCategoryRepository;
$this->normalizer = $normalizer;
@@ -73,6 +82,8 @@ class ActivityContext implements
$this->personRepository = $personRepository;
$this->translator = $translator;
$this->baseContextData = $baseContextData;
$this->thirdPartyRender = $thirdPartyRender;
$this->thirdPartyRepository = $thirdPartyRepository;
}
public function adminFormReverseTransform(array $data): array
@@ -89,6 +100,8 @@ class ActivityContext implements
'person1Label' => $data['person1Label'] ?? $this->translator->trans('docgen.person 1'),
'person2' => $data['person2'] ?? false,
'person2Label' => $data['person2Label'] ?? $this->translator->trans('docgen.person 2'),
'thirdParty' => $data['thirdParty'] ?? false,
'thirdPartyLabel' => $data['thirdPartyLabel'] ?? $this->translator->trans('thirdParty'),
];
}
@@ -118,6 +131,14 @@ class ActivityContext implements
->add('person2Label', TextType::class, [
'label' => 'person 2 label',
'required' => true,
])
->add('thirdParty', CheckboxType::class, [
'required' => false,
'label' => 'docgen.Ask for thirdParty',
])
->add('thirdPartyLabel', TextType::class, [
'label' => 'docgen.thirdParty label',
'required' => true,
]);
}
@@ -134,9 +155,7 @@ class ActivityContext implements
$builder->add($key, EntityType::class, [
'class' => Person::class,
'choices' => $persons,
'choice_label' => function (Person $p) {
return $this->personRender->renderString($p, []);
},
'choice_label' => fn (Person $p) => $this->personRender->renderString($p, []),
'multiple' => false,
'required' => false,
'expanded' => true,
@@ -145,6 +164,54 @@ class ActivityContext implements
]);
}
}
$thirdParties = $entity->getThirdParties();
if ($options['thirdParty'] ?? false) {
$builder->add('thirdParty', EntityType::class, [
'class' => ThirdParty::class,
'choices' => $thirdParties,
'choice_label' => fn (ThirdParty $p) => $this->thirdPartyRender->renderString($p, []),
'multiple' => false,
'required' => false,
'expanded' => true,
'label' => $options['thirdPartyLabel'],
'placeholder' => $this->translator->trans('Any third party selected'),
]);
}
}
public function contextGenerationDataDenormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
$denormalized = [];
foreach (['mainPerson', 'person1', 'person2'] as $k) {
if (null !== ($id = ($data[$k] ?? null))) {
$denormalized[$k] = $this->personRepository->find($id);
} else {
$denormalized[$k] = null;
}
}
if (null !== ($id = ($data['thirdParty'] ?? null))) {
$denormalized['thirdParty'] = $this->thirdPartyRepository->find($id);
} else {
$denormalized['thirdParty'] = null;
}
return $denormalized;
}
public function contextGenerationDataNormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
$normalized = [];
foreach (['mainPerson', 'person1', 'person2'] as $k) {
$normalized[$k] = ($data[$k] ?? null)?->getId();
}
$normalized['thirdParty'] = ($data['thirdParty'] ?? null)?->getId();
return $normalized;
}
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array
@@ -172,6 +239,13 @@ class ActivityContext implements
}
}
if ($options['thirdParty']) {
$data['thirdParty'] = $this->normalizer->normalize($contextGenerationData['thirdParty'], 'docgen', [
'docgen:expects' => ThirdParty::class,
'groups' => 'docgen:read'
]);
}
return $data;
}
@@ -211,33 +285,7 @@ class ActivityContext implements
{
$options = $template->getOptions();
return $options['mainPerson'] || $options['person1'] || $options['person2'];
}
public function contextGenerationDataNormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
$normalized = [];
foreach (['mainPerson', 'person1', 'person2'] as $k) {
$normalized[$k] = null === $data[$k] ? null : $data[$k]->getId();
}
return $normalized;
}
public function contextGenerationDataDenormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
$denormalized = [];
foreach (['mainPerson', 'person1', 'person2'] as $k) {
if (null !== ($id = ($data[$k] ?? null))) {
$denormalized[$k] = $this->personRepository->find($id);
} else {
$denormalized[$k] = null;
}
}
return $denormalized;
return $options['mainPerson'] || $options['person1'] || $options['person2'] || $options ['thirdParty'];
}
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void

View File

@@ -34,10 +34,16 @@ use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Chill\ThirdPartyBundle\Repository\ThirdPartyRepository;
use DateTime;
use libphonenumber\PhoneNumber;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
use function in_array;
/**
* @implements DocGeneratorContextWithPublicFormInterface<AccompanyingPeriod>
* @implements DocGeneratorContextWithAdminFormInterface<AccompanyingPeriod>
*/
class ListActivitiesByAccompanyingPeriodContext implements
DocGeneratorContextWithAdminFormInterface,
DocGeneratorContextWithPublicFormInterface
@@ -69,7 +75,7 @@ class ListActivitiesByAccompanyingPeriodContext implements
SocialIssueRepository $socialIssueRepository,
ThirdPartyRepository $thirdPartyRepository,
TranslatableStringHelperInterface $translatableStringHelper,
UserRepository $userRepository
UserRepository $userRepository,
) {
$this->accompanyingPeriodContext = $accompanyingPeriodContext;
$this->activityACLAwareRepository = $activityACLAwareRepository;
@@ -100,14 +106,91 @@ class ListActivitiesByAccompanyingPeriodContext implements
public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void
{
$this->accompanyingPeriodContext->buildPublicForm($builder, $template, $entity);
$builder
->add('myActivitiesOnly', CheckboxType::class, [
'required' => false,
'label' => 'docgen.myActivitiesOnly',
])
->add('myWorksOnly', CheckboxType::class, [
'required' => false,
'label' => 'docgen.myWorksOnly',
]);
}
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array
public function contextGenerationDataDenormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
$denormalized = $this->accompanyingPeriodContext->contextGenerationDataDenormalize($template, $entity, $data);
foreach (['myActivitiesOnly', 'myWorksOnly'] as $k) {
$denormalized[$k] = $data[$k];
}
return $denormalized;
}
public function contextGenerationDataNormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
$normalized = $this->accompanyingPeriodContext->contextGenerationDataNormalize($template, $entity, $data);
foreach (['myActivitiesOnly', 'myWorksOnly'] as $k) {
$normalized[$k] = $data[$k] ?? false;
}
return $normalized;
}
/**
* @return list
*/
private function filterActivitiesByUser(array $activities, User $user): array
{
return array_values(
array_filter(
$activities,
function ($activity) use ($user) {
$activityUsernames = array_map(static fn ($user) => $user['username'], $activity['users'] ?? []);
return in_array($user->getUsername(), $activityUsernames, true);
}
)
);
}
/**
* @return list
*/
private function filterWorksByUser(array $works, User $user): array
{
return array_values(
array_filter(
$works,
function ($work) use ($user) {
$workUsernames = array_map(static fn ($user) => $user['username'], $work['referrers'] ?? []);
return in_array($user->getUsername(), $workUsernames, true);
}
)
);
}
public function getData(DocGeneratorTemplate $template, object $entity, array $contextGenerationData = []): array
{
$data = $this->accompanyingPeriodContext->getData($template, $entity, $contextGenerationData);
$data['activities'] = $this->getActivitiesSimplified($entity);
$activities = $this->getActivitiesSimplified($entity);
$myActivitiesOnly = $contextGenerationData['myActivitiesOnly'];
if ($myActivitiesOnly && isset($contextGenerationData['creator'])) {
$activities = $this->filterActivitiesByUser($activities, $contextGenerationData['creator']);
}
$data['activities'] = $activities;
$myWorksOnly = $contextGenerationData['myWorksOnly'];
if ($myWorksOnly && isset($contextGenerationData['creator'])) {
$data['course']['works'] = $this->filterWorksByUser($data['course']['works'], $contextGenerationData['creator']);
}
return $data;
}
@@ -143,17 +226,7 @@ class ListActivitiesByAccompanyingPeriodContext implements
public function hasPublicForm(DocGeneratorTemplate $template, $entity): bool
{
return $this->accompanyingPeriodContext->hasPublicForm($template, $entity);
}
public function contextGenerationDataNormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
return $this->accompanyingPeriodContext->contextGenerationDataNormalize($template, $entity, $data);
}
public function contextGenerationDataDenormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
return $this->accompanyingPeriodContext->contextGenerationDataDenormalize($template, $entity, $data);
return true;
}
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void

View File

@@ -0,0 +1,64 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ActivityBundle\Service\EntityInfo\AccompanyingPeriodInfoQueryPart;
use Chill\ActivityBundle\Entity\Activity;
use Chill\PersonBundle\Service\EntityInfo\AccompanyingPeriodInfoUnionQueryPartInterface;
class ActivityUsersDateQueryPartForAccompanyingPeriodInfo implements AccompanyingPeriodInfoUnionQueryPartInterface
{
public function getAccompanyingPeriodIdColumn(): string
{
return 'activity.accompanyingperiod_id';
}
public function getRelatedEntityColumn(): string
{
return Activity::class;
}
public function getRelatedEntityIdColumn(): string
{
return 'activity.id';
}
public function getUserIdColumn(): string
{
return 'au.user_id';
}
public function getDateTimeColumn(): string
{
return 'activity.date';
}
public function getDiscriminator(): string
{
return 'activity_date';
}
public function getMetadataColumn(): string
{
return '\'{}\'::jsonb';
}
public function getFromStatement(): string
{
return 'activity
LEFT JOIN activity_user au on activity.id = au.activity_id';
}
public function getWhereClause(): string
{
return 'activity.accompanyingperiod_id IS NOT NULL';
}
}

View File

@@ -0,0 +1,114 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ActivityBundle\Service\GenericDoc\Providers;
use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Repository\ActivityDocumentACLAwareRepositoryInterface;
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\DocStoreBundle\GenericDoc\FetchQuery;
use Chill\DocStoreBundle\GenericDoc\FetchQueryInterface;
use Chill\DocStoreBundle\GenericDoc\GenericDocForAccompanyingPeriodProviderInterface;
use Chill\DocStoreBundle\GenericDoc\GenericDocForPersonProviderInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
use DateTimeImmutable;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping\MappingException;
use Symfony\Component\Security\Core\Security;
final class AccompanyingPeriodActivityGenericDocProvider implements GenericDocForAccompanyingPeriodProviderInterface, GenericDocForPersonProviderInterface
{
public const KEY = 'accompanying_period_activity_document';
public function __construct(
private EntityManagerInterface $em,
private Security $security,
private ActivityDocumentACLAwareRepositoryInterface $activityDocumentACLAwareRepository,
) {
}
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
$activityMetadata = $this->em->getClassMetadata(Activity::class);
$query = new FetchQuery(
self::KEY,
sprintf("jsonb_build_object('id', doc_obj.%s, 'activity_id', activity.%s)", $storedObjectMetadata->getSingleIdentifierColumnName(), $activityMetadata->getSingleIdentifierColumnName()),
'doc_obj.'.$storedObjectMetadata->getColumnName('createdAt'),
$storedObjectMetadata->getSchemaName().'.'.$storedObjectMetadata->getTableName().' AS doc_obj'
);
$query->addJoinClause(
'JOIN public.activity_storedobject activity_doc ON activity_doc.storedobject_id = doc_obj.id'
);
$query->addJoinClause(
'JOIN public.activity activity ON activity.id = activity_doc.activity_id'
);
$query->addWhereClause(
'activity.accompanyingperiod_id = ?',
[$accompanyingPeriod->getId()],
[Types::INTEGER]
);
if (null !== $startDate) {
$query->addWhereClause(
sprintf('doc_obj.%s >= ?', $storedObjectMetadata->getColumnName('createdAt')),
[$startDate],
[Types::DATE_IMMUTABLE]
);
}
if (null !== $endDate) {
$query->addWhereClause(
sprintf('doc_obj.%s < ?', $storedObjectMetadata->getColumnName('createdAt')),
[$endDate],
[Types::DATE_IMMUTABLE]
);
}
if (null !== $content) {
$query->addWhereClause(
'doc_obj.title ilike ?',
['%' . $content . '%'],
[Types::STRING]
);
}
return $query;
}
/**
* @param AccompanyingPeriod $accompanyingPeriod
* @return bool
*/
public function isAllowedForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod): bool
{
return $this->security->isGranted(ActivityVoter::SEE, $accompanyingPeriod);
}
public function isAllowedForPerson(Person $person): bool
{
return $this->security->isGranted(AccompanyingPeriodVoter::SEE, $person);
}
public function buildFetchQueryForPerson(Person $person, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{
return $this->activityDocumentACLAwareRepository
->buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext($person, $startDate, $endDate, $content);
}
}

View File

@@ -0,0 +1,53 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ActivityBundle\Service\GenericDoc\Providers;
use Chill\ActivityBundle\Repository\ActivityDocumentACLAwareRepository;
use Chill\ActivityBundle\Repository\ActivityDocumentACLAwareRepositoryInterface;
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
use Chill\DocStoreBundle\GenericDoc\FetchQueryInterface;
use Chill\DocStoreBundle\GenericDoc\GenericDocForPersonProviderInterface;
use Chill\DocStoreBundle\Repository\PersonDocumentACLAwareRepositoryInterface;
use Chill\PersonBundle\Entity\Person;
use DateTimeImmutable;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Security\Core\Security;
final readonly class PersonActivityGenericDocProvider implements GenericDocForPersonProviderInterface
{
public const KEY = 'person_activity_document';
public function __construct(
private Security $security,
private ActivityDocumentACLAwareRepositoryInterface $personActivityDocumentACLAwareRepository,
) {
}
public function buildFetchQueryForPerson(Person $person, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{
return $this->personActivityDocumentACLAwareRepository->buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(
$person,
$startDate,
$endDate,
$content
);
}
/**
* @param Person $person
* @return bool
*/
public function isAllowedForPerson(Person $person): bool
{
return $this->security->isGranted(ActivityVoter::SEE, $person);
}
}

View File

@@ -0,0 +1,52 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ActivityBundle\Service\GenericDoc\Renderers;
use Chill\ActivityBundle\Repository\ActivityRepository;
use Chill\ActivityBundle\Service\GenericDoc\Providers\AccompanyingPeriodActivityGenericDocProvider;
use Chill\ActivityBundle\Service\GenericDoc\Providers\PersonActivityGenericDocProvider;
use Chill\DocStoreBundle\GenericDoc\GenericDocDTO;
use Chill\DocStoreBundle\GenericDoc\Twig\GenericDocRendererInterface;
use Chill\DocStoreBundle\Repository\StoredObjectRepository;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
final class AccompanyingPeriodActivityGenericDocRenderer implements GenericDocRendererInterface
{
private StoredObjectRepository $objectRepository;
private ActivityRepository $activityRepository;
public function __construct(StoredObjectRepository $storedObjectRepository, ActivityRepository $activityRepository)
{
$this->objectRepository = $storedObjectRepository;
$this->activityRepository = $activityRepository;
}
public function supports(GenericDocDTO $genericDocDTO, $options = []): bool
{
return $genericDocDTO->key === AccompanyingPeriodActivityGenericDocProvider::KEY || $genericDocDTO->key === PersonActivityGenericDocProvider::KEY;
}
public function getTemplate(GenericDocDTO $genericDocDTO, $options = []): string
{
return '@ChillActivity/GenericDoc/activity_document.html.twig';
}
public function getTemplateData(GenericDocDTO $genericDocDTO, $options = []): array
{
return [
'activity' => $this->activityRepository->find($genericDocDTO->identifiers['activity_id']),
'document' => $this->objectRepository->find($genericDocDTO->identifiers['id']),
'context' => $genericDocDTO->getContext(),
];
}
}

Some files were not shown because too many files have changed in this diff Show More