Compare commits

...

195 Commits

Author SHA1 Message Date
9eb571549b Prepare for release 2.20.0 2024-06-05 16:21:11 +02:00
db8257d230 Merge branch '170-export-action-referrer' into 'master'
Resolve "Dans la liste des évaluations et la liste des actions, il n'y a pas le nom des référents de l'action"

Closes #170

See merge request Chill-Projet/chill-bundles!695
2024-06-05 14:08:05 +00:00
bce93efe83 Resolve "Dans la liste des évaluations et la liste des actions, il n'y a pas le nom des référents de l'action" 2024-06-05 14:08:05 +00:00
06401af801 Merge branch '145-permettre-de-visualiser-les-documents-dans-libreoffice-en-utilisant-webdav' into 'master'
Add history to storedObject, instead of creating new stored object instances

Closes #145

See merge request Chill-Projet/chill-bundles!698
2024-06-04 20:37:36 +00:00
ea1d4c48f2 Add history support to StoredObject entity
This commit adds a history saving feature to the StoredObject entity, which allows saving versions of the object's changes over time. This is achieved by implementing a saveHistory method that captures data attributes like filename, IV, key information, and type. The corresponding Automated tests were also created. Furthermore, adjustments were made to the StoredObject test to align with the new feature.
2024-06-04 22:31:50 +02:00
nobohan
33cba27dd4 Translations: Added translations for choices of durations (> 5 hours) 2024-06-04 21:24:58 +02:00
27b0ec0ae7 Merge branch '145-permettre-de-visualiser-les-documents-dans-libreoffice-en-utilisant-webdav' into 'master'
Webdav access point to edit documents using LibreOffice

Closes #145

See merge request Chill-Projet/chill-bundles!592
2024-05-28 11:36:57 +00:00
9f141468c7 fix phpstan, cs, and rector rules 2024-05-28 13:23:54 +02:00
56d173046d fix phpstan, cs, and rector rules 2024-05-28 12:54:56 +02:00
059e4a0acd fixes for feature "refactor store object form widget" 2024-05-28 12:31:46 +02:00
111a21fcec Add new file for StoredObjectType tests and update class definitions
This commit adds a new file, StoredObjectTypeTest.php, to ChillDocStoreBundle Tests. It contains unit tests for the StoredObjectType class. Changes are also made in StoredObjectNormalizer and StoredObjectDataMapper classes, making JWTDavTokenProviderInterface and UrlGeneratorInterface as readonly in StoredObjectNormalizer and removing unnecessary EntityManagerInterface and debug commands on StoredObjectDataMapper. These changes improve test coverage and optimize the code for better performance.
2024-05-28 12:08:02 +02:00
775535e683 refactor file drop widget 2024-05-28 11:25:59 +02:00
47a928a6cd Add DAV edit link to StoredObject serialization
Enabled the adding of access link, specifically DAV edit link to the JSON serialization of the StoredObject entity. The patch also adjusted the serializer groups of various attributes of StoredObject from "read, write" to "write". Lastly, these changes were reflected in the accompanying CourseWork Controller and the FormEvaluation Vue component.
2024-05-23 18:25:20 +02:00
0dd58cebec optional parameter after the required one 2024-05-23 17:00:46 +02:00
4cff706306 Apply new CS rules on the webdav feature 2024-05-23 17:00:46 +02:00
fca929f56f Dav: add UI to edit document 2024-05-23 17:00:46 +02:00
8d44bb2c32 Dav: add some documentation on classes 2024-05-23 17:00:46 +02:00
a57e6c0cc9 Dav: Introduce access control inside de dav controller 2024-05-23 17:00:45 +02:00
3fe870ba71 Dav: refactor WebdavController 2024-05-23 17:00:45 +02:00
6f6683f549 Dav: implements JWT extraction from the URL, and add the access_token in dav urls 2024-05-23 17:00:45 +02:00
146e0090fb Webdav: fully implements the controller and response
The controller is tested from real request scraped from apache mod_dav implementation. The requests were scraped using a wireshark-like tool. Those requests have been adapted to suit to our xml.
2024-05-23 17:00:42 +02:00
20291026fb release 2.19.0 2024-05-14 16:05:51 +02:00
85d6765178 Merge branch '266-event-bundle-graphic' into 'master'
Resolve "Module évenements: finaliser les bugs graphiques"

Closes #266

See merge request Chill-Projet/chill-bundles!692
2024-05-08 08:57:42 +00:00
30955752c3 fix pipeline and add changie 2024-05-08 10:28:14 +02:00
f7f7e1cb1d updated translation by changing translation in twig 2024-05-08 10:05:58 +02:00
651c455bdf added translation for No item 2024-05-08 10:05:49 +02:00
d50d067bf7 added button for moderators and fixed participant styling 2024-05-08 10:05:37 +02:00
46c647cbb7 fixed events width 2024-05-08 10:05:27 +02:00
da83b1e98c Merge branch '239-create-documents' into 'master'
239 - generated doc block moved to top page

See merge request Chill-Projet/chill-bundles!682
2024-05-07 14:30:16 +00:00
536c2622c7 239 - doc generation form added to top of doc list page when more than 5 documents 2024-05-07 14:30:16 +00:00
cb70c322a4 Merge branch '276-take-closing-date-on-period-when-export' into 'master'
Update geographical unit computation for closed periods in exports

Closes #276

See merge request Chill-Projet/chill-bundles!687
2024-04-29 13:44:42 +00:00
89c231de41 Update geographical unit computation for closed periods in exports
The geographical unit computation in the ChillPersonBundle now considers the closing date of an accompanying period when a person changes location. This provides more accurate statistics, especially in situations where the individual moved after the period closed. The changes also include refinements for the validFrom and validTo data within the AccompanyingCourseFilters and AccompanyingCourseAggregators.
2024-04-29 13:03:22 +02:00
c773f9c6db Update geographical unit filter for period's location
The geographical unit filter in the accompanying course filters now takes the period's location on the address into account. This enhancement was achieved by modifying the GeographicalUnitStatFilter class. As a result, the "filter accompanying period by geographical unit" option provides more accurate data.
2024-04-29 11:39:46 +02:00
4c05d1e026 Merge branch '197-fix-calendar-synchronisation-script' into 'master'
Make the script which subscribe to user calendars on ms-graph more tolerant to errors

Closes #197

See merge request Chill-Projet/chill-bundles!685
2024-04-26 12:04:44 +00:00
3e2ff463bc make the script which subscribe to user calendars on ms-graph more tolerant to errors
The script does not fails and exit when some calendar settings are not reachable
2024-04-26 13:56:24 +02:00
59005e83c4 Merge branch '270_do_not_display_eval_from_closed_period_in_homepage' into 'master'
Do not display evaluation from closed accompanying period on homepage

Closes #270

See merge request Chill-Projet/chill-bundles!676
2024-04-18 07:37:06 +00:00
juminet
ab6feef371 Do not display evaluation from closed accompanying period on homepage 2024-04-18 07:37:05 +00:00
8516e89c9c update docs to include import of countries which is necessary to be able to import addresses 2024-04-17 16:16:56 +02:00
4091efc72e Update bundles version to 2.18.2 2024-04-12 12:58:23 +02:00
b577bd7123 Merge branch '250-fix-import-postal-codes' into 'master'
Resolve "Import postal codes"

Closes #250

See merge request Chill-Projet/chill-bundles!672
2024-04-12 10:54:15 +00:00
dbb9feb129 rector correction: cast value to string 2024-04-12 12:35:52 +02:00
e8b95f8491 Add changie for fix import postal codes 2024-04-11 16:45:43 +02:00
8de37a9ef3 Fix import of postal codes. URL changed + names of keys 2024-04-11 16:45:22 +02:00
8fd6986c47 Release 2.18.1 2024-03-26 22:10:18 +01:00
807f1b4aa1 Fix layout in admin document generation
A layout issue in the admin document generation has been fixed, particularly in the ChillDocGeneratorBundle. Unnecessary elements such as table headers and multiple entity data rows in DocGeneratorTemplate have been removed, simplifying the view page and improving its performance.
2024-03-26 22:10:01 +01:00
f3002631ea Release 2.18.0 2024-03-26 18:10:18 +01:00
9e667d4de4 Merge branch '268-improve-ux-when-configuring-documents' into 'master'
Improve admin UX for configuration of document template (document generation)

Closes #268

See merge request Chill-Projet/chill-bundles!670
2024-03-26 17:06:49 +00:00
fc88a5f40d Improve admin UX for configuration of document template (document generation) 2024-03-26 17:06:49 +00:00
9ff7aef3fc Merge branch '267-Fix-the-join-with-the-user-list' into 'master'
Fix the join in the user list (admin): show only current user job

Closes #267

See merge request Chill-Projet/chill-bundles!669
2024-03-20 12:34:13 +00:00
4f08019618 Fix the join in the user list (admin): show only current user job 2024-03-20 12:45:08 +01:00
2a58330832 Update v2.17.0.md: add missing changie line 2024-03-19 20:46:50 +00:00
a2cea3df02 Release 2.17.0 2024-03-19 21:00:38 +01:00
9ac43ecf5b Merge branch '238-custom-column-export-person' into 'master'
Liste des usagers: permettre d'ajouter des colonnes custom

