mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-05 15:29:50 +00:00
Merge remote-tracking branch 'origin/master' into issue159_page_acceuil
This commit is contained in:
commit
8cc5859a3b
26
.changes/v2.12.0.md
Normal file
26
.changes/v2.12.0.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
## v2.12.0 - 2023-11-15
|
||||||
|
### Feature
|
||||||
|
* ([#199](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/199)) Export: add an aggregator "group activities by presence"
|
||||||
|
* ([#199](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/199)) Export: add a filter "filter activity by activity presence"
|
||||||
|
* ([#199](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/199)) Export: add an aggregator "group activities by person" (only for the activities saved in a person context)
|
||||||
|
* ([#199](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/199)) Export: add a new aggregator "group peoples by postal code"
|
||||||
|
* ([#200](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/200)) Export: split export about person on accompanying period work: one with the people associated with the work, another one with the people associated with the accompanying period
|
||||||
|
* ([#204](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/204)) Add 3 new filters and 3 new aggregators for work action creator (with jobs and scopes)
|
||||||
|
|
||||||
|
* ([#202](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/202)) Create export for the average duration of social work actions
|
||||||
|
* ([#206](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/206)) Export: add a export which count persons on accompanying period work
|
||||||
|
* ([#206](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/206)) Export: add an export which count persons on activity
|
||||||
|
* ([#203](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/203)) Export: add clauses on the social work start date and end date within the filter "Filter accompanying period by accompanying period work"
|
||||||
|
### Fixed
|
||||||
|
* Export: fix typo in filter "filter accompanying period work on end date"
|
||||||
|
* ([#189](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/189)) Export: Fix failure in export linked to household
|
||||||
|
* ([#205](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/205)) Fix loading of accompanying period work referrers
|
||||||
|
### Traduction francophone des principaux changements
|
||||||
|
* export: ajout d'un regroupement "grouper les échanges par présence de l'usager";
|
||||||
|
* export: ajout d'un filtre "filtre les échanges par présence de l'usager";
|
||||||
|
* export: ajout d'un regroupement "regrouper les échanges par personne" (seulement pour les échanges enregistrés dans le contexte de l'usager);
|
||||||
|
* export: ajout d'un regroupement "grouper les usagers par codes postaux"
|
||||||
|
* export: séparation des exports sur les actions: dans l'un, les filtres des usagers portent sur les usagers concernés par l'action, dans l'autre, les filtres portent sur les usagers concernés par le parcours de l'action;
|
||||||
|
* export: ajout de 3 nouveaux filtres et regroupements sur le créateur de l'action, son métier et son service;
|
||||||
|
* export: correction de l'export sur les ménages liés aux parcours;
|
||||||
|
* correction du chargement des actions d'accompagnement
|
3
.changes/v2.12.1.md
Normal file
3
.changes/v2.12.1.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
## v2.12.1 - 2023-11-16
|
||||||
|
### Fixed
|
||||||
|
* ([#208](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/208)) Export: fix loading of form for "filter action by type, goal and result"
|
9
.changes/v2.13.0.md
Normal file
9
.changes/v2.13.0.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
## v2.13.0 - 2023-11-21
|
||||||
|
### Feature
|
||||||
|
* ([#173](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/173)) Allow user to add a phonenumber to their profile which will be included in automatically generated documents
|
||||||
|
### Fixed
|
||||||
|
* ([#211](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/211)) Export: fix loading of "Group activity by type"
|
||||||
|
* ([#190](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/190)) Export: fix loading of "group activity by reasons"
|
||||||
|
* ([#213](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/213)) Export: fix usage of some Collection returned instead of array in export filters
|
||||||
|
* ([#215](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/215)) Use only the string 'both' for gender (with a database migration)
|
||||||
|
* ([#212](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/212)) Clean the database to make working the "Group people by gender" aggregator
|
8
.changes/v2.14.0.md
Normal file
8
.changes/v2.14.0.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
## v2.14.0 - 2023-11-24
|
||||||
|
### Feature
|
||||||
|
* ([#161](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/161)) Export: in filter "Filter accompanying period work (social action) by type, goal and result", order the items alphabetically or with the defined order
|
||||||
|
### Fixed
|
||||||
|
* ([#141](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/141)) Export: on filter "action by type goals, and results", restore the fields when editing a saved export
|
||||||
|
* ([#219](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/219)) Export: fix the list of accompanying period work, when the "calc date" is null
|
||||||
|
* ([#222](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/222)) Fix rendering of custom fields
|
||||||
|
* Fix various errors in custom fields administration
|
5
.changes/v2.14.1.md
Normal file
5
.changes/v2.14.1.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
## v2.14.1 - 2023-11-29
|
||||||
|
### Fixed
|
||||||
|
* Export: fix list person with custom fields
|
||||||
|
* ([#100](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/100)) Add a paginator to budget elements (resource and charge types) in the admin
|
||||||
|
* Fix error in ListEvaluation when "handling agents" are alone
|
11
.changes/v2.15.0.md
Normal file
11
.changes/v2.15.0.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
## v2.15.0 - 2023-12-11
|
||||||
|
### Feature
|
||||||
|
* ([#191](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/191)) Add export "number of household associate with an exchange"
|
||||||
|
* ([#235](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/235)) Export: add dates on the filter "filter course by activity type"
|
||||||
|
### Fixed
|
||||||
|
* ([#214](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/214)) Fix error when posting an empty comment on an accompanying period.
|
||||||
|
* ([#233](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/233)) Fix "filter evaluation by evaluation type" (and add select2 to the list of evaluation types to pick)
|
||||||
|
* ([#234](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/234)) Fix "filter aside activity by date"
|
||||||
|
|
||||||
|
* ([#228](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/228)) Fix export of activity for people created before the introduction of the createdAt column on person (during v1)
|
||||||
|
* ([#246](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/246)) Do not show activities, evaluations and social work when associated to a confidential accompanying period, except for the users which are allowed to see them
|
5
.changes/v2.15.1.md
Normal file
5
.changes/v2.15.1.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
## v2.15.1 - 2023-12-20
|
||||||
|
### Fixed
|
||||||
|
* Fix the household export query to exclude accompanying periods that are in draft state.
|
||||||
|
### DX
|
||||||
|
* ([#167](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/167)) Fixed readthedocs compilation by updating readthedocs config file and requirements for Sphinx
|
5
.changes/v2.15.2.md
Normal file
5
.changes/v2.15.2.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
## v2.15.2 - 2024-01-11
|
||||||
|
### Fixed
|
||||||
|
* Fix the id_seq used when creating a new accompanying period participation during fusion of two person files
|
||||||
|
### DX
|
||||||
|
* Set placeholder to False for expanded EntityType form fields where required is set to False.
|
@ -11,6 +11,10 @@ cache:
|
|||||||
services:
|
services:
|
||||||
- name: postgis/postgis:14-3.3-alpine
|
- name: postgis/postgis:14-3.3-alpine
|
||||||
alias: db
|
alias: db
|
||||||
|
command:
|
||||||
|
- postgres
|
||||||
|
- "-c"
|
||||||
|
- max_connections=1000
|
||||||
- name: redis
|
- name: redis
|
||||||
alias: redis
|
alias: redis
|
||||||
|
|
||||||
@ -47,7 +51,7 @@ build:
|
|||||||
paths:
|
paths:
|
||||||
- .cache/
|
- .cache/
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 30 min
|
expire_in: 1 day
|
||||||
paths:
|
paths:
|
||||||
- bin
|
- bin
|
||||||
- vendor/
|
- vendor/
|
||||||
@ -61,7 +65,7 @@ code_style:
|
|||||||
paths:
|
paths:
|
||||||
- .cache/
|
- .cache/
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 30 min
|
expire_in: 1 day
|
||||||
paths:
|
paths:
|
||||||
- bin
|
- bin
|
||||||
- vendor/
|
- vendor/
|
||||||
@ -75,7 +79,7 @@ phpstan_tests:
|
|||||||
paths:
|
paths:
|
||||||
- .cache/
|
- .cache/
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 30 min
|
expire_in: 1 day
|
||||||
paths:
|
paths:
|
||||||
- bin
|
- bin
|
||||||
- vendor/
|
- vendor/
|
||||||
@ -90,7 +94,7 @@ rector_tests:
|
|||||||
paths:
|
paths:
|
||||||
- .cache/
|
- .cache/
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 30 min
|
expire_in: 1 day
|
||||||
paths:
|
paths:
|
||||||
- bin
|
- bin
|
||||||
- vendor/
|
- vendor/
|
||||||
@ -117,7 +121,7 @@ unit_tests:
|
|||||||
- php -d memory_limit=3G tests/console doctrine:fixtures:load -n
|
- php -d memory_limit=3G tests/console doctrine:fixtures:load -n
|
||||||
- php -d memory_limit=4G bin/phpunit --colors=never --exclude-group dbIntensive
|
- php -d memory_limit=4G bin/phpunit --colors=never --exclude-group dbIntensive
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 30 min
|
expire_in: 1 day
|
||||||
paths:
|
paths:
|
||||||
- bin
|
- bin
|
||||||
- vendor/
|
- vendor/
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
---
|
---
|
||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
|
build:
|
||||||
|
os: ubuntu-22.04
|
||||||
|
tools:
|
||||||
|
python: "3.7"
|
||||||
|
|
||||||
sphinx:
|
sphinx:
|
||||||
configuration: docs/source/conf.py
|
configuration: docs/source/conf.py
|
||||||
|
|
||||||
python:
|
python:
|
||||||
version: 3.7
|
|
||||||
install:
|
install:
|
||||||
- requirements: docs/requirements.txt
|
- requirements: docs/requirements.txt
|
80
CHANGELOG.md
80
CHANGELOG.md
@ -6,6 +6,86 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
|||||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||||
|
|
||||||
|
|
||||||
|
## v2.15.2 - 2024-01-11
|
||||||
|
### Fixed
|
||||||
|
* Fix the id_seq used when creating a new accompanying period participation during fusion of two person files
|
||||||
|
### DX
|
||||||
|
* Set placeholder to False for expanded EntityType form fields where required is set to False.
|
||||||
|
|
||||||
|
## v2.15.1 - 2023-12-20
|
||||||
|
### Fixed
|
||||||
|
* Fix the household export query to exclude accompanying periods that are in draft state.
|
||||||
|
### DX
|
||||||
|
* ([#167](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/167)) Fixed readthedocs compilation by updating readthedocs config file and requirements for Sphinx
|
||||||
|
|
||||||
|
## v2.15.0 - 2023-12-11
|
||||||
|
### Feature
|
||||||
|
* ([#191](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/191)) Add export "number of household associate with an exchange"
|
||||||
|
* ([#235](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/235)) Export: add dates on the filter "filter course by activity type"
|
||||||
|
### Fixed
|
||||||
|
* ([#214](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/214)) Fix error when posting an empty comment on an accompanying period.
|
||||||
|
* ([#233](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/233)) Fix "filter evaluation by evaluation type" (and add select2 to the list of evaluation types to pick)
|
||||||
|
* ([#234](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/234)) Fix "filter aside activity by date"
|
||||||
|
|
||||||
|
* ([#228](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/228)) Fix export of activity for people created before the introduction of the createdAt column on person (during v1)
|
||||||
|
* ([#246](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/246)) Do not show activities, evaluations and social work when associated to a confidential accompanying period, except for the users which are allowed to see them
|
||||||
|
|
||||||
|
## v2.14.1 - 2023-11-29
|
||||||
|
### Fixed
|
||||||
|
* Export: fix list person with custom fields
|
||||||
|
* ([#100](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/100)) Add a paginator to budget elements (resource and charge types) in the admin
|
||||||
|
* Fix error in ListEvaluation when "handling agents" are alone
|
||||||
|
|
||||||
|
## v2.14.0 - 2023-11-24
|
||||||
|
### Feature
|
||||||
|
* ([#161](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/161)) Export: in filter "Filter accompanying period work (social action) by type, goal and result", order the items alphabetically or with the defined order
|
||||||
|
### Fixed
|
||||||
|
* ([#141](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/141)) Export: on filter "action by type goals, and results", restore the fields when editing a saved export
|
||||||
|
* ([#219](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/219)) Export: fix the list of accompanying period work, when the "calc date" is null
|
||||||
|
* ([#222](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/222)) Fix rendering of custom fields
|
||||||
|
* Fix various errors in custom fields administration
|
||||||
|
|
||||||
|
## v2.13.0 - 2023-11-21
|
||||||
|
### Feature
|
||||||
|
* ([#173](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/173)) Allow user to add a phonenumber to their profile which will be included in automatically generated documents
|
||||||
|
### Fixed
|
||||||
|
* ([#211](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/211)) Export: fix loading of "Group activity by type"
|
||||||
|
* ([#190](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/190)) Export: fix loading of "group activity by reasons"
|
||||||
|
* ([#213](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/213)) Export: fix usage of some Collection returned instead of array in export filters
|
||||||
|
* ([#215](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/215)) Use only the string 'both' for gender (with a database migration)
|
||||||
|
* ([#212](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/212)) Clean the database to make working the "Group people by gender" aggregator
|
||||||
|
|
||||||
|
## v2.12.1 - 2023-11-16
|
||||||
|
### Fixed
|
||||||
|
* ([#208](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/208)) Export: fix loading of form for "filter action by type, goal and result"
|
||||||
|
|
||||||
|
## v2.12.0 - 2023-11-15
|
||||||
|
### Feature
|
||||||
|
* ([#199](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/199)) Export: add an aggregator "group activities by presence"
|
||||||
|
* ([#199](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/199)) Export: add a filter "filter activity by activity presence"
|
||||||
|
* ([#199](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/199)) Export: add an aggregator "group activities by person" (only for the activities saved in a person context)
|
||||||
|
* ([#199](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/199)) Export: add a new aggregator "group peoples by postal code"
|
||||||
|
* ([#200](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/200)) Export: split export about person on accompanying period work: one with the people associated with the work, another one with the people associated with the accompanying period
|
||||||
|
* ([#204](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/204)) Add 3 new filters and 3 new aggregators for work action creator (with jobs and scopes)
|
||||||
|
|
||||||
|
* ([#202](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/202)) Create export for the average duration of social work actions
|
||||||
|
* ([#206](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/206)) Export: add a export which count persons on accompanying period work
|
||||||
|
* ([#206](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/206)) Export: add an export which count persons on activity
|
||||||
|
* ([#203](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/203)) Export: add clauses on the social work start date and end date within the filter "Filter accompanying period by accompanying period work"
|
||||||
|
### Fixed
|
||||||
|
* Export: fix typo in filter "filter accompanying period work on end date"
|
||||||
|
* ([#189](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/189)) Export: Fix failure in export linked to household
|
||||||
|
* ([#205](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/205)) Fix loading of accompanying period work referrers
|
||||||
|
### Traduction francophone des principaux changements
|
||||||
|
* export: ajout d'un regroupement "grouper les échanges par présence de l'usager";
|
||||||
|
* export: ajout d'un filtre "filtre les échanges par présence de l'usager";
|
||||||
|
* export: ajout d'un regroupement "regrouper les échanges par personne" (seulement pour les échanges enregistrés dans le contexte de l'usager);
|
||||||
|
* export: ajout d'un regroupement "grouper les usagers par codes postaux"
|
||||||
|
* export: séparation des exports sur les actions: dans l'un, les filtres des usagers portent sur les usagers concernés par l'action, dans l'autre, les filtres portent sur les usagers concernés par le parcours de l'action;
|
||||||
|
* export: ajout de 3 nouveaux filtres et regroupements sur le créateur de l'action, son métier et son service;
|
||||||
|
* export: correction de l'export sur les ménages liés aux parcours;
|
||||||
|
* correction du chargement des actions d'accompagnement
|
||||||
|
|
||||||
## v2.11.0 - 2023-11-07
|
## v2.11.0 - 2023-11-07
|
||||||
### Feature
|
### Feature
|
||||||
* ([#194](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/194)) Export: add a filter "filter activity by creator job"
|
* ([#194](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/194)) Export: add a filter "filter activity by creator job"
|
||||||
|
@ -27,7 +27,7 @@ To compile this documentation :
|
|||||||
Contribute
|
Contribute
|
||||||
===========
|
===========
|
||||||
|
|
||||||
Issue tracker : https://git.framasoft.org/groups/Chill-project/issues
|
Issue tracker : https://gitlab.com/Chill-Projet/chill-bundles/-/issues
|
||||||
|
|
||||||
Licence
|
Licence
|
||||||
=======
|
=======
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
docutils==0.13.1
|
docutils==0.13.1
|
||||||
Pygments==2.2.0
|
Pygments==2.2.0
|
||||||
sphinx==1.8.5
|
sphinx==1.8.5
|
||||||
|
Jinja2<3.1
|
||||||
git+https://github.com/fabpot/sphinx-php.git@v2.0.2#egg_name=sphinx-php
|
git+https://github.com/fabpot/sphinx-php.git@v2.0.2#egg_name=sphinx-php
|
||||||
jsx-lexer===0.0.8
|
jsx-lexer===0.0.8
|
||||||
sphinx_rtd_theme==0.5.0
|
sphinx_rtd_theme==0.5.0
|
||||||
|
@ -49,7 +49,7 @@ Clone or download the chill-skeleton project and `cd` into the main directory.
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
git clone https://gitlab.com/Chill-Projet/chill-skeleton-basic.git
|
git clone https://gitlab.com/Chill-Projet/chill-skeleton-basic.git
|
||||||
cd chill-app
|
cd chill-skeleton-basic
|
||||||
|
|
||||||
|
|
||||||
As a developer, the code will stay on your computer and will be executed in docker container. To avoid permission problem, the code should be run with the same uid/gid from your current user. This is why we get your current user id with the command ``id -u`` in each following scripts.
|
As a developer, the code will stay on your computer and will be executed in docker container. To avoid permission problem, the code should be run with the same uid/gid from your current user. This is why we get your current user id with the command ``id -u`` in each following scripts.
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
|
|
||||||
Configure Chill for calendar sync and SSO with Microsoft Graph (Outlook)
|
Configure Chill for calendar and absence synchronisation and SSO with Microsoft Graph (Outlook)
|
||||||
========================================================================
|
===============================================================================================
|
||||||
|
|
||||||
Chill offers the possibility to:
|
Chill offers the possibility to:
|
||||||
|
|
||||||
* authenticate users using Microsoft Graph, with relatively small adaptations;
|
* authenticate users using Microsoft Graph, with relatively small adaptations;
|
||||||
* synchronize calendar in both ways (`see the user manual for a large description of the feature <https://gitea.champs-libres.be/Chill-project/manuals>`_).
|
* synchronize calendar in both ways (`see the user manual for a large description of the feature <https://gitea.champs-libres.be/Chill-project/manuals>`_).
|
||||||
|
|
||||||
Both can be configured separately (synchronising calendars without SSO, or SSO without calendar). When calendar sync is configured without SSL, the user's email address is the key to associate Chill's users with Microsoft's ones.
|
Both can be configured separately (synchronising calendars without SSO, or SSO without calendar).
|
||||||
|
|
||||||
|
Please note that the user's email address is the key to associate Chill's users with Microsoft's ones.
|
||||||
|
|
||||||
Configure SSO
|
Configure SSO
|
||||||
-------------
|
-------------
|
||||||
@ -186,12 +188,19 @@ Configure chill app
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Configure sync
|
Configure sync and calendar access
|
||||||
--------------
|
----------------------------------
|
||||||
|
|
||||||
The sync processe might be configured in the same app, or into a different app.
|
The purpose of this configuration is the following:
|
||||||
|
|
||||||
The synchronization processes use Oauth2.0 for authentication and authorization.
|
- let user read their calendar and shared calendar within Chill (with the same permissions as the one configured in Outlook / Azure);
|
||||||
|
- allow chill instance to write appointment ("Rendez-vous") into their calendar, and invite other users to their appointment;
|
||||||
|
- allow chill instance to be notified if an appoint is added or removed by the user within another interface than Chill: if the appointment match another one created in the Chill interface, the date and time are updated in Chill;
|
||||||
|
- allow chill instance to read the absence of the user and, if set, mark the user as absent in Chill;
|
||||||
|
|
||||||
|
The sync processe might be configured in the same app, or into a different app on the Azure side.
|
||||||
|
|
||||||
|
The synchronization processes use Oauth 2.0 / OpenID Connect for authentication and authorization.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
@ -229,8 +238,9 @@ Some explanation:
|
|||||||
The sync daemon must have write access:
|
The sync daemon must have write access:
|
||||||
|
|
||||||
* the daemon must be allowed to read all users and their profile, to establish a link between them and the Chill's users: (:code:`Users.Read.All`);
|
* the daemon must be allowed to read all users and their profile, to establish a link between them and the Chill's users: (:code:`Users.Read.All`);
|
||||||
* it must also be allowed to read and write into the calendars (:code:`Calendars.ReadWrite.All`)
|
* it must also be allowed to read and write into the calendars (:code:`Calendars.ReadWrite.All`);
|
||||||
* for sending invitation to other users, the permission (:code:`Mail.Send`) must be granted.
|
* for sending invitation to other users, the permission (:code:`Mail.Send`) must be granted;
|
||||||
|
* and, for reading the absence status of the user and sync it with chill, it must be able to read the mailboxSettings (:code:`MailboxSettings.Read`).
|
||||||
|
|
||||||
At this step, you might choose to accept those permissions for all users, or let them do it by yourself.
|
At this step, you might choose to accept those permissions for all users, or let them do it by yourself.
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 166 KiB |
@ -28,3 +28,4 @@ Version 1.5.5
|
|||||||
|
|
||||||
- [activity] replace dropdown for selecting reasons and use chillEntity for reason rendering
|
- [activity] replace dropdown for selecting reasons and use chillEntity for reason rendering
|
||||||
- fix bug: error when trying to edit activity of which the type has been deactivated
|
- fix bug: error when trying to edit activity of which the type has been deactivated
|
||||||
|
|
||||||
|
@ -13,4 +13,6 @@ namespace Chill\ActivityBundle;
|
|||||||
|
|
||||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||||
|
|
||||||
class ChillActivityBundle extends Bundle {}
|
class ChillActivityBundle extends Bundle
|
||||||
|
{
|
||||||
|
}
|
||||||
|
@ -67,7 +67,8 @@ final class ActivityController extends AbstractController
|
|||||||
private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory,
|
private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory,
|
||||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
private readonly PaginatorFactory $paginatorFactory,
|
private readonly PaginatorFactory $paginatorFactory,
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a Activity entity.
|
* Deletes a Activity entity.
|
||||||
|
@ -56,7 +56,7 @@ class ActivityReasonCategoryController extends AbstractController
|
|||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id);
|
$entity = $em->getRepository(ActivityReasonCategory::class)->find($id);
|
||||||
|
|
||||||
if (!$entity) {
|
if (!$entity) {
|
||||||
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
|
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
|
||||||
@ -79,7 +79,7 @@ class ActivityReasonCategoryController extends AbstractController
|
|||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
$entities = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->findAll();
|
$entities = $em->getRepository(ActivityReasonCategory::class)->findAll();
|
||||||
|
|
||||||
return $this->render('@ChillActivity/ActivityReasonCategory/index.html.twig', [
|
return $this->render('@ChillActivity/ActivityReasonCategory/index.html.twig', [
|
||||||
'entities' => $entities,
|
'entities' => $entities,
|
||||||
@ -111,7 +111,7 @@ class ActivityReasonCategoryController extends AbstractController
|
|||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id);
|
$entity = $em->getRepository(ActivityReasonCategory::class)->find($id);
|
||||||
|
|
||||||
if (!$entity) {
|
if (!$entity) {
|
||||||
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
|
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
|
||||||
@ -131,7 +131,7 @@ class ActivityReasonCategoryController extends AbstractController
|
|||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id);
|
$entity = $em->getRepository(ActivityReasonCategory::class)->find($id);
|
||||||
|
|
||||||
if (!$entity) {
|
if (!$entity) {
|
||||||
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
|
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
|
||||||
|
@ -24,7 +24,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
|||||||
*/
|
*/
|
||||||
class ActivityReasonController extends AbstractController
|
class ActivityReasonController extends AbstractController
|
||||||
{
|
{
|
||||||
public function __construct(private readonly ActivityReasonRepository $activityReasonRepository) {}
|
public function __construct(private readonly ActivityReasonRepository $activityReasonRepository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new ActivityReason entity.
|
* Creates a new ActivityReason entity.
|
||||||
@ -60,7 +62,7 @@ class ActivityReasonController extends AbstractController
|
|||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
|
$entity = $em->getRepository(ActivityReason::class)->find($id);
|
||||||
|
|
||||||
if (null === $entity) {
|
if (null === $entity) {
|
||||||
throw new NotFoundHttpException('Unable to find ActivityReason entity.');
|
throw new NotFoundHttpException('Unable to find ActivityReason entity.');
|
||||||
@ -115,7 +117,7 @@ class ActivityReasonController extends AbstractController
|
|||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
|
$entity = $em->getRepository(ActivityReason::class)->find($id);
|
||||||
|
|
||||||
if (!$entity) {
|
if (!$entity) {
|
||||||
throw $this->createNotFoundException('Unable to find ActivityReason entity.');
|
throw $this->createNotFoundException('Unable to find ActivityReason entity.');
|
||||||
@ -135,7 +137,7 @@ class ActivityReasonController extends AbstractController
|
|||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
|
$entity = $em->getRepository(ActivityReason::class)->find($id);
|
||||||
|
|
||||||
if (!$entity) {
|
if (!$entity) {
|
||||||
throw $this->createNotFoundException('Unable to find ActivityReason entity.');
|
throw $this->createNotFoundException('Unable to find ActivityReason entity.');
|
||||||
|
@ -19,7 +19,9 @@ use Doctrine\ORM\EntityManagerInterface;
|
|||||||
|
|
||||||
class ActivityEntityListener
|
class ActivityEntityListener
|
||||||
{
|
{
|
||||||
public function __construct(private readonly EntityManagerInterface $em, private readonly AccompanyingPeriodWorkRepository $workRepository) {}
|
public function __construct(private readonly EntityManagerInterface $em, private readonly AccompanyingPeriodWorkRepository $workRepository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function persistActionToCourse(Activity $activity)
|
public function persistActionToCourse(Activity $activity)
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,8 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
|
|||||||
private RollingDateConverterInterface $rollingDateConverter,
|
private RollingDateConverterInterface $rollingDateConverter,
|
||||||
private ActivityTypeRepositoryInterface $activityTypeRepository,
|
private ActivityTypeRepositoryInterface $activityTypeRepository,
|
||||||
private TranslatableStringHelperInterface $translatableStringHelper,
|
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class BySocialActionAggregator implements AggregatorInterface
|
class BySocialActionAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository) {}
|
public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class BySocialIssueAggregator implements AggregatorInterface
|
class BySocialIssueAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly SocialIssueRepository $issueRepository, private readonly SocialIssueRender $issueRender) {}
|
public function __construct(private readonly SocialIssueRepository $issueRepository, private readonly SocialIssueRender $issueRender)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -0,0 +1,76 @@
|
|||||||
|
<?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\Export\Aggregator;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Export\Declarations;
|
||||||
|
use Chill\ActivityBundle\Repository\ActivityPresenceRepositoryInterface;
|
||||||
|
use Chill\MainBundle\Export\AggregatorInterface;
|
||||||
|
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||||
|
use Doctrine\ORM\QueryBuilder;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
|
final readonly class ActivityPresenceAggregator implements AggregatorInterface
|
||||||
|
{
|
||||||
|
public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFormDefaultData(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLabels($key, array $values, mixed $data)
|
||||||
|
{
|
||||||
|
return function (null|int|string $value): string {
|
||||||
|
if ('_header' === $value) {
|
||||||
|
return 'export.aggregator.activity.by_activity_presence.header';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null === $value || '' === $value || null === $presence = $this->activityPresenceRepository->find($value)) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->translatableStringHelper->localize($presence->getName());
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getQueryKeys($data)
|
||||||
|
{
|
||||||
|
return ['activity_presence_aggregator_attendee'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTitle(): string
|
||||||
|
{
|
||||||
|
return 'export.aggregator.activity.by_activity_presence.Group activity by presence';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addRole(): ?string
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function alterQuery(QueryBuilder $qb, $data): void
|
||||||
|
{
|
||||||
|
$qb->addSelect('IDENTITY(activity.attendee) AS activity_presence_aggregator_attendee');
|
||||||
|
$qb->addGroupBy('activity_presence_aggregator_attendee');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function applyOn()
|
||||||
|
{
|
||||||
|
return Declarations::ACTIVITY;
|
||||||
|
}
|
||||||
|
}
|
@ -22,7 +22,9 @@ class ActivityTypeAggregator implements AggregatorInterface
|
|||||||
{
|
{
|
||||||
final public const KEY = 'activity_type_aggregator';
|
final public const KEY = 'activity_type_aggregator';
|
||||||
|
|
||||||
public function __construct(protected ActivityTypeRepositoryInterface $activityTypeRepository, protected TranslatableStringHelperInterface $translatableStringHelper) {}
|
public function __construct(protected ActivityTypeRepositoryInterface $activityTypeRepository, protected TranslatableStringHelperInterface $translatableStringHelper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
@ -56,20 +58,15 @@ class ActivityTypeAggregator implements AggregatorInterface
|
|||||||
|
|
||||||
public function getLabels($key, array $values, $data): \Closure
|
public function getLabels($key, array $values, $data): \Closure
|
||||||
{
|
{
|
||||||
// for performance reason, we load data from db only once
|
return function (null|int|string $value): string {
|
||||||
$this->activityTypeRepository->findBy(['id' => $values]);
|
|
||||||
|
|
||||||
return function ($value): string {
|
|
||||||
if ('_header' === $value) {
|
if ('_header' === $value) {
|
||||||
return 'Activity type';
|
return 'Activity type';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null === $value || '' === $value) {
|
if (null === $value || '' === $value || null === $t = $this->activityTypeRepository->find($value)) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$t = $this->activityTypeRepository->find($value);
|
|
||||||
|
|
||||||
return $this->translatableStringHelper->localize($t->getName());
|
return $this->translatableStringHelper->localize($t->getName());
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,9 @@ class ActivityUserAggregator implements AggregatorInterface
|
|||||||
{
|
{
|
||||||
final public const KEY = 'activity_user_id';
|
final public const KEY = 'activity_user_id';
|
||||||
|
|
||||||
public function __construct(private readonly UserRepository $userRepository, private readonly UserRender $userRender) {}
|
public function __construct(private readonly UserRepository $userRepository, private readonly UserRender $userRender)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class ActivityUsersAggregator implements AggregatorInterface
|
class ActivityUsersAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) {}
|
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,8 @@ class ActivityUsersJobAggregator implements AggregatorInterface
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly UserJobRepositoryInterface $userJobRepository,
|
private readonly UserJobRepositoryInterface $userJobRepository,
|
||||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
@ -65,7 +66,9 @@ class ActivityUsersJobAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function getFormDefaultData(): array
|
public function getFormDefaultData(): array
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,8 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
@ -65,7 +66,9 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function getFormDefaultData(): array
|
public function getFormDefaultData(): array
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class ByCreatorAggregator implements AggregatorInterface
|
class ByCreatorAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) {}
|
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class ByThirdpartyAggregator implements AggregatorInterface
|
class ByThirdpartyAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository, private readonly ThirdPartyRender $thirdPartyRender) {}
|
public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository, private readonly ThirdPartyRender $thirdPartyRender)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,8 @@ class CreatorJobAggregator implements AggregatorInterface
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly UserJobRepositoryInterface $userJobRepository,
|
private readonly UserJobRepositoryInterface $userJobRepository,
|
||||||
private readonly TranslatableStringHelper $translatableStringHelper
|
private readonly TranslatableStringHelper $translatableStringHelper
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
@ -65,7 +66,9 @@ class CreatorJobAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function getFormDefaultData(): array
|
public function getFormDefaultData(): array
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,8 @@ class CreatorScopeAggregator implements AggregatorInterface
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly ScopeRepository $scopeRepository,
|
private readonly ScopeRepository $scopeRepository,
|
||||||
private readonly TranslatableStringHelper $translatableStringHelper
|
private readonly TranslatableStringHelper $translatableStringHelper
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
@ -65,7 +66,9 @@ class CreatorScopeAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function getFormDefaultData(): array
|
public function getFormDefaultData(): array
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class LocationTypeAggregator implements AggregatorInterface
|
class LocationTypeAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly LocationTypeRepository $locationTypeRepository, private readonly TranslatableStringHelper $translatableStringHelper) {}
|
public function __construct(private readonly LocationTypeRepository $locationTypeRepository, private readonly TranslatableStringHelper $translatableStringHelper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,9 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
|||||||
|
|
||||||
class ActivityReasonAggregator implements AggregatorInterface, ExportElementValidatedInterface
|
class ActivityReasonAggregator implements AggregatorInterface, ExportElementValidatedInterface
|
||||||
{
|
{
|
||||||
public function __construct(protected ActivityReasonCategoryRepository $activityReasonCategoryRepository, protected ActivityReasonRepository $activityReasonRepository, protected TranslatableStringHelper $translatableStringHelper) {}
|
public function __construct(protected ActivityReasonCategoryRepository $activityReasonCategoryRepository, protected ActivityReasonRepository $activityReasonRepository, protected TranslatableStringHelper $translatableStringHelper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
@ -99,12 +101,6 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
|||||||
|
|
||||||
public function getLabels($key, array $values, $data)
|
public function getLabels($key, array $values, $data)
|
||||||
{
|
{
|
||||||
match ($data['level']) {
|
|
||||||
'reasons' => $this->activityReasonRepository->findBy(['id' => $values]),
|
|
||||||
'categories' => $this->activityReasonCategoryRepository->findBy(['id' => $values]),
|
|
||||||
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) {
|
||||||
return 'reasons' === $data['level'] ? 'Group by reasons' : 'Group by categories of reason';
|
return 'reasons' === $data['level'] ? 'Group by reasons' : 'Group by categories of reason';
|
||||||
|
@ -0,0 +1,67 @@
|
|||||||
|
<?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\Export\Aggregator\PersonAggregators;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Export\Declarations;
|
||||||
|
use Chill\MainBundle\Export\AggregatorInterface;
|
||||||
|
use Chill\PersonBundle\Export\Helper\LabelPersonHelper;
|
||||||
|
use Doctrine\ORM\QueryBuilder;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
|
final readonly class PersonAggregator implements AggregatorInterface
|
||||||
|
{
|
||||||
|
public function __construct(private LabelPersonHelper $labelPersonHelper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
// nothing to add here
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFormDefaultData(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLabels($key, array $values, mixed $data)
|
||||||
|
{
|
||||||
|
return $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.person.by_person.person');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getQueryKeys($data)
|
||||||
|
{
|
||||||
|
return ['activity_by_person_agg'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return 'export.aggregator.person.by_person.title';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addRole(): ?string
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function alterQuery(QueryBuilder $qb, $data)
|
||||||
|
{
|
||||||
|
$qb
|
||||||
|
->addSelect('IDENTITY(activity.person) AS activity_by_person_agg')
|
||||||
|
->addGroupBy('activity_by_person_agg');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function applyOn()
|
||||||
|
{
|
||||||
|
return Declarations::ACTIVITY_PERSON;
|
||||||
|
}
|
||||||
|
}
|
@ -25,7 +25,9 @@ final readonly class PersonsAggregator implements AggregatorInterface
|
|||||||
{
|
{
|
||||||
private const PREFIX = 'act_persons_agg';
|
private const PREFIX = 'act_persons_agg';
|
||||||
|
|
||||||
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
|
public function __construct(private LabelPersonHelper $labelPersonHelper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
|
|
||||||
class SentReceivedAggregator implements AggregatorInterface
|
class SentReceivedAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
public function __construct(private readonly TranslatorInterface $translator)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -36,7 +36,9 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface
|
|||||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function getFormDefaultData(): array
|
public function getFormDefaultData(): array
|
||||||
{
|
{
|
||||||
|
@ -41,7 +41,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
|||||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function getFormDefaultData(): array
|
public function getFormDefaultData(): array
|
||||||
{
|
{
|
||||||
|
@ -0,0 +1,149 @@
|
|||||||
|
<?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\Export\Export\LinkedToACP;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Entity\Activity;
|
||||||
|
use Chill\ActivityBundle\Export\Declarations;
|
||||||
|
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
|
||||||
|
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
||||||
|
use Chill\MainBundle\Export\ExportInterface;
|
||||||
|
use Chill\MainBundle\Export\FormatterInterface;
|
||||||
|
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||||
|
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
|
||||||
|
use Chill\PersonBundle\Entity\Household\HouseholdMember;
|
||||||
|
use Chill\PersonBundle\Entity\Person\PersonCenterHistory;
|
||||||
|
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
|
||||||
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
|
use Doctrine\ORM\EntityRepository;
|
||||||
|
use Doctrine\ORM\Query;
|
||||||
|
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
|
final readonly class CountHouseholdOnActivity implements ExportInterface, GroupedExportInterface
|
||||||
|
{
|
||||||
|
private EntityRepository $repository;
|
||||||
|
|
||||||
|
private bool $filterStatsByCenters;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
EntityManagerInterface $em,
|
||||||
|
ParameterBagInterface $parameterBag,
|
||||||
|
) {
|
||||||
|
$this->repository = $em->getRepository(Activity::class);
|
||||||
|
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFormDefaultData(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAllowedFormattersTypes(): array
|
||||||
|
{
|
||||||
|
return [FormatterInterface::TYPE_TABULAR];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'export.export.count_household_on_activity.description';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getGroup(): string
|
||||||
|
{
|
||||||
|
return 'Exports of activities linked to an accompanying period';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLabels($key, array $values, $data)
|
||||||
|
{
|
||||||
|
if ('export_count_activity' !== $key) {
|
||||||
|
throw new \LogicException("the key {$key} is not used by this export");
|
||||||
|
}
|
||||||
|
|
||||||
|
return static fn ($value) => '_header' === $value ? 'export.export.count_household_on_activity.header' : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getQueryKeys($data): array
|
||||||
|
{
|
||||||
|
return ['export_count_activity'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getResult($query, $data)
|
||||||
|
{
|
||||||
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTitle(): string
|
||||||
|
{
|
||||||
|
return 'export.export.count_household_on_activity.title';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getType(): string
|
||||||
|
{
|
||||||
|
return Declarations::ACTIVITY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||||
|
{
|
||||||
|
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||||
|
|
||||||
|
$qb = $this->repository
|
||||||
|
->createQueryBuilder('activity')
|
||||||
|
->join('activity.persons', 'person')
|
||||||
|
->join('activity.accompanyingPeriod', 'acp')
|
||||||
|
->join(
|
||||||
|
HouseholdMember::class,
|
||||||
|
'householdmember',
|
||||||
|
Query\Expr\Join::WITH,
|
||||||
|
'person.id = IDENTITY(householdmember.person) AND householdmember.startDate <= activity.date AND (householdmember.endDate IS NULL OR householdmember.endDate > activity.date)'
|
||||||
|
)
|
||||||
|
->join('householdmember.household', 'household');
|
||||||
|
|
||||||
|
if ($this->filterStatsByCenters) {
|
||||||
|
$qb
|
||||||
|
->andWhere(
|
||||||
|
$qb->expr()->exists(
|
||||||
|
'SELECT 1 FROM '.AccompanyingPeriodParticipation::class.' acl_count_part
|
||||||
|
JOIN '.PersonCenterHistory::class.' acl_count_person_history WITH IDENTITY(acl_count_person_history.person) = IDENTITY(acl_count_part.person)
|
||||||
|
WHERE acl_count_part.accompanyingPeriod = acp.id AND acl_count_person_history.center IN (:authorized_centers)
|
||||||
|
'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
->setParameter('authorized_centers', $centers);
|
||||||
|
}
|
||||||
|
|
||||||
|
AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||||
|
|
||||||
|
$qb->select('COUNT(DISTINCT household.id) as export_count_activity');
|
||||||
|
|
||||||
|
return $qb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function requiredRole(): string
|
||||||
|
{
|
||||||
|
return ActivityStatsVoter::STATS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function supportsModifiers(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Declarations::ACTIVITY,
|
||||||
|
Declarations::ACTIVITY_ACP,
|
||||||
|
PersonDeclarations::ACP_TYPE,
|
||||||
|
PersonDeclarations::PERSON_TYPE,
|
||||||
|
PersonDeclarations::HOUSEHOLD_TYPE,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,140 @@
|
|||||||
|
<?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\Export\Export\LinkedToACP;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Entity\Activity;
|
||||||
|
use Chill\ActivityBundle\Export\Declarations;
|
||||||
|
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
|
||||||
|
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
||||||
|
use Chill\MainBundle\Export\ExportInterface;
|
||||||
|
use Chill\MainBundle\Export\FormatterInterface;
|
||||||
|
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||||
|
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
|
||||||
|
use Chill\PersonBundle\Entity\Person\PersonCenterHistory;
|
||||||
|
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
|
||||||
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
|
use Doctrine\ORM\EntityRepository;
|
||||||
|
use Doctrine\ORM\Query;
|
||||||
|
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
|
class CountPersonsOnActivity implements ExportInterface, GroupedExportInterface
|
||||||
|
{
|
||||||
|
protected EntityRepository $repository;
|
||||||
|
|
||||||
|
private readonly bool $filterStatsByCenters;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
EntityManagerInterface $em,
|
||||||
|
ParameterBagInterface $parameterBag,
|
||||||
|
) {
|
||||||
|
$this->repository = $em->getRepository(Activity::class);
|
||||||
|
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFormDefaultData(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAllowedFormattersTypes(): array
|
||||||
|
{
|
||||||
|
return [FormatterInterface::TYPE_TABULAR];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'export.export.count_person_on_activity.description';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getGroup(): string
|
||||||
|
{
|
||||||
|
return 'Exports of activities linked to an accompanying period';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLabels($key, array $values, $data)
|
||||||
|
{
|
||||||
|
if ('export_count_activity' !== $key) {
|
||||||
|
throw new \LogicException("the key {$key} is not used by this export");
|
||||||
|
}
|
||||||
|
|
||||||
|
return static fn ($value) => '_header' === $value ? 'export.export.count_person_on_activity.header' : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getQueryKeys($data): array
|
||||||
|
{
|
||||||
|
return ['export_count_activity'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getResult($query, $data)
|
||||||
|
{
|
||||||
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTitle(): string
|
||||||
|
{
|
||||||
|
return 'export.export.count_person_on_activity.title';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getType(): string
|
||||||
|
{
|
||||||
|
return Declarations::ACTIVITY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||||
|
{
|
||||||
|
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||||
|
|
||||||
|
$qb = $this->repository
|
||||||
|
->createQueryBuilder('activity')
|
||||||
|
->join('activity.persons', 'person')
|
||||||
|
->join('activity.accompanyingPeriod', 'acp');
|
||||||
|
|
||||||
|
if ($this->filterStatsByCenters) {
|
||||||
|
$qb
|
||||||
|
->andWhere(
|
||||||
|
$qb->expr()->exists(
|
||||||
|
'SELECT 1 FROM '.AccompanyingPeriodParticipation::class.' acl_count_part
|
||||||
|
JOIN '.PersonCenterHistory::class.' acl_count_person_history WITH IDENTITY(acl_count_person_history.person) = IDENTITY(acl_count_part.person)
|
||||||
|
WHERE acl_count_part.accompanyingPeriod = acp.id AND acl_count_person_history.center IN (:authorized_centers)
|
||||||
|
'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
->setParameter('authorized_centers', $centers);
|
||||||
|
}
|
||||||
|
|
||||||
|
AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||||
|
|
||||||
|
$qb->select('COUNT(DISTINCT person.id) as export_count_activity');
|
||||||
|
|
||||||
|
return $qb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function requiredRole(): string
|
||||||
|
{
|
||||||
|
return ActivityStatsVoter::STATS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function supportsModifiers(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Declarations::ACTIVITY,
|
||||||
|
Declarations::ACTIVITY_ACP,
|
||||||
|
PersonDeclarations::ACP_TYPE,
|
||||||
|
PersonDeclarations::PERSON_TYPE,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -20,22 +20,18 @@ use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
|||||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||||
use Chill\MainBundle\Export\Helper\TranslatableStringExportLabelHelper;
|
use Chill\MainBundle\Export\Helper\TranslatableStringExportLabelHelper;
|
||||||
use Chill\MainBundle\Export\ListInterface;
|
use Chill\MainBundle\Export\ListInterface;
|
||||||
use Chill\PersonBundle\Entity\Person\PersonCenterHistory;
|
use Chill\PersonBundle\Export\Helper\FilterListAccompanyingPeriodHelperInterface;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
class ListActivity implements ListInterface, GroupedExportInterface
|
final readonly class ListActivity implements ListInterface, GroupedExportInterface
|
||||||
{
|
{
|
||||||
private readonly bool $filterStatsByCenters;
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly ListActivityHelper $helper,
|
private ListActivityHelper $helper,
|
||||||
private readonly EntityManagerInterface $entityManager,
|
private EntityManagerInterface $entityManager,
|
||||||
private readonly TranslatableStringExportLabelHelper $translatableStringExportLabelHelper,
|
private TranslatableStringExportLabelHelper $translatableStringExportLabelHelper,
|
||||||
ParameterBagInterface $parameterBag,
|
private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper,
|
||||||
) {
|
) {
|
||||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
@ -119,19 +115,7 @@ class ListActivity implements ListInterface, GroupedExportInterface
|
|||||||
->leftJoin('acppart.person', 'person')
|
->leftJoin('acppart.person', 'person')
|
||||||
->andWhere('acppart.startDate != acppart.endDate OR acppart.endDate IS NULL');
|
->andWhere('acppart.startDate != acppart.endDate OR acppart.endDate IS NULL');
|
||||||
|
|
||||||
if ($this->filterStatsByCenters) {
|
$this->filterListAccompanyingPeriodHelper->addFilterAccompanyingPeriods($qb, $requiredModifiers, $acl, $data);
|
||||||
$qb
|
|
||||||
->andWhere(
|
|
||||||
$qb->expr()->exists(
|
|
||||||
'SELECT 1
|
|
||||||
FROM '.PersonCenterHistory::class.' acl_count_person_history
|
|
||||||
WHERE acl_count_person_history.person = person
|
|
||||||
AND acl_count_person_history.center IN (:authorized_centers)
|
|
||||||
'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
->setParameter('authorized_centers', $centers);
|
|
||||||
}
|
|
||||||
|
|
||||||
$qb
|
$qb
|
||||||
// some grouping are necessary
|
// some grouping are necessary
|
||||||
|
@ -33,7 +33,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
|||||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function getFormDefaultData(): array
|
public function getFormDefaultData(): array
|
||||||
{
|
{
|
||||||
|
@ -0,0 +1,140 @@
|
|||||||
|
<?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\Export\Export\LinkedToPerson;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Export\Declarations;
|
||||||
|
use Chill\ActivityBundle\Repository\ActivityRepository;
|
||||||
|
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
|
||||||
|
use Chill\MainBundle\Export\ExportInterface;
|
||||||
|
use Chill\MainBundle\Export\FormatterInterface;
|
||||||
|
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||||
|
use Chill\PersonBundle\Entity\Household\HouseholdMember;
|
||||||
|
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
|
||||||
|
use Doctrine\ORM\Query;
|
||||||
|
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
|
final readonly class CountHouseholdOnActivity implements ExportInterface, GroupedExportInterface
|
||||||
|
{
|
||||||
|
private bool $filterStatsByCenters;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
private ActivityRepository $activityRepository,
|
||||||
|
ParameterBagInterface $parameterBag,
|
||||||
|
) {
|
||||||
|
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFormDefaultData(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAllowedFormattersTypes()
|
||||||
|
{
|
||||||
|
return [FormatterInterface::TYPE_TABULAR];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription()
|
||||||
|
{
|
||||||
|
return 'export.export.count_household_on_activity_person.description';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getGroup(): string
|
||||||
|
{
|
||||||
|
return 'Exports of activities linked to a person';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLabels($key, array $values, $data)
|
||||||
|
{
|
||||||
|
if ('export_count_activity' !== $key) {
|
||||||
|
throw new \LogicException("the key {$key} is not used by this export");
|
||||||
|
}
|
||||||
|
|
||||||
|
return static fn ($value) => '_header' === $value ? 'export.export.count_household_on_activity_person.header' : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getQueryKeys($data)
|
||||||
|
{
|
||||||
|
return ['export_count_activity'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getResult($query, $data)
|
||||||
|
{
|
||||||
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return 'export.export.count_household_on_activity_person.title';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getType(): string
|
||||||
|
{
|
||||||
|
return Declarations::ACTIVITY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||||
|
{
|
||||||
|
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||||
|
|
||||||
|
$qb = $this->activityRepository
|
||||||
|
->createQueryBuilder('activity')
|
||||||
|
->join('activity.person', 'person')
|
||||||
|
->join(
|
||||||
|
HouseholdMember::class,
|
||||||
|
'householdmember',
|
||||||
|
Query\Expr\Join::WITH,
|
||||||
|
'person = householdmember.person AND householdmember.startDate <= activity.date AND (householdmember.endDate IS NULL OR householdmember.endDate > activity.date)'
|
||||||
|
)
|
||||||
|
->join('householdmember.household', 'household');
|
||||||
|
|
||||||
|
$qb->select('COUNT(DISTINCT household.id) as export_count_activity');
|
||||||
|
|
||||||
|
if ($this->filterStatsByCenters) {
|
||||||
|
$qb
|
||||||
|
->join('person.centerHistory', 'centerHistory')
|
||||||
|
->where(
|
||||||
|
$qb->expr()->andX(
|
||||||
|
$qb->expr()->lte('centerHistory.startDate', 'activity.date'),
|
||||||
|
$qb->expr()->orX(
|
||||||
|
$qb->expr()->isNull('centerHistory.endDate'),
|
||||||
|
$qb->expr()->gt('centerHistory.endDate', 'activity.date')
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
->andWhere($qb->expr()->in('centerHistory.center', ':centers'))
|
||||||
|
->setParameter('centers', $centers);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $qb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function requiredRole(): string
|
||||||
|
{
|
||||||
|
return ActivityStatsVoter::STATS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function supportsModifiers()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Declarations::ACTIVITY,
|
||||||
|
Declarations::ACTIVITY_PERSON,
|
||||||
|
PersonDeclarations::PERSON_TYPE,
|
||||||
|
PersonDeclarations::HOUSEHOLD_TYPE,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -47,7 +47,9 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
|||||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function getFormDefaultData(): array
|
public function getFormDefaultData(): array
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,8 @@ class ListActivityHelper
|
|||||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
private readonly TranslatableStringExportLabelHelper $translatableStringLabelHelper,
|
private readonly TranslatableStringExportLabelHelper $translatableStringLabelHelper,
|
||||||
private readonly UserHelper $userHelper
|
private readonly UserHelper $userHelper
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function addSelect(QueryBuilder $qb): void
|
public function addSelect(QueryBuilder $qb): void
|
||||||
{
|
{
|
||||||
@ -74,7 +75,9 @@ class ListActivityHelper
|
|||||||
->addGroupBy('location.id');
|
->addGroupBy('location.id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function getAllowedFormattersTypes()
|
public function getAllowedFormattersTypes()
|
||||||
{
|
{
|
||||||
|
@ -15,18 +15,24 @@ use Chill\ActivityBundle\Entity\Activity;
|
|||||||
use Chill\ActivityBundle\Entity\ActivityType;
|
use Chill\ActivityBundle\Entity\ActivityType;
|
||||||
use Chill\ActivityBundle\Repository\ActivityTypeRepositoryInterface;
|
use Chill\ActivityBundle\Repository\ActivityTypeRepositoryInterface;
|
||||||
use Chill\MainBundle\Export\FilterInterface;
|
use Chill\MainBundle\Export\FilterInterface;
|
||||||
|
use Chill\MainBundle\Form\Type\PickRollingDateType;
|
||||||
|
use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface;
|
||||||
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||||
use Chill\PersonBundle\Export\Declarations;
|
use Chill\PersonBundle\Export\Declarations;
|
||||||
use Doctrine\ORM\QueryBuilder;
|
use Doctrine\ORM\QueryBuilder;
|
||||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
class ActivityTypeFilter implements FilterInterface
|
final readonly class ActivityTypeFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
|
private const BASE_EXISTS = 'SELECT 1 FROM '.Activity::class.' act_type_filter_activity WHERE act_type_filter_activity.accompanyingPeriod = acp';
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly ActivityTypeRepositoryInterface $activityTypeRepository,
|
private ActivityTypeRepositoryInterface $activityTypeRepository,
|
||||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
) {}
|
private RollingDateConverterInterface $rollingDateConverter,
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
@ -35,15 +41,28 @@ class ActivityTypeFilter implements FilterInterface
|
|||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data)
|
public function alterQuery(QueryBuilder $qb, $data)
|
||||||
{
|
{
|
||||||
$qb->andWhere(
|
$exists = self::BASE_EXISTS;
|
||||||
$qb->expr()->exists(
|
|
||||||
'SELECT 1 FROM '.Activity::class.' act_type_filter_activity
|
if (count($data['accepted_activitytypes']) > 0) {
|
||||||
WHERE act_type_filter_activity.activityType IN (:act_type_filter_activity_types) AND act_type_filter_activity.accompanyingPeriod = acp'
|
$exists .= ' AND act_type_filter_activity.activityType IN (:act_type_filter_activity_types)';
|
||||||
)
|
|
||||||
);
|
|
||||||
$qb->setParameter('act_type_filter_activity_types', $data['accepted_activitytypes']);
|
$qb->setParameter('act_type_filter_activity_types', $data['accepted_activitytypes']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (null !== $data['date_after']) {
|
||||||
|
$exists .= ' AND act_type_filter_activity.date >= :act_type_filter_activity_date_after';
|
||||||
|
$qb->setParameter('act_type_filter_activity_date_after', $this->rollingDateConverter->convert($data['date_after']));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null !== $data['date_before']) {
|
||||||
|
$exists .= ' AND act_type_filter_activity.date >= :act_type_filter_activity_date_before';
|
||||||
|
$qb->setParameter('act_type_filter_activity_date_before', $this->rollingDateConverter->convert($data['date_before']));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (self::BASE_EXISTS !== $exists) {
|
||||||
|
$qb->andWhere($qb->expr()->exists($exists));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function applyOn()
|
public function applyOn()
|
||||||
{
|
{
|
||||||
return Declarations::ACP_TYPE;
|
return Declarations::ACP_TYPE;
|
||||||
@ -60,11 +79,27 @@ class ActivityTypeFilter implements FilterInterface
|
|||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$builder->add('date_after', PickRollingDateType::class, [
|
||||||
|
'label' => 'export.filter.activity.acp_by_activity_type.activity after',
|
||||||
|
'help' => 'export.filter.activity.acp_by_activity_type.activity after help',
|
||||||
|
'required' => false,
|
||||||
|
]);
|
||||||
|
|
||||||
|
$builder->add('date_before', PickRollingDateType::class, [
|
||||||
|
'label' => 'export.filter.activity.acp_by_activity_type.activity before',
|
||||||
|
'help' => 'export.filter.activity.acp_by_activity_type.activity before help',
|
||||||
|
'required' => false,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFormDefaultData(): array
|
public function getFormDefaultData(): array
|
||||||
{
|
{
|
||||||
return [];
|
return [
|
||||||
|
'accepted_activitytypes' => [],
|
||||||
|
'date_after' => null,
|
||||||
|
'date_before' => null,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, $format = 'string'): array
|
public function describeAction($data, $format = 'string'): array
|
||||||
@ -75,8 +110,12 @@ class ActivityTypeFilter implements FilterInterface
|
|||||||
$types[] = $this->translatableStringHelper->localize($aty->getName());
|
$types[] = $this->translatableStringHelper->localize($aty->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
return ['export.filter.activity.acp_by_activity_type.acp_containing_at_least_one_%activitytypes%', [
|
return ['export.filter.activity.acp_by_activity_type.acp_containing_at_least_one_activitytypes', [
|
||||||
'%activitytypes%' => implode(', ', $types),
|
'activitytypes' => implode(', ', $types),
|
||||||
|
'has_date_after' => null !== $data['date_after'] ? 1 : 0,
|
||||||
|
'date_after' => $this->rollingDateConverter->convert($data['date_after']),
|
||||||
|
'has_date_before' => null !== $data['date_before'] ? 1 : 0,
|
||||||
|
'date_before' => $this->rollingDateConverter->convert($data['date_before']),
|
||||||
]];
|
]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class BySocialActionFilter implements FilterInterface
|
class BySocialActionFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly SocialActionRender $actionRender) {}
|
public function __construct(private readonly SocialActionRender $actionRender)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class BySocialIssueFilter implements FilterInterface
|
class BySocialIssueFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly SocialIssueRender $issueRender) {}
|
public function __construct(private readonly SocialIssueRender $issueRender)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,8 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
|
|||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private RollingDateConverterInterface $rollingDateConverter,
|
private RollingDateConverterInterface $rollingDateConverter,
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
|
|
||||||
class ActivityDateFilter implements FilterInterface
|
class ActivityDateFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(protected TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter) {}
|
public function __construct(protected TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -0,0 +1,83 @@
|
|||||||
|
<?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\Export\Filter;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Entity\ActivityPresence;
|
||||||
|
use Chill\ActivityBundle\Export\Declarations;
|
||||||
|
use Chill\MainBundle\Export\FilterInterface;
|
||||||
|
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\ORM\QueryBuilder;
|
||||||
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
|
final readonly class ActivityPresenceFilter implements FilterInterface
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
|
private TranslatorInterface $translator
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return 'export.filter.activity.by_presence.Filter activity by activity presence';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildForm(FormBuilderInterface $builder)
|
||||||
|
{
|
||||||
|
$builder->add('presences', EntityType::class, [
|
||||||
|
'class' => ActivityPresence::class,
|
||||||
|
'choice_label' => fn (ActivityPresence $presence) => $this->translatableStringHelper->localize($presence->getName())
|
||||||
|
.($presence->isActive() ? '' : ' ('.$this->translator->trans('inactive').')'),
|
||||||
|
'multiple' => true,
|
||||||
|
'expanded' => true,
|
||||||
|
'label' => 'export.filter.activity.by_presence.presences',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFormDefaultData(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function describeAction($data, $format = 'string')
|
||||||
|
{
|
||||||
|
$presences = array_map(
|
||||||
|
fn (ActivityPresence $presence) => $this->translatableStringHelper->localize($presence->getName()),
|
||||||
|
$data['presences'] instanceof Collection ? $data['presences']->toArray() : $data['presences']
|
||||||
|
);
|
||||||
|
|
||||||
|
return [
|
||||||
|
'export.filter.activity.by_presence.Filtered by activity presence: only %presences%',
|
||||||
|
['%presences%' => implode(', ', $presences)],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addRole(): ?string
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function alterQuery(QueryBuilder $qb, $data)
|
||||||
|
{
|
||||||
|
$qb
|
||||||
|
->andWhere('activity.attendee IN (:activity_presence_filter_presences)')
|
||||||
|
->setParameter('activity_presence_filter_presences', $data['presences']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function applyOn()
|
||||||
|
{
|
||||||
|
return Declarations::ACTIVITY;
|
||||||
|
}
|
||||||
|
}
|
@ -27,7 +27,8 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
protected TranslatableStringHelperInterface $translatableStringHelper,
|
protected TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
protected ActivityTypeRepositoryInterface $activityTypeRepository
|
protected ActivityTypeRepositoryInterface $activityTypeRepository
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class ActivityUsersFilter implements FilterInterface
|
class ActivityUsersFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly UserRender $userRender) {}
|
public function __construct(private readonly UserRender $userRender)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class ByCreatorFilter implements FilterInterface
|
class ByCreatorFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly UserRender $userRender) {}
|
public function __construct(private readonly UserRender $userRender)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,8 @@ final readonly class CreatorJobFilter implements FilterInterface
|
|||||||
private TranslatableStringHelper $translatableStringHelper,
|
private TranslatableStringHelper $translatableStringHelper,
|
||||||
private TranslatorInterface $translator,
|
private TranslatorInterface $translator,
|
||||||
private UserJobRepositoryInterface $userJobRepository,
|
private UserJobRepositoryInterface $userJobRepository,
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,8 @@ class CreatorScopeFilter implements FilterInterface
|
|||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly TranslatableStringHelper $translatableStringHelper
|
private readonly TranslatableStringHelper $translatableStringHelper
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,9 @@ class EmergencyFilter implements FilterInterface
|
|||||||
|
|
||||||
private const DEFAULT_CHOICE = 'false';
|
private const DEFAULT_CHOICE = 'false';
|
||||||
|
|
||||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
public function __construct(private readonly TranslatorInterface $translator)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class LocationTypeFilter implements FilterInterface
|
class LocationTypeFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
|
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,9 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
|||||||
|
|
||||||
class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInterface
|
class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(protected TranslatableStringHelper $translatableStringHelper, protected ActivityReasonRepository $activityReasonRepository) {}
|
public function __construct(protected TranslatableStringHelper $translatableStringHelper, protected ActivityReasonRepository $activityReasonRepository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,8 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
|||||||
private TranslatableStringHelper $translatableStringHelper,
|
private TranslatableStringHelper $translatableStringHelper,
|
||||||
private ActivityReasonRepository $activityReasonRepository,
|
private ActivityReasonRepository $activityReasonRepository,
|
||||||
private RollingDateConverterInterface $rollingDateConverter,
|
private RollingDateConverterInterface $rollingDateConverter,
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,9 @@ final readonly class PersonsFilter implements FilterInterface
|
|||||||
{
|
{
|
||||||
private const PREFIX = 'act_persons_filter';
|
private const PREFIX = 'act_persons_filter';
|
||||||
|
|
||||||
public function __construct(private PersonRenderInterface $personRender) {}
|
public function __construct(private PersonRenderInterface $personRender)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,9 @@ 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) {}
|
public function __construct(private readonly TranslatorInterface $translator)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
class UserFilter implements FilterInterface
|
class UserFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly UserRender $userRender) {}
|
public function __construct(private readonly UserRender $userRender)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,8 @@ class UsersJobFilter implements FilterInterface
|
|||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,8 @@ class UsersScopeFilter implements FilterInterface
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
{
|
{
|
||||||
|
@ -183,6 +183,7 @@ class ActivityType extends AbstractType
|
|||||||
$builder->add('attendee', EntityType::class, [
|
$builder->add('attendee', EntityType::class, [
|
||||||
'label' => $activityType->getLabel('attendee'),
|
'label' => $activityType->getLabel('attendee'),
|
||||||
'required' => $activityType->isRequired('attendee'),
|
'required' => $activityType->isRequired('attendee'),
|
||||||
|
'placeholder' => false,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'class' => ActivityPresence::class,
|
'class' => ActivityPresence::class,
|
||||||
'choice_label' => fn (ActivityPresence $activityPresence) => $this->translatableStringHelper->localize($activityPresence->getName()),
|
'choice_label' => fn (ActivityPresence $activityPresence) => $this->translatableStringHelper->localize($activityPresence->getName()),
|
||||||
@ -404,7 +405,7 @@ class ActivityType extends AbstractType
|
|||||||
->setAllowedTypes('center', ['null', Center::class, 'array'])
|
->setAllowedTypes('center', ['null', Center::class, 'array'])
|
||||||
->setAllowedTypes('role', ['string'])
|
->setAllowedTypes('role', ['string'])
|
||||||
->setAllowedTypes('activityType', \Chill\ActivityBundle\Entity\ActivityType::class)
|
->setAllowedTypes('activityType', \Chill\ActivityBundle\Entity\ActivityType::class)
|
||||||
->setAllowedTypes('accompanyingPeriod', [\Chill\PersonBundle\Entity\AccompanyingPeriod::class, 'null']);
|
->setAllowedTypes('accompanyingPeriod', [AccompanyingPeriod::class, 'null']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBlockPrefix(): string
|
public function getBlockPrefix(): string
|
||||||
|
@ -25,7 +25,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
|
|
||||||
class ActivityTypeType extends AbstractType
|
class ActivityTypeType extends AbstractType
|
||||||
{
|
{
|
||||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
|
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,8 @@ class PickActivityReasonType extends AbstractType
|
|||||||
private readonly ActivityReasonRepository $activityReasonRepository,
|
private readonly ActivityReasonRepository $activityReasonRepository,
|
||||||
private readonly ActivityReasonRender $reasonRender,
|
private readonly ActivityReasonRender $reasonRender,
|
||||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
*/
|
*/
|
||||||
class TranslatableActivityReasonCategoryType extends AbstractType
|
class TranslatableActivityReasonCategoryType extends AbstractType
|
||||||
{
|
{
|
||||||
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator) {}
|
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
|
|
||||||
class TranslatableActivityType extends AbstractType
|
class TranslatableActivityType extends AbstractType
|
||||||
{
|
{
|
||||||
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository) {}
|
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
*/
|
*/
|
||||||
class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
||||||
{
|
{
|
||||||
public function __construct(protected Security $security, protected TranslatorInterface $translator) {}
|
public function __construct(protected Security $security, protected TranslatorInterface $translator)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security;
|
|||||||
*/
|
*/
|
||||||
final readonly class AdminMenuBuilder implements LocalMenuBuilderInterface
|
final readonly class AdminMenuBuilder implements LocalMenuBuilderInterface
|
||||||
{
|
{
|
||||||
public function __construct(private Security $security) {}
|
public function __construct(private Security $security)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||||
{
|
{
|
||||||
|
@ -23,11 +23,13 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
*/
|
*/
|
||||||
final readonly class PersonMenuBuilder implements LocalMenuBuilderInterface
|
final readonly class PersonMenuBuilder implements LocalMenuBuilderInterface
|
||||||
{
|
{
|
||||||
public function __construct(private AuthorizationCheckerInterface $authorizationChecker, private TranslatorInterface $translator) {}
|
public function __construct(private AuthorizationCheckerInterface $authorizationChecker, private TranslatorInterface $translator)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||||
{
|
{
|
||||||
/** @var \Chill\PersonBundle\Entity\Person $person */
|
/** @var Person $person */
|
||||||
$person = $parameters['person'];
|
$person = $parameters['person'];
|
||||||
|
|
||||||
if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) {
|
if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) {
|
||||||
|
@ -18,7 +18,9 @@ use Chill\MainBundle\Notification\NotificationHandlerInterface;
|
|||||||
|
|
||||||
final readonly class ActivityNotificationHandler implements NotificationHandlerInterface
|
final readonly class ActivityNotificationHandler implements NotificationHandlerInterface
|
||||||
{
|
{
|
||||||
public function __construct(private ActivityRepository $activityRepository) {}
|
public function __construct(private ActivityRepository $activityRepository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function getTemplate(Notification $notification, array $options = []): string
|
public function getTemplate(Notification $notification, array $options = []): string
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,8 @@ final readonly class ActivityACLAwareRepository implements ActivityACLAwareRepos
|
|||||||
private EntityManagerInterface $em,
|
private EntityManagerInterface $em,
|
||||||
private Security $security,
|
private Security $security,
|
||||||
private RequestStack $requestStack,
|
private RequestStack $requestStack,
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws NonUniqueResultException
|
* @throws NonUniqueResultException
|
||||||
|
@ -33,7 +33,8 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
|
|||||||
private CenterResolverManagerInterface $centerResolverManager,
|
private CenterResolverManagerInterface $centerResolverManager,
|
||||||
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
|
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
|
||||||
private Security $security
|
private Security $security
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface
|
public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,8 @@ class ActivityContext implements
|
|||||||
private readonly BaseContextData $baseContextData,
|
private readonly BaseContextData $baseContextData,
|
||||||
private readonly ThirdPartyRender $thirdPartyRender,
|
private readonly ThirdPartyRender $thirdPartyRender,
|
||||||
private readonly ThirdPartyRepository $thirdPartyRepository
|
private readonly ThirdPartyRepository $thirdPartyRepository
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function adminFormReverseTransform(array $data): array
|
public function adminFormReverseTransform(array $data): array
|
||||||
{
|
{
|
||||||
|
@ -56,7 +56,8 @@ class ListActivitiesByAccompanyingPeriodContext implements
|
|||||||
private readonly ThirdPartyRepository $thirdPartyRepository,
|
private readonly ThirdPartyRepository $thirdPartyRepository,
|
||||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
private readonly UserRepository $userRepository
|
private readonly UserRepository $userRepository
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function adminFormReverseTransform(array $data): array
|
public function adminFormReverseTransform(array $data): array
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,8 @@ final readonly class AccompanyingPeriodActivityGenericDocProvider implements Gen
|
|||||||
private EntityManagerInterface $em,
|
private EntityManagerInterface $em,
|
||||||
private Security $security,
|
private Security $security,
|
||||||
private ActivityDocumentACLAwareRepositoryInterface $activityDocumentACLAwareRepository,
|
private ActivityDocumentACLAwareRepositoryInterface $activityDocumentACLAwareRepository,
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface
|
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,8 @@ final readonly class PersonActivityGenericDocProvider implements GenericDocForPe
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
private Security $security,
|
private Security $security,
|
||||||
private ActivityDocumentACLAwareRepositoryInterface $personActivityDocumentACLAwareRepository,
|
private ActivityDocumentACLAwareRepositoryInterface $personActivityDocumentACLAwareRepository,
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface
|
public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,9 @@ use Chill\DocStoreBundle\Repository\StoredObjectRepository;
|
|||||||
|
|
||||||
final readonly class AccompanyingPeriodActivityGenericDocRenderer implements GenericDocRendererInterface
|
final readonly class AccompanyingPeriodActivityGenericDocRenderer implements GenericDocRendererInterface
|
||||||
{
|
{
|
||||||
public function __construct(private StoredObjectRepository $objectRepository, private ActivityRepository $activityRepository) {}
|
public function __construct(private StoredObjectRepository $objectRepository, private ActivityRepository $activityRepository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function supports(GenericDocDTO $genericDocDTO, $options = []): bool
|
public function supports(GenericDocDTO $genericDocDTO, $options = []): bool
|
||||||
{
|
{
|
||||||
|
@ -310,7 +310,7 @@ final class ActivityControllerTest extends WebTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Chill\ActivityBundle\Entity\ActivityType
|
* @return ActivityType
|
||||||
*/
|
*/
|
||||||
private function getRandomActivityType()
|
private function getRandomActivityType()
|
||||||
{
|
{
|
||||||
|
@ -0,0 +1,62 @@
|
|||||||
|
<?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\Tests\Export\Aggregator;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Entity\Activity;
|
||||||
|
use Chill\ActivityBundle\Export\Aggregator\ActivityPresenceAggregator;
|
||||||
|
use Chill\ActivityBundle\Repository\ActivityPresenceRepositoryInterface;
|
||||||
|
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||||
|
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||||
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*
|
||||||
|
* @coversNothing
|
||||||
|
*/
|
||||||
|
class ActivityPresenceAggregatorTest extends AbstractAggregatorTest
|
||||||
|
{
|
||||||
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
private ActivityPresenceRepositoryInterface $activityPresenceRepository;
|
||||||
|
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
self::bootKernel();
|
||||||
|
$this->translatableStringHelper = self::$container->get(TranslatableStringHelperInterface::class);
|
||||||
|
$this->activityPresenceRepository = self::$container->get(ActivityPresenceRepositoryInterface::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAggregator()
|
||||||
|
{
|
||||||
|
return new ActivityPresenceAggregator($this->activityPresenceRepository, $this->translatableStringHelper);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFormData()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
[],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getQueryBuilders()
|
||||||
|
{
|
||||||
|
self::bootKernel();
|
||||||
|
|
||||||
|
$em = self::$container->get(EntityManagerInterface::class);
|
||||||
|
|
||||||
|
return [
|
||||||
|
$em->createQueryBuilder()
|
||||||
|
->select('count(activity.id)')
|
||||||
|
->from(Activity::class, 'activity'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
<?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\Tests\Export\Aggregator\PersonAggregators;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Entity\Activity;
|
||||||
|
use Chill\ActivityBundle\Export\Aggregator\PersonAggregators\PersonAggregator;
|
||||||
|
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
|
||||||
|
use Chill\PersonBundle\Export\Helper\LabelPersonHelper;
|
||||||
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*
|
||||||
|
* @coversNothing
|
||||||
|
*/
|
||||||
|
class PersonAggregatorTest extends AbstractAggregatorTest
|
||||||
|
{
|
||||||
|
private LabelPersonHelper $labelPersonHelper;
|
||||||
|
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
self::bootKernel();
|
||||||
|
$this->labelPersonHelper = self::$container->get(LabelPersonHelper::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAggregator()
|
||||||
|
{
|
||||||
|
return new PersonAggregator($this->labelPersonHelper);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFormData()
|
||||||
|
{
|
||||||
|
return [[]];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getQueryBuilders()
|
||||||
|
{
|
||||||
|
self::bootKernel();
|
||||||
|
|
||||||
|
$em = self::$container->get(EntityManagerInterface::class);
|
||||||
|
|
||||||
|
return [
|
||||||
|
$em->createQueryBuilder()
|
||||||
|
->select('count(activity.id)')
|
||||||
|
->from(Activity::class, 'activity'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
<?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\Tests\Export\Export\LinkedToACP;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Export\Declarations;
|
||||||
|
use Chill\ActivityBundle\Export\Export\LinkedToACP\CountHouseholdOnActivity;
|
||||||
|
use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||||
|
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
|
||||||
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*
|
||||||
|
* @coversNothing
|
||||||
|
*/
|
||||||
|
class CountHouseholdOnActivityTest extends AbstractExportTest
|
||||||
|
{
|
||||||
|
private EntityManagerInterface $entityManager;
|
||||||
|
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
self::bootKernel();
|
||||||
|
$this->entityManager = self::$container->get(EntityManagerInterface::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getExport()
|
||||||
|
{
|
||||||
|
yield new CountHouseholdOnActivity($this->entityManager, $this->getParameters(true));
|
||||||
|
yield new CountHouseholdOnActivity($this->entityManager, $this->getParameters(false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFormData()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
[],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getModifiersCombination()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
Declarations::ACTIVITY,
|
||||||
|
Declarations::ACTIVITY_ACP,
|
||||||
|
PersonDeclarations::ACP_TYPE,
|
||||||
|
PersonDeclarations::PERSON_TYPE,
|
||||||
|
PersonDeclarations::HOUSEHOLD_TYPE,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
<?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\Tests\Export\Export\LinkedToACP;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Export\Declarations;
|
||||||
|
use Chill\ActivityBundle\Export\Export\LinkedToACP\CountPersonsOnActivity;
|
||||||
|
use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||||
|
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
|
||||||
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*
|
||||||
|
* @coversNothing
|
||||||
|
*/
|
||||||
|
class CountPersonsOnActivityTest extends AbstractExportTest
|
||||||
|
{
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
self::bootKernel();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getExport()
|
||||||
|
{
|
||||||
|
$em = self::$container->get(EntityManagerInterface::class);
|
||||||
|
|
||||||
|
yield new CountPersonsOnActivity($em, $this->getParameters(true));
|
||||||
|
yield new CountPersonsOnActivity($em, $this->getParameters(false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFormData()
|
||||||
|
{
|
||||||
|
return [[]];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getModifiersCombination()
|
||||||
|
{
|
||||||
|
return [[
|
||||||
|
Declarations::ACTIVITY,
|
||||||
|
Declarations::ACTIVITY_ACP,
|
||||||
|
PersonDeclarations::ACP_TYPE,
|
||||||
|
PersonDeclarations::PERSON_TYPE,
|
||||||
|
]];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
<?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\Tests\Export\Export\LinkedToPerson;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Export\Declarations;
|
||||||
|
use Chill\ActivityBundle\Export\Export\LinkedToPerson\CountHouseholdOnActivity;
|
||||||
|
use Chill\ActivityBundle\Repository\ActivityRepository;
|
||||||
|
use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||||
|
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*
|
||||||
|
* @coversNothing
|
||||||
|
*/
|
||||||
|
class CountHouseholdOnActivityTest extends AbstractExportTest
|
||||||
|
{
|
||||||
|
private ActivityRepository $activityRepository;
|
||||||
|
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
self::bootKernel();
|
||||||
|
$this->activityRepository = self::$container->get(ActivityRepository::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getExport()
|
||||||
|
{
|
||||||
|
yield new CountHouseholdOnActivity($this->activityRepository, $this->getParameters(true));
|
||||||
|
yield new CountHouseholdOnActivity($this->activityRepository, $this->getParameters(false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFormData()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
[],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getModifiersCombination()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
Declarations::ACTIVITY,
|
||||||
|
Declarations::ACTIVITY_PERSON,
|
||||||
|
PersonDeclarations::PERSON_TYPE,
|
||||||
|
PersonDeclarations::HOUSEHOLD_TYPE,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
@ -13,6 +13,7 @@ namespace Chill\ActivityBundle\Tests\Export\Filter\ACPFilters;
|
|||||||
|
|
||||||
use Chill\ActivityBundle\Entity\Activity;
|
use Chill\ActivityBundle\Entity\Activity;
|
||||||
use Chill\ActivityBundle\Entity\ActivityType;
|
use Chill\ActivityBundle\Entity\ActivityType;
|
||||||
|
use Chill\MainBundle\Service\RollingDate\RollingDate;
|
||||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
@ -55,8 +56,30 @@ final class ActivityTypeFilterTest extends AbstractFilterTest
|
|||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
foreach ($array as $a) {
|
foreach ($array as $a) {
|
||||||
|
$data[] = [
|
||||||
|
'accepted_activitytypes' => [],
|
||||||
|
'date_after' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
|
||||||
|
'date_before' => new RollingDate(RollingDate::T_TODAY),
|
||||||
|
];
|
||||||
$data[] = [
|
$data[] = [
|
||||||
'accepted_activitytypes' => new ArrayCollection([$a]),
|
'accepted_activitytypes' => new ArrayCollection([$a]),
|
||||||
|
'date_after' => null,
|
||||||
|
'date_before' => null,
|
||||||
|
];
|
||||||
|
$data[] = [
|
||||||
|
'accepted_activitytypes' => [$a],
|
||||||
|
'date_after' => null,
|
||||||
|
'date_before' => null,
|
||||||
|
];
|
||||||
|
$data[] = [
|
||||||
|
'accepted_activitytypes' => [$a],
|
||||||
|
'date_after' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
|
||||||
|
'date_before' => new RollingDate(RollingDate::T_TODAY),
|
||||||
|
];
|
||||||
|
$data[] = [
|
||||||
|
'accepted_activitytypes' => [],
|
||||||
|
'date_after' => null,
|
||||||
|
'date_before' => null,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,76 @@
|
|||||||
|
<?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\Tests\Export\Filter;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Entity\Activity;
|
||||||
|
use Chill\ActivityBundle\Export\Filter\ActivityPresenceFilter;
|
||||||
|
use Chill\ActivityBundle\Repository\ActivityPresenceRepositoryInterface;
|
||||||
|
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||||
|
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*
|
||||||
|
* @coversNothing
|
||||||
|
*/
|
||||||
|
class ActivityPresenceFilterTest extends AbstractFilterTest
|
||||||
|
{
|
||||||
|
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||||
|
private TranslatorInterface $translator;
|
||||||
|
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
self::bootKernel();
|
||||||
|
|
||||||
|
$this->translator = self::$container->get(TranslatorInterface::class);
|
||||||
|
$this->translatableStringHelper = self::$container->get(TranslatableStringHelperInterface::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFilter()
|
||||||
|
{
|
||||||
|
return new ActivityPresenceFilter($this->translatableStringHelper, $this->translator);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFormData()
|
||||||
|
{
|
||||||
|
self::bootKernel();
|
||||||
|
|
||||||
|
$presences = self::$container->get(ActivityPresenceRepositoryInterface::class)
|
||||||
|
->findAll();
|
||||||
|
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
'presences' => $presences,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'presences' => new ArrayCollection($presences),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getQueryBuilders()
|
||||||
|
{
|
||||||
|
self::bootKernel();
|
||||||
|
|
||||||
|
$em = self::$container->get(EntityManagerInterface::class);
|
||||||
|
|
||||||
|
yield $em->createQueryBuilder()
|
||||||
|
->select('count(activity.id)')
|
||||||
|
->from(Activity::class, 'activity');
|
||||||
|
|
||||||
|
self::ensureKernelShutdown();
|
||||||
|
}
|
||||||
|
}
|
@ -35,7 +35,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::$container->get('chill.activity.export.person_having_an_activity_between_date_filter');
|
$this->filter = self::$container->get('chill.activity.export.person_having_an_activity_between_date_filter');
|
||||||
|
|
||||||
$request = $this->prophesize()
|
$request = $this->prophesize()
|
||||||
->willExtend(\Symfony\Component\HttpFoundation\Request::class);
|
->willExtend(Request::class);
|
||||||
|
|
||||||
$request->getLocale()->willReturn('fr');
|
$request->getLocale()->willReturn('fr');
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase
|
|||||||
|
|
||||||
$this->assertTrue($form->isSynchronized());
|
$this->assertTrue($form->isSynchronized());
|
||||||
$this->assertInstanceOf(
|
$this->assertInstanceOf(
|
||||||
\Chill\ActivityBundle\Entity\ActivityType::class,
|
ActivityType::class,
|
||||||
$form->getData()['type'],
|
$form->getData()['type'],
|
||||||
'The data is an instance of Chill\\ActivityBundle\\Entity\\ActivityType'
|
'The data is an instance of Chill\\ActivityBundle\\Entity\\ActivityType'
|
||||||
);
|
);
|
||||||
@ -83,7 +83,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Chill\ActivityBundle\Entity\ActivityType
|
* @return ActivityType
|
||||||
*/
|
*/
|
||||||
protected function getRandomType(mixed $active = true)
|
protected function getRandomType(mixed $active = true)
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,18 @@ services:
|
|||||||
tags:
|
tags:
|
||||||
- { name: chill.export, alias: 'list_activity_linked_to_person' }
|
- { name: chill.export, alias: 'list_activity_linked_to_person' }
|
||||||
|
|
||||||
|
Chill\ActivityBundle\Export\Export\LinkedToACP\CountPersonsOnActivity:
|
||||||
|
tags:
|
||||||
|
- { name: chill.export, alias: 'count_person_on_activity' }
|
||||||
|
|
||||||
|
Chill\ActivityBundle\Export\Export\LinkedToACP\CountHouseholdOnActivity:
|
||||||
|
tags:
|
||||||
|
- { name: chill.export, alias: 'count_household_on_activity_acp' }
|
||||||
|
|
||||||
|
Chill\ActivityBundle\Export\Export\LinkedToPerson\CountHouseholdOnActivity:
|
||||||
|
tags:
|
||||||
|
- { name: chill.export, alias: 'count_household_on_activity_person' }
|
||||||
|
|
||||||
chill.activity.export.count_activity_linked_to_acp:
|
chill.activity.export.count_activity_linked_to_acp:
|
||||||
class: Chill\ActivityBundle\Export\Export\LinkedToACP\CountActivity
|
class: Chill\ActivityBundle\Export\Export\LinkedToACP\CountActivity
|
||||||
tags:
|
tags:
|
||||||
@ -135,6 +147,11 @@ services:
|
|||||||
tags:
|
tags:
|
||||||
- { name: chill.export_filter, alias: 'period_having_activity_betw_dates_filter' }
|
- { name: chill.export_filter, alias: 'period_having_activity_betw_dates_filter' }
|
||||||
|
|
||||||
|
Chill\ActivityBundle\Export\Filter\ActivityPresenceFilter:
|
||||||
|
tags:
|
||||||
|
- { name: chill.export_filter, alias: 'activity_presence_filter' }
|
||||||
|
|
||||||
|
|
||||||
## Aggregators
|
## Aggregators
|
||||||
Chill\ActivityBundle\Export\Aggregator\PersonAggregators\ActivityReasonAggregator:
|
Chill\ActivityBundle\Export\Aggregator\PersonAggregators\ActivityReasonAggregator:
|
||||||
tags:
|
tags:
|
||||||
@ -218,3 +235,11 @@ services:
|
|||||||
Chill\ActivityBundle\Export\Aggregator\ACPAggregators\ByActivityTypeAggregator:
|
Chill\ActivityBundle\Export\Aggregator\ACPAggregators\ByActivityTypeAggregator:
|
||||||
tags:
|
tags:
|
||||||
- { name: chill.export_aggregator, alias: acp_by_activity_type_aggregator }
|
- { name: chill.export_aggregator, alias: acp_by_activity_type_aggregator }
|
||||||
|
|
||||||
|
Chill\ActivityBundle\Export\Aggregator\ActivityPresenceAggregator:
|
||||||
|
tags:
|
||||||
|
- { name: chill.export_aggregator, alias: activity_presence_agg }
|
||||||
|
|
||||||
|
Chill\ActivityBundle\Export\Aggregator\PersonAggregators\PersonAggregator:
|
||||||
|
tags:
|
||||||
|
- { name: chill.export_aggregator, alias: activity_person_agg }
|
||||||
|
@ -3,7 +3,12 @@ export:
|
|||||||
activity:
|
activity:
|
||||||
course_having_activity_between_date:
|
course_having_activity_between_date:
|
||||||
Only course having an activity between from and to: Seulement les parcours ayant reçu au moins un échange entre le {from, date, short} et le {to, date, short}
|
Only course having an activity between from and to: Seulement les parcours ayant reçu au moins un échange entre le {from, date, short} et le {to, date, short}
|
||||||
person_between_dates:
|
|
||||||
|
acp_by_activity_type:
|
||||||
|
'acp_containing_at_least_one_activitytypes': >-
|
||||||
|
Parcours filtrés: uniquement ceux qui contiennent au moins un échange d'un des types suivants: {activitytypes}
|
||||||
|
{has_date_after, select, 1 {, après le {date_after, date}} other {}}
|
||||||
|
{has_date_before, select, 1 {, avant le {date_before, date}} other {}}
|
||||||
describe_action_with_no_subject: >-
|
describe_action_with_no_subject: >-
|
||||||
Filtré par personne ayant eu un échange entre le {date_from, date} et le {date_to, date}
|
Filtré par personne ayant eu un échange entre le {date_from, date} et le {date_to, date}
|
||||||
describe_action_with_subject: >-
|
describe_action_with_subject: >-
|
||||||
|
@ -332,6 +332,19 @@ docgen:
|
|||||||
myWorksOnly: Prendre en compte uniquement les actions d'accompagnement dont je suis référent
|
myWorksOnly: Prendre en compte uniquement les actions d'accompagnement dont je suis référent
|
||||||
|
|
||||||
export:
|
export:
|
||||||
|
export:
|
||||||
|
count_person_on_activity:
|
||||||
|
title: Nombre d'usagers concernés par les échanges
|
||||||
|
description: Compte le nombre d'usagers concernés par les échanges. Si un usager est présent dans plusieurs échanges, il n'est comptabilisé qu'une seule fois.
|
||||||
|
header: Nombre d'usagers concernés par des échanges
|
||||||
|
count_household_on_activity:
|
||||||
|
title: Nombre de ménages concernés par les échanges
|
||||||
|
description: Compte le nombre de ménages concernés par les échanges. Si un ménage est présent dans plusieurs échanges, il n'est comptabilisé qu'une seule fois. Les usagers sans ménages ne sont pas comptabilisés.
|
||||||
|
header: Nombre de ménage concernés par des échanges
|
||||||
|
count_household_on_activity_person:
|
||||||
|
title: Nombre de ménages concernés par les échanges
|
||||||
|
description: Compte le nombre de ménages concernés par les échanges. Si un ménage est présent dans plusieurs échanges, il n'est comptabilisé qu'une seule fois. Les usagers sans ménages ne sont pas comptabilisés. Lorsqu'un usager change de ménage, chaque ménage est comptabilisé une fois.
|
||||||
|
header: Nombre de ménage concernés par des échanges
|
||||||
list:
|
list:
|
||||||
activity:
|
activity:
|
||||||
users name: Nom des utilisateurs
|
users name: Nom des utilisateurs
|
||||||
@ -366,7 +379,10 @@ export:
|
|||||||
Receiving an activity after: Ayant reçu un échange après le
|
Receiving an activity after: Ayant reçu un échange après le
|
||||||
Receiving an activity before: Ayant reçu un échange avant le
|
Receiving an activity before: Ayant reçu un échange avant le
|
||||||
acp_by_activity_type:
|
acp_by_activity_type:
|
||||||
'acp_containing_at_least_one_%activitytypes%': 'Parcours filtrés: uniquement ceux qui contiennent au moins un échange d''un des types suivants: %activitytypes%'
|
'activity after': Échanges après le
|
||||||
|
activity after help: Si laissé vide, ne sera pas pris en compte
|
||||||
|
activity before: Echanges avant le
|
||||||
|
activity before help: Si laissé vide, ne sera pas pris en compte
|
||||||
person_between_dates:
|
person_between_dates:
|
||||||
Implied in an activity after this date: Impliqué dans un échange après cette date
|
Implied in an activity after this date: Impliqué dans un échange après cette date
|
||||||
Implied in an activity before this date: Impliqué dans un échange avant cette date
|
Implied in an activity before this date: Impliqué dans un échange avant cette date
|
||||||
@ -389,8 +405,16 @@ export:
|
|||||||
Sent or received: Envoyé ou reçu
|
Sent or received: Envoyé ou reçu
|
||||||
is sent: envoyé
|
is sent: envoyé
|
||||||
is received: reçu
|
is received: reçu
|
||||||
|
by_presence:
|
||||||
|
Filter activity by activity presence: Filtrer les échanges par présence de l'usager
|
||||||
|
presences: Présences
|
||||||
|
'Filtered by activity presence: only %presences%': 'Filtré par présence de l''usager: seulement %presences%'
|
||||||
|
|
||||||
aggregator:
|
aggregator:
|
||||||
|
person:
|
||||||
|
by_person:
|
||||||
|
title: Grouper les échanges par usager (dossier d'usager dans lequel l'échange est enregistré)
|
||||||
|
person: Usager
|
||||||
acp:
|
acp:
|
||||||
by_activity_type:
|
by_activity_type:
|
||||||
title: Grouper les parcours par type d'échange
|
title: Grouper les parcours par type d'échange
|
||||||
@ -421,6 +445,9 @@ export:
|
|||||||
by_persons:
|
by_persons:
|
||||||
Group activity by persons: Grouper les échanges par usager participant
|
Group activity by persons: Grouper les échanges par usager participant
|
||||||
Persons: Usagers participants
|
Persons: Usagers participants
|
||||||
|
by_activity_presence:
|
||||||
|
Group activity by presence: Grouper les échanges par présence de l'usager
|
||||||
|
header: Présence de(s) usager(s)
|
||||||
|
|
||||||
generic_doc:
|
generic_doc:
|
||||||
filter:
|
filter:
|
||||||
|
@ -13,4 +13,6 @@ namespace Chill\AsideActivityBundle;
|
|||||||
|
|
||||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||||
|
|
||||||
class ChillAsideActivityBundle extends Bundle {}
|
class ChillAsideActivityBundle extends Bundle
|
||||||
|
{
|
||||||
|
}
|
||||||
|
@ -20,7 +20,9 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
|
|
||||||
final class AsideActivityController extends CRUDController
|
final class AsideActivityController extends CRUDController
|
||||||
{
|
{
|
||||||
public function __construct(private readonly AsideActivityCategoryRepository $categoryRepository) {}
|
public function __construct(private readonly AsideActivityCategoryRepository $categoryRepository)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function createEntity(string $action, Request $request): object
|
public function createEntity(string $action, Request $request): object
|
||||||
{
|
{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user