mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-11 17:25:02 +00:00
Compare commits
156 Commits
upgrade/sy
...
2.2.1
Author | SHA1 | Date | |
---|---|---|---|
9d2dfbe610
|
|||
70e6aee3c5 | |||
6c16967cdc
|
|||
4359c2dddc
|
|||
5a102d4989
|
|||
88a544fabe | |||
bf2a4bafd8 | |||
fe936ac0f2
|
|||
398b633863
|
|||
8fabfdd5c0
|
|||
8a91be4ef3
|
|||
3b9fae3b49
|
|||
7349be94c8
|
|||
d815b44280
|
|||
56957250ba
|
|||
a6b451df98
|
|||
3879e5cd9b
|
|||
cb4de1f3d2
|
|||
21f0f70350 | |||
fadc007bfe
|
|||
1b664d0be2
|
|||
a136a278da
|
|||
e0c21e46ae
|
|||
270e068ace
|
|||
c683123eca
|
|||
c4dd46a03c
|
|||
1d7279c022
|
|||
eb41293c96 | |||
37e92ca58d | |||
593adadef1 | |||
f5b71a0c41 | |||
f42e1723ab | |||
2178833da7 | |||
23ee29ab0d | |||
199223293e
|
|||
520d5ab6d4 | |||
c73beef3af | |||
73b95732db
|
|||
88f48d474f
|
|||
0fd36a3196
|
|||
77f8cf0e1a | |||
1b9fea04ce
|
|||
78b19efe86 | |||
07ff425bfc
|
|||
c77dd011b8 | |||
9c109d2efd
|
|||
80dfa092db
|
|||
4489098add | |||
ed556d9ee8 | |||
bd5dab2215 | |||
ff03299f80 | |||
5749660760 | |||
b679dbe26c
|
|||
6c3fa5cb98
|
|||
|
1b0569c974 | ||
6bdd1f31d3 | |||
ff3dab0934
|
|||
|
9593cfde36 | ||
|
ad1b28ff11 | ||
|
6232dabae5 | ||
|
ef59e6dc1c | ||
|
303666b30d | ||
|
d0867f9aa3 | ||
|
db33fab097 | ||
|
91a19b9e99 | ||
|
c6658aa2f3 | ||
9c85ad74ce | |||
fec2dd0f74 | |||
977299192f | |||
77997e2b6f | |||
6e618e688b | |||
dad36927f3 | |||
664bf743f9
|
|||
f5448f9d95 | |||
a31c4063a1 | |||
c8f95528c0 | |||
20023dff67
|
|||
d82a3e0ff6
|
|||
04359f27c6
|
|||
5109490aad
|
|||
8b82e0c535 | |||
5351223d44 | |||
53aa887da5 | |||
ef6a5e0b6b | |||
5931b2f709 | |||
9d1e54d3a0 | |||
a8945f5701 | |||
674e057f67
|
|||
b2e79b677b
|
|||
748e566c7e
|
|||
1f4c51f3bc | |||
dc6eeccaab | |||
0083842509
|
|||
ca7be4ecd0 | |||
785c70fe92 | |||
8bbca7e61a
|
|||
5d21612c2e | |||
fb9f182edd | |||
bbd3d2a83f
|
|||
e87420dc57 | |||
f1bf02d2b4 | |||
8a35c2e2ee | |||
fbd555e89a
|
|||
66dc027354
|
|||
8863e0a92e
|
|||
db9fef095a
|
|||
1df2342c49 | |||
addbdacee8 | |||
8a684734e7
|
|||
1abaf2acb0 | |||
a0ae1f0d0f | |||
2554da9dd8
|
|||
3e3f20993d
|
|||
997f3cdb09
|
|||
ab5ad7ae14
|
|||
36413f16c3
|
|||
f75b90cb26
|
|||
1956836f88
|
|||
ea4294d12d
|
|||
c73e57ad73
|
|||
5b729e1cb1
|
|||
229af2e4f9
|
|||
e80a6e417b
|
|||
c5989de120
|
|||
fcbc00d0f1
|
|||
722f053f06
|
|||
97b7ff2e43
|
|||
f3e0302f3f
|
|||
4974995ea2
|
|||
f2e1c73f37
|
|||
|
1a66a08142 | ||
|
71e8e2baee | ||
|
0a2f41c8a0 | ||
|
67b32341d1 | ||
|
cb37e8c006 | ||
ba43b6b025 | |||
cdaca533a0
|
|||
73c0dd0e9e | |||
8fd9010ea5 | |||
488a0e5f0c | |||
cb0ff88318 | |||
be965e8698 | |||
241e605ea6 | |||
fe3d437096 | |||
c1f5f02c41 | |||
|
3576f7f14f | ||
|
d8d517017d | ||
087ada2250 | |||
|
afb25276ee | ||
|
e850f67b00 | ||
|
f4a7145627 | ||
|
6b5423ded3 | ||
|
eb765585b2 | ||
|
1a759cabe4 | ||
|
457d71b4f3 | ||
|
ecb8ef0146 |
6
.changes/header.tpl.md
Normal file
6
.changes/header.tpl.md
Normal 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).
|
0
.changes/unreleased/.gitkeep
Normal file
0
.changes/unreleased/.gitkeep
Normal file
677
.changes/v2.0.0.md
Normal file
677
.changes/v2.0.0.md
Normal 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
17
.changes/v2.1.0.md
Normal 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
12
.changes/v2.2.0.md
Normal 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
3
.changes/v2.2.1.md
Normal 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
|
34
.changie.yaml
Normal file
34
.changie.yaml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
changesDir: .changes
|
||||||
|
unreleasedDir: unreleased
|
||||||
|
headerPath: header.tpl.md
|
||||||
|
changelogPath: CHANGELOG.md
|
||||||
|
versionExt: md
|
||||||
|
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}'
|
||||||
|
kindFormat: '### {{.Kind}}'
|
||||||
|
changeFormat: >-
|
||||||
|
* {{ if not (eq .Custom.Issue "") }}([#{{ .Custom.Issue }}](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/{{ .Custom.Issue }})) {{ end }}{{.Body}}
|
||||||
|
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_
|
35
.env.test
35
.env.test
@@ -3,38 +3,3 @@
|
|||||||
# Run tests from root to adapt your own environment
|
# Run tests from root to adapt your own environment
|
||||||
KERNEL_CLASS='App\Kernel'
|
KERNEL_CLASS='App\Kernel'
|
||||||
APP_SECRET='$ecretf0rt3st'
|
APP_SECRET='$ecretf0rt3st'
|
||||||
|
|
||||||
ADMIN_PASSWORD=admin
|
|
||||||
|
|
||||||
LOCALE=fr
|
|
||||||
REDIS_URL=redis
|
|
||||||
REDIS_PORT=6379
|
|
||||||
REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
|
|
||||||
|
|
||||||
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
|
|
||||||
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
|
|
||||||
JWT_PASSPHRASE=2a30f6ba26521a2613821da35f28386e
|
|
||||||
|
|
||||||
TWILIO_SID=~
|
|
||||||
TWILIO_SECRET=~
|
|
||||||
DEFAULT_CARRIER_CODE=BE
|
|
||||||
|
|
||||||
ADD_ADDRESS_DEFAULT_COUNTRY=BE
|
|
||||||
|
|
||||||
ADD_ADDRESS_MAP_CENTER_X=50.8443
|
|
||||||
ADD_ADDRESS_MAP_CENTER_Y=4.3523
|
|
||||||
ADD_ADDRESS_MAP_CENTER_Z=15
|
|
||||||
|
|
||||||
SHORT_MESSAGE_DSN=null://null
|
|
||||||
MESSENGER_TRANSPORT_DSN=sync://
|
|
||||||
###< symfony/messenger ###
|
|
||||||
|
|
||||||
###> doctrine/doctrine-bundle ###
|
|
||||||
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
|
||||||
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
|
|
||||||
#
|
|
||||||
DATABASE_URL="postgresql://postgres:postgres@db:5432/test?serverVersion=14&charset=utf8"
|
|
||||||
|
|
||||||
ASYNC_UPLOAD_TEMP_URL_KEY=
|
|
||||||
ASYNC_UPLOAD_TEMP_URL_BASE_PATH=
|
|
||||||
ASYNC_UPLOAD_TEMP_URL_CONTAINER=
|
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
# Select what we should cache between builds
|
# Select what we should cache between builds
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
|
- tests/app/vendor/
|
||||||
- .cache
|
- .cache
|
||||||
|
|
||||||
# Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
|
# Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
|
||||||
@@ -27,7 +28,7 @@ variables:
|
|||||||
REDIS_PORT: 6379
|
REDIS_PORT: 6379
|
||||||
REDIS_URL: redis://redis:6379
|
REDIS_URL: redis://redis:6379
|
||||||
# change vendor dir to make the app install into tests/apps
|
# change vendor dir to make the app install into tests/apps
|
||||||
#COMPOSER_VENDOR_DIR: /vendor
|
COMPOSER_VENDOR_DIR: tests/app/vendor
|
||||||
DEFAULT_CARRIER_CODE: BE
|
DEFAULT_CARRIER_CODE: BE
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
@@ -48,7 +49,7 @@ build:
|
|||||||
expire_in: 30 min
|
expire_in: 30 min
|
||||||
paths:
|
paths:
|
||||||
- bin
|
- bin
|
||||||
- vendor/
|
- tests/app/vendor/
|
||||||
|
|
||||||
code_style:
|
code_style:
|
||||||
stage: Tests
|
stage: Tests
|
||||||
@@ -62,7 +63,7 @@ code_style:
|
|||||||
expire_in: 30 min
|
expire_in: 30 min
|
||||||
paths:
|
paths:
|
||||||
- bin
|
- bin
|
||||||
- vendor/
|
- tests/app/vendor/
|
||||||
|
|
||||||
phpstan_tests:
|
phpstan_tests:
|
||||||
stage: Tests
|
stage: Tests
|
||||||
@@ -76,7 +77,7 @@ phpstan_tests:
|
|||||||
expire_in: 30 min
|
expire_in: 30 min
|
||||||
paths:
|
paths:
|
||||||
- bin
|
- bin
|
||||||
- vendor/
|
- tests/app/vendor/
|
||||||
|
|
||||||
rector_tests:
|
rector_tests:
|
||||||
stage: Tests
|
stage: Tests
|
||||||
@@ -90,7 +91,7 @@ rector_tests:
|
|||||||
expire_in: 30 min
|
expire_in: 30 min
|
||||||
paths:
|
paths:
|
||||||
- bin
|
- bin
|
||||||
- vendor/
|
- tests/app/vendor/
|
||||||
|
|
||||||
# psalm_tests:
|
# psalm_tests:
|
||||||
# stage: Tests
|
# stage: Tests
|
||||||
@@ -110,12 +111,13 @@ unit_tests:
|
|||||||
# until we fix testes
|
# until we fix testes
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
script:
|
script:
|
||||||
- php tests/console doctrine:migrations:migrate -n
|
- php tests/app/bin/console doctrine:migrations:migrate -n
|
||||||
- php -d memory_limit=3G tests/console doctrine:fixtures:load -n
|
- php -d memory_limit=2G tests/app/bin/console cache:clear --env=dev
|
||||||
- php -d memory_limit=2G tests/console cache:clear --env=test
|
- php -d memory_limit=3G tests/app/bin/console doctrine:fixtures:load -n
|
||||||
|
- php -d memory_limit=2G tests/app/bin/console cache:clear --env=test
|
||||||
- php -d memory_limit=4G bin/phpunit --colors=never
|
- php -d memory_limit=4G bin/phpunit --colors=never
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 30 min
|
expire_in: 30 min
|
||||||
paths:
|
paths:
|
||||||
- bin
|
- bin
|
||||||
- vendor/
|
- tests/app/vendor/
|
||||||
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
|||||||
[submodule "_exts/sphinx-php"]
|
[submodule "_exts/sphinx-php"]
|
||||||
path = _exts/sphinx-php
|
path = _exts/sphinx-php
|
||||||
url = https://github.com/fabpot/sphinx-php.git
|
url = https://github.com/fabpot/sphinx-php.git
|
||||||
|
[submodule "tests/app"]
|
||||||
|
path = tests/app
|
||||||
|
url = https://gitlab.com/Chill-projet/chill-app.git
|
||||||
|
53
CHANGELOG.md
53
CHANGELOG.md
@@ -1,16 +1,54 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
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/),
|
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.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
|
* [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] Feature: improve label for aliases in "Filter by activity type"
|
||||||
* [activity][export] DX/Feature: use of an `ActivityTypeRepositoryInterface` instead of the old-style EntityRepository
|
* [activity][export] DX/Feature: use of an `ActivityTypeRepositoryInterface` instead of the old-style EntityRepository
|
||||||
@@ -18,9 +56,6 @@ and this project adheres to
|
|||||||
* [person][export] Fixed: use left join for related entities in accompanying course aggregators
|
* [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: 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
|
* [workflow] Feature: show the email addresses that received an access link for the workflow
|
||||||
|
|
||||||
## Test releases
|
|
||||||
|
|
||||||
### 2.0.0-beta2
|
### 2.0.0-beta2
|
||||||
|
|
||||||
* [workflow]: Fixed: the notification is sent when the user is added to the first step.
|
* [workflow]: Fixed: the notification is sent when the user is added to the first step.
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
"sensio/framework-extra-bundle": "^5.5",
|
"sensio/framework-extra-bundle": "^5.5",
|
||||||
"spomky-labs/base64url": "^2.0",
|
"spomky-labs/base64url": "^2.0",
|
||||||
"symfony/browser-kit": "^4.4",
|
"symfony/browser-kit": "^4.4",
|
||||||
|
"symfony/clock": "^6.2",
|
||||||
"symfony/css-selector": "^4.4",
|
"symfony/css-selector": "^4.4",
|
||||||
"symfony/expression-language": "^4.4",
|
"symfony/expression-language": "^4.4",
|
||||||
"symfony/form": "^4.4",
|
"symfony/form": "^4.4",
|
||||||
@@ -107,7 +108,7 @@
|
|||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\": "tests/",
|
"App\\": "tests/app/src/",
|
||||||
"Chill\\DocGeneratorBundle\\Tests\\": "src/Bundle/ChillDocGeneratorBundle/tests",
|
"Chill\\DocGeneratorBundle\\Tests\\": "src/Bundle/ChillDocGeneratorBundle/tests",
|
||||||
"Chill\\WopiBundle\\Tests\\": "src/Bundle/ChillDocGeneratorBundle/tests"
|
"Chill\\WopiBundle\\Tests\\": "src/Bundle/ChillDocGeneratorBundle/tests"
|
||||||
}
|
}
|
||||||
@@ -123,10 +124,12 @@
|
|||||||
},
|
},
|
||||||
"bin-dir": "bin",
|
"bin-dir": "bin",
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
"sort-packages": true
|
"sort-packages": true,
|
||||||
|
"vendor-dir": "tests/app/vendor"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"auto-scripts": {
|
"auto-scripts": {
|
||||||
|
"assets:install %PUBLIC_DIR%": "symfony-cmd",
|
||||||
"cache:clear": "symfony-cmd"
|
"cache:clear": "symfony-cmd"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,9 +50,18 @@ class CountPerson implements ExportInterface
|
|||||||
public function getLabels($key, array $values, $data)
|
public function getLabels($key, array $values, $data)
|
||||||
{
|
{
|
||||||
// the Closure which will be executed by the formatter.
|
// the Closure which will be executed by the formatter.
|
||||||
return fn($value) => match ($value) {
|
return function ($value) {
|
||||||
'_header' => $this->getTitle(),
|
switch ($value) {
|
||||||
default => $value,
|
case '_header':
|
||||||
|
// we have to process specifically the '_header' string,
|
||||||
|
// which will be used by the formatter to show a column title
|
||||||
|
return $this->getTitle();
|
||||||
|
|
||||||
|
default:
|
||||||
|
// for all value, we do not process them and return them
|
||||||
|
// immediatly
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
203
docs/source/development/entity-info.rst
Normal file
203
docs/source/development/entity-info.rst
Normal 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``.
|
@@ -35,6 +35,7 @@ As Chill rely on the `symfony <http://symfony.com>`_ framework, reading the fram
|
|||||||
manual/index.rst
|
manual/index.rst
|
||||||
Assets <assets.rst>
|
Assets <assets.rst>
|
||||||
Cron Jobs <cronjob.rst>
|
Cron Jobs <cronjob.rst>
|
||||||
|
Info about entities <entity-info.rst>
|
||||||
|
|
||||||
Layout and UI
|
Layout and UI
|
||||||
**************
|
**************
|
||||||
|
@@ -6,6 +6,8 @@
|
|||||||
A copy of the license is included in the section entitled "GNU
|
A copy of the license is included in the section entitled "GNU
|
||||||
Free Documentation License".
|
Free Documentation License".
|
||||||
|
|
||||||
|
.. _timelines:
|
||||||
|
|
||||||
Timelines
|
Timelines
|
||||||
*********
|
*********
|
||||||
|
|
||||||
|
@@ -23,12 +23,19 @@ class ChillMainConfiguration implements ConfigurationInterface
|
|||||||
{
|
{
|
||||||
use AddWidgetConfigurationTrait;
|
use AddWidgetConfigurationTrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ContainerBuilder
|
||||||
|
*/
|
||||||
|
private $containerBuilder;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
array $widgetFactories,
|
array $widgetFactories,
|
||||||
private readonly ContainerBuilder $containerBuilder
|
ContainerBuilder $containerBuilder
|
||||||
) {
|
) {
|
||||||
// we register here widget factories (see below)
|
// we register here widget factories (see below)
|
||||||
$this->setWidgetFactories($widgetFactories);
|
$this->setWidgetFactories($widgetFactories);
|
||||||
|
// we will need the container builder later...
|
||||||
|
$this->containerBuilder = $containerBuilder;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getConfigTreeBuilder()
|
public function getConfigTreeBuilder()
|
||||||
|
@@ -151,6 +151,7 @@ This script will :
|
|||||||
|
|
||||||
# mount into to container
|
# mount into to container
|
||||||
./docker-php.sh
|
./docker-php.sh
|
||||||
|
bin/console chill:db:sync-views
|
||||||
# and load fixtures
|
# and load fixtures
|
||||||
bin/console doctrine:migrations:migrate
|
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
|
# mount into to container
|
||||||
./docker-php.sh
|
./docker-php.sh
|
||||||
# and load fixtures
|
# and load fixtures (do not this for production)
|
||||||
bin/console doctrine:fixtures:load --purge-with-truncate
|
bin/console doctrine:fixtures:load --purge-with-truncate
|
||||||
|
|
||||||
There are several users available:
|
There are several users available:
|
||||||
@@ -204,8 +205,10 @@ How to create the database schema (= run migrations) ?
|
|||||||
# if a container is running
|
# if a container is running
|
||||||
./docker-php.sh
|
./docker-php.sh
|
||||||
bin/console doctrine:migrations:migrate
|
bin/console doctrine:migrations:migrate
|
||||||
|
bin/console chill:db:sync-views
|
||||||
# if not
|
# if not
|
||||||
docker-compose run --user $(id -u) php bin/console doctrine:migrations:migrate
|
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 ?
|
How to read the email sent by the program ?
|
||||||
@@ -236,6 +239,23 @@ How to open a terminal in the project
|
|||||||
# if not
|
# if not
|
||||||
docker-compose run --user $(id -u) php /bin/bash
|
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 ?
|
How to run composer ?
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
|
@@ -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.
|
* 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
|
Cron jobs
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
|
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
|
||||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
xsi:noNamespaceSchemaLocation="tests/app/vendor/phpunit/phpunit/phpunit.xsd"
|
||||||
backupGlobals="false"
|
backupGlobals="false"
|
||||||
colors="true"
|
colors="true"
|
||||||
bootstrap="tests/bootstrap.php"
|
bootstrap="tests/app/tests/bootstrap.php"
|
||||||
>
|
>
|
||||||
<php>
|
<php>
|
||||||
<ini name="error_reporting" value="-1" />
|
<ini name="error_reporting" value="-1" />
|
||||||
|
27
rector.php
27
rector.php
@@ -12,8 +12,6 @@ return static function (RectorConfig $rectorConfig): void {
|
|||||||
__DIR__ . '/src',
|
__DIR__ . '/src',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/testsApp_KernelDevDebugContainer.xml');
|
|
||||||
|
|
||||||
//$rectorConfig->cacheClass(\Rector\Caching\ValueObject\Storage\FileCacheStorage::class);
|
//$rectorConfig->cacheClass(\Rector\Caching\ValueObject\Storage\FileCacheStorage::class);
|
||||||
//$rectorConfig->cacheDirectory(__DIR__ . '/.cache/rector');
|
//$rectorConfig->cacheDirectory(__DIR__ . '/.cache/rector');
|
||||||
|
|
||||||
@@ -23,8 +21,7 @@ return static function (RectorConfig $rectorConfig): void {
|
|||||||
|
|
||||||
//define sets of rules
|
//define sets of rules
|
||||||
$rectorConfig->sets([
|
$rectorConfig->sets([
|
||||||
LevelSetList::UP_TO_PHP_82,
|
LevelSetList::UP_TO_PHP_74
|
||||||
\Rector\Symfony\Set\SymfonySetList::SYMFONY_44,
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// skip some path...
|
// skip some path...
|
||||||
@@ -37,5 +34,27 @@ return static function (RectorConfig $rectorConfig): void {
|
|||||||
|
|
||||||
// must merge MR500 and review a typing of "ArrayCollection" in entities
|
// must merge MR500 and review a typing of "ArrayCollection" in entities
|
||||||
\Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector::class,
|
\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
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
@@ -47,29 +47,76 @@ use function array_key_exists;
|
|||||||
|
|
||||||
final class ActivityController extends AbstractController
|
final class ActivityController extends AbstractController
|
||||||
{
|
{
|
||||||
|
private AccompanyingPeriodRepository $accompanyingPeriodRepository;
|
||||||
|
|
||||||
|
private ActivityACLAwareRepositoryInterface $activityACLAwareRepository;
|
||||||
|
|
||||||
|
private ActivityRepository $activityRepository;
|
||||||
|
|
||||||
|
private ActivityTypeCategoryRepository $activityTypeCategoryRepository;
|
||||||
|
|
||||||
|
private ActivityTypeRepositoryInterface $activityTypeRepository;
|
||||||
|
|
||||||
|
private CenterResolverManagerInterface $centerResolver;
|
||||||
|
|
||||||
|
private EntityManagerInterface $entityManager;
|
||||||
|
|
||||||
|
private EventDispatcherInterface $eventDispatcher;
|
||||||
|
|
||||||
|
private LocationRepository $locationRepository;
|
||||||
|
|
||||||
|
private LoggerInterface $logger;
|
||||||
|
|
||||||
|
private PersonRepository $personRepository;
|
||||||
|
|
||||||
|
private SerializerInterface $serializer;
|
||||||
|
|
||||||
|
private ThirdPartyRepository $thirdPartyRepository;
|
||||||
|
|
||||||
|
private TranslatorInterface $translator;
|
||||||
|
|
||||||
|
private UserRepositoryInterface $userRepository;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly ActivityACLAwareRepositoryInterface $activityACLAwareRepository,
|
ActivityACLAwareRepositoryInterface $activityACLAwareRepository,
|
||||||
private readonly ActivityTypeRepositoryInterface $activityTypeRepository,
|
ActivityTypeRepositoryInterface $activityTypeRepository,
|
||||||
private readonly ActivityTypeCategoryRepository $activityTypeCategoryRepository,
|
ActivityTypeCategoryRepository $activityTypeCategoryRepository,
|
||||||
private readonly PersonRepository $personRepository,
|
PersonRepository $personRepository,
|
||||||
private readonly ThirdPartyRepository $thirdPartyRepository,
|
ThirdPartyRepository $thirdPartyRepository,
|
||||||
private readonly LocationRepository $locationRepository,
|
LocationRepository $locationRepository,
|
||||||
private readonly ActivityRepository $activityRepository,
|
ActivityRepository $activityRepository,
|
||||||
private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository,
|
AccompanyingPeriodRepository $accompanyingPeriodRepository,
|
||||||
private readonly EntityManagerInterface $entityManager,
|
EntityManagerInterface $entityManager,
|
||||||
private readonly EventDispatcherInterface $eventDispatcher,
|
EventDispatcherInterface $eventDispatcher,
|
||||||
private readonly LoggerInterface $logger,
|
LoggerInterface $logger,
|
||||||
private readonly SerializerInterface $serializer,
|
SerializerInterface $serializer,
|
||||||
private readonly UserRepositoryInterface $userRepository,
|
UserRepositoryInterface $userRepository,
|
||||||
private readonly CenterResolverManagerInterface $centerResolver,
|
CenterResolverManagerInterface $centerResolver,
|
||||||
private readonly TranslatorInterface $translator,
|
TranslatorInterface $translator
|
||||||
) {
|
) {
|
||||||
|
$this->activityACLAwareRepository = $activityACLAwareRepository;
|
||||||
|
$this->activityTypeRepository = $activityTypeRepository;
|
||||||
|
$this->activityTypeCategoryRepository = $activityTypeCategoryRepository;
|
||||||
|
$this->personRepository = $personRepository;
|
||||||
|
$this->thirdPartyRepository = $thirdPartyRepository;
|
||||||
|
$this->locationRepository = $locationRepository;
|
||||||
|
$this->activityRepository = $activityRepository;
|
||||||
|
$this->accompanyingPeriodRepository = $accompanyingPeriodRepository;
|
||||||
|
$this->entityManager = $entityManager;
|
||||||
|
$this->eventDispatcher = $eventDispatcher;
|
||||||
|
$this->logger = $logger;
|
||||||
|
$this->serializer = $serializer;
|
||||||
|
$this->userRepository = $userRepository;
|
||||||
|
$this->centerResolver = $centerResolver;
|
||||||
|
$this->translator = $translator;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a Activity entity.
|
* Deletes a Activity entity.
|
||||||
|
*
|
||||||
|
* @param mixed $id
|
||||||
*/
|
*/
|
||||||
public function deleteAction(Request $request, mixed $id)
|
public function deleteAction(Request $request, $id)
|
||||||
{
|
{
|
||||||
$view = null;
|
$view = null;
|
||||||
|
|
||||||
@@ -603,8 +650,8 @@ final class ActivityController extends AbstractController
|
|||||||
throw $this->createNotFoundException('Accompanying Period not found');
|
throw $this->createNotFoundException('Accompanying Period not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Add permission
|
// TODO Add permission
|
||||||
// $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
|
// $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
|
||||||
} else {
|
} else {
|
||||||
throw $this->createNotFoundException('Person or Accompanying Period not found');
|
throw $this->createNotFoundException('Person or Accompanying Period not found');
|
||||||
}
|
}
|
||||||
|
@@ -47,8 +47,10 @@ class ActivityReasonCategoryController extends AbstractController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a form to edit an existing ActivityReasonCategory entity.
|
* Displays a form to edit an existing ActivityReasonCategory entity.
|
||||||
|
*
|
||||||
|
* @param mixed $id
|
||||||
*/
|
*/
|
||||||
public function editAction(mixed $id)
|
public function editAction($id)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
@@ -96,8 +98,10 @@ class ActivityReasonCategoryController extends AbstractController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds and displays a ActivityReasonCategory entity.
|
* Finds and displays a ActivityReasonCategory entity.
|
||||||
|
*
|
||||||
|
* @param mixed $id
|
||||||
*/
|
*/
|
||||||
public function showAction(mixed $id)
|
public function showAction($id)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
@@ -114,8 +118,10 @@ class ActivityReasonCategoryController extends AbstractController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Edits an existing ActivityReasonCategory entity.
|
* Edits an existing ActivityReasonCategory entity.
|
||||||
|
*
|
||||||
|
* @param mixed $id
|
||||||
*/
|
*/
|
||||||
public function updateAction(Request $request, mixed $id)
|
public function updateAction(Request $request, $id)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
|
@@ -24,8 +24,11 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
|||||||
*/
|
*/
|
||||||
class ActivityReasonController extends AbstractController
|
class ActivityReasonController extends AbstractController
|
||||||
{
|
{
|
||||||
public function __construct(private readonly ActivityReasonRepository $activityReasonRepository)
|
private ActivityReasonRepository $activityReasonRepository;
|
||||||
|
|
||||||
|
public function __construct(ActivityReasonRepository $activityReasonRepository)
|
||||||
{
|
{
|
||||||
|
$this->activityReasonRepository = $activityReasonRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -53,8 +56,10 @@ class ActivityReasonController extends AbstractController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a form to edit an existing ActivityReason entity.
|
* Displays a form to edit an existing ActivityReason entity.
|
||||||
|
*
|
||||||
|
* @param mixed $id
|
||||||
*/
|
*/
|
||||||
public function editAction(mixed $id)
|
public function editAction($id)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
@@ -102,8 +107,10 @@ class ActivityReasonController extends AbstractController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds and displays a ActivityReason entity.
|
* Finds and displays a ActivityReason entity.
|
||||||
|
*
|
||||||
|
* @param mixed $id
|
||||||
*/
|
*/
|
||||||
public function showAction(mixed $id)
|
public function showAction($id)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
@@ -120,8 +127,10 @@ class ActivityReasonController extends AbstractController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Edits an existing ActivityReason entity.
|
* Edits an existing ActivityReason entity.
|
||||||
|
*
|
||||||
|
* @param mixed $id
|
||||||
*/
|
*/
|
||||||
public function updateAction(Request $request, mixed $id)
|
public function updateAction(Request $request, $id)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
|
@@ -25,14 +25,17 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface
|
|||||||
{
|
{
|
||||||
use \Symfony\Component\DependencyInjection\ContainerAwareTrait;
|
use \Symfony\Component\DependencyInjection\ContainerAwareTrait;
|
||||||
|
|
||||||
|
private EntityManagerInterface $em;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Faker\Generator
|
* @var \Faker\Generator
|
||||||
*/
|
*/
|
||||||
private $faker;
|
private $faker;
|
||||||
|
|
||||||
public function __construct(private readonly EntityManagerInterface $em)
|
public function __construct(EntityManagerInterface $em)
|
||||||
{
|
{
|
||||||
$this->faker = FakerFactory::create('fr_FR');
|
$this->faker = FakerFactory::create('fr_FR');
|
||||||
|
$this->em = $em;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getOrder()
|
public function getOrder()
|
||||||
@@ -67,7 +70,7 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface
|
|||||||
->setPerson($person)
|
->setPerson($person)
|
||||||
->setDate($this->faker->dateTimeThisYear())
|
->setDate($this->faker->dateTimeThisYear())
|
||||||
->setDurationTime($this->faker->dateTime(36000))
|
->setDurationTime($this->faker->dateTime(36000))
|
||||||
->setActivityType($this->getRandomActivityType())
|
->setType($this->getRandomActivityType())
|
||||||
->setScope($this->getRandomScope());
|
->setScope($this->getRandomScope());
|
||||||
|
|
||||||
// ->setAttendee($this->faker->boolean())
|
// ->setAttendee($this->faker->boolean())
|
||||||
|
@@ -65,9 +65,9 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
|||||||
|
|
||||||
use TrackUpdateTrait;
|
use TrackUpdateTrait;
|
||||||
|
|
||||||
final public const SENTRECEIVED_RECEIVED = 'received';
|
public const SENTRECEIVED_RECEIVED = 'received';
|
||||||
|
|
||||||
final public const SENTRECEIVED_SENT = 'sent';
|
public const SENTRECEIVED_SENT = 'sent';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod")
|
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod")
|
||||||
@@ -672,7 +672,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated use @link{self::setActivityType} instead
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
public function setType(ActivityType $activityType): self
|
public function setType(ActivityType $activityType): self
|
||||||
{
|
{
|
||||||
|
@@ -23,9 +23,10 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
class ActivityReason
|
class ActivityReason
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
* @var bool
|
||||||
* @ORM\Column(type="boolean")
|
* @ORM\Column(type="boolean")
|
||||||
*/
|
*/
|
||||||
private bool $active = true;
|
private $active = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ActivityReasonCategory
|
* @var ActivityReasonCategory
|
||||||
@@ -33,7 +34,7 @@ class ActivityReason
|
|||||||
* targetEntity="Chill\ActivityBundle\Entity\ActivityReasonCategory",
|
* targetEntity="Chill\ActivityBundle\Entity\ActivityReasonCategory",
|
||||||
* inversedBy="reasons")
|
* inversedBy="reasons")
|
||||||
*/
|
*/
|
||||||
private ?ActivityReasonCategory $category = null;
|
private $category;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
@@ -42,13 +43,13 @@ class ActivityReason
|
|||||||
* @ORM\Column(name="id", type="integer")
|
* @ORM\Column(name="id", type="integer")
|
||||||
* @ORM\GeneratedValue(strategy="AUTO")
|
* @ORM\GeneratedValue(strategy="AUTO")
|
||||||
*/
|
*/
|
||||||
private ?int $id = null;
|
private $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
* @ORM\Column(type="json")
|
* @ORM\Column(type="json")
|
||||||
*/
|
*/
|
||||||
private array $name;
|
private $name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get active.
|
* Get active.
|
||||||
@@ -80,9 +81,27 @@ class ActivityReason
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get name.
|
* Get name.
|
||||||
|
*
|
||||||
|
* @param mixed|null $locale
|
||||||
|
*
|
||||||
|
* @return array | string
|
||||||
*/
|
*/
|
||||||
public function getName(): array
|
public function getName($locale = null)
|
||||||
{
|
{
|
||||||
|
if ($locale) {
|
||||||
|
if (isset($this->name[$locale])) {
|
||||||
|
return $this->name[$locale];
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($this->name as $name) {
|
||||||
|
if (!empty($name)) {
|
||||||
|
return $name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
* @ORM\Table(name="activityreasoncategory")
|
* @ORM\Table(name="activityreasoncategory")
|
||||||
* @ORM\HasLifecycleCallbacks
|
* @ORM\HasLifecycleCallbacks
|
||||||
*/
|
*/
|
||||||
class ActivityReasonCategory implements \Stringable
|
class ActivityReasonCategory
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var bool
|
* @var bool
|
||||||
@@ -65,7 +65,7 @@ class ActivityReasonCategory implements \Stringable
|
|||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString(): string
|
public function __toString()
|
||||||
{
|
{
|
||||||
return 'ActivityReasonCategory(' . $this->getName('x') . ')';
|
return 'ActivityReasonCategory(' . $this->getName('x') . ')';
|
||||||
}
|
}
|
||||||
|
@@ -27,11 +27,11 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
|||||||
*/
|
*/
|
||||||
class ActivityType
|
class ActivityType
|
||||||
{
|
{
|
||||||
final public const FIELD_INVISIBLE = 0;
|
public const FIELD_INVISIBLE = 0;
|
||||||
|
|
||||||
final public const FIELD_OPTIONAL = 1;
|
public const FIELD_OPTIONAL = 1;
|
||||||
|
|
||||||
final public const FIELD_REQUIRED = 2;
|
public const FIELD_REQUIRED = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated not in use
|
* @deprecated not in use
|
||||||
@@ -275,8 +275,10 @@ class ActivityType
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @Assert\Callback
|
* @Assert\Callback
|
||||||
|
*
|
||||||
|
* @param mixed $payload
|
||||||
*/
|
*/
|
||||||
public function checkSocialActionsVisibility(ExecutionContextInterface $context, mixed $payload)
|
public function checkSocialActionsVisibility(ExecutionContextInterface $context, $payload)
|
||||||
{
|
{
|
||||||
if ($this->socialIssuesVisible !== $this->socialActionsVisible) {
|
if ($this->socialIssuesVisible !== $this->socialActionsVisible) {
|
||||||
if (!(2 === $this->socialIssuesVisible && 1 === $this->socialActionsVisible)) {
|
if (!(2 === $this->socialIssuesVisible && 1 === $this->socialActionsVisible)) {
|
||||||
|
@@ -22,8 +22,14 @@ use function in_array;
|
|||||||
|
|
||||||
class ActivityEntityListener
|
class ActivityEntityListener
|
||||||
{
|
{
|
||||||
public function __construct(private readonly EntityManagerInterface $em, private readonly AccompanyingPeriodWorkRepository $workRepository)
|
private EntityManagerInterface $em;
|
||||||
|
|
||||||
|
private AccompanyingPeriodWorkRepository $workRepository;
|
||||||
|
|
||||||
|
public function __construct(EntityManagerInterface $em, AccompanyingPeriodWorkRepository $workRepository)
|
||||||
{
|
{
|
||||||
|
$this->em = $em;
|
||||||
|
$this->workRepository = $workRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function persistActionToCourse(Activity $activity)
|
public function persistActionToCourse(Activity $activity)
|
||||||
|
@@ -20,8 +20,16 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class ByCreatorAggregator implements AggregatorInterface
|
class ByCreatorAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender)
|
private UserRender $userRender;
|
||||||
{
|
|
||||||
|
private UserRepositoryInterface $userRepository;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
UserRepositoryInterface $userRepository,
|
||||||
|
UserRender $userRender
|
||||||
|
) {
|
||||||
|
$this->userRepository = $userRepository;
|
||||||
|
$this->userRender = $userRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -21,8 +21,16 @@ use function in_array;
|
|||||||
|
|
||||||
class BySocialActionAggregator implements AggregatorInterface
|
class BySocialActionAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository)
|
private SocialActionRender $actionRender;
|
||||||
{
|
|
||||||
|
private SocialActionRepository $actionRepository;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
SocialActionRender $actionRender,
|
||||||
|
SocialActionRepository $actionRepository
|
||||||
|
) {
|
||||||
|
$this->actionRender = $actionRender;
|
||||||
|
$this->actionRepository = $actionRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -21,8 +21,16 @@ use function in_array;
|
|||||||
|
|
||||||
class BySocialIssueAggregator implements AggregatorInterface
|
class BySocialIssueAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly SocialIssueRepository $issueRepository, private readonly SocialIssueRender $issueRender)
|
private SocialIssueRender $issueRender;
|
||||||
{
|
|
||||||
|
private SocialIssueRepository $issueRepository;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
SocialIssueRepository $issueRepository,
|
||||||
|
SocialIssueRender $issueRender
|
||||||
|
) {
|
||||||
|
$this->issueRepository = $issueRepository;
|
||||||
|
$this->issueRender = $issueRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -21,8 +21,16 @@ use function in_array;
|
|||||||
|
|
||||||
class ByThirdpartyAggregator implements AggregatorInterface
|
class ByThirdpartyAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository, private readonly ThirdPartyRender $thirdPartyRender)
|
private ThirdPartyRender $thirdPartyRender;
|
||||||
{
|
|
||||||
|
private ThirdPartyRepository $thirdPartyRepository;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
ThirdPartyRepository $thirdPartyRepository,
|
||||||
|
ThirdPartyRender $thirdPartyRender
|
||||||
|
) {
|
||||||
|
$this->thirdPartyRepository = $thirdPartyRepository;
|
||||||
|
$this->thirdPartyRender = $thirdPartyRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -21,8 +21,16 @@ use function in_array;
|
|||||||
|
|
||||||
class CreatorScopeAggregator implements AggregatorInterface
|
class CreatorScopeAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly ScopeRepository $scopeRepository, private readonly TranslatableStringHelper $translatableStringHelper)
|
private ScopeRepository $scopeRepository;
|
||||||
{
|
|
||||||
|
private TranslatableStringHelper $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
ScopeRepository $scopeRepository,
|
||||||
|
TranslatableStringHelper $translatableStringHelper
|
||||||
|
) {
|
||||||
|
$this->scopeRepository = $scopeRepository;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -29,8 +29,12 @@ class DateAggregator implements AggregatorInterface
|
|||||||
|
|
||||||
private const DEFAULT_CHOICE = 'year';
|
private const DEFAULT_CHOICE = 'year';
|
||||||
|
|
||||||
public function __construct(private readonly TranslatorInterface $translator)
|
private TranslatorInterface $translator;
|
||||||
{
|
|
||||||
|
public function __construct(
|
||||||
|
TranslatorInterface $translator
|
||||||
|
) {
|
||||||
|
$this->translator = $translator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
@@ -95,9 +99,17 @@ class DateAggregator implements AggregatorInterface
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return match ($data['frequency']) {
|
switch ($data['frequency']) {
|
||||||
default => $value,
|
case 'month':
|
||||||
};
|
case 'week':
|
||||||
|
//return $this->translator->trans('for week') .' '. $value ;
|
||||||
|
|
||||||
|
case 'year':
|
||||||
|
//return $this->translator->trans('in year') .' '. $value ;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,8 +21,16 @@ use function in_array;
|
|||||||
|
|
||||||
class LocationTypeAggregator implements AggregatorInterface
|
class LocationTypeAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly LocationTypeRepository $locationTypeRepository, private readonly TranslatableStringHelper $translatableStringHelper)
|
private LocationTypeRepository $locationTypeRepository;
|
||||||
{
|
|
||||||
|
private TranslatableStringHelper $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
LocationTypeRepository $locationTypeRepository,
|
||||||
|
TranslatableStringHelper $translatableStringHelper
|
||||||
|
) {
|
||||||
|
$this->locationTypeRepository = $locationTypeRepository;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -22,10 +22,18 @@ use function in_array;
|
|||||||
|
|
||||||
class ActivityTypeAggregator implements AggregatorInterface
|
class ActivityTypeAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
final public const KEY = 'activity_type_aggregator';
|
public const KEY = 'activity_type_aggregator';
|
||||||
|
|
||||||
public function __construct(protected ActivityTypeRepositoryInterface $activityTypeRepository, protected TranslatableStringHelperInterface $translatableStringHelper)
|
protected ActivityTypeRepositoryInterface $activityTypeRepository;
|
||||||
{
|
|
||||||
|
protected TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
ActivityTypeRepositoryInterface $activityTypeRepository,
|
||||||
|
TranslatableStringHelperInterface $translatableStringHelper
|
||||||
|
) {
|
||||||
|
$this->activityTypeRepository = $activityTypeRepository;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -21,10 +21,18 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class ActivityUserAggregator implements AggregatorInterface
|
class ActivityUserAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
final public const KEY = 'activity_user_id';
|
public const KEY = 'activity_user_id';
|
||||||
|
|
||||||
public function __construct(private readonly UserRepository $userRepository, private readonly UserRender $userRender)
|
private UserRender $userRender;
|
||||||
{
|
|
||||||
|
private UserRepository $userRepository;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
UserRepository $userRepository,
|
||||||
|
UserRender $userRender
|
||||||
|
) {
|
||||||
|
$this->userRepository = $userRepository;
|
||||||
|
$this->userRender = $userRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -21,8 +21,14 @@ use function in_array;
|
|||||||
|
|
||||||
class ActivityUsersAggregator implements AggregatorInterface
|
class ActivityUsersAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender)
|
private UserRender $userRender;
|
||||||
|
|
||||||
|
private UserRepositoryInterface $userRepository;
|
||||||
|
|
||||||
|
public function __construct(UserRepositoryInterface $userRepository, UserRender $userRender)
|
||||||
{
|
{
|
||||||
|
$this->userRepository = $userRepository;
|
||||||
|
$this->userRender = $userRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -20,8 +20,14 @@ use function in_array;
|
|||||||
|
|
||||||
class ActivityUsersJobAggregator implements \Chill\MainBundle\Export\AggregatorInterface
|
class ActivityUsersJobAggregator implements \Chill\MainBundle\Export\AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly UserJobRepositoryInterface $userJobRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
private UserJobRepositoryInterface $userJobRepository;
|
||||||
|
|
||||||
|
public function __construct(UserJobRepositoryInterface $userJobRepository, TranslatableStringHelperInterface $translatableStringHelper)
|
||||||
{
|
{
|
||||||
|
$this->userJobRepository = $userJobRepository;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -20,8 +20,14 @@ use function in_array;
|
|||||||
|
|
||||||
class ActivityUsersScopeAggregator implements \Chill\MainBundle\Export\AggregatorInterface
|
class ActivityUsersScopeAggregator implements \Chill\MainBundle\Export\AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly ScopeRepositoryInterface $scopeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
private ScopeRepositoryInterface $scopeRepository;
|
||||||
|
|
||||||
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(ScopeRepositoryInterface $scopeRepository, TranslatableStringHelperInterface $translatableStringHelper)
|
||||||
{
|
{
|
||||||
|
$this->scopeRepository = $scopeRepository;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -30,8 +30,20 @@ use function in_array;
|
|||||||
|
|
||||||
class ActivityReasonAggregator implements AggregatorInterface, ExportElementValidatedInterface
|
class ActivityReasonAggregator implements AggregatorInterface, ExportElementValidatedInterface
|
||||||
{
|
{
|
||||||
public function __construct(protected ActivityReasonCategoryRepository $activityReasonCategoryRepository, protected ActivityReasonRepository $activityReasonRepository, protected TranslatableStringHelper $translatableStringHelper)
|
protected ActivityReasonCategoryRepository $activityReasonCategoryRepository;
|
||||||
{
|
|
||||||
|
protected ActivityReasonRepository $activityReasonRepository;
|
||||||
|
|
||||||
|
protected TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
ActivityReasonCategoryRepository $activityReasonCategoryRepository,
|
||||||
|
ActivityReasonRepository $activityReasonRepository,
|
||||||
|
TranslatableStringHelper $translatableStringHelper
|
||||||
|
) {
|
||||||
|
$this->activityReasonCategoryRepository = $activityReasonCategoryRepository;
|
||||||
|
$this->activityReasonRepository = $activityReasonRepository;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
@@ -101,11 +113,21 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
|||||||
|
|
||||||
public function getLabels($key, array $values, $data)
|
public function getLabels($key, array $values, $data)
|
||||||
{
|
{
|
||||||
match ($data['level']) {
|
// for performance reason, we load data from db only once
|
||||||
'reasons' => $this->activityReasonRepository->findBy(['id' => $values]),
|
switch ($data['level']) {
|
||||||
'categories' => $this->activityReasonCategoryRepository->findBy(['id' => $values]),
|
case 'reasons':
|
||||||
default => throw new RuntimeException(sprintf("The level data '%s' is invalid.", $data['level'])),
|
$this->activityReasonRepository->findBy(['id' => $values]);
|
||||||
};
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'categories':
|
||||||
|
$this->activityReasonCategoryRepository->findBy(['id' => $values]);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new RuntimeException(sprintf("The level data '%s' is invalid.", $data['level']));
|
||||||
|
}
|
||||||
|
|
||||||
return function ($value) use ($data) {
|
return function ($value) use ($data) {
|
||||||
if ('_header' === $value) {
|
if ('_header' === $value) {
|
||||||
|
@@ -20,8 +20,11 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
|
|
||||||
class SentReceivedAggregator implements AggregatorInterface
|
class SentReceivedAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly TranslatorInterface $translator)
|
private TranslatorInterface $translator;
|
||||||
|
|
||||||
|
public function __construct(TranslatorInterface $translator)
|
||||||
{
|
{
|
||||||
|
$this->translator = $translator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -16,9 +16,9 @@ namespace Chill\ActivityBundle\Export;
|
|||||||
*/
|
*/
|
||||||
abstract class Declarations
|
abstract class Declarations
|
||||||
{
|
{
|
||||||
final public const ACTIVITY = 'activity';
|
public const ACTIVITY = 'activity';
|
||||||
|
|
||||||
final public const ACTIVITY_ACP = 'activity_linked_to_acp';
|
public const ACTIVITY_ACP = 'activity_linked_to_acp';
|
||||||
|
|
||||||
final public const ACTIVITY_PERSON = 'activity_linked_to_person';
|
public const ACTIVITY_PERSON = 'activity_linked_to_person';
|
||||||
}
|
}
|
||||||
|
@@ -24,8 +24,20 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class ListActivity implements ListInterface, GroupedExportInterface
|
class ListActivity implements ListInterface, GroupedExportInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly ListActivityHelper $helper, private readonly EntityManagerInterface $entityManager, private readonly TranslatableStringExportLabelHelper $translatableStringExportLabelHelper)
|
private EntityManagerInterface $entityManager;
|
||||||
{
|
|
||||||
|
private ListActivityHelper $helper;
|
||||||
|
|
||||||
|
private TranslatableStringExportLabelHelper $translatableStringExportLabelHelper;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
ListActivityHelper $helper,
|
||||||
|
EntityManagerInterface $entityManager,
|
||||||
|
TranslatableStringExportLabelHelper $translatableStringExportLabelHelper
|
||||||
|
) {
|
||||||
|
$this->helper = $helper;
|
||||||
|
$this->entityManager = $entityManager;
|
||||||
|
$this->translatableStringExportLabelHelper = $translatableStringExportLabelHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
@@ -50,17 +62,22 @@ class ListActivity implements ListInterface, GroupedExportInterface
|
|||||||
|
|
||||||
public function getLabels($key, array $values, $data)
|
public function getLabels($key, array $values, $data)
|
||||||
{
|
{
|
||||||
return match ($key) {
|
switch ($key) {
|
||||||
'acpId' => static function ($value) {
|
case 'acpId':
|
||||||
if ('_header' === $value) {
|
return static function ($value) {
|
||||||
return ListActivityHelper::MSG_KEY . 'accompanying course id';
|
if ('_header' === $value) {
|
||||||
}
|
return ListActivityHelper::MSG_KEY . 'accompanying course id';
|
||||||
|
}
|
||||||
|
|
||||||
return $value ?? '';
|
return $value ?? '';
|
||||||
},
|
};
|
||||||
'scopesNames' => $this->translatableStringExportLabelHelper->getLabelMulti($key, $values, ListActivityHelper::MSG_KEY . 'course circles'),
|
|
||||||
default => $this->helper->getLabels($key, $values, $data),
|
case 'scopesNames':
|
||||||
};
|
return $this->translatableStringExportLabelHelper->getLabelMulti($key, $values, ListActivityHelper::MSG_KEY . 'course circles');
|
||||||
|
|
||||||
|
default:
|
||||||
|
return $this->helper->getLabels($key, $values, $data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data)
|
||||||
|
@@ -24,8 +24,12 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class CountActivity implements ExportInterface, GroupedExportInterface
|
class CountActivity implements ExportInterface, GroupedExportInterface
|
||||||
{
|
{
|
||||||
public function __construct(protected ActivityRepository $activityRepository)
|
protected ActivityRepository $activityRepository;
|
||||||
{
|
|
||||||
|
public function __construct(
|
||||||
|
ActivityRepository $activityRepository
|
||||||
|
) {
|
||||||
|
$this->activityRepository = $activityRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
@@ -36,6 +36,8 @@ use function in_array;
|
|||||||
|
|
||||||
class ListActivity implements ListInterface, GroupedExportInterface
|
class ListActivity implements ListInterface, GroupedExportInterface
|
||||||
{
|
{
|
||||||
|
protected EntityManagerInterface $entityManager;
|
||||||
|
|
||||||
protected array $fields = [
|
protected array $fields = [
|
||||||
'id',
|
'id',
|
||||||
'date',
|
'date',
|
||||||
@@ -50,8 +52,22 @@ class ListActivity implements ListInterface, GroupedExportInterface
|
|||||||
'person_id',
|
'person_id',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function __construct(protected EntityManagerInterface $entityManager, protected TranslatorInterface $translator, protected TranslatableStringHelperInterface $translatableStringHelper, private readonly ActivityRepository $activityRepository)
|
protected TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
{
|
|
||||||
|
protected TranslatorInterface $translator;
|
||||||
|
|
||||||
|
private ActivityRepository $activityRepository;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
EntityManagerInterface $em,
|
||||||
|
TranslatorInterface $translator,
|
||||||
|
TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
|
ActivityRepository $activityRepository
|
||||||
|
) {
|
||||||
|
$this->entityManager = $em;
|
||||||
|
$this->translator = $translator;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
|
$this->activityRepository = $activityRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
@@ -30,18 +30,24 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
*/
|
*/
|
||||||
class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
||||||
{
|
{
|
||||||
final public const SUM = 'sum';
|
public const SUM = 'sum';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The action for this report.
|
||||||
|
*/
|
||||||
|
protected string $action;
|
||||||
|
|
||||||
|
private ActivityRepository $activityRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $action the stat to perform
|
* @param string $action the stat to perform
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly ActivityRepository $activityRepository,
|
ActivityRepository $activityRepository,
|
||||||
/**
|
string $action = 'sum'
|
||||||
* The action for this report.
|
|
||||||
*/
|
|
||||||
protected string $action = 'sum'
|
|
||||||
) {
|
) {
|
||||||
|
$this->action = $action;
|
||||||
|
$this->activityRepository = $activityRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
@@ -30,10 +30,46 @@ use const SORT_NUMERIC;
|
|||||||
|
|
||||||
class ListActivityHelper
|
class ListActivityHelper
|
||||||
{
|
{
|
||||||
final public const MSG_KEY = 'export.list.activity.';
|
public const MSG_KEY = 'export.list.activity.';
|
||||||
|
|
||||||
public function __construct(private readonly ActivityPresenceRepositoryInterface $activityPresenceRepository, private readonly ActivityTypeRepositoryInterface $activityTypeRepository, private readonly DateTimeHelper $dateTimeHelper, private readonly LabelPersonHelper $labelPersonHelper, private readonly LabelThirdPartyHelper $labelThirdPartyHelper, private readonly TranslatorInterface $translator, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatableStringExportLabelHelper $translatableStringLabelHelper, private readonly UserHelper $userHelper)
|
private ActivityPresenceRepositoryInterface $activityPresenceRepository;
|
||||||
{
|
|
||||||
|
private ActivityTypeRepositoryInterface $activityTypeRepository;
|
||||||
|
|
||||||
|
private DateTimeHelper $dateTimeHelper;
|
||||||
|
|
||||||
|
private LabelPersonHelper $labelPersonHelper;
|
||||||
|
|
||||||
|
private LabelThirdPartyHelper $labelThirdPartyHelper;
|
||||||
|
|
||||||
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
private TranslatableStringExportLabelHelper $translatableStringLabelHelper;
|
||||||
|
|
||||||
|
private TranslatorInterface $translator;
|
||||||
|
|
||||||
|
private UserHelper $userHelper;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
ActivityPresenceRepositoryInterface $activityPresenceRepository,
|
||||||
|
ActivityTypeRepositoryInterface $activityTypeRepository,
|
||||||
|
DateTimeHelper $dateTimeHelper,
|
||||||
|
LabelPersonHelper $labelPersonHelper,
|
||||||
|
LabelThirdPartyHelper $labelThirdPartyHelper,
|
||||||
|
TranslatorInterface $translator,
|
||||||
|
TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
|
TranslatableStringExportLabelHelper $translatableStringLabelHelper,
|
||||||
|
UserHelper $userHelper
|
||||||
|
) {
|
||||||
|
$this->activityPresenceRepository = $activityPresenceRepository;
|
||||||
|
$this->activityTypeRepository = $activityTypeRepository;
|
||||||
|
$this->dateTimeHelper = $dateTimeHelper;
|
||||||
|
$this->labelPersonHelper = $labelPersonHelper;
|
||||||
|
$this->labelThirdPartyHelper = $labelThirdPartyHelper;
|
||||||
|
$this->translator = $translator;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
|
$this->translatableStringLabelHelper = $translatableStringLabelHelper;
|
||||||
|
$this->userHelper = $userHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addSelect(QueryBuilder $qb): void
|
public function addSelect(QueryBuilder $qb): void
|
||||||
@@ -79,78 +115,113 @@ class ListActivityHelper
|
|||||||
|
|
||||||
public function getLabels($key, array $values, $data)
|
public function getLabels($key, array $values, $data)
|
||||||
{
|
{
|
||||||
return match ($key) {
|
switch ($key) {
|
||||||
'createdAt', 'updatedAt' => $this->dateTimeHelper->getLabel($key),
|
case 'createdAt':
|
||||||
'createdBy', 'updatedBy' => $this->userHelper->getLabel($key, $values, $key),
|
case 'updatedAt':
|
||||||
'date' => $this->dateTimeHelper->getLabel(self::MSG_KEY . $key),
|
return $this->dateTimeHelper->getLabel($key);
|
||||||
'attendeeName' => function ($value) {
|
|
||||||
if ('_header' === $value) {
|
|
||||||
return 'Attendee';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null === $value || null === $presence = $this->activityPresenceRepository->find($value)) {
|
case 'createdBy':
|
||||||
return '';
|
case 'updatedBy':
|
||||||
}
|
return $this->userHelper->getLabel($key, $values, $key);
|
||||||
|
|
||||||
return $this->translatableStringHelper->localize($presence->getName());
|
case 'date':
|
||||||
},
|
return $this->dateTimeHelper->getLabel(self::MSG_KEY . $key);
|
||||||
'listReasons' => $this->translatableStringLabelHelper->getLabelMulti($key, $values, 'Activity Reasons'),
|
|
||||||
'typeName' => function ($value) {
|
|
||||||
if ('_header' === $value) {
|
|
||||||
return 'Activity type';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null === $value || null === $type = $this->activityTypeRepository->find($value)) {
|
case 'attendeeName':
|
||||||
return '';
|
return function ($value) {
|
||||||
}
|
if ('_header' === $value) {
|
||||||
|
return 'Attendee';
|
||||||
|
}
|
||||||
|
|
||||||
return $this->translatableStringHelper->localize($type->getName());
|
if (null === $value || null === $presence = $this->activityPresenceRepository->find($value)) {
|
||||||
},
|
return '';
|
||||||
'usersNames' => $this->userHelper->getLabelMulti($key, $values, self::MSG_KEY . 'users name'),
|
}
|
||||||
'usersIds', 'thirdPartiesIds', 'personsIds' => static function ($value) use ($key) {
|
|
||||||
if ('_header' === $value) {
|
|
||||||
return match ($key) {
|
|
||||||
'usersIds' => self::MSG_KEY . 'users ids',
|
|
||||||
'thirdPartiesIds' => self::MSG_KEY . 'third parties ids',
|
|
||||||
'personsIds' => self::MSG_KEY . 'persons ids',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
$decoded = json_decode($value, null, 512, JSON_THROW_ON_ERROR);
|
return $this->translatableStringHelper->localize($presence->getName());
|
||||||
|
};
|
||||||
|
|
||||||
return implode(
|
case 'listReasons':
|
||||||
'|',
|
return $this->translatableStringLabelHelper->getLabelMulti($key, $values, 'Activity Reasons');
|
||||||
array_unique(
|
|
||||||
array_filter($decoded, static fn (?int $id) => null !== $id),
|
|
||||||
SORT_NUMERIC
|
|
||||||
)
|
|
||||||
);
|
|
||||||
},
|
|
||||||
'personsNames' => $this->labelPersonHelper->getLabelMulti($key, $values, self::MSG_KEY . 'persons name'),
|
|
||||||
'thirdPartiesNames' => $this->labelThirdPartyHelper->getLabelMulti($key, $values, self::MSG_KEY . 'thirds parties'),
|
|
||||||
'sentReceived' => function ($value) {
|
|
||||||
if ('_header' === $value) {
|
|
||||||
return self::MSG_KEY . 'sent received';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null === $value) {
|
case 'typeName':
|
||||||
return '';
|
return function ($value) {
|
||||||
}
|
if ('_header' === $value) {
|
||||||
|
return 'Activity type';
|
||||||
|
}
|
||||||
|
|
||||||
return $this->translator->trans($value);
|
if (null === $value || null === $type = $this->activityTypeRepository->find($value)) {
|
||||||
},
|
return '';
|
||||||
default => function ($value) use ($key) {
|
}
|
||||||
if ('_header' === $value) {
|
|
||||||
return self::MSG_KEY . $key;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null === $value) {
|
return $this->translatableStringHelper->localize($type->getName());
|
||||||
return '';
|
};
|
||||||
}
|
|
||||||
|
|
||||||
return $this->translator->trans($value);
|
case 'usersNames':
|
||||||
},
|
return $this->userHelper->getLabelMulti($key, $values, self::MSG_KEY . 'users name');
|
||||||
};
|
|
||||||
|
case 'usersIds':
|
||||||
|
case 'thirdPartiesIds':
|
||||||
|
case 'personsIds':
|
||||||
|
return static function ($value) use ($key) {
|
||||||
|
if ('_header' === $value) {
|
||||||
|
switch ($key) {
|
||||||
|
case 'usersIds':
|
||||||
|
return self::MSG_KEY . 'users ids';
|
||||||
|
|
||||||
|
case 'thirdPartiesIds':
|
||||||
|
return self::MSG_KEY . 'third parties ids';
|
||||||
|
|
||||||
|
case 'personsIds':
|
||||||
|
return self::MSG_KEY . 'persons ids';
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new LogicException('key not supported');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$decoded = json_decode($value, null, 512, JSON_THROW_ON_ERROR);
|
||||||
|
|
||||||
|
return implode(
|
||||||
|
'|',
|
||||||
|
array_unique(
|
||||||
|
array_filter($decoded, static fn (?int $id) => null !== $id),
|
||||||
|
SORT_NUMERIC
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
case 'personsNames':
|
||||||
|
return $this->labelPersonHelper->getLabelMulti($key, $values, self::MSG_KEY . 'persons name');
|
||||||
|
|
||||||
|
case 'thirdPartiesNames':
|
||||||
|
return $this->labelThirdPartyHelper->getLabelMulti($key, $values, self::MSG_KEY . 'thirds parties');
|
||||||
|
|
||||||
|
case 'sentReceived':
|
||||||
|
return function ($value) {
|
||||||
|
if ('_header' === $value) {
|
||||||
|
return self::MSG_KEY . 'sent received';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null === $value) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->translator->trans($value);
|
||||||
|
};
|
||||||
|
|
||||||
|
default:
|
||||||
|
return function ($value) use ($key) {
|
||||||
|
if ('_header' === $value) {
|
||||||
|
return self::MSG_KEY . $key;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null === $value) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->translator->trans($value);
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data)
|
||||||
|
@@ -23,8 +23,16 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class ActivityTypeFilter implements FilterInterface
|
class ActivityTypeFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly ActivityTypeRepositoryInterface $activityTypeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
private ActivityTypeRepositoryInterface $activityTypeRepository;
|
||||||
{
|
|
||||||
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
ActivityTypeRepositoryInterface $activityTypeRepository,
|
||||||
|
TranslatableStringHelperInterface $translatableStringHelper
|
||||||
|
) {
|
||||||
|
$this->activityTypeRepository = $activityTypeRepository;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -20,8 +20,11 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class ByCreatorFilter implements FilterInterface
|
class ByCreatorFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly UserRender $userRender)
|
private UserRender $userRender;
|
||||||
|
|
||||||
|
public function __construct(UserRender $userRender)
|
||||||
{
|
{
|
||||||
|
$this->userRender = $userRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -22,8 +22,11 @@ use function in_array;
|
|||||||
|
|
||||||
class BySocialActionFilter implements FilterInterface
|
class BySocialActionFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly SocialActionRender $actionRender)
|
private SocialActionRender $actionRender;
|
||||||
|
|
||||||
|
public function __construct(SocialActionRender $actionRender)
|
||||||
{
|
{
|
||||||
|
$this->actionRender = $actionRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -22,8 +22,11 @@ use function in_array;
|
|||||||
|
|
||||||
class BySocialIssueFilter implements FilterInterface
|
class BySocialIssueFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly SocialIssueRender $issueRender)
|
private SocialIssueRender $issueRender;
|
||||||
|
|
||||||
|
public function __construct(SocialIssueRender $issueRender)
|
||||||
{
|
{
|
||||||
|
$this->issueRender = $issueRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -28,8 +28,11 @@ class EmergencyFilter implements FilterInterface
|
|||||||
|
|
||||||
private const DEFAULT_CHOICE = false;
|
private const DEFAULT_CHOICE = false;
|
||||||
|
|
||||||
public function __construct(private readonly TranslatorInterface $translator)
|
private TranslatorInterface $translator;
|
||||||
|
|
||||||
|
public function __construct(TranslatorInterface $translator)
|
||||||
{
|
{
|
||||||
|
$this->translator = $translator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -22,8 +22,11 @@ use function in_array;
|
|||||||
|
|
||||||
class LocationTypeFilter implements FilterInterface
|
class LocationTypeFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
|
private TranslatableStringHelper $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(TranslatableStringHelper $translatableStringHelper)
|
||||||
{
|
{
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -29,8 +29,11 @@ class SentReceivedFilter implements FilterInterface
|
|||||||
|
|
||||||
private const DEFAULT_CHOICE = Activity::SENTRECEIVED_SENT;
|
private const DEFAULT_CHOICE = Activity::SENTRECEIVED_SENT;
|
||||||
|
|
||||||
public function __construct(private readonly TranslatorInterface $translator)
|
private TranslatorInterface $translator;
|
||||||
|
|
||||||
|
public function __construct(TranslatorInterface $translator)
|
||||||
{
|
{
|
||||||
|
$this->translator = $translator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -21,8 +21,11 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class UserFilter implements FilterInterface
|
class UserFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly UserRender $userRender)
|
private UserRender $userRender;
|
||||||
|
|
||||||
|
public function __construct(UserRender $userRender)
|
||||||
{
|
{
|
||||||
|
$this->userRender = $userRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -23,8 +23,11 @@ use function in_array;
|
|||||||
|
|
||||||
class UserScopeFilter implements FilterInterface
|
class UserScopeFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
|
private TranslatableStringHelper $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(TranslatableStringHelper $translatableStringHelper)
|
||||||
{
|
{
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -27,8 +27,16 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
|
|
||||||
class ActivityDateFilter implements FilterInterface
|
class ActivityDateFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(protected TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter)
|
protected TranslatorInterface $translator;
|
||||||
{
|
|
||||||
|
private RollingDateConverterInterface $rollingDateConverter;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
TranslatorInterface $translator,
|
||||||
|
RollingDateConverterInterface $rollingDateConverter
|
||||||
|
) {
|
||||||
|
$this->translator = $translator;
|
||||||
|
$this->rollingDateConverter = $rollingDateConverter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -26,8 +26,16 @@ use function count;
|
|||||||
|
|
||||||
class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInterface
|
class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository)
|
protected ActivityTypeRepositoryInterface $activityTypeRepository;
|
||||||
{
|
|
||||||
|
protected TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
|
ActivityTypeRepositoryInterface $activityTypeRepository
|
||||||
|
) {
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
|
$this->activityTypeRepository = $activityTypeRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -20,8 +20,11 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class ActivityUsersFilter implements FilterInterface
|
class ActivityUsersFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly UserRender $userRender)
|
private UserRender $userRender;
|
||||||
|
|
||||||
|
public function __construct(UserRender $userRender)
|
||||||
{
|
{
|
||||||
|
$this->userRender = $userRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -29,8 +29,16 @@ use function in_array;
|
|||||||
|
|
||||||
class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInterface
|
class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(protected TranslatableStringHelper $translatableStringHelper, protected ActivityReasonRepository $activityReasonRepository)
|
protected ActivityReasonRepository $activityReasonRepository;
|
||||||
{
|
|
||||||
|
protected TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
TranslatableStringHelper $helper,
|
||||||
|
ActivityReasonRepository $activityReasonRepository
|
||||||
|
) {
|
||||||
|
$this->translatableStringHelper = $helper;
|
||||||
|
$this->activityReasonRepository = $activityReasonRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -37,8 +37,20 @@ use function count;
|
|||||||
|
|
||||||
class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInterface, FilterInterface
|
class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInterface, FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(protected TranslatableStringHelper $translatableStringHelper, protected ActivityReasonRepository $activityReasonRepository, protected TranslatorInterface $translator)
|
protected ActivityReasonRepository $activityReasonRepository;
|
||||||
{
|
|
||||||
|
protected TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
protected TranslatorInterface $translator;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
TranslatableStringHelper $translatableStringHelper,
|
||||||
|
ActivityReasonRepository $activityReasonRepository,
|
||||||
|
TranslatorInterface $translator
|
||||||
|
) {
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
|
$this->activityReasonRepository = $activityReasonRepository;
|
||||||
|
$this->translator = $translator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -22,8 +22,11 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class UsersJobFilter implements FilterInterface
|
class UsersJobFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(TranslatableStringHelperInterface $translatableStringHelper)
|
||||||
{
|
{
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -23,8 +23,16 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class UsersScopeFilter implements FilterInterface
|
class UsersScopeFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly ScopeRepositoryInterface $scopeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
private ScopeRepositoryInterface $scopeRepository;
|
||||||
{
|
|
||||||
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
ScopeRepositoryInterface $scopeRepository,
|
||||||
|
TranslatableStringHelperInterface $translatableStringHelper
|
||||||
|
) {
|
||||||
|
$this->scopeRepository = $scopeRepository;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -58,22 +58,40 @@ use function in_array;
|
|||||||
|
|
||||||
class ActivityType extends AbstractType
|
class ActivityType extends AbstractType
|
||||||
{
|
{
|
||||||
|
protected AuthorizationHelper $authorizationHelper;
|
||||||
|
|
||||||
|
protected ObjectManager $om;
|
||||||
|
|
||||||
|
protected SocialActionRender $socialActionRender;
|
||||||
|
|
||||||
|
protected SocialIssueRender $socialIssueRender;
|
||||||
|
|
||||||
|
protected array $timeChoices;
|
||||||
|
|
||||||
|
protected TranslatableStringHelper $translatableStringHelper;
|
||||||
|
|
||||||
protected User $user;
|
protected User $user;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
TokenStorageInterface $tokenStorage,
|
TokenStorageInterface $tokenStorage,
|
||||||
protected AuthorizationHelper $authorizationHelper,
|
AuthorizationHelper $authorizationHelper,
|
||||||
protected ObjectManager $om,
|
ObjectManager $om,
|
||||||
protected TranslatableStringHelper $translatableStringHelper,
|
TranslatableStringHelper $translatableStringHelper,
|
||||||
protected array $timeChoices,
|
array $timeChoices,
|
||||||
protected SocialIssueRender $socialIssueRender,
|
SocialIssueRender $socialIssueRender,
|
||||||
protected SocialActionRender $socialActionRender
|
SocialActionRender $socialActionRender
|
||||||
) {
|
) {
|
||||||
if (!$tokenStorage->getToken()->getUser() instanceof User) {
|
if (!$tokenStorage->getToken()->getUser() instanceof User) {
|
||||||
throw new RuntimeException('you should have a valid user');
|
throw new RuntimeException('you should have a valid user');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user = $tokenStorage->getToken()->getUser();
|
$this->user = $tokenStorage->getToken()->getUser();
|
||||||
|
$this->authorizationHelper = $authorizationHelper;
|
||||||
|
$this->om = $om;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
|
$this->timeChoices = $timeChoices;
|
||||||
|
$this->socialIssueRender = $socialIssueRender;
|
||||||
|
$this->socialActionRender = $socialActionRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||||
|
@@ -25,8 +25,11 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
|
|
||||||
class ActivityTypeType extends AbstractType
|
class ActivityTypeType extends AbstractType
|
||||||
{
|
{
|
||||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
|
private TranslatableStringHelper $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(TranslatableStringHelper $translatableStringHelper)
|
||||||
{
|
{
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
@@ -24,8 +24,20 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
*/
|
*/
|
||||||
class PickActivityReasonType extends AbstractType
|
class PickActivityReasonType extends AbstractType
|
||||||
{
|
{
|
||||||
public function __construct(private readonly ActivityReasonRepository $activityReasonRepository, private readonly ActivityReasonRender $reasonRender, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
private ActivityReasonRepository $activityReasonRepository;
|
||||||
{
|
|
||||||
|
private ActivityReasonRender $reasonRender;
|
||||||
|
|
||||||
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
ActivityReasonRepository $activityReasonRepository,
|
||||||
|
ActivityReasonRender $reasonRender,
|
||||||
|
TranslatableStringHelperInterface $translatableStringHelper
|
||||||
|
) {
|
||||||
|
$this->activityReasonRepository = $activityReasonRepository;
|
||||||
|
$this->reasonRender = $reasonRender;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
|
@@ -23,8 +23,14 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
*/
|
*/
|
||||||
class TranslatableActivityReasonCategoryType extends AbstractType
|
class TranslatableActivityReasonCategoryType extends AbstractType
|
||||||
{
|
{
|
||||||
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator)
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
private TranslatorInterface $translator;
|
||||||
|
|
||||||
|
public function __construct(TranslatableStringHelperInterface $translatableStringHelper, TranslatorInterface $translator)
|
||||||
{
|
{
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
|
$this->translator = $translator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
|
@@ -20,8 +20,16 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
|
|
||||||
class TranslatableActivityType extends AbstractType
|
class TranslatableActivityType extends AbstractType
|
||||||
{
|
{
|
||||||
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository)
|
protected ActivityTypeRepositoryInterface $activityTypeRepository;
|
||||||
{
|
|
||||||
|
protected TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
TranslatableStringHelperInterface $helper,
|
||||||
|
ActivityTypeRepositoryInterface $activityTypeRepository
|
||||||
|
) {
|
||||||
|
$this->translatableStringHelper = $helper;
|
||||||
|
$this->activityTypeRepository = $activityTypeRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
|
@@ -23,8 +23,16 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
*/
|
*/
|
||||||
class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
||||||
{
|
{
|
||||||
public function __construct(protected Security $security, protected TranslatorInterface $translator)
|
protected Security $security;
|
||||||
{
|
|
||||||
|
protected TranslatorInterface $translator;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
Security $security,
|
||||||
|
TranslatorInterface $translator
|
||||||
|
) {
|
||||||
|
$this->security = $security;
|
||||||
|
$this->translator = $translator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||||
|
@@ -18,10 +18,13 @@ use Symfony\Component\Security\Core\Security;
|
|||||||
/**
|
/**
|
||||||
* @implements LocalMenuBuilderInterface<array>
|
* @implements LocalMenuBuilderInterface<array>
|
||||||
*/
|
*/
|
||||||
final readonly class AdminMenuBuilder implements LocalMenuBuilderInterface
|
final class AdminMenuBuilder implements LocalMenuBuilderInterface
|
||||||
{
|
{
|
||||||
public function __construct(private Security $security)
|
private Security $security;
|
||||||
|
|
||||||
|
public function __construct(Security $security)
|
||||||
{
|
{
|
||||||
|
$this->security = $security;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||||
|
@@ -23,8 +23,22 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
*/
|
*/
|
||||||
final class PersonMenuBuilder implements LocalMenuBuilderInterface
|
final class PersonMenuBuilder implements LocalMenuBuilderInterface
|
||||||
{
|
{
|
||||||
public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator)
|
/**
|
||||||
{
|
* @var AuthorizationCheckerInterface
|
||||||
|
*/
|
||||||
|
private $authorizationChecker;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var TranslatorInterface
|
||||||
|
*/
|
||||||
|
private $translator;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
AuthorizationCheckerInterface $authorizationChecker,
|
||||||
|
TranslatorInterface $translator
|
||||||
|
) {
|
||||||
|
$this->translator = $translator;
|
||||||
|
$this->authorizationChecker = $authorizationChecker;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||||
|
@@ -16,10 +16,13 @@ use Chill\ActivityBundle\Repository\ActivityRepository;
|
|||||||
use Chill\MainBundle\Entity\Notification;
|
use Chill\MainBundle\Entity\Notification;
|
||||||
use Chill\MainBundle\Notification\NotificationHandlerInterface;
|
use Chill\MainBundle\Notification\NotificationHandlerInterface;
|
||||||
|
|
||||||
final readonly class ActivityNotificationHandler implements NotificationHandlerInterface
|
final class ActivityNotificationHandler implements NotificationHandlerInterface
|
||||||
{
|
{
|
||||||
public function __construct(private ActivityRepository $activityRepository)
|
private ActivityRepository $activityRepository;
|
||||||
|
|
||||||
|
public function __construct(ActivityRepository $activityRepository)
|
||||||
{
|
{
|
||||||
|
$this->activityRepository = $activityRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTemplate(Notification $notification, array $options = []): string
|
public function getTemplate(Notification $notification, array $options = []): string
|
||||||
|
@@ -33,10 +33,34 @@ use Symfony\Component\Security\Core\Security;
|
|||||||
use function count;
|
use function count;
|
||||||
use function in_array;
|
use function in_array;
|
||||||
|
|
||||||
final readonly class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInterface
|
final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInterface
|
||||||
{
|
{
|
||||||
public function __construct(private AuthorizationHelper $authorizationHelper, private CenterResolverDispatcherInterface $centerResolverDispatcher, private TokenStorageInterface $tokenStorage, private ActivityRepository $repository, private EntityManagerInterface $em, private Security $security)
|
private AuthorizationHelper $authorizationHelper;
|
||||||
{
|
|
||||||
|
private CenterResolverDispatcherInterface $centerResolverDispatcher;
|
||||||
|
|
||||||
|
private EntityManagerInterface $em;
|
||||||
|
|
||||||
|
private ActivityRepository $repository;
|
||||||
|
|
||||||
|
private Security $security;
|
||||||
|
|
||||||
|
private TokenStorageInterface $tokenStorage;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
AuthorizationHelper $authorizationHelper,
|
||||||
|
CenterResolverDispatcherInterface $centerResolverDispatcher,
|
||||||
|
TokenStorageInterface $tokenStorage,
|
||||||
|
ActivityRepository $repository,
|
||||||
|
EntityManagerInterface $em,
|
||||||
|
Security $security
|
||||||
|
) {
|
||||||
|
$this->authorizationHelper = $authorizationHelper;
|
||||||
|
$this->centerResolverDispatcher = $centerResolverDispatcher;
|
||||||
|
$this->tokenStorage = $tokenStorage;
|
||||||
|
$this->repository = $repository;
|
||||||
|
$this->em = $em;
|
||||||
|
$this->security = $security;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findByAccompanyingPeriod(AccompanyingPeriod $period, string $role, ?int $start = 0, ?int $limit = 1000, ?array $orderBy = []): array
|
public function findByAccompanyingPeriod(AccompanyingPeriod $period, string $role, ?int $start = 0, ?int $limit = 1000, ?array $orderBy = []): array
|
||||||
|
@@ -17,7 +17,7 @@ use Doctrine\ORM\EntityRepository;
|
|||||||
|
|
||||||
class ActivityPresenceRepository implements ActivityPresenceRepositoryInterface
|
class ActivityPresenceRepository implements ActivityPresenceRepositoryInterface
|
||||||
{
|
{
|
||||||
private readonly EntityRepository $repository;
|
private EntityRepository $repository;
|
||||||
|
|
||||||
public function __construct(EntityManagerInterface $entityManager)
|
public function __construct(EntityManagerInterface $entityManager)
|
||||||
{
|
{
|
||||||
|
@@ -23,11 +23,15 @@ use Symfony\Component\HttpFoundation\RequestStack;
|
|||||||
*/
|
*/
|
||||||
class ActivityReasonRepository extends ServiceEntityRepository
|
class ActivityReasonRepository extends ServiceEntityRepository
|
||||||
{
|
{
|
||||||
|
private RequestStack $requestStack;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
ManagerRegistry $registry,
|
ManagerRegistry $registry,
|
||||||
private readonly RequestStack $requestStack
|
RequestStack $requestStack
|
||||||
) {
|
) {
|
||||||
parent::__construct($registry, ActivityReason::class);
|
parent::__construct($registry, ActivityReason::class);
|
||||||
|
|
||||||
|
$this->requestStack = $requestStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -17,7 +17,7 @@ use Doctrine\ORM\EntityRepository;
|
|||||||
|
|
||||||
final class ActivityTypeRepository implements ActivityTypeRepositoryInterface
|
final class ActivityTypeRepository implements ActivityTypeRepositoryInterface
|
||||||
{
|
{
|
||||||
private readonly EntityRepository $repository;
|
private EntityRepository $repository;
|
||||||
|
|
||||||
public function __construct(EntityManagerInterface $em)
|
public function __construct(EntityManagerInterface $em)
|
||||||
{
|
{
|
||||||
|
@@ -20,9 +20,9 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
|||||||
|
|
||||||
class ActivityStatsVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface
|
class ActivityStatsVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface
|
||||||
{
|
{
|
||||||
final public const LISTS = 'CHILL_ACTIVITY_LIST';
|
public const LISTS = 'CHILL_ACTIVITY_LIST';
|
||||||
|
|
||||||
final public const STATS = 'CHILL_ACTIVITY_STATS';
|
public const STATS = 'CHILL_ACTIVITY_STATS';
|
||||||
|
|
||||||
protected VoterHelperInterface $helper;
|
protected VoterHelperInterface $helper;
|
||||||
|
|
||||||
|
@@ -35,7 +35,7 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn
|
|||||||
*
|
*
|
||||||
* It is safe for usage in template and controller
|
* It is safe for usage in template and controller
|
||||||
*/
|
*/
|
||||||
final public const CREATE = 'CHILL_ACTIVITY_CREATE';
|
public const CREATE = 'CHILL_ACTIVITY_CREATE';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* role to allow to create an activity associated win an accompanying course.
|
* role to allow to create an activity associated win an accompanying course.
|
||||||
@@ -44,7 +44,7 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn
|
|||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
final public const CREATE_ACCOMPANYING_COURSE = 'CHILL_ACTIVITY_CREATE_ACCOMPANYING_COURSE';
|
public const CREATE_ACCOMPANYING_COURSE = 'CHILL_ACTIVITY_CREATE_ACCOMPANYING_COURSE';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* role to allow to create an activity associated with a person.
|
* role to allow to create an activity associated with a person.
|
||||||
@@ -53,17 +53,17 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn
|
|||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
final public const CREATE_PERSON = 'CHILL_ACTIVITY_CREATE_PERSON';
|
public const CREATE_PERSON = 'CHILL_ACTIVITY_CREATE_PERSON';
|
||||||
|
|
||||||
final public const DELETE = 'CHILL_ACTIVITY_DELETE';
|
public const DELETE = 'CHILL_ACTIVITY_DELETE';
|
||||||
|
|
||||||
final public const FULL = 'CHILL_ACTIVITY_FULL';
|
public const FULL = 'CHILL_ACTIVITY_FULL';
|
||||||
|
|
||||||
final public const SEE = 'CHILL_ACTIVITY_SEE';
|
public const SEE = 'CHILL_ACTIVITY_SEE';
|
||||||
|
|
||||||
final public const SEE_DETAILS = 'CHILL_ACTIVITY_SEE_DETAILS';
|
public const SEE_DETAILS = 'CHILL_ACTIVITY_SEE_DETAILS';
|
||||||
|
|
||||||
final public const UPDATE = 'CHILL_ACTIVITY_UPDATE';
|
public const UPDATE = 'CHILL_ACTIVITY_UPDATE';
|
||||||
|
|
||||||
private const ALL = [
|
private const ALL = [
|
||||||
self::CREATE,
|
self::CREATE,
|
||||||
@@ -74,12 +74,15 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn
|
|||||||
self::FULL,
|
self::FULL,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected Security $security;
|
||||||
|
|
||||||
protected VoterHelperInterface $voterHelper;
|
protected VoterHelperInterface $voterHelper;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
protected Security $security,
|
Security $security,
|
||||||
VoterHelperFactoryInterface $voterHelperFactory
|
VoterHelperFactoryInterface $voterHelperFactory
|
||||||
) {
|
) {
|
||||||
|
$this->security = $security;
|
||||||
$this->voterHelper = $voterHelperFactory->generate(self::class)
|
$this->voterHelper = $voterHelperFactory->generate(self::class)
|
||||||
->addCheckFor(Person::class, [self::SEE, self::CREATE])
|
->addCheckFor(Person::class, [self::SEE, self::CREATE])
|
||||||
->addCheckFor(AccompanyingPeriod::class, [self::SEE, self::CREATE])
|
->addCheckFor(AccompanyingPeriod::class, [self::SEE, self::CREATE])
|
||||||
|
@@ -24,6 +24,9 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
|||||||
use Chill\PersonBundle\Entity\Person;
|
use Chill\PersonBundle\Entity\Person;
|
||||||
use Chill\PersonBundle\Repository\PersonRepository;
|
use Chill\PersonBundle\Repository\PersonRepository;
|
||||||
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
|
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 Doctrine\ORM\EntityManagerInterface;
|
||||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
@@ -39,8 +42,48 @@ class ActivityContext implements
|
|||||||
DocGeneratorContextWithAdminFormInterface,
|
DocGeneratorContextWithAdminFormInterface,
|
||||||
DocGeneratorContextWithPublicFormInterface
|
DocGeneratorContextWithPublicFormInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly DocumentCategoryRepository $documentCategoryRepository, private readonly NormalizerInterface $normalizer, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly EntityManagerInterface $em, private readonly PersonRenderInterface $personRender, private readonly PersonRepository $personRepository, private readonly TranslatorInterface $translator, private readonly BaseContextData $baseContextData)
|
private BaseContextData $baseContextData;
|
||||||
{
|
|
||||||
|
private DocumentCategoryRepository $documentCategoryRepository;
|
||||||
|
|
||||||
|
private EntityManagerInterface $em;
|
||||||
|
|
||||||
|
private NormalizerInterface $normalizer;
|
||||||
|
|
||||||
|
private PersonRenderInterface $personRender;
|
||||||
|
|
||||||
|
private PersonRepository $personRepository;
|
||||||
|
|
||||||
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
private TranslatorInterface $translator;
|
||||||
|
|
||||||
|
private ThirdPartyRender $thirdPartyRender;
|
||||||
|
|
||||||
|
private ThirdPartyRepository $thirdPartyRepository;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
DocumentCategoryRepository $documentCategoryRepository,
|
||||||
|
NormalizerInterface $normalizer,
|
||||||
|
TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
|
EntityManagerInterface $em,
|
||||||
|
PersonRenderInterface $personRender,
|
||||||
|
PersonRepository $personRepository,
|
||||||
|
TranslatorInterface $translator,
|
||||||
|
BaseContextData $baseContextData,
|
||||||
|
ThirdPartyRender $thirdPartyRender,
|
||||||
|
ThirdPartyRepository $thirdPartyRepository
|
||||||
|
) {
|
||||||
|
$this->documentCategoryRepository = $documentCategoryRepository;
|
||||||
|
$this->normalizer = $normalizer;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
|
$this->em = $em;
|
||||||
|
$this->personRender = $personRender;
|
||||||
|
$this->personRepository = $personRepository;
|
||||||
|
$this->translator = $translator;
|
||||||
|
$this->baseContextData = $baseContextData;
|
||||||
|
$this->thirdPartyRender = $thirdPartyRender;
|
||||||
|
$this->thirdPartyRepository = $thirdPartyRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function adminFormReverseTransform(array $data): array
|
public function adminFormReverseTransform(array $data): array
|
||||||
@@ -57,6 +100,8 @@ class ActivityContext implements
|
|||||||
'person1Label' => $data['person1Label'] ?? $this->translator->trans('docgen.person 1'),
|
'person1Label' => $data['person1Label'] ?? $this->translator->trans('docgen.person 1'),
|
||||||
'person2' => $data['person2'] ?? false,
|
'person2' => $data['person2'] ?? false,
|
||||||
'person2Label' => $data['person2Label'] ?? $this->translator->trans('docgen.person 2'),
|
'person2Label' => $data['person2Label'] ?? $this->translator->trans('docgen.person 2'),
|
||||||
|
'thirdParty' => $data['thirdParty'] ?? false,
|
||||||
|
'thirdPartyLabel' => $data['thirdPartyLabel'] ?? $this->translator->trans('thirdParty'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,6 +131,14 @@ class ActivityContext implements
|
|||||||
->add('person2Label', TextType::class, [
|
->add('person2Label', TextType::class, [
|
||||||
'label' => 'person 2 label',
|
'label' => 'person 2 label',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
|
])
|
||||||
|
->add('thirdParty', CheckboxType::class, [
|
||||||
|
'required' => false,
|
||||||
|
'label' => 'docgen.Ask for thirdParty',
|
||||||
|
])
|
||||||
|
->add('thirdPartyLabel', TextType::class, [
|
||||||
|
'label' => 'docgen.thirdParty label',
|
||||||
|
'required' => true,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,6 +164,20 @@ 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
|
public function contextGenerationDataDenormalize(DocGeneratorTemplate $template, $entity, array $data): array
|
||||||
@@ -125,6 +192,12 @@ class ActivityContext implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (null !== ($id = ($data['thirdParty'] ?? null))) {
|
||||||
|
$denormalized['thirdParty'] = $this->thirdPartyRepository->find($id);
|
||||||
|
} else {
|
||||||
|
$denormalized['thirdParty'] = null;
|
||||||
|
}
|
||||||
|
|
||||||
return $denormalized;
|
return $denormalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,9 +206,11 @@ class ActivityContext implements
|
|||||||
$normalized = [];
|
$normalized = [];
|
||||||
|
|
||||||
foreach (['mainPerson', 'person1', 'person2'] as $k) {
|
foreach (['mainPerson', 'person1', 'person2'] as $k) {
|
||||||
$normalized[$k] = null === $data[$k] ? null : $data[$k]->getId();
|
$normalized[$k] = ($data[$k] ?? null)?->getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$normalized['thirdParty'] = ($data['thirdParty'] ?? null)?->getId();
|
||||||
|
|
||||||
return $normalized;
|
return $normalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,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;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,7 +285,7 @@ class ActivityContext implements
|
|||||||
{
|
{
|
||||||
$options = $template->getOptions();
|
$options = $template->getOptions();
|
||||||
|
|
||||||
return $options['mainPerson'] || $options['person1'] || $options['person2'];
|
return $options['mainPerson'] || $options['person1'] || $options['person2'] || $options ['thirdParty'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void
|
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void
|
||||||
|
@@ -48,8 +48,44 @@ class ListActivitiesByAccompanyingPeriodContext implements
|
|||||||
DocGeneratorContextWithAdminFormInterface,
|
DocGeneratorContextWithAdminFormInterface,
|
||||||
DocGeneratorContextWithPublicFormInterface
|
DocGeneratorContextWithPublicFormInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly AccompanyingPeriodContext $accompanyingPeriodContext, private readonly ActivityACLAwareRepositoryInterface $activityACLAwareRepository, private readonly NormalizerInterface $normalizer, private readonly PersonRepository $personRepository, private readonly SocialActionRepository $socialActionRepository, private readonly SocialIssueRepository $socialIssueRepository, private readonly ThirdPartyRepository $thirdPartyRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly UserRepository $userRepository)
|
private AccompanyingPeriodContext $accompanyingPeriodContext;
|
||||||
{
|
|
||||||
|
private ActivityACLAwareRepositoryInterface $activityACLAwareRepository;
|
||||||
|
|
||||||
|
private NormalizerInterface $normalizer;
|
||||||
|
|
||||||
|
private PersonRepository $personRepository;
|
||||||
|
|
||||||
|
private SocialActionRepository $socialActionRepository;
|
||||||
|
|
||||||
|
private SocialIssueRepository $socialIssueRepository;
|
||||||
|
|
||||||
|
private ThirdPartyRepository $thirdPartyRepository;
|
||||||
|
|
||||||
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
private UserRepository $userRepository;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
AccompanyingPeriodContext $accompanyingPeriodContext,
|
||||||
|
ActivityACLAwareRepositoryInterface $activityACLAwareRepository,
|
||||||
|
NormalizerInterface $normalizer,
|
||||||
|
PersonRepository $personRepository,
|
||||||
|
SocialActionRepository $socialActionRepository,
|
||||||
|
SocialIssueRepository $socialIssueRepository,
|
||||||
|
ThirdPartyRepository $thirdPartyRepository,
|
||||||
|
TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
|
UserRepository $userRepository,
|
||||||
|
) {
|
||||||
|
$this->accompanyingPeriodContext = $accompanyingPeriodContext;
|
||||||
|
$this->activityACLAwareRepository = $activityACLAwareRepository;
|
||||||
|
$this->normalizer = $normalizer;
|
||||||
|
$this->personRepository = $personRepository;
|
||||||
|
$this->socialActionRepository = $socialActionRepository;
|
||||||
|
$this->socialIssueRepository = $socialIssueRepository;
|
||||||
|
$this->thirdPartyRepository = $thirdPartyRepository;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
|
$this->userRepository = $userRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function adminFormReverseTransform(array $data): array
|
public function adminFormReverseTransform(array $data): array
|
||||||
@@ -104,26 +140,36 @@ class ListActivitiesByAccompanyingPeriodContext implements
|
|||||||
return $normalized;
|
return $normalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return list
|
||||||
|
*/
|
||||||
private function filterActivitiesByUser(array $activities, User $user): array
|
private function filterActivitiesByUser(array $activities, User $user): array
|
||||||
{
|
{
|
||||||
return array_filter(
|
return array_values(
|
||||||
$activities,
|
array_filter(
|
||||||
function ($activity) use ($user) {
|
$activities,
|
||||||
$activityUsernames = array_map(static fn ($user) => $user['username'], $activity['users'] ?? []);
|
function ($activity) use ($user) {
|
||||||
return in_array($user->getUsername(), $activityUsernames, true);
|
$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
|
private function filterWorksByUser(array $works, User $user): array
|
||||||
{
|
{
|
||||||
return array_filter(
|
return array_values(
|
||||||
$works,
|
array_filter(
|
||||||
function ($work) use ($user) {
|
$works,
|
||||||
$workUsernames = array_map(static fn ($user) => $user['username'], $work['referrers'] ?? []);
|
function ($work) use ($user) {
|
||||||
|
$workUsernames = array_map(static fn ($user) => $user['username'], $work['referrers'] ?? []);
|
||||||
|
|
||||||
return in_array($user->getUsername(), $workUsernames, true);
|
return in_array($user->getUsername(), $workUsernames, true);
|
||||||
}
|
}
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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';
|
||||||
|
}
|
||||||
|
}
|
@@ -76,8 +76,10 @@ final class ActivityControllerTest extends WebTestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider getSecuredPagesUnauthenticated
|
* @dataProvider getSecuredPagesUnauthenticated
|
||||||
|
*
|
||||||
|
* @param mixed $url
|
||||||
*/
|
*/
|
||||||
public function testAccessIsDeniedForUnauthenticated(mixed $url)
|
public function testAccessIsDeniedForUnauthenticated($url)
|
||||||
{
|
{
|
||||||
$client = $this->createClient();
|
$client = $this->createClient();
|
||||||
|
|
||||||
@@ -214,7 +216,7 @@ final class ActivityControllerTest extends WebTestCase
|
|||||||
->setName('social without activity');
|
->setName('social without activity');
|
||||||
//copy role scopes where ACTIVITY is not present
|
//copy role scopes where ACTIVITY is not present
|
||||||
foreach ($socialPermissionGroup->getRoleScopes() as $roleScope) {
|
foreach ($socialPermissionGroup->getRoleScopes() as $roleScope) {
|
||||||
if (!strpos((string) $roleScope->getRole(), 'ACTIVITY')) {
|
if (!strpos($roleScope->getRole(), 'ACTIVITY')) {
|
||||||
$withoutActivityPermissionGroup->addRoleScope($roleScope);
|
$withoutActivityPermissionGroup->addRoleScope($roleScope);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -260,9 +262,11 @@ final class ActivityControllerTest extends WebTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param mixed $username
|
||||||
|
*
|
||||||
* @return \Symfony\Component\BrowserKit\Client
|
* @return \Symfony\Component\BrowserKit\Client
|
||||||
*/
|
*/
|
||||||
private function getAuthenticatedClient(mixed $username = 'center a_social')
|
private function getAuthenticatedClient($username = 'center a_social')
|
||||||
{
|
{
|
||||||
return self::createClient([], [
|
return self::createClient([], [
|
||||||
'PHP_AUTH_USER' => $username,
|
'PHP_AUTH_USER' => $username,
|
||||||
|
@@ -19,7 +19,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class ActivityReasonCategoryControllerTest extends WebTestCase
|
final class ActivityReasonCategoryControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
public function testToWrite(): never
|
public function testToWrite()
|
||||||
{
|
{
|
||||||
$this->markTestSkipped();
|
$this->markTestSkipped();
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class ActivityReasonControllerTest extends WebTestCase
|
final class ActivityReasonControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
public function testToWrite(): never
|
public function testToWrite()
|
||||||
{
|
{
|
||||||
$this->markTestSkipped();
|
$this->markTestSkipped();
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class ActivityTypeControllerTest extends WebTestCase
|
final class ActivityTypeControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
public function testToWrite(): never
|
public function testToWrite()
|
||||||
{
|
{
|
||||||
$this->markTestSkipped();
|
$this->markTestSkipped();
|
||||||
}
|
}
|
||||||
|
@@ -34,7 +34,7 @@ final class TranslatableActivityReasonTest extends TypeTestCase
|
|||||||
parent::setUp();
|
parent::setUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSimple(): never
|
public function testSimple()
|
||||||
{
|
{
|
||||||
$translatableActivityReasonType = new PickActivityReasonType(
|
$translatableActivityReasonType = new PickActivityReasonType(
|
||||||
$this->getTranslatableStringHelper()
|
$this->getTranslatableStringHelper()
|
||||||
|
@@ -89,9 +89,11 @@ final class TranslatableActivityTypeTest extends KernelTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param mixed $active
|
||||||
|
*
|
||||||
* @return \Chill\ActivityBundle\Entity\ActivityType
|
* @return \Chill\ActivityBundle\Entity\ActivityType
|
||||||
*/
|
*/
|
||||||
protected function getRandomType(mixed $active = true)
|
protected function getRandomType($active = true)
|
||||||
{
|
{
|
||||||
$types = $this->container->get('doctrine.orm.entity_manager')
|
$types = $this->container->get('doctrine.orm.entity_manager')
|
||||||
->getRepository(ActivityType::class)
|
->getRepository(ActivityType::class)
|
||||||
|
@@ -19,7 +19,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
*/
|
*/
|
||||||
final class TimelineProviderTest extends WebTestCase
|
final class TimelineProviderTest extends WebTestCase
|
||||||
{
|
{
|
||||||
public function testAnActivityIsShownOnTimeline(): never
|
public function testAnActivityIsShownOnTimeline()
|
||||||
{
|
{
|
||||||
$this->markTestSkipped('we have to write fixtures before writing this tests');
|
$this->markTestSkipped('we have to write fixtures before writing this tests');
|
||||||
}
|
}
|
||||||
|
@@ -33,14 +33,24 @@ class TimelineActivityProvider implements TimelineProviderInterface
|
|||||||
{
|
{
|
||||||
private const SUPPORTED_CONTEXTS = ['center', 'person'];
|
private const SUPPORTED_CONTEXTS = ['center', 'person'];
|
||||||
|
|
||||||
|
protected ActivityACLAwareRepository $aclAwareRepository;
|
||||||
|
|
||||||
|
protected EntityManagerInterface $em;
|
||||||
|
|
||||||
|
protected AuthorizationHelperInterface $helper;
|
||||||
|
|
||||||
protected UserInterface $user;
|
protected UserInterface $user;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
protected EntityManagerInterface $em,
|
EntityManagerInterface $em,
|
||||||
protected AuthorizationHelperInterface $helper,
|
AuthorizationHelperInterface $helper,
|
||||||
TokenStorageInterface $storage,
|
TokenStorageInterface $storage,
|
||||||
protected ActivityACLAwareRepository $aclAwareRepository
|
ActivityACLAwareRepository $aclAwareRepository
|
||||||
) {
|
) {
|
||||||
|
$this->em = $em;
|
||||||
|
$this->helper = $helper;
|
||||||
|
$this->aclAwareRepository = $aclAwareRepository;
|
||||||
|
|
||||||
if (!$storage->getToken()->getUser() instanceof User) {
|
if (!$storage->getToken()->getUser() instanceof User) {
|
||||||
throw new RuntimeException('A user should be authenticated !');
|
throw new RuntimeException('A user should be authenticated !');
|
||||||
}
|
}
|
||||||
|
@@ -18,9 +18,9 @@ use Symfony\Component\Validator\Constraint;
|
|||||||
*/
|
*/
|
||||||
class ActivityValidity extends Constraint
|
class ActivityValidity extends Constraint
|
||||||
{
|
{
|
||||||
final public const IS_REQUIRED_MESSAGE = ' is required';
|
public const IS_REQUIRED_MESSAGE = ' is required';
|
||||||
|
|
||||||
final public const ROOT_MESSAGE = 'For this type of activity, ';
|
public const ROOT_MESSAGE = 'For this type of activity, ';
|
||||||
|
|
||||||
public $noPersonsMessage = 'For this type of activity, you must add at least one person';
|
public $noPersonsMessage = 'For this type of activity, you must add at least one person';
|
||||||
|
|
||||||
|
@@ -34,6 +34,7 @@ services:
|
|||||||
resource: '../Validator/Constraints/'
|
resource: '../Validator/Constraints/'
|
||||||
|
|
||||||
Chill\ActivityBundle\Service\DocGenerator\:
|
Chill\ActivityBundle\Service\DocGenerator\:
|
||||||
autowire: true
|
|
||||||
autoconfigure: true
|
|
||||||
resource: '../Service/DocGenerator/'
|
resource: '../Service/DocGenerator/'
|
||||||
|
|
||||||
|
Chill\ActivityBundle\Service\EntityInfo\:
|
||||||
|
resource: '../Service/EntityInfo/'
|
||||||
|
@@ -21,8 +21,11 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
|
|
||||||
final class AsideActivityController extends CRUDController
|
final class AsideActivityController extends CRUDController
|
||||||
{
|
{
|
||||||
public function __construct(private readonly AsideActivityCategoryRepository $categoryRepository)
|
private AsideActivityCategoryRepository $categoryRepository;
|
||||||
|
|
||||||
|
public function __construct(AsideActivityCategoryRepository $categoryRepository)
|
||||||
{
|
{
|
||||||
|
$this->categoryRepository = $categoryRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createEntity(string $action, Request $request): object
|
public function createEntity(string $action, Request $request): object
|
||||||
|
@@ -24,8 +24,11 @@ use function random_int;
|
|||||||
|
|
||||||
class LoadAsideActivity extends Fixture implements DependentFixtureInterface
|
class LoadAsideActivity extends Fixture implements DependentFixtureInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly UserRepository $userRepository)
|
private UserRepository $userRepository;
|
||||||
|
|
||||||
|
public function __construct(UserRepository $userRepository)
|
||||||
{
|
{
|
||||||
|
$this->userRepository = $userRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDependencies(): array
|
public function getDependencies(): array
|
||||||
|
@@ -114,8 +114,10 @@ class AsideActivityCategory
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @Assert\Callback
|
* @Assert\Callback
|
||||||
|
*
|
||||||
|
* @param mixed $payload
|
||||||
*/
|
*/
|
||||||
public function preventRecursiveParent(ExecutionContextInterface $context, mixed $payload)
|
public function preventRecursiveParent(ExecutionContextInterface $context, $payload)
|
||||||
{
|
{
|
||||||
if (!$this->hasParent()) {
|
if (!$this->hasParent()) {
|
||||||
return;
|
return;
|
||||||
|
@@ -20,8 +20,14 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class ByActivityTypeAggregator implements AggregatorInterface
|
class ByActivityTypeAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly AsideActivityCategoryRepository $asideActivityCategoryRepository, private readonly TranslatableStringHelper $translatableStringHelper)
|
private AsideActivityCategoryRepository $asideActivityCategoryRepository;
|
||||||
|
|
||||||
|
private TranslatableStringHelper $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(AsideActivityCategoryRepository $asideActivityCategoryRepository, TranslatableStringHelper $translatableStringHelper)
|
||||||
{
|
{
|
||||||
|
$this->asideActivityCategoryRepository = $asideActivityCategoryRepository;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -22,8 +22,14 @@ use function in_array;
|
|||||||
|
|
||||||
class ByUserJobAggregator implements AggregatorInterface
|
class ByUserJobAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly UserJobRepositoryInterface $userJobRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
private UserJobRepositoryInterface $userJobRepository;
|
||||||
|
|
||||||
|
public function __construct(UserJobRepositoryInterface $userJobRepository, TranslatableStringHelperInterface $translatableStringHelper)
|
||||||
{
|
{
|
||||||
|
$this->userJobRepository = $userJobRepository;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
@@ -22,8 +22,14 @@ use function in_array;
|
|||||||
|
|
||||||
class ByUserScopeAggregator implements AggregatorInterface
|
class ByUserScopeAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly ScopeRepositoryInterface $scopeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
private ScopeRepositoryInterface $scopeRepository;
|
||||||
|
|
||||||
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
|
||||||
|
public function __construct(ScopeRepositoryInterface $scopeRepository, TranslatableStringHelperInterface $translatableStringHelper)
|
||||||
{
|
{
|
||||||
|
$this->scopeRepository = $scopeRepository;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user