Closes #238

See merge request Chill-Projet/chill-bundles!668
2024-03-19 19:59:38 +00:00
f78f5e8419 Fix cs with php-cs-fixer version 3.52 2024-03-19 20:49:39 +01:00
ccf3324bc2 Refactor ListPersonHelper and ListPerson to simplify process and allow to add customization of fields 2024-03-19 20:49:39 +01:00
dfe780f0f5 Merge branch '258-centers-parcours-export' into 'master'
In the accompanying period list, add person's centers and duration

Closes #258

See merge request Chill-Projet/chill-bundles!661
2024-03-14 21:35:00 +00:00
dd056efa0d In the accompanying period list, add person's centers and duration 2024-03-14 21:35:00 +00:00
18c0b6a47f Merge branch '259-Génération-de-document-avoir-un-comportement-coherent' into 'master'
Fix activity filter inconsistency in document generation

Closes #259

See merge request Chill-Projet/chill-bundles!667
2024-03-14 20:25:59 +00:00
df0afcd228 Fix activity filter inconsistency in document generation
This commit resolves issue 259 where the filtering of activities differed within the document generation and in the list of activities for an accompanying period. This amendment to the Chill Activity Bundle ensures consistent behavior. Additionally, new test methods and query adjustments were applied to the ActivityACLAwareRepository for better functionality.
2024-03-14 21:16:05 +01:00
d66933c8b5 Merge branch '264-repair-loading-languages' into 'master'
Fix the command which load language

Closes #264

See merge request Chill-Projet/chill-bundles!666
2024-03-14 15:12:30 +00:00
0ff51b0a5c Force new parameter to be readonly in LoadAndUpdateLanguagesCommand constructor 2024-03-14 15:05:30 +00:00
d7f4895248 Fix the command which load language
The command load the languages in the configured languages in chill's configuration.
2024-03-14 15:46:32 +01:00
7aee722957 Merge branch '237-filter-evaluations-between-dates' into 'master'
Resolve "Nouveau filtre: Filtrer les actions ayant reçu une nouvelle évaluation créée entre deux dates"

Closes #237

See merge request Chill-Projet/chill-bundles!663
2024-03-08 10:37:44 +00:00
5880858191 Resolve "Nouveau filtre: Filtrer les actions ayant reçu une nouvelle évaluation créée entre deux dates" 2024-03-08 10:37:43 +00:00
96105b101f Merge branch 'issue159_page_acceuil' into 'master'
Allow users to display news on homepage (+ configuring a dashboard homepage)

See merge request Chill-Projet/chill-bundles!604
2024-03-07 21:08:00 +00:00
d29415317b Allow users to display news on homepage (+ configuring a dashboard homepage) 2024-03-07 21:08:00 +00:00
2ad3bbe96f Merge branch '00585-fix-deprecations-doctrine-2024-03' into 'master'
Fix deprecations and code style issues (2024-03-07)

See merge request Chill-Projet/chill-bundles!665
2024-03-07 14:33:58 +00:00
1d636f5e9e Fix deprecations and code style issues 2024-03-07 15:26:58 +01:00
f0dbb17172 Update exports.rst: fix typo 2024-03-06 11:40:19 +00:00
f1dbc17dad Merge branch 'Doc-why-use-exists-in-exports' into 'master'
Update documentation to explain use of EXISTS in SQL queries

See merge request Chill-Projet/chill-bundles!664
2024-03-06 11:36:01 +00:00
09578a775c Update documentation to explain use of EXISTS in SQL queries
Added an explanatory section to the "exports.rst" doc to clarify why to use an EXISTS subquery instead of a JOIN clause in SQL queries involving many-to-* relationships. This explanation includes sample SQL queries and results to illustrate the potential issue of duplicates with JOIN and count, and how EXISTS can help avoid this issue. Also updated the ".editorconfig" file for .rst files.
2024-03-06 12:34:36 +01:00
c888b5b84f Update chill bundles version to 2.16.3 2024-02-26 14:53:20 +01:00
27d76d9579 Merge branch '232-filters-uj-and-serv-order-alphabetical' into 'master'
Resolve "Filtres sur les données: classer par ordre alphabétique les items à sélectionner"

Closes #232

See merge request Chill-Projet/chill-bundles!662
2024-02-26 13:51:25 +00:00
5b714f17be order scopes alphabetically 2024-02-26 14:40:41 +01:00
bbb167bb85 order user jobs alphabetically when returning all active user jobs 2024-02-26 13:36:44 +01:00
d713087dcb Changie and php style fixes 2024-02-26 13:30:26 +01:00
569aeeef87 Fix wrong translation of user job service -> métier 2024-02-26 12:23:11 +01:00
97f2c75de8 Change syntax of check on null for closing motive 2024-02-21 20:14:18 +01:00
4a2078dc65 upgrade to 2.16.2 2024-02-21 19:49:43 +01:00
00444e1e56 Add check on null value in template for closing motive 2024-02-20 10:10:44 +01:00
f02c5bca13 release 2.16.1 2024-02-09 00:11:11 +01:00
0d56828ebd force boostrap version to 5.2.3 2024-02-09 00:10:26 +01:00
8b28667fe5 prepare release 2.16.0 2024-02-08 21:21:49 +01:00
72f73ec8e7 prepare release 2.16.0 2024-02-08 21:21:34 +01:00
b3d1320c94 Merge branch '149-150-events-improve' into 'master'
Modernisation fonctionnement module Evénement

Closes #149, #150, and #225

See merge request Chill-Projet/chill-bundles!621
2024-02-08 20:19:30 +00:00
2ed42e1a2c Fix cs with php-cs-fier version 3.49 2024-02-08 21:12:27 +01:00
d0e5ba16fe Merge branch 'issue115_social_action_versioning' into 'master'
Add versioning and optimistic locking on accompanying period work

Closes #115

See merge request Chill-Projet/chill-bundles!627
2024-02-08 20:02:05 +00:00
8e65ad9476 Add changie file 2024-02-08 21:01:53 +01:00
cf7338b690 Fix issues with inexisting fields 2024-02-08 21:00:16 +01:00
63dd71037a Add changie file 2024-02-08 14:33:30 +01:00
cc281762b3 Translate message on conflict in AccompanyingPeriodWorkEdit App 2024-02-08 14:33:30 +01:00
aa0cadfa84 Add conflict resolution for generated API + add test
Implemented additional code to handle version conflicts when editing accompanying period work. By keeping track of the current version and returning an HTTP conflict response when it doesn't match with the provided entity version, users are properly alerted to update their entity before continuing. Furthermore, adjusted BadRequestHttpException to match correct arguments order and introduced entity version as query parameter for the URL.

ensure kernel is shutdown after generating data
2024-02-08 14:33:30 +01:00
6e2cce9531 Event: add more fields: documents, organizationCost, note, and location 2024-02-08 12:59:52 +01:00
1fbbf2b2ad fixup! Fix migrations to take into account the change in table name for Person's entity 2024-02-08 12:59:52 +01:00
e586b8ee5e Event: move validation to annotation and add UniqueEntity constraint on Participation 2024-02-08 12:59:51 +01:00
6d04e477f8 Clean database, to avoid double participations on event 2024-02-08 12:59:51 +01:00
6b7b2ae522 fixup! Fix migrations to take into account the change in table name for Person's entity 2024-02-08 12:59:51 +01:00
9b9c2774ad Allow Pick*Type to submit the form when selection an entity, and apply inside Event 2024-02-08 12:59:50 +01:00
e902b6d409 Create a page which list events 2024-02-08 12:59:50 +01:00
d8bf6a195f add creation and update information on events and participation 2024-02-08 12:59:50 +01:00
7c3152f277 Fix migration when executed after the person entity table name change 2024-02-08 12:59:50 +01:00
cef218fed5 Add interface for pagination 2024-02-08 12:59:47 +01:00
930a76cc66 use a PickPersonDynamic type in event bundle 2024-02-08 12:57:17 +01:00
f11f7498d7 Add new option "as_id" to Pick*DynamicType
This option will make the app return a single id of the entity in data, and not the entity json.
2024-02-08 12:54:44 +01:00
1a9af6b0b1 activate Event Bundle in test app 2024-02-08 12:54:44 +01:00
d347f6ae60 Fix migrations to take into account the change in table name for Person's entity 2024-02-08 12:54:44 +01:00
3bb911b4d0 Update version within PUT request
Try to add api logic

check for version being the same instead of smaller

implementing optimistic locking and displaying correct message in frontend

rector fixes

adjust violation message and add translation in translation.yaml

add translator in apiController
2024-02-08 12:09:51 +01:00
f00b39980c Add version of the social action to the state
put correct serialization groups
2024-02-08 12:08:36 +01:00
09882bb4be Add translations that were missing according to console error 2024-02-08 12:08:35 +01:00
1d21499eab add version property to accompanyingperiodwork for optimistic locking 2024-02-08 12:08:35 +01:00
8ef001e67e Merge branch '260-order-centers-dropdown' into 'master'
Resolve "Mettre en ordre alphabétique la liste des centres dans le dropdown du section 'utilisateurs' dans l'admin"

