Compare commits

..

1 Commits

Author SHA1 Message Date
b19a1ba53b Update bootstrap to version 5.3.0 2023-11-29 10:22:43 +01:00
992 changed files with 2416 additions and 7702 deletions

View File

@@ -0,0 +1,5 @@
kind: Fixed
body: 'Export: fix list person with custom fields'
time: 2023-11-27T21:01:38.260730706+01:00
custom:
Issue: ""

View File

@@ -1,5 +0,0 @@
## 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

View File

@@ -1,11 +0,0 @@
## 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

View File

@@ -1,5 +0,0 @@
## 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

View File

@@ -1,5 +0,0 @@
## 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.

View File

@@ -1,15 +0,0 @@
## v2.16.0 - 2024-02-08
### Feature
* ([#231](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/231)) Create new filter for persons having a participation in an accompanying period during a certain time span
* ([#241](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/241)) [Export][List of accompanyign period] Add two columns: the list of persons participating to the period, and their ids
* ([#244](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/244)) Add capability to generate export about change of steps of accompanying period, and generate exports for this
* ([#253](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/253)) Export: group accompanying period by person participating
* ([#243](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/243)) Export: add filter for courses not linked to a reference address
* ([#229](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/229)) Allow to group activities linked with accompanying period by reason
* ([#115](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/115)) Prevent social work to be saved when another user edited conccurently the social work
* Modernize the event bundle, with some new fields and multiple improvements
### Fixed
* ([#220](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/220)) Fix error in logs about wrong typing of eventArgs in onEditNotificationComment method
* ([#256](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/256)) Fix the conditions upon which social actions should be optional or required in relation to social issues within the activity creation form
### UX
* ([#260](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/260)) Order list of centers alphabetically in dropdown 'user' section admin.

View File

@@ -1,3 +0,0 @@
## v2.16.1 - 2024-02-09
### Fixed
* Force bootstrap version to avoid error in builds with newer version

View File

@@ -34,8 +34,6 @@ variables:
DEFAULT_CARRIER_CODE: BE DEFAULT_CARRIER_CODE: BE
# force a timezone # force a timezone
TZ: Europe/Brussels TZ: Europe/Brussels
# avoid direct deprecations (using symfony phpunit bridge: https://symfony.com/doc/4.x/components/phpunit_bridge.html#internal-deprecations
SYMFONY_DEPRECATIONS_HELPER: max[total]=99999999&max[self]=0&max[direct]=0&verbose=0
stages: stages:
- Composer install - Composer install
@@ -53,7 +51,7 @@ build:
paths: paths:
- .cache/ - .cache/
artifacts: artifacts:
expire_in: 1 day expire_in: 30 min
paths: paths:
- bin - bin
- vendor/ - vendor/
@@ -67,7 +65,7 @@ code_style:
paths: paths:
- .cache/ - .cache/
artifacts: artifacts:
expire_in: 1 day expire_in: 30 min
paths: paths:
- bin - bin
- vendor/ - vendor/
@@ -81,7 +79,7 @@ phpstan_tests:
paths: paths:
- .cache/ - .cache/
artifacts: artifacts:
expire_in: 1 day expire_in: 30 min
paths: paths:
- bin - bin
- vendor/ - vendor/
@@ -96,7 +94,7 @@ rector_tests:
paths: paths:
- .cache/ - .cache/
artifacts: artifacts:
expire_in: 1 day expire_in: 30 min
paths: paths:
- bin - bin
- vendor/ - vendor/
@@ -123,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: 1 day expire_in: 30 min
paths: paths:
- bin - bin
- vendor/ - vendor/

View File

@@ -1,14 +1,10 @@
--- ---
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

View File

@@ -6,56 +6,6 @@ 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.16.1 - 2024-02-09
### Fixed
* Force bootstrap version to avoid error in builds with newer version
## v2.16.0 - 2024-02-08
### Feature
* ([#231](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/231)) Create new filter for persons having a participation in an accompanying period during a certain time span
* ([#241](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/241)) [Export][List of accompanyign period] Add two columns: the list of persons participating to the period, and their ids
* ([#244](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/244)) Add capability to generate export about change of steps of accompanying period, and generate exports for this
* ([#253](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/253)) Export: group accompanying period by person participating
* ([#243](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/243)) Export: add filter for courses not linked to a reference address
* ([#229](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/229)) Allow to group activities linked with accompanying period by reason
* ([#115](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/115)) Prevent social work to be saved when another user edited conccurently the social work
* Modernize the event bundle, with some new fields and multiple improvements
### Fixed
* ([#220](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/220)) Fix error in logs about wrong typing of eventArgs in onEditNotificationComment method
* ([#256](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/256)) Fix the conditions upon which social actions should be optional or required in relation to social issues within the activity creation form
### UX
* ([#260](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/260)) Order list of centers alphabetically in dropdown 'user' section admin.
## 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 ## v2.14.0 - 2023-11-24
### Feature ### 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 * ([#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

View File

@@ -27,7 +27,7 @@ To compile this documentation :
Contribute Contribute
=========== ===========
Issue tracker : https://gitlab.com/Chill-Projet/chill-bundles/-/issues Issue tracker : https://git.framasoft.org/groups/Chill-project/issues
Licence Licence
======= =======

View File

@@ -1,7 +1,6 @@
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

View File

@@ -48,8 +48,8 @@ Clone or download the chill-skeleton project and `cd` into the main directory.
.. code-block:: bash .. code-block:: bash
git clone https://gitea.champs-libres.be/Chill-project/chill-skeleton-basic.git git clone https://gitlab.com/Chill-Projet/chill-skeleton-basic.git
cd chill-skeleton-basic cd chill-app
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.

View File

@@ -5,74 +5,72 @@ Add condition with distinct alias on each export join clauses (Indicators + Filt
These are alias conventions : These are alias conventions :
| Entity | Join | Attribute | Alias | | Entity | Join | Attribute | Alias |
|:----------------------------------------|:----------------------------------------|:-------------------------------------------|:-------------------------------------------| |:----------------------------------------|:----------------------------------------|:-------------------------------------------|:---------------------------------------|
| AccompanyingPeriodStepHistory::class | | | acpstephistory (contexte ACP_STEP_HISTORY) | | AccompanyingPeriod::class | | | acp |
| | AccompanyingPeriod::class | acpstephistory.period | acp | | | AccompanyingPeriodWork::class | acp.works | acpw |
| AccompanyingPeriod::class | | | acp | | | AccompanyingPeriodParticipation::class | acp.participations | acppart |
| | AccompanyingPeriodWork::class | acp.works | acpw | | | Location::class | acp.administrativeLocation | acploc |
| | AccompanyingPeriodParticipation::class | acp.participations | acppart | | | ClosingMotive::class | acp.closingMotive | acpmotive |
| | Location::class | acp.administrativeLocation | acploc | | | UserJob::class | acp.job | acpjob |
| | ClosingMotive::class | acp.closingMotive | acpmotive | | | Origin::class | acp.origin | acporigin |
| | UserJob::class | acp.job | acpjob | | | Scope::class | acp.scopes | acpscope |
| | Origin::class | acp.origin | acporigin | | | SocialIssue::class | acp.socialIssues | acpsocialissue |
| | Scope::class | acp.scopes | acpscope | | | User::class | acp.user | acpuser |
| | SocialIssue::class | acp.socialIssues | acpsocialissue | | | AccompanyingPeriopStepHistory::class | acp.stepHistories | acpstephistories |
| | User::class | acp.user | acpuser | | | AccompanyingPeriodInfo::class | not existing (using custom WITH clause) | acpinfo |
| | AccompanyingPeriopStepHistory::class | acp.stepHistories | acpstephistories | | AccompanyingPeriodWork::class | | | acpw |
| | AccompanyingPeriodInfo::class | not existing (using custom WITH clause) | acpinfo | | | AccompanyingPeriodWorkEvaluation::class | acpw.accompanyingPeriodWorkEvaluations | workeval |
| AccompanyingPeriodWork::class | | | acpw | | | SocialAction::class | acpw.socialAction | acpwsocialaction |
| | AccompanyingPeriodWorkEvaluation::class | acpw.accompanyingPeriodWorkEvaluations | workeval | | | Goal::class | acpw.goals | goal |
| | SocialAction::class | acpw.socialAction | acpwsocialaction | | | Result::class | acpw.results | result |
| | Goal::class | acpw.goals | goal | | AccompanyingPeriodParticipation::class | | | acppart |
| | Result::class | acpw.results | result | | | Person::class | acppart.person | partperson |
| AccompanyingPeriodParticipation::class | | | acppart | | AccompanyingPeriodWorkEvaluation::class | | | workeval |
| | Person::class | acppart.person | partperson | | | Evaluation::class | workeval.evaluation | eval |
| AccompanyingPeriodWorkEvaluation::class | | | workeval | | AccompanyingPeriodInfo::class | | | acpinfo |
| | Evaluation::class | workeval.evaluation | eval | | | User::class | acpinfo.user | acpinfo_user |
| AccompanyingPeriodInfo::class | | | acpinfo | | Goal::class | | | goal |
| | User::class | acpinfo.user | acpinfo_user | | | Result::class | goal.results | goalresult |
| Goal::class | | | goal | | Person::class | | | person |
| | Result::class | goal.results | goalresult | | | Center::class | person.center | center |
| Person::class | | | person | | | HouseholdMember::class | partperson.householdParticipations | householdmember |
| | Center::class | person.center | center | | | MaritalStatus::class | person.maritalStatus | personmarital |
| | HouseholdMember::class | partperson.householdParticipations | householdmember | | | VendeePerson::class | | vp |
| | MaritalStatus::class | person.maritalStatus | personmarital | | | VendeePersonMineur::class | | vpm |
| | VendeePerson::class | | vp | | | CurrentPersonAddress::class | person.currentPersonAddress | currentPersonAddress (on a given date) |
| | VendeePersonMineur::class | | vpm | | ResidentialAddress::class | | | resaddr |
| | CurrentPersonAddress::class | person.currentPersonAddress | currentPersonAddress (on a given date) | | | ThirdParty::class | resaddr.hostThirdParty | tparty |
| ResidentialAddress::class | | | resaddr | | ThirdParty::class | | | tparty |
| | ThirdParty::class | resaddr.hostThirdParty | tparty | | | ThirdPartyCategory::class | tparty.categories | tpartycat |
| ThirdParty::class | | | tparty | | HouseholdMember::class | | | householdmember |
| | ThirdPartyCategory::class | tparty.categories | tpartycat | | | Household::class | householdmember.household | household |
| HouseholdMember::class | | | householdmember | | | Person::class | householdmember.person | memberperson |
| | Household::class | householdmember.household | household | | | | memberperson.center | membercenter |
| | Person::class | householdmember.person | memberperson | | Household::class | | | household |
| | | memberperson.center | membercenter | | | HouseholdComposition::class | household.compositions | composition |
| Household::class | | | household | | Activity::class | | | activity |
| | HouseholdComposition::class | household.compositions | composition | | | Person::class | activity.person | actperson |
| Activity::class | | | activity | | | AccompanyingPeriod::class | activity.accompanyingPeriod | acp |
| | Person::class | activity.person | actperson | | | Person::class | activity\_person\_having\_activity.person | person\_person\_having\_activity |
| | AccompanyingPeriod::class | activity.accompanyingPeriod | acp | | | ActivityReason::class | activity\_person\_having\_activity.reasons | reasons\_person\_having\_activity |
| | Person::class | activity\_person\_having\_activity.person | person\_person\_having\_activity | | | ActivityType::class | activity.activityType | acttype |
| | ActivityReason::class | activity\_person\_having\_activity.reasons | reasons\_person\_having\_activity | | | Location::class | activity.location | actloc |
| | ActivityType::class | activity.activityType | acttype | | | SocialAction::class | activity.socialActions | actsocialaction |
| | Location::class | activity.location | actloc | | | SocialIssue::class | activity.socialIssues | actsocialssue |
| | SocialAction::class | activity.socialActions | actsocialaction | | | ThirdParty::class | activity.thirdParties | acttparty |
| | SocialIssue::class | activity.socialIssues | actsocialssue | | | User::class | activity.user | actuser |
| | ThirdParty::class | activity.thirdParties | acttparty | | | User::class | activity.users | actusers |
| | User::class | activity.user | actuser | | | ActivityReason::class | activity.reasons | actreasons |
| | User::class | activity.users | actusers | | | Center::class | actperson.center | actcenter |
| | ActivityReason::class | activity.reasons | actreasons | | | Person::class | activity.createdBy | actcreator |
| | Center::class | actperson.center | actcenter | | ActivityReason::class | | | actreasons |
| | Person::class | activity.createdBy | actcreator | | | ActivityReasonCategory::class | actreason.category | actreasoncat |
| ActivityReason::class | | | actreasons | | Calendar::class | | | cal |
| | ActivityReasonCategory::class | actreason.category | actreasoncat | | | CancelReason::class | cal.cancelReason | calcancel |
| Calendar::class | | | cal | | | Location::class | cal.location | calloc |
| | CancelReason::class | cal.cancelReason | calcancel | | | User::class | cal.user | caluser |
| | Location::class | cal.location | calloc | | VendeePerson::class | | | vp |
| | User::class | cal.user | caluser | | | SituationProfessionelle::class | vp.situationProfessionelle | vpprof |
| VendeePerson::class | | | vp | | | StatutLogement::class | vp.statutLogement | vplog |
| | SituationProfessionelle::class | vp.situationProfessionelle | vpprof | | | TempsDeTravail::class | vp.tempsDeTravail | vptt |
| | StatutLogement::class | vp.statutLogement | vplog |
| | TempsDeTravail::class | vp.tempsDeTravail | vptt |

View File

@@ -15,7 +15,7 @@
"@symfony/webpack-encore": "^4.1.0", "@symfony/webpack-encore": "^4.1.0",
"@tsconfig/node14": "^1.0.1", "@tsconfig/node14": "^1.0.1",
"bindings": "^1.5.0", "bindings": "^1.5.0",
"bootstrap": "5.2.3", "bootstrap": "^5.3.0",
"chokidar": "^3.5.1", "chokidar": "^3.5.1",
"fork-awesome": "^1.1.7", "fork-awesome": "^1.1.7",
"jquery": "^3.6.0", "jquery": "^3.6.0",

View File

@@ -28,4 +28,3 @@ 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

View File

@@ -13,6 +13,4 @@ namespace Chill\ActivityBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillActivityBundle extends Bundle class ChillActivityBundle extends Bundle {}
{
}

View File

@@ -67,8 +67,7 @@ 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.
@@ -674,8 +673,8 @@ final class ActivityController extends AbstractController
throw $this->createNotFoundException('Accompanying Period not found'); throw $this->createNotFoundException('Accompanying Period not found');
} }
// TODO Add permission // TODO Add permission
// $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person); // $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
} else { } else {
throw $this->createNotFoundException('Person or Accompanying Period not found'); throw $this->createNotFoundException('Person or Accompanying Period not found');
} }

View File

@@ -56,7 +56,7 @@ class ActivityReasonCategoryController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository(ActivityReasonCategory::class)->find($id); $entity = $em->getRepository(\Chill\ActivityBundle\Entity\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(ActivityReasonCategory::class)->findAll(); $entities = $em->getRepository(\Chill\ActivityBundle\Entity\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(ActivityReasonCategory::class)->find($id); $entity = $em->getRepository(\Chill\ActivityBundle\Entity\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(ActivityReasonCategory::class)->find($id); $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');

View File

@@ -24,9 +24,7 @@ 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.
@@ -62,7 +60,7 @@ class ActivityReasonController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository(ActivityReason::class)->find($id); $entity = $em->getRepository(\Chill\ActivityBundle\Entity\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.');
@@ -117,7 +115,7 @@ class ActivityReasonController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository(ActivityReason::class)->find($id); $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReason entity.'); throw $this->createNotFoundException('Unable to find ActivityReason entity.');
@@ -137,7 +135,7 @@ class ActivityReasonController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository(ActivityReason::class)->find($id); $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReason entity.'); throw $this->createNotFoundException('Unable to find ActivityReason entity.');

View File

@@ -291,11 +291,7 @@ class ActivityType
public function checkSocialActionsVisibility(ExecutionContextInterface $context, mixed $payload) public function checkSocialActionsVisibility(ExecutionContextInterface $context, mixed $payload)
{ {
if ($this->socialIssuesVisible !== $this->socialActionsVisible) { if ($this->socialIssuesVisible !== $this->socialActionsVisible) {
// if social issues are invisible then social actions cannot be optional or required + if social issues are optional then social actions shouldn't be required if (!(2 === $this->socialIssuesVisible && 1 === $this->socialActionsVisible)) {
if (
(0 === $this->socialIssuesVisible && (1 === $this->socialActionsVisible || 2 === $this->socialActionsVisible))
|| (1 === $this->socialIssuesVisible && 2 === $this->socialActionsVisible)
) {
$context $context
->buildViolation('The socialActionsVisible value is not compatible with the socialIssuesVisible value') ->buildViolation('The socialActionsVisible value is not compatible with the socialIssuesVisible value')
->atPath('socialActionsVisible') ->atPath('socialActionsVisible')

View File

@@ -19,9 +19,7 @@ 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)
{ {

View File

@@ -31,8 +31,7 @@ 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)
{ {
@@ -57,7 +56,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
public function getLabels($key, array $values, mixed $data) public function getLabels($key, array $values, mixed $data)
{ {
return function (int|string|null $value): string { return function (null|int|string $value): string {
if ('_header' === $value) { if ('_header' === $value) {
return 'export.aggregator.acp.by_activity_type.activity_type'; return 'export.aggregator.acp.by_activity_type.activity_type';
} }

View File

@@ -20,9 +20,7 @@ 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
{ {

View File

@@ -20,9 +20,7 @@ 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
{ {

View File

@@ -20,13 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
final readonly class ActivityPresenceAggregator implements AggregatorInterface final readonly class ActivityPresenceAggregator implements AggregatorInterface
{ {
public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper) public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper) {}
{
}
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder) {}
{
}
public function getFormDefaultData(): array public function getFormDefaultData(): array
{ {
@@ -35,7 +31,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface
public function getLabels($key, array $values, mixed $data) public function getLabels($key, array $values, mixed $data)
{ {
return function (int|string|null $value): string { return function (null|int|string $value): string {
if ('_header' === $value) { if ('_header' === $value) {
return 'export.aggregator.activity.by_activity_presence.header'; return 'export.aggregator.activity.by_activity_presence.header';
} }

View File

@@ -22,9 +22,7 @@ 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
{ {
@@ -58,7 +56,7 @@ class ActivityTypeAggregator implements AggregatorInterface
public function getLabels($key, array $values, $data): \Closure public function getLabels($key, array $values, $data): \Closure
{ {
return function (int|string|null $value): string { return function (null|int|string $value): string {
if ('_header' === $value) { if ('_header' === $value) {
return 'Activity type'; return 'Activity type';
} }

View File

@@ -22,9 +22,7 @@ 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
{ {

View File

@@ -20,9 +20,7 @@ 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
{ {

View File

@@ -27,8 +27,7 @@ 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
{ {
@@ -66,9 +65,7 @@ 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
{ {

View File

@@ -27,8 +27,7 @@ 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
{ {
@@ -66,9 +65,7 @@ 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
{ {

View File

@@ -20,9 +20,7 @@ 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
{ {

View File

@@ -20,9 +20,7 @@ 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
{ {

View File

@@ -27,8 +27,7 @@ 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
{ {
@@ -66,9 +65,7 @@ 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
{ {

View File

@@ -27,8 +27,7 @@ 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
{ {
@@ -66,9 +65,7 @@ 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
{ {

View File

@@ -20,9 +20,7 @@ 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
{ {

View File

@@ -9,7 +9,7 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code. * the LICENSE file that was distributed with this source code.
*/ */
namespace Chill\ActivityBundle\Export\Aggregator; namespace Chill\ActivityBundle\Export\Aggregator\PersonAggregators;
use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Repository\ActivityReasonCategoryRepository; use Chill\ActivityBundle\Repository\ActivityReasonCategoryRepository;
@@ -25,12 +25,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
class ActivityReasonAggregator implements AggregatorInterface, ExportElementValidatedInterface class ActivityReasonAggregator implements AggregatorInterface, ExportElementValidatedInterface
{ {
public function __construct( public function __construct(protected ActivityReasonCategoryRepository $activityReasonCategoryRepository, protected ActivityReasonRepository $activityReasonRepository, protected TranslatableStringHelper $translatableStringHelper) {}
protected ActivityReasonCategoryRepository $activityReasonCategoryRepository,
protected ActivityReasonRepository $activityReasonRepository,
protected TranslatableStringHelper $translatableStringHelper
) {
}
public function addRole(): ?string public function addRole(): ?string
{ {
@@ -54,7 +49,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
// make a jointure only if needed // make a jointure only if needed
if (!\in_array('actreasons', $qb->getAllAliases(), true)) { if (!\in_array('actreasons', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.reasons', 'actreasons'); $qb->innerJoin('activity.reasons', 'actreasons');
} }
// join category if necessary // join category if necessary
@@ -65,12 +60,19 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
} }
} }
$qb->addGroupBy($alias); // add the "group by" part
$groupBy = $qb->getDQLPart('groupBy');
if (\count($groupBy) > 0) {
$qb->addGroupBy($alias);
} else {
$qb->groupBy($alias);
}
} }
public function applyOn(): string public function applyOn(): string
{ {
return Declarations::ACTIVITY; return Declarations::ACTIVITY_PERSON;
} }
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
@@ -92,9 +94,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
public function getFormDefaultData(): array public function getFormDefaultData(): array
{ {
return [ return [];
'level' => 'reasons',
];
} }
public function getLabels($key, array $values, $data) public function getLabels($key, array $values, $data)

View File

@@ -19,9 +19,7 @@ use Symfony\Component\Form\FormBuilderInterface;
final readonly class PersonAggregator implements AggregatorInterface final readonly class PersonAggregator implements AggregatorInterface
{ {
public function __construct(private LabelPersonHelper $labelPersonHelper) public function __construct(private LabelPersonHelper $labelPersonHelper) {}
{
}
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {

View File

@@ -25,9 +25,7 @@ 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)
{ {

View File

@@ -19,9 +19,7 @@ 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
{ {

View File

@@ -36,9 +36,7 @@ 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
{ {

View File

@@ -41,9 +41,7 @@ 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
{ {

View File

@@ -1,149 +0,0 @@
<?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,
];
}
}

View File

@@ -41,9 +41,7 @@ class CountPersonsOnActivity 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
{ {

View File

@@ -20,18 +20,22 @@ 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\Export\Helper\FilterListAccompanyingPeriodHelperInterface; use Chill\PersonBundle\Entity\Person\PersonCenterHistory;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
final readonly class ListActivity implements ListInterface, GroupedExportInterface class ListActivity implements ListInterface, GroupedExportInterface
{ {
private readonly bool $filterStatsByCenters;
public function __construct( public function __construct(
private ListActivityHelper $helper, private readonly ListActivityHelper $helper,
private EntityManagerInterface $entityManager, private readonly EntityManagerInterface $entityManager,
private TranslatableStringExportLabelHelper $translatableStringExportLabelHelper, private readonly TranslatableStringExportLabelHelper $translatableStringExportLabelHelper,
private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper, ParameterBagInterface $parameterBag,
) { ) {
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
} }
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
@@ -115,7 +119,19 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
->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');
$this->filterListAccompanyingPeriodHelper->addFilterAccompanyingPeriods($qb, $requiredModifiers, $acl, $data); if ($this->filterStatsByCenters) {
$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

View File

@@ -33,9 +33,7 @@ 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
{ {

View File

@@ -1,140 +0,0 @@
<?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,
];
}
}

View File

@@ -47,9 +47,7 @@ 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
{ {

View File

@@ -40,8 +40,7 @@ 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
{ {
@@ -75,9 +74,7 @@ class ListActivityHelper
->addGroupBy('location.id'); ->addGroupBy('location.id');
} }
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder) {}
{
}
public function getAllowedFormattersTypes() public function getAllowedFormattersTypes()
{ {

View File

@@ -15,24 +15,18 @@ 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;
final readonly class ActivityTypeFilter implements FilterInterface 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 ActivityTypeRepositoryInterface $activityTypeRepository, private readonly ActivityTypeRepositoryInterface $activityTypeRepository,
private TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatableStringHelperInterface $translatableStringHelper
private RollingDateConverterInterface $rollingDateConverter, ) {}
) {
}
public function addRole(): ?string public function addRole(): ?string
{ {
@@ -41,26 +35,13 @@ final readonly class ActivityTypeFilter implements FilterInterface
public function alterQuery(QueryBuilder $qb, $data) public function alterQuery(QueryBuilder $qb, $data)
{ {
$exists = self::BASE_EXISTS; $qb->andWhere(
$qb->expr()->exists(
if (count($data['accepted_activitytypes']) > 0) { 'SELECT 1 FROM '.Activity::class.' act_type_filter_activity
$exists .= ' AND act_type_filter_activity.activityType IN (:act_type_filter_activity_types)'; WHERE act_type_filter_activity.activityType IN (:act_type_filter_activity_types) AND act_type_filter_activity.accompanyingPeriod = acp'
$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()
@@ -79,27 +60,11 @@ final readonly 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
@@ -110,12 +75,8 @@ final readonly 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']),
]]; ]];
} }

View File

@@ -21,9 +21,7 @@ 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
{ {

View File

@@ -21,9 +21,7 @@ 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
{ {

View File

@@ -23,8 +23,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
{ {
public function __construct( public function __construct(
private RollingDateConverterInterface $rollingDateConverter, private RollingDateConverterInterface $rollingDateConverter,
) { ) {}
}
public function getTitle() public function getTitle()
{ {

View File

@@ -23,9 +23,7 @@ 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
{ {

View File

@@ -26,8 +26,7 @@ final readonly class ActivityPresenceFilter implements FilterInterface
public function __construct( public function __construct(
private TranslatableStringHelperInterface $translatableStringHelper, private TranslatableStringHelperInterface $translatableStringHelper,
private TranslatorInterface $translator private TranslatorInterface $translator
) { ) {}
}
public function getTitle() public function getTitle()
{ {

View File

@@ -27,8 +27,7 @@ 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
{ {

View File

@@ -20,9 +20,7 @@ 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
{ {

View File

@@ -20,9 +20,7 @@ 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
{ {

View File

@@ -32,8 +32,7 @@ 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
{ {

View File

@@ -27,8 +27,7 @@ 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
{ {

View File

@@ -28,9 +28,7 @@ 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
{ {

View File

@@ -21,9 +21,7 @@ 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
{ {

View File

@@ -26,9 +26,7 @@ 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
{ {

View File

@@ -32,8 +32,7 @@ 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
{ {

View File

@@ -26,9 +26,7 @@ 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
{ {

View File

@@ -29,9 +29,7 @@ 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
{ {

View File

@@ -21,9 +21,7 @@ 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
{ {

View File

@@ -28,8 +28,7 @@ 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
{ {

View File

@@ -30,8 +30,7 @@ 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
{ {

View File

@@ -183,7 +183,6 @@ 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()),
@@ -405,7 +404,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', [AccompanyingPeriod::class, 'null']); ->setAllowedTypes('accompanyingPeriod', [\Chill\PersonBundle\Entity\AccompanyingPeriod::class, 'null']);
} }
public function getBlockPrefix(): string public function getBlockPrefix(): string

View File

@@ -25,9 +25,7 @@ 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)
{ {

View File

@@ -28,8 +28,7 @@ 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)
{ {

View File

@@ -23,9 +23,7 @@ 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)
{ {

View File

@@ -20,9 +20,7 @@ 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)
{ {

View File

@@ -23,9 +23,7 @@ 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)
{ {

View File

@@ -20,9 +20,7 @@ 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)
{ {

View File

@@ -23,13 +23,11 @@ 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 Person $person */ /** @var \Chill\PersonBundle\Entity\Person $person */
$person = $parameters['person']; $person = $parameters['person'];
if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) { if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) {

View File

@@ -18,9 +18,7 @@ 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
{ {

View File

@@ -44,8 +44,7 @@ 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

View File

@@ -33,17 +33,16 @@ 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
{ {
$query = $this->buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext($person, $startDate, $endDate, $content); $query = $this->buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext($person, $startDate, $endDate, $content);
return $this->addFetchQueryByPersonACL($query, $person); return $this->addFetchQueryByPersonACL($query, $person);
} }
public function buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery public function buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery
{ {
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
$activityMetadata = $this->em->getClassMetadata(Activity::class); $activityMetadata = $this->em->getClassMetadata(Activity::class);
@@ -72,7 +71,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
return $this->addWhereClauses($query, $startDate, $endDate, $content); return $this->addWhereClauses($query, $startDate, $endDate, $content);
} }
public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery
{ {
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
$activityMetadata = $this->em->getClassMetadata(Activity::class); $activityMetadata = $this->em->getClassMetadata(Activity::class);
@@ -123,7 +122,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
return $this->addWhereClauses($query, $startDate, $endDate, $content); return $this->addWhereClauses($query, $startDate, $endDate, $content);
} }
private function addWhereClauses(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery private function addWhereClauses(FetchQuery $query, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery
{ {
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);

View File

@@ -25,12 +25,12 @@ interface ActivityDocumentACLAwareRepositoryInterface
* *
* This method must check the rights to see a document: the user must be allowed to see the given activities * This method must check the rights to see a document: the user must be allowed to see the given activities
*/ */
public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface; public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface;
/** /**
* Return a fetch query for querying document's activities for an activity in accompanying periods, but for a given person. * Return a fetch query for querying document's activities for an activity in accompanying periods, but for a given person.
* *
* This method must check the rights to see a document: the user must be allowed to see the given accompanying periods * This method must check the rights to see a document: the user must be allowed to see the given accompanying periods
*/ */
public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery; public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery;
} }

View File

@@ -34,7 +34,7 @@ class ActivityPresenceRepository implements ActivityPresenceRepositoryInterface
return $this->repository->findAll(); return $this->repository->findAll();
} }
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array
{ {
return $this->findBy($criteria, $orderBy, $limit, $offset); return $this->findBy($criteria, $orderBy, $limit, $offset);
} }

View File

@@ -25,7 +25,7 @@ interface ActivityPresenceRepositoryInterface
/** /**
* @return array|ActivityPresence[] * @return array|ActivityPresence[]
*/ */
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array; public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array;
public function findOneBy(array $criteria): ?ActivityPresence; public function findOneBy(array $criteria): ?ActivityPresence;

View File

@@ -48,7 +48,7 @@ final class ActivityTypeRepository implements ActivityTypeRepositoryInterface
/** /**
* @return array|ActivityType[] * @return array|ActivityType[]
*/ */
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array
{ {
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
} }

View File

@@ -51,8 +51,7 @@ 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
{ {

View File

@@ -56,8 +56,7 @@ 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
{ {

View File

@@ -34,10 +34,9 @@ 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
{ {
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
$activityMetadata = $this->em->getClassMetadata(Activity::class); $activityMetadata = $this->em->getClassMetadata(Activity::class);
@@ -100,7 +99,7 @@ final readonly class AccompanyingPeriodActivityGenericDocProvider implements Gen
return $this->security->isGranted(AccompanyingPeriodVoter::SEE, $person); return $this->security->isGranted(AccompanyingPeriodVoter::SEE, $person);
} }
public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface
{ {
return $this->activityDocumentACLAwareRepository return $this->activityDocumentACLAwareRepository
->buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext($person, $startDate, $endDate, $content); ->buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext($person, $startDate, $endDate, $content);

View File

@@ -25,10 +25,9 @@ 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
{ {
return $this->personActivityDocumentACLAwareRepository->buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext( return $this->personActivityDocumentACLAwareRepository->buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(
$person, $person,

View File

@@ -20,9 +20,7 @@ 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
{ {

View File

@@ -310,7 +310,7 @@ final class ActivityControllerTest extends WebTestCase
} }
/** /**
* @return ActivityType * @return \Chill\ActivityBundle\Entity\ActivityType
*/ */
private function getRandomActivityType() private function getRandomActivityType()
{ {

View File

@@ -9,10 +9,10 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code. * the LICENSE file that was distributed with this source code.
*/ */
namespace Chill\ActivityBundle\Tests\Export\Aggregator; namespace Chill\ActivityBundle\Tests\Export\Aggregator\PersonAggregators;
use Chill\ActivityBundle\Entity\Activity; use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Export\Aggregator\ActivityReasonAggregator; use Chill\ActivityBundle\Export\Aggregator\PersonAggregators\ActivityReasonAggregator;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest; use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\PhpUnit\ProphecyTrait;
@@ -33,14 +33,14 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest
self::bootKernel(); self::bootKernel();
$this->aggregator = self::$container->get(ActivityReasonAggregator::class); $this->aggregator = self::$container->get(ActivityReasonAggregator::class);
/*
$request = $this->prophesize()
->willExtend(\Symfony\Component\HttpFoundation\Request::class);
$request->getLocale()->willReturn('fr'); $request = $this->prophesize()
->willExtend(\Symfony\Component\HttpFoundation\Request::class);
self::$container->get('request_stack') $request->getLocale()->willReturn('fr');
->push($request->reveal());*/
self::$container->get('request_stack')
->push($request->reveal());
} }
public function getAggregator() public function getAggregator()
@@ -65,12 +65,7 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest
return [ return [
$em->createQueryBuilder() $em->createQueryBuilder()
->select('count(activity.id)') ->select('count(activity.id)')
->from(Activity::class, 'activity') ->from(Activity::class, 'activity'),
->join('activity.person', 'person'),
$em->createQueryBuilder()
->select('count(activity.id)')
->from(Activity::class, 'activity')
->join('activity.accompanyingPeriod', 'accompanyingPeriod'),
$em->createQueryBuilder() $em->createQueryBuilder()
->select('count(activity.id)') ->select('count(activity.id)')
->from(Activity::class, 'activity') ->from(Activity::class, 'activity')

View File

@@ -1,60 +0,0 @@
<?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,
],
];
}
}

View File

@@ -1,59 +0,0 @@
<?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,
],
];
}
}

View File

@@ -13,7 +13,6 @@ 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;
@@ -56,30 +55,8 @@ 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,
]; ];
} }

View File

@@ -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(Request::class); ->willExtend(\Symfony\Component\HttpFoundation\Request::class);
$request->getLocale()->willReturn('fr'); $request->getLocale()->willReturn('fr');

View File

@@ -58,7 +58,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase
$this->assertTrue($form->isSynchronized()); $this->assertTrue($form->isSynchronized());
$this->assertInstanceOf( $this->assertInstanceOf(
ActivityType::class, \Chill\ActivityBundle\Entity\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 ActivityType * @return \Chill\ActivityBundle\Entity\ActivityType
*/ */
protected function getRandomType(mixed $active = true) protected function getRandomType(mixed $active = true)
{ {

View File

@@ -157,7 +157,7 @@ final class ActivityVoterTest extends KernelTestCase
* *
* @return \Symfony\Component\Security\Core\Authentication\Token\TokenInterface * @return \Symfony\Component\Security\Core\Authentication\Token\TokenInterface
*/ */
protected function prepareToken(?User $user = null) protected function prepareToken(User $user = null)
{ {
$token = $this->prophet->prophesize(); $token = $this->prophet->prophesize();
$token $token

View File

@@ -20,14 +20,6 @@ services:
tags: tags:
- { name: chill.export, alias: 'count_person_on_activity' } - { 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:
@@ -153,7 +145,7 @@ services:
## Aggregators ## Aggregators
Chill\ActivityBundle\Export\Aggregator\ActivityReasonAggregator: Chill\ActivityBundle\Export\Aggregator\PersonAggregators\ActivityReasonAggregator:
tags: tags:
- { name: chill.export_aggregator, alias: activity_reason_aggregator } - { name: chill.export_aggregator, alias: activity_reason_aggregator }

View File

@@ -3,12 +3,7 @@ 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: >-

View File

@@ -337,14 +337,6 @@ export:
title: Nombre d'usagers concernés par les échanges 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. 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 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
@@ -379,10 +371,7 @@ 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:
'activity after': Échanges après le '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 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

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