Closes #260

See merge request Chill-Projet/chill-bundles!657
2024-02-08 10:33:09 +00:00
458df45fa5 Add changie 2024-02-08 11:22:48 +01:00
2b968b9a5b order centers dropdown alphabetically 2024-02-08 11:21:33 +01:00
f1fa4d415e Fix messages+intl-icu.fr.yaml file, which was altered during multiple git merge 2024-02-07 21:28:18 +01:00
2312a8d46f Merge branch '229-Export-des-échanges-on-doit-pouvoir-regrouper-par-sujet-des-échanges-aussi-dans-les-échanges-liés-au-parcours' into 'master'
Refactor ActivityReasonAggregator: can be applied also on export for activites linked with accompanying period

Closes #229

See merge request Chill-Projet/chill-bundles!656
2024-02-07 15:49:18 +00:00
67c3de733f Refactor ActivityReasonAggregator: can be applied also on export for Activities linked with accompanying period
This commit renames the ActivityReasonAggregator's namespace from PersonAggregators to Aggregator and modifies its methods. The join method in the query builder has been changed from innerJoin to leftJoin, 'group by' part is simplified, and the applyOn method now returns Declarations::ACTIVITY instead of Declarations::ACTIVITY_PERSON. Further modifications apply to the getFormDefaultData method and the corresponding test.
2024-02-07 16:47:33 +01:00
c05451bfe9 Update 'calc_date' field option in HasTemporaryLocationFilter.php
This commit makes the 'calc_date' field in HasTemporaryLocationFilter.php required. This field was previously optional; this change ensures that a calculation date is always provided when filtering accompanying courses by temporary location.
2024-02-07 16:38:41 +01:00
8be9fb6553 Merge branch '244-record-closing-motive-on-acc-period-closing' into 'master'
[Export] Ajout de la comptabilisation du nombre de changements de statuts du parcours

Closes #244

See merge request Chill-Projet/chill-bundles!650
2024-02-07 15:09:09 +00:00
f5f6eb78a2 fix incorrect merge of messages+intl-icu.fr.yaml 2024-02-07 16:00:55 +01:00
7a7e66146b Merge branch '240-add-filter-by-referrer-between-dates' into 'master'
[export] Add referrer on accompanying course filter between dates feature and relevant tests

Closes #240

See merge request Chill-Projet/chill-bundles!649
2024-02-07 14:41:07 +00:00
4bbad4fc61 fix cs with php-cs-fixer 3.49 2024-02-07 15:38:56 +01:00
86613a9be9 Add changie for the whole feature 2024-02-07 15:38:10 +01:00
21bd6478ad Add DI configuration for the export of period step history data within the ChillPersonBundle
This commit adds dependency injection configuration for the export of period step history data within the ChillPersonBundle. It specifically configures exports, filters, and aggregators, all related to the accompanying period step history. Additionally, it updates ChillPersonExtension to load this newly created configuration.
2024-02-07 15:38:10 +01:00
5849d8d670 fix typo 2024-02-07 15:38:10 +01:00
568ee079b5 Add ByClosingMotiveAggregator on AccompanyingPeriodStepHistory exports and corresponding tests
Added a new class ByClosingMotiveAggregator to the AccompanyingPeriodStepHistoryAggregators for grouping status changes by closing motive. This also includes a corresponding test class. Additionally, updated relevant translations in the messages.fr.yml file.
2024-02-07 15:38:09 +01:00
bf97b2a50c Add ByDateAggregator to AccompanyingPeriodStepHistoryAggregators
Implemented a new ByDateAggregator in the AccompanyingPeriodStepHistoryAggregators for grouping status changes by date. A corresponding test suite has been included to verify its function. Necessary translations have also been updated.
2024-02-07 15:38:09 +01:00
01785ed494 Add ByStepAggregator to AccompanyingPeriodStepHistoryAggregators
Added a new ByStepAggregator to the AccompanyingPeriodStepHistoryAggregators, allowing to group status changes in the course by step. The corresponding test suite ensures the correct operation of this new class. Updates in the translations file have also been made as part of this addition.
2024-02-07 15:38:09 +01:00
97d401b7f6 Implement ByStepFilter for AccompanyingPeriodStepHistoryFilters and its tests
A new feature has been added, the ByStepFilter, to the Chill project. The ByStepFilter provides a way to filter data in AccompanyingPeriodStepHistoryFilters based on certain steps. In addition, a new test suite has been introduced to ensure the correct functionality of this filter. The necessary translations for completing this feature have also been included.
2024-02-07 15:38:09 +01:00
44ccfe92b6 Add ByDateFilter and its test for AccompanyingPeriodStepHistoryFilters
A new filter called ByDateFilter has been added under AccompanyingPeriodStepHistoryFilters. This filter allows users to filter data based on a date range on the start date. Corresponding unit tests for ByDateFilter are included in this commit. Both English and French translations for the new filter are also added.
2024-02-07 15:38:07 +01:00
b6ea857389 Add AccompanyingCourseStepHistory counting capabilities
The newly created CountAccompanyingCourseStepHistory class counts changes in AccompanyingPeriod status. Corresponding test file ensures the correct functionality. Supporting translations and necessary export declarations have been added to facilitate this change.
2024-02-07 15:35:44 +01:00
f8840d89bf Add capability to store closing motive when closing accompanying period
The commit introduces new functionality in the bundle that allows storing the closing motive when a course is closed. This is achieved by modifying the model and database schema to include a new `closingMotive` field in AccompanyingPeriodStepHistory entity.
2024-02-07 15:35:44 +01:00
813f2f1e12 Fix call within DI for referrer filter test 2024-02-07 15:34:33 +01:00
4a15a89102 [export] Add referrer on accompanying course filter between dates feature and relevant tests
Implemented a new filter to the software for social workers. This filter, ReferrerFilterBetweenDates, enables filtering of query results based on a range of dates and accepted referrers. Tests for this new functionality have also been added to ensure the feature works as expected.
2024-02-07 15:31:48 +01:00
c707a34f16 [export] Add referrer on accompanying course filter between dates feature and relevant tests
Implemented a new filter to the software for social workers. This filter, ReferrerFilterBetweenDates, enables filtering of query results based on a range of dates and accepted referrers. Tests for this new functionality have also been added to ensure the feature works as expected.
2024-02-07 15:31:45 +01:00
0c9010f065 Merge branch '242-export-add-filter-course-having-temporary-location' into 'master'
Add HasTemporaryLocationFilter test and update filter parameters

Closes #242

See merge request Chill-Projet/chill-bundles!645
2024-02-07 13:35:52 +00:00
3871299346 Merge branch '256_activity_form_admin' into 'master'
Fix activity form admin bug

See merge request Chill-Projet/chill-bundles!651
2024-02-07 13:30:59 +00:00
e2e0b08210 Add HasTemporaryLocationFilter test and update filter parameters
A new test HasTemporaryLocationFilterTest has been added under ChillPersonBundle. This test mainly focuses on checking the filter functionalities related to temporary locations. In addition, the 'having_temporarily' parameter has been added to 'calc_date' field in HasTemporaryLocationFilter class.
2024-02-07 14:28:24 +01:00
4df0542932 Merge branch 'issue220_fix_notification_event_error' into 'master'
Fix typing of doctrine events on Notification

Closes #220

See merge request Chill-Projet/chill-bundles!626
2024-02-07 13:23:54 +00:00
13854e59de Add grouping parenthesis on condition about social issue and social action visibility
This improve readability and avoid errors with boolean operator precedence
2024-02-07 14:22:28 +01:00
574ad42a76 Add changie for fix in activity entity/form 2024-02-07 14:22:28 +01:00
4736fca679 Fix the conditions upon which social actions should be optional or required in relation to social issues within the activity creation form 2024-02-07 14:22:27 +01:00
32ae2f8f0d Add a separate method for onPersist, use same private resetCache method 2024-02-07 13:55:31 +01:00
d58c0a867d add changie 2024-02-07 13:55:30 +01:00
15f8432ce0 Use PostUpdateEventArgs typing instead of PostPersistEventArgs 2024-02-07 13:55:29 +01:00
ae7637acc6 Merge branch '243-missing-filter-acc-period-not-associated-with-address-reference' into 'master'
Add filter for courses not linked to a reference address

Closes #243

See merge request Chill-Projet/chill-bundles!655
2024-02-07 12:45:12 +00:00
ce391a6de8 Merge branch '241-export-list-acc-period-add-column-persons' into 'master'
[Export][List of accompanying periods] Add a column with a list of persons, names and ids

Closes #241

See merge request Chill-Projet/chill-bundles!647
2024-02-07 12:40:57 +00:00
950835c10b Add filter for courses not linked to a reference address
This commit introduces a new filter to the Accompanying Course section. It allows users to filter for courses that are not associated with a reference address. The accompanying test and translation changes are also included in this update.
2024-02-07 13:38:15 +01:00
9ba557a5bf Merge branch '253-group-course-by-person' into 'master'
Export: group accompanying period by person participating

Closes #253

See merge request Chill-Projet/chill-bundles!653
2024-02-07 12:32:52 +00:00
439fecd69f fix cs 2024-02-07 13:25:49 +01:00
f02168950f Export: group accompanying period by person participating 2024-02-07 13:16:07 +01:00
58c2235b88 Merge branch 'issue231_person_with_participation_filter' into 'master'
Add WithParticipationBetweenDatesFilter to ChillPersonBundle

See merge request Chill-Projet/chill-bundles!639
2024-02-07 10:54:30 +00:00
42c5577027 Merge branch 'upgrade-php-cs-3.49' into 'master'
Upgrade php-cs 3.49

See merge request Chill-Projet/chill-bundles!654
2024-02-07 09:57:20 +00:00
036fe8d6f8 upgrade php-cs 3.49 2024-02-07 10:43:53 +01:00
51ebc253aa fix url of the base skeleton 2024-01-24 15:07:24 +00:00
4fdc7fd210 Merge branch 'fix-testContextGenerationDataNormalizeDenormalizeGetData' into 'master'
Fix the test "testContextGenerationDataNormalizeDenormalizeGetData"

See merge request Chill-Projet/chill-bundles!648
2024-01-23 12:31:37 +00:00
0bf6c07e8d Add Symfony Deprecations Helper to Gitlab CI configuration
The Gitlab CI configuration for the Chill Project has been updated to include the Symfony Deprecations Helper setting. This addition helps to avoid direct deprecations and provide a more efficient testing process. The helper is integrated using Symfony's PHPUnit bridge.
2024-01-23 11:32:22 +01:00
7a12602699 fix testContextGenerationDataNormalizeDenormalizeGetData
The method `Relationship::getOpposite` does not only compare the object equality, but also the object id.
2024-01-23 10:56:55 +01:00
15a927a9f8 [Export][List of accompanying periods] Add a list of persons, names and ids 2024-01-22 14:13:27 +01:00
0a2805f23f Merge branch 'upgrade-php-cs-fixer-to-3.47.0' into 'master'
CS: pgrade php-cs-fixer to 3.47.0

See merge request Chill-Projet/chill-bundles!646
2024-01-22 11:21:58 +00:00
27ce322690 upgrade php-cs-fixer to 3.47.0 2024-01-22 12:14:39 +01:00
fdfc3fb7ec Update changelog and master release version 2024-01-11 16:17:04 +01:00
aee245cd04 raise the expire term for artifacts in the gitlab pipeline 2024-01-11 13:42:02 +01:00
adcf183469 Merge branch 'adjust_field_required_behaviour_in_forms' into 'master'
Adjust form for activity type presence field, setting placeholder to false

See merge request Chill-Projet/chill-bundles!643
2024-01-11 11:53:07 +00:00
86bf5eba4f Merge branch 'fix_duplicate_acp_participation_handler' into 'master'
Use the correct id_seq to explicitly assign id to new row in accompanying...

See merge request Chill-Projet/chill-bundles!644
2024-01-11 11:48:41 +00:00
db130ef9df add changie 2024-01-11 11:59:21 +01:00
2b903c4d6e Use the correct id_seq to explicitly assign id to new row in accompanying period participation table 2024-01-11 11:55:03 +01:00
2c6b5dfee1 Add changie 2024-01-10 13:20:38 +01:00
0b50cbfe4c adjust form for activity type presence field, setting placeholder to false 2024-01-10 13:12:59 +01:00
3a6a125bb1 Merge branch 'test_branch' into 'master'
Apply code styling according to new rules php-cs-fixer

See merge request Chill-Projet/chill-bundles!642
2024-01-10 11:22:13 +00:00
e67c5d98ef force pipeline to run again 2024-01-10 11:09:33 +01:00
3c8e59e088 php cs fixes after updating php cs fixer 2024-01-10 10:31:25 +01:00
60ede58af0 Update chill-bundles version 2023-12-20 11:49:38 +01:00
afb79141f0 Merge branch 'fix_household_export' into 'master'
Fix household export

See merge request Chill-Projet/chill-bundles!640
2023-12-20 10:46:30 +00:00
4d72933edb Add condition to household export queries to exclude accompanying periods that are in draft. 2023-12-20 10:46:29 +00:00
469e379166 php cs fixes 2023-12-18 17:05:18 +01:00
f103b228e4 Create test for the participationBetweenDatesFilter 2023-12-18 17:04:42 +01:00
d2a31de1be Add a missing translation for the filter description 2023-12-18 17:04:16 +01:00
138a537d2b Add changie 2023-12-18 15:51:52 +01:00
c06c861e17 Php cs fixes 2023-12-18 15:38:20 +01:00
34cbd2605c Add a changie 2023-12-18 15:32:04 +01:00
044bab45ad Fix query : was missing parenthesis. 2023-12-18 15:29:59 +01:00
b9890d1302 Minor fixes 2023-12-18 10:33:30 +01:00
5b2a2a1bc5 Add WithParticipationBetweenDatesFilter to ChillPersonBundle
This update adds a new filter, WithParticipationBetweenDatesFilter, to the ChillPersonBundle. This filter helps to find persons who participated in any parcours between specified date ranges. Additionally, relevant French translations have been updated and the filter has been registered in the services configuration file.
2023-12-13 17:45:08 +01:00
0da12cdc2e Merge branch '245-rewrite-test-relationship-api' into 'master'
Refactor RelationshipApiControllerTest to avoid failures

Closes #245

See merge request Chill-Projet/chill-bundles!635
2023-12-13 15:02:42 +00:00
d1ce99e6d3 Merge branch '167build_the_docs' into 'master'
DX: re-instate the build of documentation on read-the-docs

See merge request Chill-Projet/chill-bundles!638
2023-12-13 08:39:56 +00:00
juminet
0ad27328c9 DX: re-instate the build of documentation on read-the-docs 2023-12-13 08:39:56 +00:00
91e6b035bd release 2.15.0 2023-12-11 17:23:47 +01:00
2adb6105eb Merge branch '246-do-not-show-confidential-in-list' into 'master'
Filter confidential courses from list of accompanying periods and related

Closes #246

See merge request Chill-Projet/chill-bundles!633
2023-12-11 16:22:38 +00:00
33d187f329 Merge branch '228-fix-export-activity-from-v1' into 'master'
Fix export for people created before 'createdAt' column introduction

Closes #228

See merge request Chill-Projet/chill-bundles!634
2023-12-11 16:22:12 +00:00
f02873c6e0 Refactor RelationshipApiControllerTest
The codebase has been improved by refining and optimizing the test methods in the RelationshipApiControllerTest class. The check for relations was also added to exclude persons without any relationship, this may exclude duplicate relations. This change should avoid errors on this test.
2023-12-08 11:07:14 +01:00
8cc93a8b07 add changie [ci-skip] 2023-12-07 23:25:38 +01:00
f7184ca7bb Fix export for people created before 'createdAt' column introduction
This commit introduces a migration to fix the export for individuals who were created before the introduction of the 'createdAt' column. The 'startdate' column is now updated to match the individual's first activity date. This migration is irreversible. It's been added as a response to Issue #228
2023-12-07 23:22:48 +01:00
f0605c6b08 Use dedicated FilterListAccompanyingPeriodHelper to filter confidential course in different lists 2023-12-07 16:18:37 +01:00
54606403b4 Refactor confidential filtering on list to let it usable by other lists 2023-12-07 15:13:54 +01:00
47d829d72d Filter confidential courses from list of accompanying periods 2023-12-06 22:46:50 +01:00
1155 changed files with 14220 additions and 3594 deletions

View File

@@ -1,5 +0,0 @@
kind: Feature
body: Add export "number of household associate with an exchange"
time: 2023-12-04T16:29:23.341485328+01:00
custom:
Issue: "191"

View File

@@ -1,5 +0,0 @@
kind: Feature
body: 'Export: add dates on the filter "filter course by activity type"'
time: 2023-12-04T18:11:56.906524311+01:00
custom:
Issue: "235"

View File

@@ -1,5 +0,0 @@
kind: Fixed
body: Fix error when posting an empty comment on an accompanying period.
time: 2023-11-29T11:34:58.986983057+01:00
custom:
Issue: "214"

View File

@@ -1,5 +0,0 @@
kind: Fixed
body: Fix "filter evaluation by evaluation type" (and add select2 to the list of evaluation types to pick)
time: 2023-12-01T09:45:10.744382859+01:00
custom:
Issue: "233"

View File

@@ -1,6 +0,0 @@
kind: Fixed
body: |
Fix "filter aside activity by date"
time: 2023-12-04T17:17:16.553597209+01:00
custom:
Issue: "234"

11
.changes/v2.15.0.md Normal file
View File

@@ -0,0 +1,11 @@
## v2.15.0 - 2023-12-11
### Feature
* ([#191](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/191)) Add export "number of household associate with an exchange"
* ([#235](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/235)) Export: add dates on the filter "filter course by activity type"
### Fixed
* ([#214](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/214)) Fix error when posting an empty comment on an accompanying period.
* ([#233](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/233)) Fix "filter evaluation by evaluation type" (and add select2 to the list of evaluation types to pick)
* ([#234](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/234)) Fix "filter aside activity by date"
* ([#228](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/228)) Fix export of activity for people created before the introduction of the createdAt column on person (during v1)
* ([#246](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/246)) Do not show activities, evaluations and social work when associated to a confidential accompanying period, except for the users which are allowed to see them

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

@@ -0,0 +1,5 @@
## v2.15.1 - 2023-12-20
### Fixed
* Fix the household export query to exclude accompanying periods that are in draft state.
### DX
* ([#167](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/167)) Fixed readthedocs compilation by updating readthedocs config file and requirements for Sphinx

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

@@ -0,0 +1,5 @@
## v2.15.2 - 2024-01-11
### Fixed
* Fix the id_seq used when creating a new accompanying period participation during fusion of two person files
### DX
* Set placeholder to False for expanded EntityType form fields where required is set to False.

15
.changes/v2.16.0.md Normal file
View File

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

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

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

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

@@ -0,0 +1,3 @@
## v2.16.2 - 2024-02-21
### Fixed
* Check for null values in closing motive of parcours d'accompagnement for correct rendering of template

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

@@ -0,0 +1,5 @@
## v2.16.3 - 2024-02-26
### Fixed
* ([#236](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/236)) Fix translation of user job -> 'service' must be 'métier'
### UX
* ([#232](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/232)) Order user jobs and services alphabetically in export filters

9
.changes/v2.17.0.md Normal file
View File

@@ -0,0 +1,9 @@
## v2.17.0 - 2024-03-19
### Feature
* ([#237](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/237)) New export filter for social actions with an evaluation created between two dates
* ([#258](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/258)) In the list of accompangying period, add the list of person's centers and the duration of the course
* ([#238](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/238)) Allow to customize list person with new fields
* ([#159](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/159)) Admin can publish news on the homepage
### Fixed
* ([#264](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/264)) Fix languages: load the languages in all availables languages configured for Chill
* ([#259](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/259)) Keep a consistent behaviour between the filtering of activities within the document generation (model "accompanying period with activities"), and the same filter in the list of activities for an accompanying period

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

@@ -0,0 +1,5 @@
## v2.18.0 - 2024-03-26
### Feature
* ([#268](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/268)) Improve admin UX to configure document templates for document generation
### Fixed
* ([#267](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/267)) Fix the join between job and user in the user list (admin): show only the current user job

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

@@ -0,0 +1,3 @@
## v2.18.1 - 2024-03-26
### Fixed
* Fix layout issue in document generation for admin (minor)

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

@@ -0,0 +1,3 @@
## v2.18.2 - 2024-04-12
### Fixed
* ([#250](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/250)) Postal codes import : fix the source URL and the keys to handle each record

20
.changes/v2.19.0.md Normal file
View File

@@ -0,0 +1,20 @@
## v2.19.0 - 2024-05-14
### Feature
* ([#197](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/197)) Make the script which subscribe to microsoft calendars changes more tolerant to errors or missing configuration on the microsoft side
* ([#276](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/276)) Take closing date into account when computing the geographical unit on accompanying period. When a person moved after an accompanying period is closed, the date of closing accompanying period is took into account if it is earlier than the date given by the user.
### Fixed
* ([#270](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/270)) Fix broken link in homepage when a evaluation from a closed acc period was present in the homepage widget
* ([#275](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/275)) Allow the filter "filter accompanying period by geographical unit" to take period's location on address into account
### UX
* Form for document generation moved to the top of document list page
* ([#266](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/266)) Event bundle: adjust certain graphical issues for better user experience
### Traduction francophone des principaux changements
- script de synchronisation des agendas de microsoft Outlook: le script est plus tolérant aux erreurs de configuration côté serveur (manque de droit d'accès);
- dans les statistiques sur les parcours d'accompagnements, regroupement et filtre par unité géographique: lorsque la date de prise en compte de l'adresse est postérieure à la fermeture du parcours, c'est la date de fermeture du parcours qui est prise en compte (cela permet de tenir compte de la localisation de l'usager au moment de la fermeture dans le cas où celui-ci aurait déménagé par la suite);
- sur la page d'accueil, il n'y a plus de rappel pour les évaluations pour les parcours cloturés;
- correction du filtre "filtrer par zone géographique"
- répétition du bouton pour générer un document en haut de la page "liste des documents", quand il y a plus de cinq documents;
- module événement: améliorerations graphiques

21
.changes/v2.20.0.md Normal file
View File

@@ -0,0 +1,21 @@
## v2.20.0 - 2024-06-05
### Fixed
* ([#170](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/170)) Display agents traitants instead of accompanying period referrer in export list social actions.
* Added translations for choices of durations (> 5 hours)
### Feature
* ([#145](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/145)) Allow to open documents in LibreOffice locally (need configuration within security);
This endpoint should be added to make the endpoint works properly:
```yaml
security:
firewalls:
dav:
pattern: ^/dav
provider: chain_provider
stateless: true
guard:
authenticators:
- Chill\DocStoreBundle\Security\Guard\JWTOnDavUrlAuthenticator
```

View File

@@ -23,3 +23,7 @@ max_line_length = 0
indent_size = 2
indent_style = space
[.rst]
ident_size = 3
ident_style = space

View File

@@ -34,6 +34,8 @@ variables:
DEFAULT_CARRIER_CODE: BE
# force a timezone
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=1
stages:
- Composer install
@@ -51,7 +53,7 @@ build:
paths:
- .cache/
artifacts:
expire_in: 30 min
expire_in: 1 day
paths:
- bin
- vendor/
@@ -65,7 +67,7 @@ code_style:
paths:
- .cache/
artifacts:
expire_in: 30 min
expire_in: 1 day
paths:
- bin
- vendor/
@@ -79,7 +81,7 @@ phpstan_tests:
paths:
- .cache/
artifacts:
expire_in: 30 min
expire_in: 1 day
paths:
- bin
- vendor/
@@ -94,7 +96,7 @@ rector_tests:
paths:
- .cache/
artifacts:
expire_in: 30 min
expire_in: 1 day
paths:
- bin
- vendor/
@@ -121,7 +123,7 @@ unit_tests:
- php -d memory_limit=3G tests/console doctrine:fixtures:load -n
- php -d memory_limit=4G bin/phpunit --colors=never --exclude-group dbIntensive
artifacts:
expire_in: 30 min
expire_in: 1 day
paths:
- bin
- vendor/

View File

@@ -1,10 +1,14 @@
---
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.7"
sphinx:
configuration: docs/source/conf.py
python:
version: 3.7
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt

View File

@@ -6,6 +6,133 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
## v2.20.0 - 2024-06-05
### Fixed
* ([#170](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/170)) Display agents traitants instead of accompanying period referrer in export list social actions.
* Added translations for choices of durations (> 5 hours)
### Feature
* ([#145](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/145)) Allow to open documents in LibreOffice locally (need configuration within security);
This endpoint should be added to make the endpoint works properly:
```yaml
security:
firewalls:
dav:
pattern: ^/dav
provider: chain_provider
stateless: true
guard:
authenticators:
- Chill\DocStoreBundle\Security\Guard\JWTOnDavUrlAuthenticator
```
## v2.19.0 - 2024-05-14
### Feature
* ([#197](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/197)) Make the script which subscribe to microsoft calendars changes more tolerant to errors or missing configuration on the microsoft side
* ([#276](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/276)) Take closing date into account when computing the geographical unit on accompanying period. When a person moved after an accompanying period is closed, the date of closing accompanying period is took into account if it is earlier than the date given by the user.
### Fixed
* ([#270](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/270)) Fix broken link in homepage when a evaluation from a closed acc period was present in the homepage widget
* ([#275](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/275)) Allow the filter "filter accompanying period by geographical unit" to take period's location on address into account
### UX
* Form for document generation moved to the top of document list page
* ([#266](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/266)) Event bundle: adjust certain graphical issues for better user experience
### Traduction francophone des principaux changements
- script de synchronisation des agendas de microsoft Outlook: le script est plus tolérant aux erreurs de configuration côté serveur (manque de droit d'accès);
- dans les statistiques sur les parcours d'accompagnements, regroupement et filtre par unité géographique: lorsque la date de prise en compte de l'adresse est postérieure à la fermeture du parcours, c'est la date de fermeture du parcours qui est prise en compte (cela permet de tenir compte de la localisation de l'usager au moment de la fermeture dans le cas où celui-ci aurait déménagé par la suite);
- sur la page d'accueil, il n'y a plus de rappel pour les évaluations pour les parcours cloturés;
- correction du filtre "filtrer par zone géographique"
- répétition du bouton pour générer un document en haut de la page "liste des documents", quand il y a plus de cinq documents;
- module événement: améliorerations graphiques
## v2.18.2 - 2024-04-12
### Fixed
* ([#250](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/250)) Postal codes import : fix the source URL and the keys to handle each record
## v2.18.1 - 2024-03-26
### Fixed
* Fix layout issue in document generation for admin (minor)
## v2.18.0 - 2024-03-26
### Feature
* ([#268](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/268)) Improve admin UX to configure document templates for document generation
### Fixed
* ([#267](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/267)) Fix the join between job and user in the user list (admin): show only the current user job
## v2.17.0 - 2024-03-19
### Feature
* ([#237](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/237)) New export filter for social actions with an evaluation created between two dates
* ([#258](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/258)) In the list of accompangying period, add the list of person's centers and the duration of the course
* ([#238](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/238)) Allow to customize list person with new fields
* ([#159](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/159)) Admin can publish news on the homepage
### Fixed
* ([#264](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/264)) Fix languages: load the languages in all availables languages configured for Chill
* ([#259](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/259)) Keep a consistent behaviour between the filtering of activities within the document generation (model "accompanying period with activities"), and the same filter in the list of activities for an accompanying period
## v2.16.3 - 2024-02-26
### Fixed
* ([#236](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/236)) Fix translation of user job -> 'service' must be 'métier'
### UX
* ([#232](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/232)) Order user jobs and services alphabetically in export filters
## v2.16.2 - 2024-02-21
### Fixed
* Check for null values in closing motive of parcours d'accompagnement for correct rendering of template
## 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
### 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

View File

@@ -9,6 +9,7 @@
],
"require": {
"php": "^8.2",
"ext-dom": "*",
"ext-json": "*",
"ext-openssl": "*",
"ext-redis": "*",
@@ -75,7 +76,7 @@
"phpunit/phpunit": ">= 7.5",
"psalm/plugin-phpunit": "^0.18.4",
"psalm/plugin-symfony": "^4.0.2",
"rector/rector": "^0.17.7",
"rector/rector": "^1.1.0",
"symfony/debug-bundle": "^5.1",
"symfony/dotenv": "^4.4",
"symfony/maker-bundle": "^1.20",

View File

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

View File

@@ -1,6 +1,7 @@
docutils==0.13.1
Pygments==2.2.0
sphinx==1.8.5
Jinja2<3.1
git+https://github.com/fabpot/sphinx-php.git@v2.0.2#egg_name=sphinx-php
jsx-lexer===0.0.8
sphinx_rtd_theme==0.5.0

View File

@@ -242,3 +242,129 @@ This is an example of the *filter by birthdate*. This filter asks some informati
Continue to explain the export framework
.. _main bundle: https://git.framasoft.org/Chill-project/Chill-Main
With many-to-* relationship, why should we set WHERE clauses in an EXISTS subquery instead of a JOIN ?
``````````````````````````````````````````````````````````````````````````````````````````````````````
As we described above, the doctrine builder is converted into a sql query. Let's see how to compute the "number of course
which count at least one activity type with the id 7". For the purpose of this demonstration, we will restrict this on
two accompanying period only: the ones with id 329 and 334.
Let's see the list of activities associated with those accompanying period:
.. code-block:: sql
SELECT id, accompanyingperiod_id, type_id FROM activity WHERE accompanyingperiod_id IN (329, 334) AND type_id = 7
ORDER BY accompanyingperiod_id;
We see that we have 6 activities for the accompanying period with id 329, and only one for the 334's one.
.. csv-table::
:header: id, accompanyingperiod_id, type_id
990,329,7
986,329,7
987,329,7
993,329,7
991,329,7
992,329,7
1000,334,7
Let's calculate the average duration for those accompanying periods, and the number of period:
.. code-block:: sql
SELECT AVG(age(COALESCE(closingdate, CURRENT_DATE), openingdate)), COUNT(id) from chill_person_accompanying_period WHERE id IN (329, 334);
The result of this query is:
.. csv-table::
:header: AVG, COUNT
2 years 2 mons 21 days 12 hours 0 mins 0.0 secs,2
Now, we count the number of accompanying period, adding a :code:`JOIN` clause which make a link to the :code:`activity` table, and add a :code:`WHERE` clause to keep
only the accompanying period which contains the given activity type:
.. code-block:: sql
SELECT COUNT(chill_person_accompanying_period.id) from chill_person_accompanying_period
JOIN activity ON chill_person_accompanying_period.id = activity.accompanyingperiod_id
WHERE chill_person_accompanying_period.id IN (329, 334) AND activity.type_id = 7;
What are the results here ?
.. csv-table::
:header: COUNT
7
:code:`7` ! Why this result ? Because the number of lines is duplicated for each activity. Let's see the list of rows which
are taken into account for the computation:
.. code-block:: sql
SELECT chill_person_accompanying_period.id, activity.id from chill_person_accompanying_period
JOIN activity ON chill_person_accompanying_period.id = activity.accompanyingperiod_id
WHERE chill_person_accompanying_period.id IN (329, 334) AND activity.type_id = 7;
.. csv-table::
:header: accompanyingperiod.id, activity.id
329,993
334,1000
329,987
329,990
329,991
329,992
329,986
For each activity, a row is created and, as we count the number of non-null :code:`accompanyingperiod.id` columns, we
count one entry for each activity (actually, we count the number of activities).
So, let's use the :code:`DISTINCT` keyword to count only once the equal ids:
.. code-block::
SELECT COUNT(DISTINCT chill_person_accompanying_period.id) from chill_person_accompanying_period
JOIN activity ON chill_person_accompanying_period.id = activity.accompanyingperiod_id
WHERE chill_person_accompanying_period.id IN (329, 334) AND activity.type_id = 7;
Now, it works again...
.. csv-table::
:header: COUNT
2
But, for the average duration, this won't work: the duration which are equals (because the :code:`openingdate` is the same and
:code:`closingdate` is still :code:`NULL`, for instance) will be counted only once, which will give unexpected result.
The solution is to move the condition "having an activity with activity type with id 7" in a :code:`EXISTS` clause:
.. code-block:: sql
SELECT COUNT(chill_person_accompanying_period.id) from chill_person_accompanying_period
WHERE chill_person_accompanying_period.id IN (329, 334) AND EXISTS (SELECT 1 FROM activity WHERE type_id = 7 AND accompanyingperiod_id = chill_person_accompanying_period.id);
The result is correct without :code:`DISTINCT` keyword:
.. csv-table::
:header: COUNT
2
And we can now compute the average duration without fear:
.. code-block:: sql
SELECT AVG(age(COALESCE(closingdate, CURRENT_DATE), openingdate)) from chill_person_accompanying_period
WHERE chill_person_accompanying_period.id IN (329, 334) AND EXISTS (SELECT 1 FROM activity WHERE type_id = 7 AND accompanyingperiod_id = chill_person_accompanying_period.id);
Give the result:
.. csv-table::
:header: AVG
2 years 2 mons 21 days 12 hours 0 mins 0.0 secs

View File

@@ -48,8 +48,8 @@ Clone or download the chill-skeleton project and `cd` into the main directory.
.. code-block:: bash
git clone https://gitlab.com/Chill-Projet/chill-skeleton-basic.git
cd chill-app
git clone https://gitea.champs-libres.be/Chill-project/chill-skeleton-basic.git
cd chill-skeleton-basic
As a developer, the code will stay on your computer and will be executed in docker container. To avoid permission problem, the code should be run with the same uid/gid from your current user. This is why we get your current user id with the command ``id -u`` in each following scripts.

View File

@@ -8,6 +8,16 @@ Chill can store a list of geolocated address references, which are used to sugge
Those addresses may be load from a dedicated source.
Countries
=========
In order to load addresses into the chill application we first have to make sure that a list of countries is present.
To import the countries run the following command.
.. code-block:: bash
bin/console chill:main:countries:populate
In France
=========

View File

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

View File

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

View File

@@ -0,0 +1,6 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$records of method League\\\\Csv\\\\Writer\\:\\:insertAll\\(\\) expects iterable\\<array\\<float\\|int\\|string\\|Stringable\\|null\\>\\>, iterable\\<array\\<string, bool\\|int\\|string\\>\\> given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/UserExportController.php

View File

@@ -31,4 +31,5 @@ includes:
- phpstan-baseline-level-3.neon
- phpstan-baseline-level-4.neon
- phpstan-baseline-level-5.neon
- phpstan-baseline-2024-05.neon

View File

@@ -45,9 +45,6 @@ return static function (RectorConfig $rectorConfig): void {
// skip some path...
$rectorConfig->skip([
// we need to discuss this: are we going to have FALSE in tests instead of an error ?
\Rector\Php71\Rector\FuncCall\CountOnNullRector::class,
// we must adapt service definition
\Rector\Symfony\Symfony28\Rector\MethodCall\GetToConstructorInjectionRector::class,
\Rector\Symfony\Symfony34\Rector\Closure\ContainerGetNameToTypeInTestsRector::class,

View File

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

View File

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

View File

@@ -67,7 +67,8 @@ final class ActivityController extends AbstractController
private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory,
private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly PaginatorFactory $paginatorFactory,
) {}
) {
}
/**
* Deletes a Activity entity.
@@ -673,8 +674,8 @@ final class ActivityController extends AbstractController
throw $this->createNotFoundException('Accompanying Period not found');
}
// TODO Add permission
// $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
// TODO Add permission
// $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
} else {
throw $this->createNotFoundException('Person or Accompanying Period not found');
}

View File

@@ -56,7 +56,7 @@ class ActivityReasonCategoryController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id);
$entity = $em->getRepository(ActivityReasonCategory::class)->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
@@ -79,7 +79,7 @@ class ActivityReasonCategoryController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$entities = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->findAll();
$entities = $em->getRepository(ActivityReasonCategory::class)->findAll();
return $this->render('@ChillActivity/ActivityReasonCategory/index.html.twig', [
'entities' => $entities,
@@ -111,7 +111,7 @@ class ActivityReasonCategoryController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id);
$entity = $em->getRepository(ActivityReasonCategory::class)->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
@@ -131,7 +131,7 @@ class ActivityReasonCategoryController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id);
$entity = $em->getRepository(ActivityReasonCategory::class)->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');

View File

@@ -24,7 +24,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
*/
class ActivityReasonController extends AbstractController
{
public function __construct(private readonly ActivityReasonRepository $activityReasonRepository) {}
public function __construct(private readonly ActivityReasonRepository $activityReasonRepository)
{
}
/**
* Creates a new ActivityReason entity.
@@ -60,7 +62,7 @@ class ActivityReasonController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
$entity = $em->getRepository(ActivityReason::class)->find($id);
if (null === $entity) {
throw new NotFoundHttpException('Unable to find ActivityReason entity.');
@@ -115,7 +117,7 @@ class ActivityReasonController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
$entity = $em->getRepository(ActivityReason::class)->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReason entity.');
@@ -135,7 +137,7 @@ class ActivityReasonController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
$entity = $em->getRepository(ActivityReason::class)->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReason entity.');

View File

@@ -291,7 +291,11 @@ class ActivityType
public function checkSocialActionsVisibility(ExecutionContextInterface $context, mixed $payload)
{
if ($this->socialIssuesVisible !== $this->socialActionsVisible) {
if (!(2 === $this->socialIssuesVisible && 1 === $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 (
(0 === $this->socialIssuesVisible && (1 === $this->socialActionsVisible || 2 === $this->socialActionsVisible))
|| (1 === $this->socialIssuesVisible && 2 === $this->socialActionsVisible)
) {
$context
->buildViolation('The socialActionsVisible value is not compatible with the socialIssuesVisible value')
->atPath('socialActionsVisible')

View File

@@ -19,7 +19,9 @@ use Doctrine\ORM\EntityManagerInterface;
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)
{

View File

@@ -31,7 +31,8 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
private RollingDateConverterInterface $rollingDateConverter,
private ActivityTypeRepositoryInterface $activityTypeRepository,
private TranslatableStringHelperInterface $translatableStringHelper,
) {}
) {
}
public function buildForm(FormBuilderInterface $builder)
{
@@ -56,7 +57,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
public function getLabels($key, array $values, mixed $data)
{
return function (null|int|string $value): string {
return function (int|string|null $value): string {
if ('_header' === $value) {
return 'export.aggregator.acp.by_activity_type.activity_type';
}

View File

@@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
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
{

View File

@@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
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
{

View File

@@ -20,9 +20,13 @@ use Symfony\Component\Form\FormBuilderInterface;
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
{
@@ -31,7 +35,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface
public function getLabels($key, array $values, mixed $data)
{
return function (null|int|string $value): string {
return function (int|string|null $value): string {
if ('_header' === $value) {
return 'export.aggregator.activity.by_activity_presence.header';
}

View File

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

View File

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

View File

@@ -22,7 +22,9 @@ class ActivityUserAggregator implements AggregatorInterface
{
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
{

View File

@@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
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
{

View File

@@ -27,7 +27,8 @@ class ActivityUsersJobAggregator implements AggregatorInterface
public function __construct(
private readonly UserJobRepositoryInterface $userJobRepository,
private readonly TranslatableStringHelperInterface $translatableStringHelper
) {}
) {
}
public function addRole(): ?string
{
@@ -65,7 +66,9 @@ class ActivityUsersJobAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder) {}
public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array
{

View File

@@ -27,7 +27,8 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
public function __construct(
private readonly ScopeRepositoryInterface $scopeRepository,
private readonly TranslatableStringHelperInterface $translatableStringHelper
) {}
) {
}
public function addRole(): ?string
{
@@ -65,7 +66,9 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder) {}
public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array
{

View File

@@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
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
{

View File

@@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
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
{

View File

@@ -27,7 +27,8 @@ class CreatorJobAggregator implements AggregatorInterface
public function __construct(
private readonly UserJobRepositoryInterface $userJobRepository,
private readonly TranslatableStringHelper $translatableStringHelper
) {}
) {
}
public function addRole(): ?string
{
@@ -65,7 +66,9 @@ class CreatorJobAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder) {}
public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array
{

View File

@@ -27,7 +27,8 @@ class CreatorScopeAggregator implements AggregatorInterface
public function __construct(
private readonly ScopeRepository $scopeRepository,
private readonly TranslatableStringHelper $translatableStringHelper
) {}
) {
}
public function addRole(): ?string
{
@@ -65,7 +66,9 @@ class CreatorScopeAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder) {}
public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array
{

View File

@@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
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
{

View File

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

View File

@@ -25,7 +25,9 @@ final readonly class PersonsAggregator implements AggregatorInterface
{
private const PREFIX = 'act_persons_agg';
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
public function __construct(private LabelPersonHelper $labelPersonHelper)
{
}
public function buildForm(FormBuilderInterface $builder)
{

View File

@@ -19,7 +19,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class SentReceivedAggregator implements AggregatorInterface
{
public function __construct(private readonly TranslatorInterface $translator) {}
public function __construct(private readonly TranslatorInterface $translator)
{
}
public function addRole(): ?string
{

View File

@@ -36,7 +36,9 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface
$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
{

View File

@@ -41,7 +41,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface
$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
{

View File

@@ -42,7 +42,9 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
$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
{

View File

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

View File

@@ -20,22 +20,18 @@ use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
use Chill\MainBundle\Export\GroupedExportInterface;
use Chill\MainBundle\Export\Helper\TranslatableStringExportLabelHelper;
use Chill\MainBundle\Export\ListInterface;
use Chill\PersonBundle\Entity\Person\PersonCenterHistory;
use Chill\PersonBundle\Export\Helper\FilterListAccompanyingPeriodHelperInterface;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\Form\FormBuilderInterface;
class ListActivity implements ListInterface, GroupedExportInterface
final readonly class ListActivity implements ListInterface, GroupedExportInterface
{
private readonly bool $filterStatsByCenters;
public function __construct(
private readonly ListActivityHelper $helper,
private readonly EntityManagerInterface $entityManager,
private readonly TranslatableStringExportLabelHelper $translatableStringExportLabelHelper,
ParameterBagInterface $parameterBag,
private ListActivityHelper $helper,
private EntityManagerInterface $entityManager,
private TranslatableStringExportLabelHelper $translatableStringExportLabelHelper,
private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper,
) {
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
public function buildForm(FormBuilderInterface $builder)
@@ -119,19 +115,7 @@ class ListActivity implements ListInterface, GroupedExportInterface
->leftJoin('acppart.person', 'person')
->andWhere('acppart.startDate != acppart.endDate OR acppart.endDate IS NULL');
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);
}
$this->filterListAccompanyingPeriodHelper->addFilterAccompanyingPeriods($qb, $requiredModifiers, $acl, $data);
$qb
// some grouping are necessary

View File

@@ -33,7 +33,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface
$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
{

View File

@@ -34,7 +34,9 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
$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
{

View File

@@ -47,7 +47,9 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
$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
{

View File

@@ -40,7 +40,8 @@ class ListActivityHelper
private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly TranslatableStringExportLabelHelper $translatableStringLabelHelper,
private readonly UserHelper $userHelper
) {}
) {
}
public function addSelect(QueryBuilder $qb): void
{
@@ -74,7 +75,9 @@ class ListActivityHelper
->addGroupBy('location.id');
}
public function buildForm(FormBuilderInterface $builder) {}
public function buildForm(FormBuilderInterface $builder)
{
}
public function getAllowedFormattersTypes()
{

View File

@@ -31,7 +31,8 @@ final readonly class ActivityTypeFilter implements FilterInterface
private ActivityTypeRepositoryInterface $activityTypeRepository,
private TranslatableStringHelperInterface $translatableStringHelper,
private RollingDateConverterInterface $rollingDateConverter,
) {}
) {
}
public function addRole(): ?string
{

View File

@@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface;
class BySocialActionFilter implements FilterInterface
{
public function __construct(private readonly SocialActionRender $actionRender) {}
public function __construct(private readonly SocialActionRender $actionRender)
{
}
public function addRole(): ?string
{

View File

@@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface;
class BySocialIssueFilter implements FilterInterface
{
public function __construct(private readonly SocialIssueRender $issueRender) {}
public function __construct(private readonly SocialIssueRender $issueRender)
{
}
public function addRole(): ?string
{

View File

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

View File

@@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
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
{

View File

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

View File

@@ -27,7 +27,8 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
public function __construct(
protected TranslatableStringHelperInterface $translatableStringHelper,
protected ActivityTypeRepositoryInterface $activityTypeRepository
) {}
) {
}
public function addRole(): ?string
{

View File

@@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
class ActivityUsersFilter implements FilterInterface
{
public function __construct(private readonly UserRender $userRender) {}
public function __construct(private readonly UserRender $userRender)
{
}
public function addRole(): ?string
{

View File

@@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
class ByCreatorFilter implements FilterInterface
{
public function __construct(private readonly UserRender $userRender) {}
public function __construct(private readonly UserRender $userRender)
{
}
public function addRole(): ?string
{

View File

@@ -32,7 +32,8 @@ final readonly class CreatorJobFilter implements FilterInterface
private TranslatableStringHelper $translatableStringHelper,
private TranslatorInterface $translator,
private UserJobRepositoryInterface $userJobRepository,
) {}
) {
}
public function addRole(): ?string
{
@@ -79,7 +80,7 @@ final readonly class CreatorJobFilter implements FilterInterface
{
$builder
->add('jobs', EntityType::class, [
'choices' => $this->userJobRepository->findAllOrderedByName(),
'choices' => $this->userJobRepository->findAllActive(),
'class' => UserJob::class,
'choice_label' => fn (UserJob $s) => $this->translatableStringHelper->localize(
$s->getLabel()

View File

@@ -15,6 +15,7 @@ use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Entity\User\UserScopeHistory;
use Chill\MainBundle\Export\FilterInterface;
use Chill\MainBundle\Repository\ScopeRepositoryInterface;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Doctrine\ORM\Query\Expr\Join;
use Doctrine\ORM\QueryBuilder;
@@ -26,8 +27,10 @@ class CreatorScopeFilter implements FilterInterface
private const PREFIX = 'acp_act_filter_creator_scope';
public function __construct(
private readonly TranslatableStringHelper $translatableStringHelper
) {}
private readonly TranslatableStringHelper $translatableStringHelper,
private readonly ScopeRepositoryInterface $scopeRepository,
) {
}
public function addRole(): ?string
{
@@ -75,6 +78,7 @@ class CreatorScopeFilter implements FilterInterface
$builder
->add('scopes', EntityType::class, [
'class' => Scope::class,
'choices' => $this->scopeRepository->findAllActive(),
'choice_label' => fn (Scope $s) => $this->translatableStringHelper->localize(
$s->getName()
),

View File

@@ -28,7 +28,9 @@ class EmergencyFilter implements FilterInterface
private const DEFAULT_CHOICE = 'false';
public function __construct(private readonly TranslatorInterface $translator) {}
public function __construct(private readonly TranslatorInterface $translator)
{
}
public function addRole(): ?string
{

View File

@@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface;
class LocationTypeFilter implements FilterInterface
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
{
}
public function addRole(): ?string
{

View File

@@ -26,7 +26,9 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
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
{

View File

@@ -32,7 +32,8 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
private TranslatableStringHelper $translatableStringHelper,
private ActivityReasonRepository $activityReasonRepository,
private RollingDateConverterInterface $rollingDateConverter,
) {}
) {
}
public function addRole(): ?string
{

View File

@@ -26,7 +26,9 @@ final readonly class PersonsFilter implements FilterInterface
{
private const PREFIX = 'act_persons_filter';
public function __construct(private PersonRenderInterface $personRender) {}
public function __construct(private PersonRenderInterface $personRender)
{
}
public function addRole(): ?string
{

View File

@@ -29,7 +29,9 @@ class SentReceivedFilter implements FilterInterface
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
{

View File

@@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface;
class UserFilter implements FilterInterface
{
public function __construct(private readonly UserRender $userRender) {}
public function __construct(private readonly UserRender $userRender)
{
}
public function addRole(): ?string
{

View File

@@ -16,6 +16,7 @@ use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Entity\User\UserJobHistory;
use Chill\MainBundle\Entity\UserJob;
use Chill\MainBundle\Export\FilterInterface;
use Chill\MainBundle\Repository\UserJobRepositoryInterface;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\QueryBuilder;
@@ -27,8 +28,10 @@ class UsersJobFilter implements FilterInterface
private const PREFIX = 'act_filter_user_job';
public function __construct(
private readonly TranslatableStringHelperInterface $translatableStringHelper
) {}
private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly UserJobRepositoryInterface $userJobRepository
) {
}
public function addRole(): ?string
{
@@ -68,6 +71,7 @@ class UsersJobFilter implements FilterInterface
$builder
->add('jobs', EntityType::class, [
'class' => UserJob::class,
'choices' => $this->userJobRepository->findAllActive(),
'choice_label' => fn (UserJob $j) => $this->translatableStringHelper->localize($j->getLabel()),
'multiple' => true,
'expanded' => true,

View File

@@ -30,7 +30,8 @@ class UsersScopeFilter implements FilterInterface
public function __construct(
private readonly ScopeRepositoryInterface $scopeRepository,
private readonly TranslatableStringHelperInterface $translatableStringHelper
) {}
) {
}
public function addRole(): ?string
{

View File

@@ -15,11 +15,10 @@ use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Entity\ActivityPresence;
use Chill\ActivityBundle\Form\Type\PickActivityReasonType;
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
use Chill\DocStoreBundle\Form\StoredObjectType;
use Chill\DocStoreBundle\Form\CollectionStoredObjectType;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\Location;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Form\Type\ChillCollectionType;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\MainBundle\Form\Type\CommentType;
use Chill\MainBundle\Form\Type\PickUserDynamicType;
@@ -95,7 +94,7 @@ class ActivityType extends AbstractType
]);
}
/** @var \Chill\PersonBundle\Entity\AccompanyingPeriod|null $accompanyingPeriod */
/** @var AccompanyingPeriod|null $accompanyingPeriod */
$accompanyingPeriod = null;
if ($options['accompanyingPeriod'] instanceof AccompanyingPeriod) {
@@ -183,6 +182,7 @@ class ActivityType extends AbstractType
$builder->add('attendee', EntityType::class, [
'label' => $activityType->getLabel('attendee'),
'required' => $activityType->isRequired('attendee'),
'placeholder' => false,
'expanded' => true,
'class' => ActivityPresence::class,
'choice_label' => fn (ActivityPresence $activityPresence) => $this->translatableStringHelper->localize($activityPresence->getName()),
@@ -275,16 +275,9 @@ class ActivityType extends AbstractType
}
if ($activityType->isVisible('documents')) {
$builder->add('documents', ChillCollectionType::class, [
'entry_type' => StoredObjectType::class,
$builder->add('documents', CollectionStoredObjectType::class, [
'label' => $activityType->getLabel('documents'),
'required' => $activityType->isRequired('documents'),
'allow_add' => true,
'allow_delete' => true,
'button_add_label' => 'activity.Insert a document',
'button_remove_label' => 'activity.Remove a document',
'empty_collection_explain' => 'No documents',
'entry_options' => ['has_title' => true],
]);
}
@@ -404,7 +397,7 @@ class ActivityType extends AbstractType
->setAllowedTypes('center', ['null', Center::class, 'array'])
->setAllowedTypes('role', ['string'])
->setAllowedTypes('activityType', \Chill\ActivityBundle\Entity\ActivityType::class)
->setAllowedTypes('accompanyingPeriod', [\Chill\PersonBundle\Entity\AccompanyingPeriod::class, 'null']);
->setAllowedTypes('accompanyingPeriod', [AccompanyingPeriod::class, 'null']);
}
public function getBlockPrefix(): string

View File

@@ -25,7 +25,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
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)
{

View File

@@ -28,7 +28,8 @@ class PickActivityReasonType extends AbstractType
private readonly ActivityReasonRepository $activityReasonRepository,
private readonly ActivityReasonRender $reasonRender,
private readonly TranslatableStringHelperInterface $translatableStringHelper
) {}
) {
}
public function configureOptions(OptionsResolver $resolver)
{

View File

@@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
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)
{

View File

@@ -20,7 +20,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
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)
{

View File

@@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
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)
{

View File

@@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security;
*/
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)
{

View File

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

View File

@@ -18,7 +18,9 @@ use Chill\MainBundle\Notification\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
{

View File

@@ -44,7 +44,8 @@ final readonly class ActivityACLAwareRepository implements ActivityACLAwareRepos
private EntityManagerInterface $em,
private Security $security,
private RequestStack $requestStack,
) {}
) {
}
/**
* @throws NonUniqueResultException
@@ -242,7 +243,8 @@ final readonly class ActivityACLAwareRepository implements ActivityACLAwareRepos
thirdparties.thirdpartyids,
persons.personids,
actions.socialactionids,
issues.socialissueids
issues.socialissueids,
a.user_id
FROM activity a
LEFT JOIN chill_main_location location ON a.location_id = location.id
@@ -282,6 +284,7 @@ final readonly class ActivityACLAwareRepository implements ActivityACLAwareRepos
->addJoinedEntityResult(ActivityPresence::class, 'activityPresence', 'a', 'attendee')
->addFieldResult('activityPresence', 'presence_id', 'id')
->addFieldResult('activityPresence', 'presence_name', 'name')
->addScalarResult('user_id', 'userId', Types::INTEGER)
// results which cannot be mapped into entity
->addScalarResult('comment_comment', 'comment', Types::TEXT)

View File

@@ -33,16 +33,17 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
private CenterResolverManagerInterface $centerResolverManager,
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
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);
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);
$activityMetadata = $this->em->getClassMetadata(Activity::class);
@@ -71,7 +72,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
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);
$activityMetadata = $this->em->getClassMetadata(Activity::class);
@@ -122,7 +123,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
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);

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
*/
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.
*
* 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();
}
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);
}

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