Compare commits

...

1329 Commits
v2.x ... master

Author SHA1 Message Date
2a280b814f Refactor view templates: relocate 'merge' action block and standardize 'duplicate link' block handling 2025-09-09 17:36:46 +02:00
230c758255 Update bundles to v4.3.0 2025-09-08 16:05:09 +02:00
eafda987ae Merge branch '412-absence-enddate' into 'master'
Resolve "Absence user: add end date"

Closes #412

See merge request Chill-Projet/chill-bundles!865
2025-09-08 13:47:14 +00:00
7db8a371fc Resolve "Absence user: add end date" 2025-09-08 13:47:14 +00:00
0d0649dd31 Change route URL to avoid clash with person duplicate controller method 2025-09-08 14:51:54 +02:00
ac12b8cdcf Merge branch 'add-permission-list-command' into 'master'
Add `RoleDumper` and `DumpListPermissionsCommand` to generate a markdown list of permissions

See merge request Chill-Projet/chill-bundles!874
2025-09-05 16:55:45 +00:00
9c1611d052 Add RoleDumper and DumpListPermissionsCommand to generate a markdown list of permissions 2025-09-05 16:55:45 +00:00
90e3043c3d Junie guidelines: fix grammar and typos in development guidelines 2025-09-04 17:26:55 +02:00
af13bf9088 Update chill bundles to v4.2.1 2025-09-03 21:12:21 +02:00
4aa65d69c7 Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2025-09-03 21:11:06 +02:00
9e33aec594 Handle different export types in ExportConfigNormalizer and allow null/array checks for dataFormatter in ExportController 2025-09-03 21:10:58 +02:00
f88bc7e9f0 Merge branch 'improve-local-storage' into 'master'
Improve error handling when saving objects to local disk

See merge request Chill-Projet/chill-bundles!872
2025-09-02 19:59:26 +00:00
8e78c41549 Improve error handling when saving objects to local disk by using dumpFile with detailed exception logging. 2025-09-02 21:53:40 +02:00
6e36771349 fix changelog 2025-09-02 17:52:20 +02:00
7a82cae155 Release v4.2.0 2025-09-02 17:13:28 +02:00
dfab223391 Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2025-09-02 16:14:13 +02:00
539752485c Allow null values for alias and dataFormatter in buildExportDataForNormalization method 2025-09-02 16:13:48 +02:00
d204df0316 Merge branch '422-password-recover-layout' into 'master'
Resolve "Fix layout of password recover pages"

Closes #422

See merge request Chill-Projet/chill-bundles!869
2025-09-02 08:29:27 +00:00
juminet
82c02f442b Resolve "Fix layout of password recover pages" 2025-09-02 08:29:26 +00:00
f32a9dc7bc Merge branch '64-identifiant-personne' into 'master'
Add external identifiers for person, editable in edit form, with minimal features associated

See merge request Chill-Projet/chill-bundles!871
2025-09-01 08:05:11 +00:00
ea06a96f91 Add external identifiers for person, editable in edit form, with minimal features associated 2025-09-01 08:05:11 +00:00
76433e2512 Fix incorrect parameter name in event details link 2025-08-28 13:49:45 +02:00
1fa464b87a Fix typo in 'uncheckAll' script for centers selection 2025-08-28 13:32:43 +02:00
3b75f43e80 Update chill bundles to v4.1.0 2025-08-26 15:43:21 +02:00
a40eb95c43 Add changie for new event bundle features 2025-08-26 15:41:58 +02:00
8429c6e693 Merge branch 'improvements_event_module' into 'master'
Improvements event module

See merge request Chill-Projet/chill-bundles!825
2025-08-26 13:35:36 +00:00
6db7f6827c Update eslint baseline 2025-08-26 15:24:44 +02:00
3c60c57985 Adapt export list events to new export features 2025-08-26 15:18:08 +02:00
10aa36aae0 Set required to false for entitychoice filter field 2025-08-26 15:18:08 +02:00
eed9913a49 Allow select2 option for entityChoice filterOrderHelper 2025-08-26 15:18:08 +02:00
1a847d36a0 Fixes in template parameters + remove budget elements when removing event 2025-08-26 15:18:08 +02:00
d916962d9b Phpstan fix import Serializer instead of SerializerInterface 2025-08-26 15:18:08 +02:00
1092fc64ae Fix voter for the create event permission 2025-08-26 15:18:08 +02:00
4e99b6ecbd Allow filtering of event list by center and responsable 2025-08-26 15:18:08 +02:00
60d107b541 Create internal and external animators 2025-08-26 15:18:08 +02:00
4c3befe489 WIP change animator field to animator intern and animator extern 2025-08-26 15:18:08 +02:00
e176319775 WIP change animator field 2025-08-26 15:18:08 +02:00
5d810b4230 Add center to the show page of an event 2025-08-26 15:18:08 +02:00
52b8eea069 Fix passing of id parameter to route 2025-08-26 15:18:08 +02:00
4bebeaeaaa Fix wrong import of serializer 2025-08-26 15:18:08 +02:00
3969e12633 Fix cs and phpstan issues 2025-08-26 15:18:08 +02:00
d60312d4a2 Move styling to scss file and fix styling of participation list 2025-08-26 15:18:08 +02:00
d2454ae134 use key for column names in export 2025-08-26 15:18:08 +02:00
17c2cb1fdc Add missing translations 2025-08-26 15:18:08 +02:00
94d7a2a0bb Reverse deleting of organizationCost property on event entity to keep db data 2025-08-26 15:18:08 +02:00
aef1efc6cd Add missing translations and add eventThemeType missing config 2025-08-26 15:18:08 +02:00
dd0c662c9e Add missing description to migration 2025-08-26 15:18:08 +02:00
6b1696b62e phpstan, rector, phpcs fixes 2025-08-26 15:18:08 +02:00
c4b760c452 eslint fixes and new baseline 2025-08-26 15:18:08 +02:00
69fe2a8256 Add translations 2025-08-26 15:18:08 +02:00
8c98242896 Split budget elements in charges and resources column 2025-08-26 15:18:08 +02:00
7eecfd3882 Add new columns to export list event 2025-08-26 15:18:08 +02:00
6713658569 Add animators property to event 2025-08-26 15:18:08 +02:00
342b786106 Create export list of events 2025-08-26 15:18:08 +02:00
80a7437769 Update twig templates for display budget elements 2025-08-26 15:18:08 +02:00
8a38ce1a5c Add event budget element entity, forms and event property 2025-08-26 15:18:08 +02:00
5d94bf0556 Create an event budget kind admin entity 2025-08-26 15:18:08 +02:00
bb71e084b8 Create address on the fly field in event form 2025-08-26 15:18:08 +02:00
27f0bf28e9 Adjust templates and translations 2025-08-26 15:18:08 +02:00
383f588795 Add field in event for themes 2025-08-26 15:18:08 +02:00
e7a1ff1ac8 Add event theme property to event entity 2025-08-26 15:18:08 +02:00
adc9c47d0a Add event theme color for badge 2025-08-26 15:18:08 +02:00
e594b65d1e Create event theme admin entity 2025-08-26 15:18:08 +02:00
c0826bc65c Merge branch '400-add-filter-mes-actions' into 'master'
Add a filter to list for acpw where current user intervenes

Closes #400

See merge request Chill-Projet/chill-bundles!859
2025-08-18 16:26:20 +00:00
904f4e5ed9 Add a filter to list for acpw where current user intervenes 2025-08-18 16:26:20 +00:00
481f82b4c7 Merge branch '355-fusion-thirdparty' into 'master'
Resolve "Fusion des tiers"

Closes #355

See merge request Chill-Projet/chill-bundles!795
2025-08-18 15:34:48 +00:00
f5668592ca Resolve "Fusion des tiers" 2025-08-18 15:34:48 +00:00
aa085a1562 **fix:** add min and step attributes to integer field in DateIntervalType 2025-08-06 17:35:45 +02:00
2754251fdc Merge branch 'master' of https://gitlab.com/Chill-Projet/chill-bundles 2025-08-06 14:20:29 +02:00
2f6cef4238 - **fix:** move closing motive up to be coherent with display elsewhere 2025-08-06 14:20:09 +02:00
2309636eae - **fix:** adjust display logic for accompanying period dates, include closing date if period is closed. 2025-08-06 13:47:29 +02:00
56ec8fb516 Remove 'to_validate' as default for task filter 2025-08-06 09:05:39 +02:00
fe6e6e54c1 Show filters on list pages unfolded by default 2025-07-22 15:50:49 +02:00
2a09594b4a UI improvement: limit display of particapations in event list page 2025-07-22 13:26:44 +02:00
7c798e1f63 Merge branch '387-notification-user-group' into 'master'
Resolve "Notification: envoi à des groupes utilisateurs"

Closes #387

See merge request Chill-Projet/chill-bundles!842
2025-07-20 20:18:49 +00:00
ab8da4ab7a Resolve "Notification: envoi à des groupes utilisateurs" 2025-07-20 20:18:49 +00:00
5bdb2df929 Merge branch 'revert-5f016734' into 'master'
Revert "Merge branch 'ticket/supplementary-comments-on-motive' into 'master'"

See merge request Chill-Projet/chill-bundles!863
2025-07-20 18:51:51 +00:00
e3a6b60fa2 Revert "Merge branch 'ticket/supplementary-comments-on-motive' into 'master'"
This reverts merge request !855
2025-07-20 18:50:33 +00:00
5f01673404 Merge branch 'ticket/supplementary-comments-on-motive' into 'master'
Ajout de commentaires supplémentaires aux motifs

See merge request Chill-Projet/chill-bundles!855
2025-07-11 14:06:40 +00:00
63d0a52ea1 Ajout de commentaires supplémentaires aux motifs 2025-07-11 14:06:40 +00:00
837089ff5d Fix testMerge method in AccompanyingPeriodWorkMergeServiceTest.php 2025-07-10 11:33:23 +02:00
f383fab578 Fix styling 2025-07-09 15:30:39 +02:00
f3cc4a89af Update chill bundles to v4.0.2 2025-07-09 15:23:59 +02:00
703f5dc32d Transfer evaluations (and related documents) during merge 2025-07-09 15:21:42 +02:00
b870e71f77 Add translation for validation message in social action merger 2025-07-09 15:21:24 +02:00
a7e278204f fix changelog 2025-07-09 09:22:28 +02:00
4cfdcb2f02 Release v4.0.1 with fix in package.json file 2025-07-08 17:00:24 +02:00
3b82ab0e7f Release v4.0.0 2025-07-08 15:59:04 +02:00
ccfae1dc75 Merge branch '339-partage-d'export-enregistré' into 'master'
Partage d'export enregistré et génération asynchrone des exports

Closes #339 and #338

See merge request Chill-Projet/chill-bundles!800
2025-07-08 13:53:38 +00:00
8bc16dadb0 Partage d'export enregistré et génération asynchrone des exports 2025-07-08 13:53:25 +00:00
c4cc0baa8e Merge branch 'eslint-fix-issues-2025-07' into 'master'
Fix Eslint issues

See merge request Chill-Projet/chill-bundles!853
2025-07-08 13:38:51 +00:00
aed114c75c Fix Eslint issues 2025-07-08 13:38:51 +00:00
e592b89c94 remove ux-translator from dependencies 2025-07-07 12:36:49 +02:00
70e75adb7d Merge branch 'master' of https://gitlab.com/Chill-Projet/chill-bundles 2025-07-02 13:57:20 +02:00
6f7015b152 Fix translations of form fields in admin for social actions 2025-07-02 13:56:41 +02:00
65dde1e6a0 Merge branch '390-fix-search-results' into 'master'
Fix participant condition in list_with_period.html.twig

Closes #390

See merge request Chill-Projet/chill-bundles!832
2025-07-02 10:59:17 +00:00
d193c50922 Merge branch '359-fusion-accompanying-period-work' into 'master'
Resolve "Fusion actions d'accompagnement"

Closes #359

See merge request Chill-Projet/chill-bundles!804
2025-07-02 10:53:17 +00:00
840ef6eed8 Resolve "Fusion actions d'accompagnement" 2025-07-02 10:53:16 +00:00
b4bbb1a456 Merge branch 'improve_person_resource_form' into 'master'
Improve person resource form

See merge request Chill-Projet/chill-bundles!846
2025-07-01 14:01:44 +00:00
606435a6b3 Pipeline corrections 2025-07-01 14:47:36 +02:00
404143f8a6 Merge branch 'improve_person_resource_form' of https://gitlab.com/Chill-Projet/chill-bundles into improve_person_resource_form 2025-07-01 14:34:39 +02:00
ec957a2fe3 Improve UX with better labeling in person resource form 2025-07-01 14:34:19 +02:00
8ed5e35f1a Merge branch 'master' of https://gitlab.com/Chill-Projet/chill-bundles 2025-07-01 14:33:27 +02:00
ec37676dab release v3.12.1 2025-06-30 20:35:00 +02:00
2d8cda30b9 Add localizeString method to PickTemplate component for string localization 2025-06-30 20:32:17 +02:00
27d344c97d Release v3.12.0 2025-06-30 11:00:42 +02:00
088e5692e2 Merge branch 'improve_person_resource_form' into 'master'
Improve admin templates for event admin entities + activity reason (category)...

See merge request Chill-Projet/chill-bundles!838
2025-06-30 08:44:24 +00:00
298044bc82 Improve admin templates for event admin entities + activity reason (category)... 2025-06-30 08:44:24 +00:00
ee4e223043 Merge branch '393-fix-dump-only-document-generator' into 'master'
Send data dumps as email attachments instead of links, update translations,...

Closes #393

See merge request Chill-Projet/chill-bundles!843
2025-06-30 08:41:09 +00:00
c53377ce8d Merge branch 'workflow-do-not-remove-workflow-canceled-automatically' into 'master'
Remove unnecessary workflow deletion logic when in the initial position

See merge request Chill-Projet/chill-bundles!844
2025-06-30 08:40:46 +00:00
0b580658de Remove unnecessary workflow deletion logic when in the initial position 2025-06-26 14:38:12 +02:00
786c60a50d Send data dumps as email attachments instead of links, update translations, and add unit tests for the handler. 2025-06-26 12:21:19 +02:00
456f00566d update juni guidelines 2025-06-26 12:19:49 +02:00
a38116cca4 fix cs 2025-06-20 17:31:13 +02:00
nobohan
9158e33854 #392 php cs-fixer 2025-06-19 21:29:43 +02:00
nobohan
af74f7860b Fixed nullable content for NewsItem in setContent signature #392 2025-06-19 17:53:33 +02:00
c2842148c6 Improve UX with better labeling in person resource form 2025-06-17 19:27:06 +02:00
10e4c7da23 Merge branch 'master' of https://gitlab.com/Chill-Projet/chill-bundles 2025-06-17 18:45:25 +02:00
bdf1cf71ba Fix argument usage in localizeString method for UserRenderBoxBadge component
Adjusted `localizeString` method to accept a `label` parameter, ensuring proper localization of `user_job.label` and `main_scope.name`. Also made minor syntax adjustments to improve readability.
2025-06-17 10:55:30 +02:00
f680a35f49 Improve admin templates for event admin entities + activity reason (category) entities and remove delete and show actions for coherence 2025-06-11 17:13:19 +02:00
7d0fe06651 Fix admin entity edit actions for event admin entities and activity reason (category) entities 2025-06-11 16:46:04 +02:00
5ee8a6bc82 Merge branch 'upgrade-ci-image' into 'master'
Update CI configuration to use `chill/base-image:8.3-edge` instead of the old PHP 8.2 base image

See merge request Chill-Projet/chill-bundles!834
2025-06-05 10:10:41 +00:00
47cf83ef93 Update CI configuration to use chill/base-image:8.3-edge instead of the old PHP 8.2 base image 2025-06-05 11:30:01 +02:00
fca10ada71 Fix translation keys and participant pluralization in list_with_period.html.twig
Updated French translations for "Participants" and improved pluralization handling in accompanying_period keys. Modified list_with_period.html.twig to dynamically translate "Participants" based on the count of current participations.
2025-06-04 16:55:56 +02:00
a35d456308 Fix participant condition in list_with_period.html.twig
Updated the condition to properly handle cases where the first participation's person is not the current person.
2025-06-04 16:54:44 +02:00
67c1dfa42b Merge branch 'prepare-junie' into 'master'
Clean skeleton (and add Junie guidelines)

See merge request Chill-Projet/chill-bundles!830
2025-06-04 08:13:36 +00:00
49cbb6a002 Clean skeleton (and add Junie guidelines) 2025-06-04 08:13:35 +00:00
4c0c66bdb4 Add installation dependencies and improve setup instructions
Expanded the installation guide to include required dependencies such as `jq`, `php`, `composer`, and `symfony-cli`, among others. Updated setup commands to include `-W` flag for better dependency handling and added a cache clear step to ensure proper asset compilation. These changes enhance clarity and streamline the installation process.
2025-05-30 15:30:19 +02:00
880a164793 Remove @symfony/ux-translator from dependencies
The @symfony/ux-translator package was removed from package.json as it is no longer required. This helps streamline the dependency list and reduce unnecessary maintenance overhead.
2025-05-30 14:02:47 +02:00
29c1ba3c2b Fix compilation of app for calendar 2025-05-30 13:29:56 +02:00
397267f4b9 Merge branch 'replace-node-sass' into 'master'
Replace node-sass with sass and update bootstrap to version 5.3

See merge request Chill-Projet/chill-bundles!828
2025-05-28 15:04:59 +00:00
df88c31c40 Replace node-sass with sass and update bootstrap to version 5.3 2025-05-28 15:04:59 +00:00
6f1fe1c118 Merge branch '379-translation-localization-vue' into 'master'
Resolve "Finish handling of internationalization in vuejs: handling translation of "translatable string""

Closes #379

See merge request Chill-Projet/chill-bundles!822
2025-05-28 14:40:27 +00:00
649ad26721 Resolve "Finish handling of internationalization in vuejs: handling translation of "translatable string"" 2025-05-28 14:40:26 +00:00
a8c41141e8 Enhance note rendering with Markdown to HTML conversion in AccompanyingCourseWork/show.html.twig
Updated the note display logic to use the `chill_markdown_to_html` filter for better formatting and presentation. This change ensures that Markdown syntax in notes is properly rendered as HTML.
2025-05-28 16:36:03 +02:00
d82727f831 Update CommentEditor styles for responsiveness
Imported Bootstrap variables and updated styling to use responsive media breakpoints. Adjusted positioning of toggle buttons to ensure proper alignment on different screen sizes.
2025-05-28 16:36:03 +02:00
66bd63403b Update event binding in CKEditor5 component template
Replaces the deprecated `@input` event with the `@update:modelValue` event to ensure compatibility with Vue 3. This improves handling of two-way binding for the `v-model` directive.
2025-05-28 16:31:59 +02:00
992e6d29d0 Merge branch '321-text-editor-fallback' into 'master'
Text editor: Add a toggle button to switch to simple text editor and add emoji and fullscreen to ckeditor toolbar

Closes #321

See merge request Chill-Projet/chill-bundles!827
2025-05-27 09:16:31 +00:00
bb41af4ed2 replace ck-editor by new CommentEditor on every vuejs components 2025-05-23 13:51:44 +02:00
19dd4667f2 Integrate Vue-based editor with rich and simple mode toggle
Replaced CKEditor initialization with a Vue-based editor component. Introduced a toggle to switch between rich and simple editing modes, persisting the state in local storage. Updated CKEditor dependency to version 45.1.0.
2025-05-23 13:34:50 +02:00
976f293f28 Add Emoji and Fullscreen features to CKEditor configuration
Integrated Emoji, Mention (required for Emoji), and Fullscreen plugins into the CKEditor setup. Updated the toolbar to include respective buttons, enhancing functionality and user interaction.
2025-05-23 13:33:47 +02:00
5c9396077d remove "faked" entity and simplify template string in Activity index.js
Replaced multi-line template string with a cleaner single-line backtick template. This improves readability and maintains consistent formatting in the code.
2025-05-23 13:22:56 +02:00
713c50309b Merge branch '367-page-mes-parcours' into 'master'
Resolve "Reorganise page 'Mes parcours'"

Closes #367

See merge request Chill-Projet/chill-bundles!807
2025-05-21 16:13:43 +00:00
44a8ddeba4 Resolve "Reorganise page 'Mes parcours'" 2025-05-21 16:13:43 +00:00
8b2af35e97 Fix typo 2025-05-21 17:57:35 +02:00
dc44c46667 Fix SocialActionCSVExporterTest.php 2025-05-21 09:29:25 +02:00
ba571c1a69 Merge branch 'master' of https://gitlab.com/Chill-Projet/chill-bundles 2025-05-20 10:04:53 +02:00
6a364705f2 Git add desactivation date for social issue csv export 2025-05-20 09:57:07 +02:00
b6d454691a Git add desactivation date for social action csv export 2025-05-20 09:38:39 +02:00
6d7a6932a9 Merge branch '365-correct-activities-works-counters' into 'master'
#365 correct works counter in acc course summary

Closes #365

See merge request Chill-Projet/chill-bundles!826
2025-05-16 14:40:20 +00:00
juminet
2faf194b15 #365 correct works counter in acc course summary 2025-05-16 14:40:19 +00:00
f207599d86 Merge branch '352-remove-wopi-link-module' into 'master'
Resolve "Code mort: module wopi-link semble inutilisé"

Closes #352

See merge request Chill-Projet/chill-bundles!824
2025-05-16 08:33:57 +00:00
b0959f8cc5 Resolve "Code mort: module wopi-link semble inutilisé" 2025-05-16 08:33:56 +00:00
4c5dee5f0a Fix pipeline 2025-05-14 17:31:48 +02:00
f6c98aa0d5 Add missing translation for user_group.no_user_groups 2025-05-14 14:53:50 +02:00
6d13d184d5 Merge branch 'master' of https://gitlab.com/Chill-Projet/chill-bundles 2025-05-14 13:57:22 +02:00
af36eccfaf Allow more characters for maritalstatus id 2025-05-14 13:56:36 +02:00
483a20a43f Merge branch '374-task-default-filters' into 'master'
Resolve "Module tâche: enlever les filtres par défaut"

Closes #374

See merge request Chill-Projet/chill-bundles!819
2025-05-13 08:59:01 +00:00
6d8e2ad825 Resolve "Module tâche: enlever les filtres par défaut" 2025-05-13 08:59:01 +00:00
86388a63a8 Merge branch '381-uncoherent-display-persons-acc-course-works' into 'master'
381 display previous person participation in acc course work

Closes #381

See merge request Chill-Projet/chill-bundles!823
2025-05-13 08:45:38 +00:00
juminet
5ea55ebfe5 381 display previous person participation in acc course work 2025-05-13 08:45:38 +00:00
f97dc8f931 Merge branch '377-document-file-name' into 'master'
377 - add the document filename to document title when uploading a new document

Closes #377

See merge request Chill-Projet/chill-bundles!821
2025-05-13 08:30:31 +00:00
juminet
a9c3aab528 377 - add the document filename to document title when uploading a new document 2025-05-13 08:30:30 +00:00
1181377bd6 Merge branch '376-typeerror-doc-history' into 'master'
#376 prevent typerror in doc-history + improve display of document history

Closes #376

See merge request Chill-Projet/chill-bundles!820
2025-05-13 07:50:53 +00:00
juminet
2275b7c560 #376 prevent typerror in doc-history + improve display of document history 2025-05-13 07:50:52 +00:00
4a8d298ae5 Fix typing error for the display of text in calendar events 2025-05-05 10:42:04 +02:00
3e7f03d331 Add possibility to cancel a workflow if there is a pending signature [ci-skip] 2025-04-17 14:23:32 +02:00
b830952b9e Release v3.11.0 2025-04-17 14:22:35 +02:00
ad17313c61 Merge branch '380-remove-not-null-constraint-household-composition' into 'master'
Remove "not null" validation on HouseholdComposition properties

Closes #380

See merge request Chill-Projet/chill-bundles!818
2025-04-17 09:03:15 +00:00
620515ad15 Remove "not null" validation on HouseholdComposition properties
This change removes the "not null" constraint on specific properties in the HouseholdComposition entity to allow null values. The adjustment addresses Issue #380 and ensures better flexibility without impacting the schema.
2025-04-17 10:56:45 +02:00
50c377ee22 Merge branch 'fix/fix-stored-object-version-not-delete-when-not-exists-on-disk' into 'master'
Fix error when cleaning non-existent stored object versions

See merge request Chill-Projet/chill-bundles!816
2025-04-17 08:36:36 +00:00
cc7e7a90ee Merge branch 'fix/cancel-stale-workflow-handle-fails-silently' into 'master'
Add consistent LOG_PREFIX and key to CancelStaleWorkflowHandler logs

See merge request Chill-Projet/chill-bundles!817
2025-04-16 19:10:37 +00:00
1d4ef19051 Add key to log messages context and add log prefix to enhance CancelStaleWorkflowHandler messages
Introduced a consistent LOG_PREFIX to all log messages in CancelStaleWorkflowHandler. This ensures clearer contextual identification in logs and improves traceability when debugging or monitoring workflow actions.
2025-04-16 21:03:29 +02:00
8337a724d1 Fix error when cleaning non-existent stored object versions
Prevent the `RemoveOldVersionMessageHandler` from throwing errors when the stored object version is missing on disk. Introduced a check to log a notice instead of attempting deletion in such cases and added corresponding test coverage.
2025-04-16 16:26:02 +02:00
8ca377d5d4 Merge branch 'button-signature-zone' into 'master'
Add button unique signature zone

See merge request Chill-Projet/chill-bundles!812
2025-04-15 13:09:54 +00:00
224e0bae43 Add button unique signature zone 2025-04-15 13:09:54 +00:00
3aa4fac80d Merge branch '364-tel2-third-party' into 'master'
Adding a second phone number to thirdparty entity

Closes #364

See merge request Chill-Projet/chill-bundles!810
2025-04-15 12:59:58 +00:00
juminet
a7517eb647 Adding a second phone number to thirdparty entity 2025-04-15 12:59:57 +00:00
e278e636e0 Merge branch '365-add-activities-works-counter' into 'master'
#365 Add works and activities counter

Closes #365

See merge request Chill-Projet/chill-bundles!809
2025-04-14 09:34:02 +00:00
juminet
40e373a9c7 #365 Add works and activities counter 2025-04-14 09:34:02 +00:00
1c1f418b18 Merge branch 'fix/acc-period-step-change-shorten-elapsed' into 'master'
Adjust cronjob interval to ensure daily execution

See merge request Chill-Projet/chill-bundles!814
2025-04-10 13:49:11 +00:00
bf0e14b43a Merge branch '102-liste-des-document-titre-long' into 'master'
Fix graphical bug in document list with title overflowing the frame, and add new classes to display title and aside in flex-table (DX + Fix)

Closes #102 and #22

See merge request Chill-Projet/chill-bundles!815
2025-04-10 13:47:40 +00:00
203a098054 Refactor document row layouts to use CSS grid
Replaced the old 'item-col' structure with a 'item-two-col-grid' layout across multiple templates, improving consistency and responsiveness. Introduced CSS grid styles ensuring proper alignment and wrapping of titles and aside elements in different viewport sizes. This enhances the overall readability and maintainability of the views.
2025-04-10 15:41:06 +02:00
d58acff541 Add css layout for badges for accompanying period work, activity and calendar 2025-04-10 15:41:06 +02:00
5858e05a42 Replace grid in person_list document to fit the whole width of the page 2025-04-10 15:31:06 +02:00
b9b4fafe14 Adjust cronjob interval to ensure daily execution
The interval for `AccompanyingPeriodStepChangeCronjob` was reduced from 24 hours to 23 hours and 45 minutes. This change guarantees at least one execution per day, addressing potential issues with timing overlaps.
2025-04-09 21:30:41 +02:00
fe6949ea26 Update chill bundles to v3.10.3 2025-03-18 13:47:31 +01:00
8a444a12f4 Turn off eslint error ban-ts-comment 2025-03-18 10:57:24 +01:00
8b7b5ceed7 Release v3.10.2 2025-03-17 22:30:17 +01:00
b0e826d05a Revert "Remove unnecessary ts-expect-error"
This reverts commit 7f101ba616.
2025-03-17 22:22:37 +01:00
6fb9c3af3f Release v3.10.1 2025-03-17 21:59:32 +01:00
7f101ba616 Remove unnecessary ts-expect-error 2025-03-17 21:59:16 +01:00
cea82fac10 Merge branch '333-removing-node-deps-to-symfony-ux-translator' into 'master'
Copy Symfony UX Translator module into to chill-bundles

Closes #333

See merge request Chill-Projet/chill-bundles!808
2025-03-17 20:45:48 +00:00
1344fc33e1 Copy Symfony UX Translator module into to chill-bundles 2025-03-17 20:45:48 +00:00
c8e09a28e6 Eslint fixes 2025-03-17 17:32:28 +01:00
c52d4b2a0e Release v3.10.0 2025-03-17 16:41:07 +01:00
7f326d5441 Fix typing of argument in FullCAlendar slot 2025-03-17 16:29:59 +01:00
2840c06476 Merge branch '368-fix-user-search-engine' into 'master'
Fix search query for user-groups

Closes #368

See merge request Chill-Projet/chill-bundles!806
2025-03-14 14:10:53 +00:00
7ddf84ea5a Fix ts errors upon prod compilation 2025-03-14 15:07:23 +01:00
f202625ea8 Fix LIKE clause logic in UserGroupRepository query
Adjusted the parameter order and ensured consistent use of LOWER and UNACCENT functions in the LIKE clause. This resolves potential mismatches and improves query reliability for pattern matching.
2025-03-14 15:04:22 +01:00
7a9168fcdb Refactor variable declarations in pick-entity module.
Consolidated variable declarations into a single statement using const. This improves code readability and aligns with modern JavaScript best practices.
2025-03-14 15:02:09 +01:00
40eb71f95a Merge branch '362-bug-manager-registry-fix2' into 'master'
Resolve loading of manager registry

Closes #362

See merge request Chill-Projet/chill-bundles!803
2025-03-05 16:45:08 +00:00
84b7cc8145 Php cs fixes 2025-03-05 10:46:36 +01:00
08af530726 Replace deprecated Statement::create() method use constructor directly 2025-03-05 10:26:22 +01:00
03b2496817 Fix dependency injection issues in AbstractCRUDController
Replaced incorrect service definitions in AbstractCRUDController to ensure proper dependency injection. Specifically, fixed retrieval of the ManagerRegistry and Validator services to resolve CalendarRange save errors (Issue #362). No schema changes were introduced.
2025-03-04 23:02:19 +01:00
f638ce71fd Merge branch '363-display_actions_by_issue' into 'master'
Resolve "Change display of social issues and social actions"

Closes #363

See merge request Chill-Projet/chill-bundles!802
2025-03-04 14:40:48 +00:00
b39997f00a Resolve "Change display of social issues and social actions" 2025-03-04 14:40:48 +00:00
38b21a2159 Update chill to version v3.9.2 2025-02-27 16:20:03 +01:00
17db571244 Add changie and linter fixes 2025-02-27 16:19:21 +01:00
8c8c16c1a1 use fetchResult instead of makeFetch for acpw creation 2025-02-27 16:16:54 +01:00
046d3ec9f1 use fetchResult instead of makeFetch for SocialIssuesAcc.vue component 2025-02-27 16:12:00 +01:00
596833f1a5 use fetchResult instead of makeFetch 2025-02-27 15:58:53 +01:00
66e4bab558 Fix pipeline phpunit and lint 2025-02-27 13:50:35 +01:00
d1c9926bb1 Update bundles to version v3.9.1 2025-02-27 12:21:26 +01:00
a71d066765 Fix post/path requests with missing 'type' property for gender 2025-02-27 12:19:10 +01:00
217ac7b9e7 Linter fixes 2025-02-27 11:54:48 +01:00
be901822bc Update chill version to v3.9.0 2025-02-27 11:26:25 +01:00
7ed10efcd1 Fix declaration of variables for dynamic picker 2025-02-24 13:49:33 +01:00
350661a4fa Merge branch '341-export-csv-thirdparties' into 'master'
Resolve "Extraction de la liste des tiers au format CSV"

Closes #341

See merge request Chill-Projet/chill-bundles!789
2025-02-19 11:37:46 +00:00
08207b656a Resolve "Extraction de la liste des tiers au format CSV" 2025-02-19 11:37:46 +00:00
8de63de6d6 Merge branch '343-social_issue_action_export' into 'master'
Resolve "Permettre de télécharger la liste des problématiques et la liste des actions en CSV"

Closes #343

See merge request Chill-Projet/chill-bundles!785
2025-02-19 11:18:05 +00:00
51804b10c0 Resolve "Permettre de télécharger la liste des problématiques et la liste des actions en CSV" 2025-02-19 11:18:04 +00:00
02f555efae Merge branch '333-working-with-translations' into 'master'
Setup alias for use in standalone chill-bundles project and replace relative paths

Closes #333

See merge request Chill-Projet/chill-bundles!766
2025-02-19 10:57:59 +00:00
d2fcb6945b Setup alias for use in standalone chill-bundles project and replace relative paths 2025-02-19 10:57:59 +00:00
c89e3785ef Merge branch '360-restore-document-on-workflow-cancel' into 'master'
Add event subscriber for document restoration on cancel

Closes #360

See merge request Chill-Projet/chill-bundles!798
2025-02-17 12:22:57 +00:00
9f17ec4841 Merge branch '353-doc_require_to_populate_languages' into 'master'
doc: add languages population command

Closes #353

See merge request Chill-Projet/chill-bundles!792
2025-02-17 12:22:25 +00:00
b277a7749a Merge branch '357-doc_address-ref-requires-language' into 'master'
doc: chill:main:address-ref-from-best-addresse requires a language code

Closes #357

See merge request Chill-Projet/chill-bundles!793
2025-02-17 12:21:48 +00:00
c8b6b6e33a Merge branch '349-suggest-agents-traitants' into 'master'
Resolve "Proposer en plus du référent de parcours les agents traitants saisis dans toutes les cations d'accompagnement du parcours"

Closes #349

See merge request Chill-Projet/chill-bundles!787
2025-02-17 12:21:10 +00:00
10eaebf610 Resolve "Proposer en plus du référent de parcours les agents traitants saisis dans toutes les cations d'accompagnement du parcours" 2025-02-17 12:21:10 +00:00
0a34f9086f Add event subscriber for document restoration on cancel
Implement an event subscriber to restore documents to their last kept version when a workflow transition ends in a non-positive final state. Includes corresponding unit tests and an unreleased feature change log entry.
2025-02-14 15:08:42 +01:00
739e0b1692 Merge branch 'fix/docgen-accompanying-period-context-with-list-aworks' into 'master'
Refactor username mapping in activity context filter.

See merge request Chill-Projet/chill-bundles!797
2025-02-14 12:20:07 +00:00
8db8f5fdf5 Refactor username mapping in activity context filter.
Replaced array_map with a foreach loop for clarity and maintainability when extracting usernames from work referrers. This ensures better readability and aligns with coding standards.
2025-02-14 12:11:28 +01:00
fc32f9eca9 Merge branch 'add-dependents' into 'master'
add household properties :  number of dependents and number of dependents with disabilities

See merge request Chill-Projet/chill-bundles!778
2025-02-13 12:41:29 +00:00
ab35e8c034 Release v3.8.2 2025-02-10 14:52:22 +01:00
2aded2974f Merge branch '358-remove-filter-button' into 'master'
Remove "filter" button from attachment modal in workflows

Closes #358

See merge request Chill-Projet/chill-bundles!794
2025-02-10 13:49:09 +00:00
f84c1632b2 Remove "filter" button from attachment modal in workflows
The "filter" button was unnecessary in the document list within the "add attachment" modal and has been removed for simplicity. This change does not involve any schema modifications and resolves issue #358.
2025-02-10 14:41:53 +01:00
Christophe Siraut
03717a1a87 ChillPersonBundle: move numberOfDependents configuration to a new household node; extend AdministrativeStatusRepository and EmploymentStatusRepository from ServiceEntityRepository 2025-02-07 17:45:33 +01:00
Christophe Siraut
02c524dd79 doc: chill:main:address-ref-from-best-addresse requires a language code 2025-02-07 10:53:53 +01:00
99e4824137 Release bundles v.3.8.1 2025-02-05 18:14:22 +01:00
dacaaea235 Fix household link in parcours banner 2025-02-05 18:09:34 +01:00
096466e79e Add missing lines for v3.8.0 2025-02-03 22:22:11 +01:00
7285e5c2b0 Merge branch '331-manage-attachments-to-workflow' into 'master'
Add attachments to workflow

Closes #331

See merge request Chill-Projet/chill-bundles!764
2025-02-03 21:15:00 +00:00
37227a3aeb Add attachments to workflow 2025-02-03 21:15:00 +00:00
7569667189 Release v3.8.0 2025-02-03 22:11:42 +01:00
b0993f4062 Merge branch '334-current-user-activity-suggestion' into 'master'
Resolve "Quand on crée un échange, l'utilisateur courant doit toujours être suggéré"

Closes #334

See merge request Chill-Projet/chill-bundles!786
2025-02-03 21:08:49 +00:00
7c79b65f48 Merge branch '350-validation_person_duplicate' into 'master'
Resolve "Erreur 500 lorsqu'un utilisateur fusionne deux dossiers d'usagers, et que les deux dossiers usagers sélectionnés sont les mêmes"

Closes #350

See merge request Chill-Projet/chill-bundles!788
2025-02-03 21:04:28 +00:00
b8f25bcd45 Resolve "Erreur 500 lorsqu'un utilisateur fusionne deux dossiers d'usagers, et que les deux dossiers usagers sélectionnés sont les mêmes" 2025-02-03 21:04:27 +00:00
f4efb0e975 Merge branch '351-prettier_span_fix' into 'master'
Resolve "UX bug caused by 'Prettier' linter"

Closes #351

See merge request Chill-Projet/chill-bundles!790
2025-02-03 21:02:46 +00:00
c641baec78 Resolve "UX bug caused by 'Prettier' linter" 2025-02-03 21:02:44 +00:00
cc150e32f0 Merge branch '354-fix_creation_document_category' into 'master'
Resolve "chill_doc: cannot create a document category"

Closes #354

See merge request Chill-Projet/chill-bundles!791
2025-02-03 21:02:03 +00:00
Christophe Siraut
bc7f0907ab doc: add languages population command 2025-02-03 14:05:08 +01:00
26cf6459b4 Add changie 2025-02-03 11:23:12 +01:00
d0fa6dd512 Apply fix to query idInsideBundle for documentCategory creation 2025-02-03 11:21:00 +01:00
Christophe Siraut
fbdc0d32f0 ChillPersonBundle: Add numberOfDependents and numberOfDependentsWithDisabilities 2025-01-31 10:13:47 +01:00
Christophe Siraut
5f31473c90 ChillMainBundle: optionnaly mask aggegators in ExportType 2025-01-31 09:37:46 +01:00
Christophe Siraut
98cf167040 ChillPersonBundle: add aggregators for administrative status and employment status 2025-01-31 09:37:46 +01:00
Christophe Siraut
6c37d798bf ChillPersonBundle: add administrativeStatus property to Person 2025-01-31 09:06:45 +01:00
03748a7e84 Add changie 2025-01-30 12:00:11 +01:00
9e3431f397 Merge branch 'improve_news_item_admin_form' into 'master'
Improve ux news item admin form

See merge request Chill-Projet/chill-bundles!779
2025-01-27 10:59:51 +00:00
912861dbff Remove assert attribute on startdate 2025-01-27 11:03:46 +01:00
35f25daf7c Merge branch '320-display-persons-in-banner' into 'master'
Display first associated persons in the banner of an accompanying course

Closes #320

See merge request Chill-Projet/chill-bundles!769
2025-01-23 20:19:31 +00:00
21274155b5 Display first associated persons in the banner of an accompanying course 2025-01-23 20:19:31 +00:00
3f7c136d6b Remove yarn.lock from tracking 2025-01-23 12:40:39 +01:00
5d9c573853 Merge branch '319-display-info-in-notification' into 'master'
Resolve "Afficher les noms des usagers et l'entité concerné par l'entité notifiée dans la liste des notifications"

Closes #319

See merge request Chill-Projet/chill-bundles!767
2025-01-23 11:34:16 +00:00
9a5fd67842 Resolve "Afficher les noms des usagers et l'entité concerné par l'entité notifiée dans la liste des notifications" 2025-01-23 11:34:16 +00:00
2755bc12c4 Add current user to suggested users when creating activity 2025-01-22 15:41:25 +01:00
9e191f1b5b Restrict eslint on src directory 2025-01-22 14:19:30 +00:00
ab684a20ad Release version v3.7.1 2025-01-21 23:06:30 +01:00
bc92b52498 Merge branch 'fix-notifier-config' into 'master'
Fix notifier  legacy configuration and some improvements

See merge request Chill-Projet/chill-bundles!784
2025-01-21 22:05:27 +00:00
be5655e537 Refine Notifier component configuration guidance
Added detailed instructions to configure the Symfony Notifier component correctly, emphasizing proper setup for SMS providers like OVHcloud. Clarified removal of legacy configurations and included examples for both utilizing and replacing the added configuration.
2025-01-21 22:59:08 +01:00
ceb0bd982e Prevent default texter configuration if already defined
Check existing framework configurations for `texter_transports` before applying default settings. This avoids overwriting or conflicting with pre-defined notifier configurations.
2025-01-21 22:59:08 +01:00
47c0af3623 Handle missing message IDs in SentMessageEventSubscriber
Added a condition to log an info message when the sent SMS lacks a message ID. Ensures clearer distinction between successful and incomplete SMS message logging.
2025-01-21 22:39:37 +01:00
f6f2efee2c Release v3.7.0 with new feature and updated dependencies
Introduce the Symfony Notifier component for SMS messaging, supporting more providers. Fix referrer's scope and job aggregation issue (#348). Update numerous dependencies, including Babel and ESLint, for improved stability and functionality.
2025-01-21 16:07:00 +01:00
59fd9fc63f Add a line in the documentation about the role of prettier within eslint configuration 2025-01-21 10:36:45 +01:00
ec2c08681e Add --fix to eslint yarn command 2025-01-21 09:52:29 +01:00
fedcbb9a70 Add missing changie for MR !782 2025-01-20 15:47:01 +01:00
3f1a4fe353 Merge branch 'short-message-use-notifier-component' into 'master'
Send short messages using Notifier integration

See merge request Chill-Projet/chill-bundles!782
2025-01-20 14:17:01 +00:00
fc27c73dab Merge branch '332-changie-schema-prompt' into 'master'
Add a prompt to signal a schema change in the db

Closes #332

See merge request Chill-Projet/chill-bundles!772
2025-01-20 14:13:33 +00:00
20bfd5b717 Add Rector command to composer scripts
Included the Rector command in composer.json to streamline running Rector tasks. This addition ensures consistency and improves developer efficiency by integrating the tool directly into the project workflow.
2025-01-20 15:10:44 +01:00
5e3a1eb2ab Remove legacy ShortMessage components and integrate Notifier
Replaced outdated ShortMessage functionalities with Symfony's Notifier component for handling SMS messages. Deprecated legacy `ShortMessage` components and introduced a transition layer for existing OVH configurations. Updated dependencies and environment setup to support the new implementation.
2025-01-20 15:10:44 +01:00
b02820407c Add log SMS when a message is sent
Introduced a new event subscriber to log SMS sent events with details such as recipient and message IDs. This enhances monitoring and debugging of SMS delivery.
2025-01-20 15:10:43 +01:00
594ed4a5b4 Replace custom ShortMessage usage with Symfony’s SmsMessage.
Switched the entire short message notification system to leverage Symfony's Notifier component and its TexterInterface with SmsMessage. This update simplifies the implementation, removes custom short message handling, and aligns with Symfony's standardized approach.
2025-01-20 15:10:43 +01:00
88fbf7bc1c Add Symfony Notifier integration
Integrated Symfony Notifier into the project by adding it to `composer.json` and creating a configuration file `notifier.yaml`. Updated `symfony.lock` to include the recipe configuration for Notifier. Minor documentation formatting issues were also fixed in `index.rst`.
2025-01-20 14:28:49 +01:00
aa26e67f6f Update PHP-CS-Fixer cache path and add PHPStan command
Changed the cache path in `.php-cs-fixer.dist.php` to improve organization by moving it to the `var` directory. Added a new Composer script for running PHPStan to streamline static analysis workflows.
2025-01-20 14:12:24 +01:00
21ac3eaab4 Merge branch '348-erreur-dans-le-regroupement-par-service-du-referent-de-parcours' into 'master'
Resolve "Erreur dans le regroupement par service du référent de parcours"

Closes #348

See merge request Chill-Projet/chill-bundles!783
2025-01-20 12:10:25 +00:00
2ff500b00e Resolve "Erreur dans le regroupement par service du référent de parcours" 2025-01-20 12:10:25 +00:00
19fa308c06 Update chill bundles to version 3.6.0 2025-01-16 18:00:48 +01:00
1b831bc424 Fix activity between dates filter: condition added for alias 2025-01-16 15:19:38 +01:00
573118e514 Undo change migration 2025-01-16 13:05:18 +01:00
0cabf5654a Add changie for fix 2025-01-16 12:25:42 +01:00
cfb547d55f Increase length of varchar for id chill_person_marital_status 2025-01-16 12:23:59 +01:00
a915c35026 Rector changes 2025-01-16 10:25:02 +01:00
018f8aef5c Add export button to social actions template 2025-01-15 16:45:05 +01:00
de6385ba21 Refactor SocialIssuesExportController to include method for exporting social actions 2025-01-15 16:44:45 +01:00
edb51dd3cd Add export button to template 2025-01-15 16:35:09 +01:00
c379bccad4 Create social issue export controller 2025-01-15 16:33:57 +01:00
bd9ad8a569 remove prettier command from yarn 2025-01-15 13:08:26 +01:00
0cdd9184a3 Add condition to rendering of schema change 2025-01-14 16:10:58 +01:00
cb5fd2b69d Merge branch 'address-importer-ban' into 'master'
Add service and command to import French addresses from BAN

See merge request Chill-Projet/chill-bundles!781
2025-01-13 16:09:17 +00:00
feebcf6662 Add changie [ci-skip] 2025-01-13 17:08:45 +01:00
2a61197999 Merge branch '332-changie-schema-prompt' of https://gitlab.com/Chill-Projet/chill-bundles into 332-changie-schema-prompt 2025-01-13 16:22:14 +01:00
0a53a9a9d1 Add a prompt to signal a schema change in the db 2025-01-13 16:22:04 +01:00
eea1e40663 Merge branch 'improve_news_item_admin_form' of https://gitlab.com/Chill-Projet/chill-bundles into improve_news_item_admin_form 2025-01-13 16:20:08 +01:00
1b0771eb07 Add changie 2025-01-13 16:19:52 +01:00
3a74c48104 Indicate user to set startDate equal to or greater than today + set empty_data in form content field 2025-01-13 16:19:52 +01:00
6de4861b98 Fix email attachment handling in address import reports
Updated attachment logic to use in-memory file contents and apply a `.gz` suffix to filenames. This ensures better file handling and resolves potential issues with attaching files directly from a path.
2025-01-10 23:00:40 +01:00
b4a1e824ac Add service and command to import French addresses from BAN
Introduce a service to handle the import of French addresses from the Base Adresse Nationale (BAN) dataset. Add a new console command `chill:main:address-ref-from-ban` to trigger the import by department numbers, with an option to send a report email for unmatched addresses.
2025-01-10 22:52:08 +01:00
d87cf925e2 Add changie file for storing document on disk feature 2025-01-09 16:28:36 +01:00
ce3cce7b95 Merge branch '346-store-docs-on-disk' into 'master'
Resolve "Permettre de stocker les documents sur disque, localement."

Closes #346

See merge request Chill-Projet/chill-bundles!774
2025-01-09 15:16:45 +00:00
6c97654e5e Add documentation for document storage configuration
Introduce a new guide detailing document storage options, including on-disk storage and cloud-based OpenStack integration. This document explains configuration steps, benefits, and limitations for both methods, and is now linked in the production installation index.
2025-01-09 16:05:58 +01:00
0787e61c22 Set default configuration file for chill_doc_store 2025-01-09 15:25:44 +01:00
73bcfb82b7 Add configuration option to select storage driver
Introduces a new `use_driver` configuration option to specify the desired storage driver (`local_storage` or `openstack`). Ensures proper validation to handle multiple drivers and throws appropriate errors when configurations are inconsistent or missing. Refactors related logic to improve clarity and maintainability.
2025-01-09 15:25:43 +01:00
812e4047d0 Adjust key size in KeyGenerator to 32 bytes.
Changed the key size from 128 bytes to 32 bytes in the KeyGenerator service. This aligns with the expected algorithm requirements and ensures proper cryptographic behavior.
2025-01-09 15:25:43 +01:00
999ac3af2b Add TempUrl signature validation to local storage
Implemented local storage-based file handling with TempUrl signature validation for upload and retrieval. Added validation checks for parameters like max file size/count, expiration, and signature integrity. Included unit tests for TempUrl signature validation and adjusted configuration for local storage.
2025-01-09 15:25:42 +01:00
0c628c39db store encrypted content 2025-01-09 15:25:42 +01:00
c65f1d495d Refactor ConfigureOpenstackObjectStorageCommand
- change namespace for more obvious handling;
- remove command of local storage is configured
2025-01-09 15:25:41 +01:00
83f7086bb0 Configure DI for providing kernel secret for TempUrlLocalStorageGenerator 2025-01-09 15:25:41 +01:00
c1e449f48e Implements StoredObjectManager for local storage 2025-01-09 15:25:41 +01:00
1f6de3cb11 Implement TempUrlLocalStorageGenerator and its tests
Added the full implementation for TempUrlLocalStorageGenerator, including methods to generate signed URLs and POST requests with expiration and signature logic. Introduced corresponding unit tests to validate functionality using mocked dependencies.
2025-01-09 15:25:40 +01:00
3a2548ed89 Select storage depending on configuration 2025-01-09 15:25:39 +01:00
d7652658f2 Define new configuration for local storage 2025-01-09 15:25:39 +01:00
67b5bc6dba Implements required interface to store documents on disk 2025-01-09 15:25:38 +01:00
e25c1e1816 Refactor object storage to separate local storage and openstack storage 2025-01-09 15:25:38 +01:00
282b7f7fbb Merge branch 'import-addresses-handle-no-postcode' into 'master'
Allow addresses without postal code to be imported without failure, and add email reporting for unimported addresses in import commands

See merge request Chill-Projet/chill-bundles!780
2025-01-09 11:52:21 +00:00
ab311eaecb Add email reporting for unimported addresses in import commands
Enhanced address import commands to optionally send a recap of unimported addresses via email. Updated import logic to handle cases where postal codes are missing, log issues, and generate compressed CSV reports with failed entries.
2025-01-09 12:21:10 +01:00
b37d7fb907 Add changie 2025-01-08 16:21:36 +01:00
57b8dacba0 Indicate user to set startDate equal to or greater than today + set empty_data in form content field 2025-01-08 16:18:13 +01:00
edcc01149b Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2025-01-07 16:59:32 +01:00
27b2d77fdb Fix EntityToJsonTransformer for saved exports 2025-01-07 16:59:16 +01:00
96bb98f854 upgrade yarn deps 2025-01-07 10:03:40 +01:00
68ed2db51e Refactor exception type to InvalidConfigurationException.
Replaced InvalidArgumentException with InvalidConfigurationException for widget service alias conflicts. This ensures the exception better reflects the configuration-related nature of the error.
2025-01-07 10:03:24 +01:00
184bb095d8 Update chill-bundles version to 3.5.2 2024-12-19 10:45:07 +01:00
78c8e94765 Merge branch '345-export-activity-bug' into 'master'
Fix the filtering of users that have been associated to an activity between certain dates

Closes #345

See merge request Chill-Projet/chill-bundles!773
2024-12-19 09:41:21 +00:00
c8d1a91953 Fix the filtering of users that have been associated to an activity between certain dates 2024-12-19 09:41:21 +00:00
3e8e2b0fa8 Merge branch 'add-employment-status' into 'master'
add an employmentStatus property to the person entity

See merge request Chill-Projet/chill-bundles!763
2024-12-17 15:15:57 +00:00
Christophe Siraut
2c9c700ca7 composer.json: specify doctrine/data-fixtures version 2024-12-16 17:35:22 +01:00
Christophe Siraut
110db30748 ChillPersonBundle: add employmentStatus property to Person 2024-12-16 17:35:19 +01:00
Christophe Siraut
1f96f76f87 ChillPersonBundle: add a visibility parameter to addFieldNode() 2024-12-16 16:54:18 +01:00
Christophe Siraut
65902ea231 ChillCUstomFieldsBundle: Symfony\Component\Frm\FormFactory::createNamedBuilder(): Argument #1 () must be of type string 2024-12-16 16:54:18 +01:00
Christophe Siraut
88c0b1570d composer: require-dev php-cs-fixer 2024-12-16 16:54:18 +01:00
4933d2251c fix tests about PdfSignedMessageHandler.php 2024-12-16 16:50:07 +01:00
c939ff4a4e Release v3.5.1 2024-12-16 15:45:29 +01:00
82fb98348b Wrap PdfSignedMessage handling in a transaction
Ensure atomicity when writing stored objects and marking signatures as signed by wrapping these operations in a database transaction. This reduces the risk of partial updates and improves data consistency.
2024-12-16 15:44:40 +01:00
d56d00421a Add convetion on database table and add translation file in english for the conventions 2024-12-12 11:37:54 +01:00
de11fa86c6 Add database table naming convention 2024-12-12 10:52:39 +01:00
4cc254a3e5 Add script to package.json for eslint + take ts files into account with new baseline 2024-12-11 14:24:53 +01:00
22ce16ef49 Fix display of gender label in the filiation 2024-12-11 14:12:54 +01:00
1e52a93cbe ignore certain folders for eslint 2024-12-11 12:26:41 +01:00
16fe07cce7 More automatic eslint fixes, update baseline and eslint docs 2024-12-11 11:32:29 +01:00
e8962782ed Merge branch 'implement_eslint' into 'master'
Implement ESLint

See merge request Chill-Projet/chill-bundles!752
2024-12-11 10:26:35 +00:00
64a853fb6d Renew baseline after applying prettier 2024-12-11 10:50:01 +01:00
ebfd48e41f Apply prettier to files 2024-12-11 10:49:11 +01:00
a6aa2a81c2 Resolve merge with master 2024-12-11 10:46:06 +01:00
98d29c2134 Add baseline to eslint 2024-12-11 10:38:55 +01:00
60386ae9ac Add a prompt to signal a schema change in the db 2024-12-10 18:30:44 +01:00
559901e528 Update chill bundles version to v3.5.0 2024-12-09 11:35:16 +01:00
05bc69fd33 Fix display of gender label
Label already localized in serialization so not to be accessed as label.fr within vue component
2024-12-09 11:32:28 +01:00
49da62d364 Merge branch 'signature-state-change-wrapped-into-transaction' into 'master'
Refactor transaction handling for signature state changes, to wrap them into transactions

See merge request Chill-Projet/chill-bundles!771
2024-12-06 11:43:08 +00:00
3af7824d01 Refactor transaction handling for signature state changes, to wrap them into transactions
Wrap signature state changes in transactions to prevent race conditions and ensure data integrity. Update controller and test class names to reflect broader state change capabilities. Enhance documentation with comments to clarify transaction requirements and procedure details for signature operations.
2024-12-06 12:37:17 +01:00
033053c437 Restrict the version of amqp-messenger 2024-12-06 12:37:16 +01:00
633bb00154 fix typing of Datetime 2024-12-06 12:37:16 +01:00
f5c1b5cf8a Merge branch '318-signature-vue-app-show-full-doc' into 'master'
Resolve "[App de signature] Pouvoir voir le document en continu (toutes les pages ensemble)"

Closes #318

See merge request Chill-Projet/chill-bundles!761
2024-12-05 16:31:04 +00:00
ccd71da4e4 Add changie 2024-12-05 17:25:08 +01:00
1eadb3bbdb add missing configuration for chill_workflow_signature_documents.yaml 2024-12-05 17:16:06 +01:00
nobohan
0bb5a79cae FEATURE signature: show full pages - show next signature button even if one signature 2024-12-05 17:16:06 +01:00
nobohan
bd3198e42b FEATURE signature: show full pages - UI and turn pages 2024-12-05 17:16:05 +01:00
nobohan
96dfddc55f FEATURE signature: show full pages - can add zone + fix hitSignature is canvas-aware 2024-12-05 17:16:05 +01:00
nobohan
da37a3db5f FEATURE signature: show full pages - can select zone 2024-12-05 17:16:04 +01:00
nobohan
c2882b1079 FEATURE signature: show full pages - WIP 2024-12-05 17:16:01 +01:00
b9e515f4e6 Merge branch '317-add-zone-bug-with-zoom' into 'master'
Resolve "Lorsqu'on place manuellement une zone de signature avec le zoom actif, la zone n'est pas placée correctement sur la page"

Closes #317

See merge request Chill-Projet/chill-bundles!757
2024-12-05 15:49:38 +00:00
nobohan
df2ea7e1ba FIXED adding zone in signature vue app was not placed correctly when zooming 2024-12-05 16:41:51 +01:00
nobohan
d59cda9cc4 DX format signature vue app 2024-12-05 16:41:51 +01:00
54e10cacd3 git use apk instead of apt-get to install jq 2024-12-05 16:25:40 +01:00
3ca126804b Implement baseline comparison for eslint in the CI 2024-12-05 16:13:07 +01:00
40d733c290 Add a baseline for eslint 2024-12-05 16:08:42 +01:00
7a98bb5a06 release v3.4.3 2024-12-05 15:44:51 +01:00
2ce8f540fe release v3.4.3 2024-12-05 15:34:28 +01:00
6c4d8990cc Merge branch '342-error-while-deploying-chill-version-v3-4-2-migrations-are-blocked' into 'master'
Resolve "Error while deploying chill version v3.4.2: migrations are blocked"

Closes #342

See merge request Chill-Projet/chill-bundles!770
2024-12-05 14:33:34 +00:00
351e9c3fcc Remove custom join table configuration for documents
The custom join table setup for the 'documents' relation has been removed. This change relies on the default naming and configuration provided by Doctrine, simplifying the code and reducing potential configuration errors.
2024-12-05 15:32:35 +01:00
1b65cac1df Make person phone number nullable
Removed the "not null" constraint from the person phone number field to allow for better flexibility in data storage, such as storing notes. This change rectifies issues in certain instances where the migration had incorrectly set the field to "not null". Adjustments include updating the database schema and modifying the entity definition to reflect this change.
2024-12-05 15:30:25 +01:00
4ebec02178 Release v3.4.2 2024-12-05 13:41:01 +01:00
6aceec6df7 Merge branch '337-activity-storedobject-unique-constraint' into 'master'
Enforce unique constraint on relation activity storedobject

Closes #337

See merge request Chill-Projet/chill-bundles!768
2024-12-05 12:37:39 +00:00
b0f1cf272f Enforce unique constraint on relation activity storedobject 2024-12-05 12:37:39 +00:00
486ad3bb41 Add changie for cleaning migrations [ci skip] 2024-11-29 12:21:17 +01:00
a4cd15d2f5 Merge branch 'clean_migrations' into 'master'
Clean migrations

See merge request Chill-Projet/chill-bundles!741
2024-11-29 11:18:11 +00:00
4bc92a61ca Fix typo 2024-11-29 12:09:03 +01:00
6ebab8e4fb Process review of migrations 2024-11-29 12:06:44 +01:00
9c918a151c Php cs fix 2024-11-29 12:06:43 +01:00
5eec4f1281 Fix pipeline rector and phpunit 2024-11-29 12:06:43 +01:00
b01c9b86db php cs fixer 2024-11-29 12:06:42 +01:00
55c4ba3f04 Clean migration with diverse alter type statements + drop cfdata_old on chill_person_person table 2024-11-29 12:06:41 +01:00
9698a5e987 Clean migration of default definitions for entity properties 2024-11-29 12:06:40 +01:00
31912b9b91 Clean migration of NULL definition on entity properties 2024-11-29 12:06:40 +01:00
a97a586b9d Clean migrations of index rename statements 2024-11-29 12:06:39 +01:00
ddc48db06f Clean taskbundle migration 2024-11-29 12:06:38 +01:00
fa8f6d6f15 Clean migration for thirdparty bundle 2024-11-29 12:06:37 +01:00
877c33e4ce Clean migration for person bundle 2024-11-29 12:06:37 +01:00
a604f3947c Clean migration for job bundle 2024-11-29 12:06:36 +01:00
82cb359072 Clean migration for main bundle 2024-11-29 12:06:36 +01:00
de711181df Clean migration for budget bundle 2024-11-29 12:06:35 +01:00
f2eaf23c2a Clean migration for activity bundle 2024-11-29 12:06:35 +01:00
e043b0cf12 Merge branch '329-gender-docgen-normalization' into 'master'
Normalize genderEntity for document generation

Closes #329

See merge request Chill-Projet/chill-bundles!762
2024-11-29 11:01:54 +00:00
0fb822e7c1 Add changie 2024-11-28 13:48:55 +01:00
a4510e2697 php cs fixes 2024-11-28 13:34:38 +01:00
f820273dd7 Pass class as second parameter to getReference() fixture method 2024-11-28 13:28:52 +01:00
19e6ceba28 Add second parameter to add-, get-, hasReference() methods in fixture classes 2024-11-28 12:44:14 +01:00
0ac49d1fde php cs fixes 2024-11-28 12:24:11 +01:00
c147d267d9 Merge branch '329-gender-docgen-normalization' of https://gitlab.com/Chill-Projet/chill-bundles into 329-gender-docgen-normalization 2024-11-28 12:20:26 +01:00
fa767110e8 Add int return type to getOrder() method in fixture classes 2024-11-28 12:20:17 +01:00
11ba2cf889 [phpstan fix] Add array return type on all dependency fixture getDependencies methods 2024-11-28 12:02:48 +01:00
d68de96004 [phpstan fix] Add void return type on all fixture load methods 2024-11-28 11:47:17 +01:00
8a16030b49 Add genderEntity to normalizeNullValue of PersonDocGenNormalizer 2024-11-28 11:31:22 +01:00
5866496f49 Add genderEntity key to peronDocGenNormalizerTest 2024-11-27 20:23:57 +01:00
f6387212cb Revert "Merge branch 'manage-translations' into 'master'"
This reverts commit cd99633d15, reversing
changes made to a9384bf734.
2024-11-27 17:54:11 +01:00
a869e5a78b Resolve merge conflicts 2024-11-26 18:11:04 +01:00
401db94d6c php cs fixer of GenderDocGenNormalizerTest 2024-11-26 18:09:40 +01:00
cd99633d15 Merge branch 'manage-translations' into 'master'
Create scripts to manage translations more consistently

See merge request Chill-Projet/chill-bundles!723
2024-11-26 17:08:10 +00:00
3e355a6465 php cs fixer 2024-11-26 18:04:36 +01:00
5afb92d549 add unit test for GenderDocGenNormalizer and move file to MainBundle 2024-11-26 18:04:12 +01:00
f4f5153ed0 Take null value for gender into account and user Interface for translatableStringHelper 2024-11-26 15:37:05 +01:00
0382f5ef61 Fix php cs fixer 2024-11-26 15:33:16 +01:00
8f34c841f3 Fix pipeline 2024-11-26 14:42:04 +01:00
e339623e2d Fix within ListWorkflow component + include ux_translator config file 2024-11-26 13:17:24 +01:00
a9384bf734 Merge branch 'fix-cs-3.65.0' into 'master'
Upgrade CS to PHP CS Fixer 3.65.0 (700668e) Persian Successor (was version 3.64.x)

See merge request Chill-Projet/chill-bundles!765
2024-11-26 11:21:44 +00:00
83ef12a2ef Upgrade CS to PHP CS Fixer 3.65.0 (700668e) Persian Successor (was version 3.64.x) 2024-11-26 12:15:29 +01:00
0b22250dd5 Normalize genderEntity for document generation 2024-11-26 10:05:03 +01:00
b9b5c4aa74 Remove unused import 2024-11-25 18:57:01 +01:00
1f306a7270 Update bundles.php, symfony.lock and package.json file 2024-11-25 18:49:32 +01:00
20d8cc2d17 Add translation key and remove unused plugin 2024-11-25 18:49:03 +01:00
e340be512c Merge master into translations branch 2024-11-25 18:24:08 +01:00
63ed046c9a Normalize genderEntity for document generation 2024-11-25 17:44:59 +01:00
b52532eb82 Merge branch '311-refactor-directory-tree' into 'master'
Resolve "Permettre le développement en clonant directement le bundle, sans app"

Closes #311

See merge request Chill-Projet/chill-bundles!754
2024-11-22 13:27:19 +00:00
81da34f1b6 Improve documentation for installation 2024-11-22 14:13:39 +01:00
8a2272f93b release v3.4.1 2024-11-22 09:50:27 +01:00
f1e5ccd432 Add workflow and signatures to dev skeleton 2024-11-22 09:45:09 +01:00
9225077ec4 Add Symfony Web Profiler Bundle
Integrate Symfony Web Profiler Bundle for improved debugging and profiling in development environment. Updated composer configuration, created necessary configuration files for both packages and routes, and locked the bundle version in symfony.lock file.
2024-11-22 09:45:09 +01:00
b92e60fa26 Rename header folder and update path in configuration
Renamed the folder 'resource' to 'resources' to better reflect its contents. Updated the file path in the PHP CS Fixer configuration accordingly to ensure continued functionality.
2024-11-22 09:45:08 +01:00
16cd63ec84 Add ignores for development-related directories 2024-11-22 09:45:08 +01:00
b59b4a644b Fix date normalization: use the same timezone consistently 2024-11-22 09:45:07 +01:00
40fec3c530 Fix the default firewall in test login
Update admin client authentication method

Modified `getClientAuthenticatedAsAdmin` to accept an optional firewall parameter and updated dependency to use `chill_in_memory` user provider. This allows more flexible and configurable testing of client authentication against different firewalls.
2024-11-22 09:45:07 +01:00
3e0731f06e Create an symfony app's skeleton to ease the development
[WIP] first import of automated recipes

[WIP] fix configuration file to be able to compile kernel and serve route

[WIP] first build of assets

[WIP] Continue working on configuration to load a page

[WIP] Reset the bin directory

[WIP] remove default migrations files

[WIP] fix configuration for running tests

[WIP] Installation instructions

Fix the default firewall in test login

[WIP] fix cs

[WIP] update gitlab-ci

[WIP] update gitlab-ci

[WIP] update gitlab ci

[WIP] fix config for running tests

[WIP] fix gitlab ci

[WIP] try tests/bootstrap php file from symfony bridge instead of phpunit recipe

remove kernel.php file

fix loading of entrypoint.json in test

[wip] increase memory limit for phpstan in test/ci

[WIP]: set the correct timezone directly within the phpunit.xml.dist file

[WIP]: fix security configuration

WIP: fix config for testing
2024-11-22 09:45:05 +01:00
9ef884349a Add workflow title to notification content
Updated the French template for workflow transition notifications to include the workflow title. This ensures users have more context in the notification email.
2024-11-21 21:26:08 +01:00
5acf9432d6 Add workflow title to notification content
Updated the French template for workflow transition notifications to include the workflow title. This ensures users have more context in the notification email.
2024-11-21 21:21:09 +01:00
4fdb722dc6 Update chill bundles to version v3.4.0 2024-11-20 14:50:41 +01:00
e113e3dce5 Merge branch '314-improve-admin' into 'master'
Resolve "[admin] Improve admin for document categories"

Closes #314 and #313

See merge request Chill-Projet/chill-bundles!753
2024-11-20 13:45:41 +00:00
6536662aba add changie for admin improvements 2024-11-20 14:07:07 +01:00
4127ce1d97 Fix conflicts after rebase 2024-11-20 12:45:55 +01:00
b327f65ef8 Fix the logic of adding a permission group to avoid duplicates being made 2024-11-20 12:43:50 +01:00
0f1604817b Allow the selection of multiple centers to create multiple groupcenters at once 2024-11-20 12:16:29 +01:00
63fc4f1089 Add translations for gender form in admin 2024-11-20 12:16:29 +01:00
ba3fe6af8c Fix pipeline phpstan, rector, php-cs-fixer 2024-11-20 12:16:29 +01:00
bc4c2c1471 Improve layout of event admin section 2024-11-20 12:16:29 +01:00
3f381c207d Add a notnull constraint on property 'type' when creating an event status 2024-11-20 12:16:29 +01:00
df30ca2c4f Improve user experience for creation of document categories with select field for document class 2024-11-20 12:16:29 +01:00
2573c32160 Update chill-bundles to v3.3.0 2024-11-20 12:10:45 +01:00
38886cd0b6 Rector correction in NotificationOnTransition 2024-11-20 10:23:33 +01:00
875d3293d2 Workflow: set comment on previous step 2024-11-20 09:47:11 +01:00
16d5f121db Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2024-11-19 16:29:55 +01:00
10999a2077 Add assets to task lists to render dynamic user picker 2024-11-19 16:29:44 +01:00
128f8b8852 Fix normalization of Date: use the same timezone as the original date 2024-11-19 15:40:53 +01:00
6ca4b91e1e Refactor breadcrumb macro parameters in Workflow templates
Updated the breadcrumb macro's parameters to accept `entity_workflow` directly instead of a context object. This change affects the index, list, and macro_breadcrumb templates, ensuring consistent parameter usage and improving readability.

This avoid exploiting a bug which was solved in twig 3.15.0
2024-11-19 12:58:20 +01:00
3a1947df9e Add entity workflow title to notification
Introduced `EntityWorkflowManager` to `NotificationOnTransition` to fetch and include the entity workflow title in notifications. Updated relevant tests to support the new functionality and verify the entity title retrieval process.
2024-11-19 12:01:31 +01:00
9012e68b70 Merge branch '1304-save-comments-on-workflow-step' into 'master'
Save the comments on a workflow step

See merge request Chill-Projet/chill-bundles!760
2024-11-19 10:15:15 +00:00
04b2def8a5 Save the comments on a workflow step 2024-11-19 10:15:15 +00:00
39b918e7eb Merge branch '326-fix-document-page-acc-course' into 'master'
Add unique constraints to prevent person_document and accompanying_course document with the same object_id

Closes #326

See merge request Chill-Projet/chill-bundles!759
2024-11-19 09:52:26 +00:00
4be6c09d4d Add unique constraints to prevent person_documnt and accompanyingcourse_document with duplicated object_id
This change ensures `object_id` uniqueness within `person_document` and `accompanyingcourse_document` tables. It includes migration scripts and entity annotations to enforce these constraints. This helps maintain data integrity and consistency across the database.
2024-11-19 10:50:46 +01:00
1961bf36e2 Changie added 2024-11-18 15:06:46 +01:00
9a44cf060f Add workflow title to notification emails for workflow transition, to user groups
Incorporated the workflow title into notification emails to provide more context to users. Updated the NotificationToUserGroupsOnTransition class and its tests to include the title from EntityWorkflowManager. Adjusted the French email templates to display the workflow title correctly.
2024-11-18 15:05:03 +01:00
723ca8db6a Remove date validation on deathDate
This change removes the `Assert\Date` validation on the `deathDate` property in the `Person` entity. The adjustment allows for more flexible input by not strictly enforcing the date format, which can resolve issues where the date string validation was previously causing errors.
2024-11-18 15:05:02 +01:00
52f06e2142 Translator dependencies added to chill-bundles 2024-11-18 14:57:13 +01:00
6ded75119c Add developers documentation for the correct management of translation keys 2024-11-18 13:04:27 +01:00
89fa10cede Change namespace for detect translation duplicate command 2024-11-18 13:03:47 +01:00
f04ef3c3e3 Merge branch '324-convert-to-pdf-on-signature-only' into 'master'
Lors de la procédure de signature, le document ne doit être converti qu'à partir du moment où la première signature est apposée

Closes #324

See merge request Chill-Projet/chill-bundles!758
2024-11-15 13:33:09 +00:00
b5f1f3153f Convert non-PDF documents before applying a signature
Enhanced the `addConvertedVersion` method in `StoredObjectToPdfConverter` to optionally include converted content in the response. Updated `SignatureRequestController` to handle non-PDF documents by converting them to PDF before processing the signature request.
2024-11-15 14:27:37 +01:00
03fe9a6d86 Update Signature App.vue to use a converted pdf
Introduced a new helper ts function to download documents as PDFs and integrated with the existing workflow. Enhanced `PDFSignatureZoneAvailable` to implement `LocaleAwareInterface` for better locale management and added PDF conversion handling for non-PDF documents. Updated App.vue to use the new PDF download method.
2024-11-15 14:27:36 +01:00
a312b45777 Remove ConvertToPdfBeforeSignatureStepEventSubscriber
This commit deletes the ConvertToPdfBeforeSignatureStepEventSubscriber.php file from the workflow directory. .
2024-11-15 14:27:35 +01:00
5d5150faa7 Add 'btn-sm' class to download button
The 'btn-sm' class was added to the download button in HistoryButtonListItem.vue to adjust its size. Additionally, a bug was fixed in DownloadButton.vue to correctly reference the 'type' property from 'atVersion'.
2024-11-15 14:27:34 +01:00
9b661c3b8f Let ConvertController return a pdf file directly without trying to converting it
Those changes improve performance when the file is already in pdf format.
2024-11-15 14:27:34 +01:00
aa0785fc71 Apply prettier rules 2024-11-14 18:47:38 +01:00
610227815a Add prettier to eslint to format vue, js and ts code + add script to run it locally 2024-11-14 18:46:22 +01:00
9d9f062417 add eslint to ci gitlab 2024-11-14 18:37:37 +01:00
0454e5d758 eslint corrections in mainbundle 2024-11-14 16:46:07 +01:00
2d6d2a1f58 eslint corrections in personbundle 2024-11-14 16:45:50 +01:00
f90fae4e14 Merge branch 'signature-app-master' into 'master'
Fixes for signature

See merge request Chill-Projet/chill-bundles!755
2024-11-14 11:23:37 +00:00
b7e27536bd Merge remote-tracking branch 'origin/master' into signature-app-master 2024-11-14 12:18:07 +01:00
887f3e0aa2 Merge branch '323-related-entity-permission-give-from-workflow' into 'master'
Permettre aux utilisateurs concerné par un workflow de modifier un document, même si, en dehors du workflow, ils ne possèdent pas de droits d'édition et de lecture sur ce document

Closes #323

See merge request Chill-Projet/chill-bundles!756
2024-11-14 11:12:37 +00:00
829fb669fe Update Workflow Permission Handling
Refactor the `WorkflowRelatedEntityPermissionHelper` to enhance permission checks for workflow-related entities. This includes updating methods, improving test coverage, and incorporating `MockClock` for date-sensitive operations.
2024-11-14 12:07:21 +01:00
a8660ecdb2 Merge branch 'adjust_list_household_export' into 'master'
Adjust list household export

See merge request Chill-Projet/chill-bundles!750
2024-11-14 08:53:44 +00:00
903a87c589 Merge branch '323-related-entity-permission-give-from-workflow' into signature-app-master 2024-11-13 22:44:29 +01:00
aad10cc61f Add workflow permission check to StoredObjectVoter
This commit introduces logic to grant permissions based on workflow conditions in the `AbstractStoredObjectVoter`. It also includes a new test case to ensure the workflow-based permission check functions correctly.
2024-11-13 22:41:30 +01:00
c99dda0126 Rename WorkflowStoredObjectPermissionHelper to WorkflowRelatedEntityPermissionHelper and create method isAllowedByWorkflow
Refactored class names and namespaces from WorkflowStoredObjectPermissionHelper to WorkflowRelatedEntityPermissionHelper across various modules. Updated associated tests and voter classes to reflect the changes, ensuring consistency and clarity in the codebase.
2024-11-13 22:41:23 +01:00
94f9ebd726 Add UserRender option to SignatureRequestController
Integrated a new UserRender option 'SPLIT_LINE_BEFORE_CHARACTER' with a value of 30 in the SignatureRequestController. This enhances the rendering format for user details.
2024-11-13 17:54:58 +01:00
5ad11041e0 Add line splitting in user render string functionality
Introduce a new option to split lines in user job and scope render strings based on a specified character limit. Implement a corresponding test to verify the correct behavior of this feature.
2024-11-13 17:54:58 +01:00
d50b169ab8 Add UserRender option to SignatureRequestController
Integrated a new UserRender option 'SPLIT_LINE_BEFORE_CHARACTER' with a value of 30 in the SignatureRequestController. This enhances the rendering format for user details.
2024-11-13 17:54:28 +01:00
ba2d8663f1 Add line splitting in user render string functionality
Introduce a new option to split lines in user job and scope render strings based on a specified character limit. Implement a corresponding test to verify the correct behavior of this feature.
2024-11-13 17:54:20 +01:00
d6c55c830b Persist EntityWorkflow and its steps with EntityManager
Refactored NotificationToUserGroupsOnTransition to utilize EntityManager for persisting EntityWorkflowStep. This ensures entities have generated IDs, leading to proper email notifications during workflow transitions.
2024-11-13 12:40:53 +01:00
937caa878e remove Date constraint on marital status date 2024-11-13 12:20:10 +01:00
21ec3121ec Merge branch 'signature-app-master' into 'master'
Signature app master

Closes #307

See merge request Chill-Projet/chill-bundles!743
2024-11-12 20:30:00 +00:00
261d47a8a4 Add changies
[ci-skip]
2024-11-12 21:25:23 +01:00
6453237340 Mark class as final and readonly 2024-11-12 21:22:51 +01:00
79621e8ab7 Add guard to block signatures on related entities without objects
Implemented a guard to prevent signatures on related entities that lack a stored object. It also includes corresponding tests and added translation for the error message in French.
2024-11-12 18:14:30 +01:00
bfa58177e0 fix url for granting access to workflow by key 2024-11-12 17:48:44 +01:00
c971e34675 JS correction in ChillWopiBundle required by ESLint 2024-11-12 15:39:52 +01:00
be2a119163 JS correction in ChillThirdpartyBundle required by ESLint 2024-11-12 15:39:31 +01:00
22ecb11227 JS corrections in ChillPersonBundle required by ESLint 2024-11-12 15:38:46 +01:00
ddf73e1a48 Updated URL in French workflow notification template
The absolute url in the French version of the workflow notification content to user group has been updated. It now points to 'chill_main_workflow_grant_access_by_key' instead of 'chill_main_workflow_show'. This update improves the user experience by taking the user directly to the desired page.
2024-11-12 14:52:39 +01:00
c3cc6c8353 Do not fail displaying notification when workflow has been deleted 2024-11-12 13:57:48 +01:00
3ec0d26001 Fix type error for displaying comment in accompanying period work detail view page 2024-11-12 10:13:20 +01:00
64d91e2afe Allow users to edit a document if they were added to the previous step of a workflow.
OP#826 Workflow - les utilisateurs des étapes précédentes sur un workflow doivent aussi avoir la main sur les étapes en cours du workflow (Vendee/accent-suivi-developpement/1289)

https://champs-libres.openproject.com/work_packages/826
2024-11-08 20:34:45 +01:00
5339d4f5d9 Refactor button to add a manual zone
- do not show the button if a zone is selected (to avoid to create two selected zones on the document);
- change the button while waiting for the user to create a new zone: this make visible the fact that the app is waiting for a user action
2024-11-08 19:35:03 +01:00
0439c29305 Prevent workflow execution for finalized transitions
Added a check in the workflow-show page script to stop the execution if a transition is marked as finalized (`toFinal`). This ensures that transitions leading to final states are not processed further.
2024-11-07 21:52:44 +01:00
8e34f6962a Add conditional cursor style for canvas when a zone is added within the canvas
Modified the canvas element to conditionally apply a CSS class when adding a zone. This change ensures the cursor changes to 'copy' for visual feedback during the add operation.
2024-11-07 21:34:49 +01:00
e5148f603b Add TransitionHasSignerIfSignature validator
Introduced a new validator `TransitionHasSignerIfSignature` to enforce that a signature transition must have a designated signer. Included related tests, updated DTO annotations, and added translations for new validation messages.
2024-11-07 19:55:09 +01:00
e2e24090ab Allow the selection of multiple centers to create multiple groupcenters at once 2024-11-07 18:50:02 +01:00
b6c141a785 Change zoomLevel from const to let.
Replaced `const` with `let` for `zoomLevel` in `App.vue` to allow reassignment. This change ensures proper handling of dynamic zoom levels during document signature operations.
2024-11-06 19:51:56 +01:00
db4d7669f1 Add duplication feature for evaluation documents within generic doc
Introduced a new method to duplicate evaluation documents and forward return path URLs. Updated templates to include duplication buttons and adjusted routing for handling the duplication process.
2024-11-06 19:34:41 +01:00
9526d016c6 Merge branch 'signature-app/zoom-button' into 'signature-app-master'
Signature app/zoom button

See merge request Chill-Projet/chill-bundles!751
2024-11-06 18:34:14 +00:00
b2f6dbbe30 Show the zoom level also if there is only one page in the document 2024-11-06 19:32:12 +01:00
5447ad2961 Fix casting zoom level from string to floatInt
Changed the type of the zoomLevel parameter from number to string and updated the assignment to parse the zoomLevel as a float. This ensures that the zoom functionality properly handles string inputs by converting them to numerical values.
2024-11-06 19:31:01 +01:00
d2b3ee0a2f Update version chill-bundles to v3.2.4 2024-11-06 18:10:55 +01:00
66b87358c8 remove push sass styles from job bundle in webpack config 2024-11-06 18:04:51 +01:00
83f0044eba Remove index.js file from webpack config in jobBundle 2024-11-06 18:01:50 +01:00
ac353ec3bc fix cs 2024-11-06 17:10:53 +01:00
7aca08c89e Allow to remove the canceled workflow to be deleted, if canceled
- OP#812
- https://champs-libres.openproject.com/work_packages/812
2024-11-06 17:10:48 +01:00
4d53c8a295 Add translations for gender form in admin 2024-11-06 14:08:21 +01:00
dd854ea339 Switch back to using .mjs extension otherwise webpack doesn't compile well with type:module specified in package.json file 2024-11-05 15:48:48 +01:00
1ac9d32565 Fix pipeline phpstan, rector, php-cs-fixer 2024-11-05 15:43:22 +01:00
63c2578012 Improve layout of event admin section 2024-11-05 15:34:01 +01:00
884b3684fe Add a notnull constraint on property 'type' when creating an event status 2024-11-05 15:28:52 +01:00
456d29e605 Improve user experience for creation of document categories with select field for document class 2024-11-05 15:28:11 +01:00
8cb2bb1ef4 Fix rector pipeline 2024-11-05 14:52:28 +01:00
cc7e9235b5 Update bundles version to v3.2.3 2024-11-05 14:41:19 +01:00
973ffcbffa Fix text color and background color of footer, was being overwritten 2024-11-05 14:39:09 +01:00
8c3de682d6 Change color of footer text to dark 2024-11-05 14:30:26 +01:00
e71c2f162c Fix display of accompanying period work referrers 2024-11-05 14:24:43 +01:00
f05c25853c Fix of errors: automatic and some manual 2024-11-04 19:56:03 +01:00
90798b12e5 Add ts parser and adjust config 2024-11-04 19:55:27 +01:00
f91f5ce27e Add eslint documentation to developers manual 2024-11-04 17:57:13 +01:00
43b70fd773 Rename translation key for workflow signature titles
Updated the translation key from 'workflow.signature_required_title' to 'workflow.signatures_title' in the workflow history view. This change ensures consistency and proper usage of the translation key across different parts of the application.
2024-11-04 15:26:07 +01:00
5c0a383909 Add null check to canRun method in CancelStaleWorkflowCronJob
Ensure the canRun method in CancelStaleWorkflowCronJob returns true when the cron job execution is null. This change includes updating the corresponding test case to cover the new behavior.
2024-11-04 14:16:52 +01:00
4dc2348893 Change behaviour to allow to add a new workflow (if available) and open the modal to list existing workflows in the same button
Use the feature of splitted dropdown buttons, from bootstrap.

See:
- OP#776
- https://champs-libres.openproject.com/work_packages/776
2024-11-04 14:05:57 +01:00
96f73b419d Eslint correction always return something in computed property 2024-10-31 19:11:49 +01:00
273f91fd00 Add config for eslint 2024-10-31 19:11:16 +01:00
27ecae4486 first eslint corrections 2024-10-31 17:28:02 +01:00
f90f1c7ef8 Install eslint and eslint vue plugin + config file 2024-10-31 17:27:45 +01:00
32459e6092 Fix gender translation for unknown 2024-10-31 14:14:37 +01:00
1e02fed32b Update chill bundles to v3.2.1 2024-10-31 12:20:07 +01:00
2c3818258a Fix fusion of person doubles and add changies for fixes 2024-10-31 12:13:21 +01:00
64f3b40694 Add the possibility of unknown to the gender entity 2024-10-31 12:10:35 +01:00
nobohan
76458cf375 signature: cancel button at the left + changed style 2024-10-30 10:38:34 +01:00
nobohan
5259ea71a1 signature vue app: improve responsive design 2024-10-30 10:29:08 +01:00
1cadc71d5a Update bundles to v3.2.0 : gender entity added 2024-10-30 10:11:36 +01:00
2b45a51f57 Merge branch 'create_gender_entity' into 'master'
Add gender entity

See merge request Chill-Projet/chill-bundles!740
2024-10-30 09:10:26 +00:00
4c66adee86 Add changie for gender entity creation 2024-10-30 09:57:35 +01:00
6c8fd99cd1 php cs fixes of personDocGenNormalizerTest 2024-10-30 09:31:53 +01:00
e886387f17 Fix PersonDocGenNormalizerTest 2024-10-29 19:05:30 +01:00
c79f030310 Fix person list exports 2024-10-29 18:04:14 +01:00
a648fd09b0 php cs fix 2024-10-29 17:10:00 +01:00
1bd5e6d582 Fix PersonControllerCreateTest 2024-10-29 17:02:32 +01:00
80940a7b19 LoadGenders fixture access string value of enum 2024-10-29 16:51:14 +01:00
7541238c1e Fix pipeline for LoadGenders file 2024-10-29 16:09:04 +01:00
34748dca76 Create a gender fixture 2024-10-29 15:55:25 +01:00
12bb264eb5 Php cs fixes 2024-10-29 15:44:11 +01:00
ac3ac432e1 Fix phpunit pipeline 2024-10-29 15:30:20 +01:00
a00f47c312 changie added 2024-10-29 14:38:47 +01:00
b503f58089 Rector fix 2024-10-29 14:38:29 +01:00
5629a0c124 Adjust query to also add households in the list that do not have an address 2024-10-29 14:32:37 +01:00
nobohan
3bc6595f58 add a zoom button for zooming to the document 2024-10-26 12:09:00 +02:00
989fdad561 Add chill_path_force_return_path method to routing helper
Implemented a new Twig function `chill_path_force_return_path` to enforce a specific return path within the URL. Updated relevant template to utilize this new function for better control over URL routing and return path management.

OP#787
https://champs-libres.openproject.com/work_packages/787
2024-10-25 18:33:22 +02:00
d7174cdb95 Reintroduce pending signatures section in person list view
Moved the pending signatures section within the person list view template to the correct location.

OP#771
https://champs-libres.openproject.com/work_packages/771
2024-10-25 18:20:58 +02:00
182e2fc3af Set 'required' to false for Email field in UserGroupType form.
Changed the Email field's 'required' option to false, allowing it to be optional. This adjustment aims to improve the usability and flexibility of the UserGroupType form.
2024-10-25 11:18:38 +02:00
7df5a22b14 Merge branch 'signature-app/OP768-alter-sending-after-signature' into 'signature-app-master'
When a user applies a signature in a workflow, the signer is the futureDestUser of the next step

See merge request Chill-Projet/chill-bundles!749
2024-10-24 16:04:44 +00:00
f750cfecac Show userGroup in workflow breadcrumb
related:

- https://champs-libres.openproject.com/wp/774
- OP#774
- Vendee/accent-suivi-developpement#1274
2024-10-24 16:15:49 +02:00
bf85e9bb71 When a user applies a signature in a workflow, the signer is the futureDestUser of the next step
See:
- Vendee/accent-suivi-developpement#1252
- https://champs-libres.openproject.com/wp/768
- OP#768
2024-10-24 15:49:59 +02:00
97729de66d Update conditional rendering logic for displaying list of workflows
Ensure the workflow modal is displayed when either workflows_availables or workflows are non-empty. This improves the user interface by correctly triggering the modal in more scenarios.

- OP#762
- https://champs-libres.openproject.com/work_packages/762
- Vendee/accent-suivi-developpement#1254
2024-10-24 15:11:07 +02:00
4e0a421a03 Refactor PDF mounting process to use ArrayBuffer
Changed mountPdf function to accept an ArrayBuffer instead of a URL. This improves handling of documents by simplifying the data flow and eliminates the need for URL object creation.
2024-10-23 22:08:25 +02:00
00408b91a9 Merge branch 'signature-app/OP#767-block-external-send-when-no-document' into 'signature-app-master'
Add workflow guard to block external send when the handler does not provide a public view

See merge request Chill-Projet/chill-bundles!748
2024-10-23 13:45:18 +00:00
fd69568842 Add workflow guard to block external send without public view
Introduce `EntityWorkflowGuardSendExternalIfNoPublicView` class to prevent workflows from transitioning to an external send state if the entity lacks a public view. Included unit tests to verify functionality for entities both with and without public views.
2024-10-23 15:26:25 +02:00
71aaf01687 Merge branch 'signature-app/OP762-fix-create-workflow-action' into 'signature-app-master'
Fix the triggering of the vent goToGenerateWorkflow when relatedentityId is not know in PickWorkflow vue component

See merge request Chill-Projet/chill-bundles!747
2024-10-23 11:51:05 +00:00
a256307b82 Fix the triggering of the event goToGenerateWorkflow when relatedEntityId is not known
The component PickWorkflow emitted the event "goToGenerateWorkflow" when the normal behaviour is intercepted. But that event generated the link to create the workflow to pass it in the payload's event. That generation failed, causing the whole event to fail.

Now, if the link could not been generated, the link is a blank string. There is a supplementary parameter `isLinkValid`, boolean, inform if the link is valid or not.
2024-10-23 13:44:31 +02:00
a6480191e5 Merge branch 'signature-app/OP753-suggest-users-persons' into 'signature-app-master'
Add suggestion for users, persons and thirdparties in workflow

See merge request Chill-Projet/chill-bundles!746
2024-10-23 09:47:43 +00:00
19eb6f7ebb Add suggested persons and third parties in form
Integrated suggested persons and third parties into the WorkflowStepType form. This enhancement auto-populates suggestion fields for better user experience. It ensures that the suggestion data for persons and third parties is readily available in the form configuration.
2024-10-23 11:41:20 +02:00
261bc88b5e Add suggested persons and third parties methods
Introduced getSuggestedPersons and getSuggestedThirdParties methods across various WorkflowHandlers. These methods integrate with ProvidePersonsAssociated and ProvideThirdPartiesAssociated services to fetch related entities, enhancing the workflow handling capabilities.
2024-10-23 11:41:19 +02:00
4f18b1d2b2 Add services and tests for associated entities management
Implemented services to provide associated persons and third parties for accompanying periods and their works. Included comprehensive tests to ensure proper functionality and associations.
2024-10-23 00:51:37 +02:00
968835a262 Refactor user suggestion logic in workflow
Removed duplicate user suggestion handling from `WorkflowController` and centralized it in `WorkflowStepType`. This change simplifies the controller and makes user suggestion logic more maintainable.
2024-10-22 23:51:48 +02:00
85dc9bdb2f Add getSuggestedUsers method in EntityWorkflowManager
Implemented the method to retrieve a list of suggested users for an entity workflow, filtering out duplicates. Added corresponding unit tests to verify the method's functionality and ensure its correctness in various scenarios.
2024-10-22 23:35:13 +02:00
c877076429 Add and update test handlers for suggested users retrieval
Introduced new test files for workflow handlers and adjusted existing `getSuggestedUsers` methods to handle related entity checks and duplicates removal. Also, modified repos to align with test dependencies.
2024-10-22 23:24:10 +02:00
d04f9ae9ff Fix LoadPeople for gender 2024-10-22 17:51:41 +02:00
086f391dc9 Cs fix and phpstan fix 2024-10-22 17:25:51 +02:00
06cbfdd0c3 style fixes 2024-10-22 16:17:34 +02:00
f1844ae02b Php cs fixes and phpstan 2024-10-22 15:56:41 +02:00
73b0dd6009 Fix transformation of data in gender filter 2024-10-22 14:54:18 +02:00
4d8bcc5a5a Fix fixture for persons 2024-10-22 14:51:02 +02:00
5dfa5e1e7f Advanced search fixed to work with new gender entity 2024-10-22 14:50:16 +02:00
588f02cdf4 Take Null value for gender into account and fix OnTheFly makeFetch 2024-10-22 14:48:16 +02:00
30b66d5806 Php cs fixes 2024-10-22 09:16:15 +02:00
5786759daa Rector changes 2024-10-22 09:15:44 +02:00
0c1c1cbf8b Fix form type to use in advanced search 2024-10-22 09:15:25 +02:00
9741794f7a Add bootstrap icons to package.json 2024-10-22 07:42:02 +02:00
5ca558bba3 Fix accidental removal of -> in GenderAggregator 2024-10-22 07:31:52 +02:00
9d05f2ac2b set GenderFilterTest back to using accepted_genders key to check if data is transformed correctly 2024-10-22 07:09:00 +02:00
566c40dd84 transform gender data for saved exports 2024-10-22 06:46:39 +02:00
418794e586 Merge branch 'signature-app/OP730-create-entities-sending' into 'signature-app-master'
Implement feature to send document to an external

See merge request Chill-Projet/chill-bundles!745
2024-10-21 15:56:12 +00:00
fd66dbf26e Merge remote-tracking branch 'origin/signature-app-master' into signature-app/OP730-create-entities-sending 2024-10-21 17:50:03 +02:00
fde74b190d Add mock for TempUrlGeneratorInterface in StoredObjectTypeTest
Updated the StoredObjectNormalizer initialization to include a mock for TempUrlGeneratorInterface. This ensures tests handle all dependencies of StoredObjectNormalizer correctly.
2024-10-21 17:45:12 +02:00
527cf23d4f Fix Canceling of stale workflow cronjob
Refactor workflow cancellation logic to encapsulate transition checks in a dedicated method, and update CronJob handling to use entity workflows instead of IDs. Enhance test coverage to ensure proper handling and instantiate mocks for EntityManagerInterface.
2024-10-21 17:42:00 +02:00
1d708a481d Fix the display of old documents in the storedobject's history list modal
OP#737

https://champs-libres.openproject.com/work_packages/737
2024-10-21 17:42:00 +02:00
ff5640e193 Allow to edit storedObject associated with workflow which are canceled
OP#753
2024-10-21 17:41:59 +02:00
d45de5405b Use the twig function chill_entity_render_string to render the person's name 2024-10-21 17:41:59 +02:00
7b322d7bab Rename signature templates by removing underscores
Standardized template names in WorkflowController and WorkflowAddSignatureController for better consistency. Updated references and renamed template files accordingly.
2024-10-21 17:41:59 +02:00
0d2e0b4e91 Customize genderFilter to include a NULL choice + add translation and adjust test 2024-10-21 16:45:45 +02:00
30ebd00693 Customize query to return ordered active gender entities 2024-10-21 16:18:50 +02:00
8b1d73356f Add condition to check if value passed to translatableStringHelper is not null 2024-10-21 16:18:12 +02:00
ddfaa2861e Remove unused method getGenderNumeric that creates phpstan errors 2024-10-21 15:39:27 +02:00
9416a19d85 Sanitize html for good measure 2024-10-21 15:39:05 +02:00
34bbee2031 Use makeFetch method 2024-10-21 15:38:46 +02:00
7f1764658a Add extends template on repository 2024-10-21 15:27:53 +02:00
43c3cc26ea Fix translation with gender 2024-10-21 15:27:37 +02:00
74593a7d28 Use enumType in gender admin form 2024-10-21 15:14:38 +02:00
daef18408a fix the return type of the EntityWorkflowCreation constraint 2024-10-18 19:26:09 +02:00
91a4b45607 Add notification to user groups on workflow transition
Implemented NotificationToUserGroupsOnTransition to send group emails upon workflow completion. Also updated NotificationOnTransition to prevent double notifications and created a unit test for the new functionality.
2024-10-18 19:25:03 +02:00
29fa086fde Set return types to MetadataExtractor 2024-10-18 19:14:23 +02:00
508c4cd674 Add an email address ot UserGroup entity 2024-10-18 19:14:13 +02:00
9fe20b5e81 Show pending signatures in the person's search results 2024-10-15 15:15:32 +02:00
d8ded80582 Add an option "suggest_myself" on PickUserDynamicType and PickUserGroupOrUserDynamicType, and use this option in WorkflowStepType
This will suggest the current user in PickUserDynamicType
2024-10-15 11:31:25 +02:00
d283d62049 !fixup Automatically execute body renderer when posting an 2024-10-15 11:10:31 +02:00
6cd336922f Fix error when denormalizing empty array for pick third party dynampic type 2024-10-15 11:09:17 +02:00
13dbbb6741 Fix race condition in ChillCollectionType
In some dcase, the collection is not initialized when a showHide is launched before the collection is fully initialized.
2024-10-15 09:08:29 +02:00
1313b6f138 Automatically execute body renderer when posting an email in Chill
+ adaptation of services which already uses body renderer
2024-10-10 14:06:00 +02:00
3d53e7da65 Show the list of pending views in the workflows index page 2024-10-10 13:40:25 +02:00
8589bada3f Layout for the email to external 2024-10-10 13:40:07 +02:00
292034d64d Add public view rendering to workflow handler for AccompanyingPeriodWorkEvaluationDocument
Implemented the `EntityWorkflowWithPublicViewInterface` in `AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler`. Included the `renderPublicView` method using `WorkflowWithPublicViewDocumentHelper` for enhanced document handling.
2024-10-10 11:42:04 +02:00
3f7c5d23dc Add return type hint to getTargets method
The getTargets method now explicitly returns an array, enhancing type safety and readability. This change ensures that the return type is clear to any developers interacting with this method.
2024-10-10 11:41:25 +02:00
78445f0d65 fixup! Add message handling for public view creation 2024-10-10 11:39:04 +02:00
c329a1f1f8 fixup! Add message handling for public view creation 2024-10-10 09:39:45 +02:00
9d722110a6 fixup! Add direct download link feature with new button implementation 2024-10-09 21:39:55 +02:00
82e2b9a0f6 Add message handling for public view creation
Introduce `PostPublicViewMessage` and `PostPublicViewMessageHandler` to handle external user views on public links by applying workflow transitions. Integrate with `WorkflowViewSendPublicController` and add relevant tests.
2024-10-09 21:39:27 +02:00
e629dbf994 Merge branch 'create_gender_entity' of https://gitlab.com/Chill-Projet/chill-bundles into create_gender_entity 2024-10-09 17:03:28 +02:00
8e02db6c85 Fix phpstan 2024-10-09 17:00:33 +02:00
7183d9a3b1 Fix genderfilter to work with array of gender entity values 2024-10-09 16:49:40 +02:00
70335a6360 rector fixes 2024-10-09 16:49:40 +02:00
fa64f44cf1 php cs fixes 2024-10-09 16:49:40 +02:00
f34c94fd65 Use new gender entity in personDocGenNormalizer 2024-10-09 16:49:40 +02:00
73d80af80a Fix getter in gender entity 2024-10-09 16:49:40 +02:00
363cbc8a76 Translate gender terms for admin templates 2024-10-09 16:49:40 +02:00
9f3893243e Adjust gender aggregator 2024-10-09 16:49:40 +02:00
7520d746e8 Correct repository and normalizer 2024-10-09 16:49:40 +02:00
052e09cf64 Fixes phpstan 2024-10-09 16:49:40 +02:00
77ece243c0 Fix twig template, remove ul tag 2024-10-09 16:49:40 +02:00
a47c8d916b Adjust translation logic for gender in vue components 2024-10-09 16:49:40 +02:00
5fce9ee9fb Fix reactivity issue for genderIcon rendering 2024-10-09 16:49:40 +02:00
47d954fe9f Adjust display of gender in twig templates 2024-10-09 16:49:40 +02:00
d9dc2d1f4e Integrate gender entity into vue components upon creation of persons 2024-10-09 16:49:40 +02:00
37cfc035a3 Implement gender icon renderbox for vue components 2024-10-09 16:49:40 +02:00
2eb686ffdb Create gender API and adjust serialization of gender property 2024-10-09 16:49:40 +02:00
34e2a26d1e Fix display of icon field in gender admin form 2024-10-09 16:49:40 +02:00
789c977aba Use EnumType in form instead of ChoiceType for field genderTranslation 2024-10-09 16:49:40 +02:00
0ba93ec7c6 Remove 'unknown' gender enum 2024-10-09 16:49:40 +02:00
b9d2f5efa3 Use renderInterface to render gender icons in twig 2024-10-09 16:49:40 +02:00
567c01f395 wip: use GenderIconEnum to allow user to select bootstrap icon 2024-10-09 16:49:40 +02:00
67a6eb17db Change PickGenderType form field to use in Person creation form 2024-10-09 16:49:40 +02:00
b78f0980f5 Create genderEnum, add genderTranslation property to Gender entity and new gender property to Person entity
Also migrations were created to handle the changes in the database.
2024-10-09 16:49:40 +02:00
f428afc7ca Create gender admin entity and add configuration to use it
entity, migration, controller, repository, templates, form added
2024-10-09 16:49:40 +02:00
18899d665d rector fixes 2024-10-08 16:57:39 +02:00
59f9ac25ba php cs fixes 2024-10-08 16:49:54 +02:00
2da6b746fb Use new gender entity in personDocGenNormalizer 2024-10-08 16:48:47 +02:00
11f75bf6f1 Fix getter in gender entity 2024-10-08 16:39:31 +02:00
a1db1a1d65 Translate gender terms for admin templates 2024-10-08 16:30:25 +02:00
bdfdabe10e Adjust gender aggregator 2024-10-08 16:29:24 +02:00
40b8fae8ba Add vizualisation of public views in the workflow history 2024-10-08 16:17:11 +02:00
b99ea3b17a !fixup Add direct download link feature 2024-10-08 16:16:10 +02:00
3f80d62ca2 Add public workflow view functionality
Introduced the ability to render public views for workflows, including new templates, handlers, and metadata support. Updated entity interfaces and translations to enhance the public sharing of workflow documents.
2024-10-08 15:15:58 +02:00
118ae291e2 Add direct download link feature with new button implementation
Introduce a new feature that allows for direct download links by integrating TempUrlGeneratorInterface. Added new DOWNLOAD_LINK_ONLY group and corresponding logic to generate download links in StoredObjectNormalizer. Implement a new Twig filter and Vue component for rendering the download button. Updated tests to cover the new functionality.
2024-10-08 15:15:38 +02:00
b0b1a28f50 Implement trans() in activity vue components 2024-10-08 13:51:41 +02:00
760f74b386 Add translation keys from i18ns to yaml files 2024-10-08 13:25:09 +02:00
5c0f3cb317 Implement the controller action to view the EntityworkflowSend 2024-10-07 15:35:36 +02:00
a0b5c208eb Send an email when a workflow is send to an external
- create an event subscriber to catch the workflow which arrive to a "sentExternal" step;
- add a messenger's message to handle the generation of the email;
- add a simple message, and a simple controller for viewing the document
- add dedicated tests
2024-10-04 13:52:18 +02:00
7913a377c8 Move the logic to check if dest users are required to a dedicated constraint
- Create a dedicated constraint to check if the destUsers are required by the applied transition.
- Apply on WorkflowTransitionContextDTO and, if required, use the built-in constraints
- create tests
2024-10-04 13:41:20 +02:00
7cd638c5fc Add TransitionHasDestineeIfIsSentExternal validator
This commit introduces a new validator to ensure that transitions marked as 'sent' have a designated external recipient. It includes related tests for scenarios with and without recipients and covers integration with the workflow context.
2024-10-04 13:41:20 +02:00
071c5e3c55 Update the form to allow sending a workflow to an external destinee
OP#734 Modification du formulaire pour permettre l'envoi d'un workflow

https://champs-libres.openproject.com/work_packages/734
2024-10-04 13:41:20 +02:00
da6589ba87 Add ThirdPartyHasEmail validator
Introduce a new validator that ensures a third party has an email address, including the corresponding translation for error messaging and unit tests to verify its functionality.
2024-10-04 13:41:19 +02:00
a563ba644e clean the file from code in error 2024-10-04 13:41:19 +02:00
2213f6f429 Add EntityWorkflowSend and EntityWorkflowSendView entities
Introduced EntityWorkflowSend and EntityWorkflowSendView entities to enable tracking of workflow content sent to external parties. Updated EntityWorkflowStep to associate with these entities and added a corresponding database migration script.
2024-10-04 13:41:19 +02:00
9a9d14eb5a Enhance behaviour of duplicating storedObject to keep only the last "kept before conversion" version if any
Enhance the duplication service to selectively handle versions tagged with "KEEP_BEFORE_CONVERSION". Modify StoredObject to support retrieval and checking of such versions. Add relevant test cases to validate this behavior.
2024-10-04 13:41:18 +02:00
4cc001a070 Enhance behaviour of duplicating storedObject to keep only the last "kept before conversion" version if any
Enhance the duplication service to selectively handle versions tagged with "KEEP_BEFORE_CONVERSION". Modify StoredObject to support retrieval and checking of such versions. Add relevant test cases to validate this behavior.
2024-10-02 13:13:26 +02:00
6c52ff84a8 Merge branch 'signature-app/OP630-user-group-in-workflows' into 'signature-app-master'
Implements feature to send a workfllow to a group of users

See merge request Chill-Projet/chill-bundles!744
2024-10-01 19:46:50 +00:00
d82a3af063 Adjust more translations in mainbundle create component 2024-10-01 20:05:04 +02:00
843a2a4b5b Correct repository and normalizer 2024-10-01 20:02:58 +02:00
818d800384 In workflow index page, show signature or decision, not both 2024-10-01 18:49:52 +02:00
cef641ee24 Render the history for workflow, with signature and onHold, and destUserGroups 2024-10-01 18:49:52 +02:00
c4c7280b52 Fix Create a PickUserGroupOrUserDynamicType 2024-10-01 18:49:52 +02:00
d8ad8c3605 Add previous exception to the stack when denormlizing Discriminated Object 2024-10-01 18:49:52 +02:00
803332ba5f Remove the feature "send a workflow to an email address" 2024-10-01 18:49:51 +02:00
479651b31e Add a list of user groups in User menu, and implements the feature to add / remove users 2024-10-01 18:49:51 +02:00
7bedf1b5b8 Add some doc for PickUserDynamicType 2024-10-01 18:49:51 +02:00
6b764114e4 Add event for handling end of addNewEntity process
Added new event 'addNewEntityProcessEnded' to PickEntity component. This event triggers form submission when 'submit_on_adding_new_entity' is enabled, ensuring proper flow control.
2024-10-01 18:49:51 +02:00
03a150aa16 Fix ChillUrlGenerator: merge parameters correctly 2024-10-01 18:49:50 +02:00
81706a61ef Fix issue with duplicate a tag 2024-10-01 18:49:50 +02:00
debca1f474 Admin CRUD for user groups 2024-10-01 18:49:50 +02:00
6781fdbd9b Fixes phpstan 2024-10-01 15:51:45 +02:00
e6102d339b Fix twig template, remove ul tag 2024-10-01 14:08:35 +02:00
06cb3ddcd1 Adjust translation logic for gender in vue components 2024-10-01 13:35:06 +02:00
05d56c6eeb Fix reactivity issue for genderIcon rendering 2024-10-01 13:09:38 +02:00
23e7f4a120 Adjust display of gender in twig templates 2024-10-01 12:16:16 +02:00
3eeb105913 Integrate gender entity into vue components upon creation of persons 2024-10-01 12:15:56 +02:00
726cdb385f Implement gender icon renderbox for vue components 2024-10-01 12:15:31 +02:00
406eba80d2 Create gender API and adjust serialization of gender property 2024-10-01 11:41:19 +02:00
236e8117d4 Fix display of icon field in gender admin form 2024-10-01 11:39:10 +02:00
e6bfcddae2 Use EnumType in form instead of ChoiceType for field genderTranslation 2024-10-01 11:38:43 +02:00
d61c090cee Remove 'unknown' gender enum 2024-10-01 11:38:20 +02:00
43dd94dad6 Use renderInterface to render gender icons in twig 2024-10-01 11:36:00 +02:00
f7f8319749 Update bundles version to v3.1.1 2024-10-01 10:38:22 +02:00
376ce59917 Fix typing errors in customfieldbundle 2024-10-01 10:35:38 +02:00
2e71808be1 Add admin users and active status to UserGroup
Added a new table `chill_main_user_group_user_admin` for admin users and modified the UserGroup entity to include an `active` status column. Included methods for managing the admin users and the active status in the UserGroup entity.
2024-09-27 12:01:47 +02:00
0c1d9ee4be Add support for handling user groups in workflow counters and list workflows in "my workflows" controller
- rewrite queries in repositories;
- fix cache key cleaning for members of users when a workflow is transitionned
2024-09-27 10:35:57 +02:00
87599425df Send a notification to all User which are members of UserGroups, when a workflow is sent to them 2024-09-26 17:29:27 +02:00
06d6227d0e Merge branch 'upgrade-sf5' into 'master'
Upgrade chill to symfony 5

See merge request Chill-Projet/chill-bundles!735
2024-09-26 14:19:40 +00:00
86ec6f82da Do not block transition in EntityWorkflow when the user is member of a dest user group
- refactor EntityWorkflowGuardTransition + tests
- allow to find easily user within userGroup by adding a dedicated method to UserGroup::contains
2024-09-26 16:04:53 +02:00
de914f4f17 wip: use GenderIconEnum to allow user to select bootstrap icon 2024-09-26 15:45:44 +02:00
17f4c85fa5 Add user group support in entity workflow steps
Enhanced the WorkflowTransitionContextDTO to include user groups alongside individual users for future steps. Updated the relevant entity and form classes to accommodate this change and included the necessary database migration script.
2024-09-26 15:39:13 +02:00
82cd77678b Create a PickUserGroupOrUserDynamicType
- add necessary vue component to render usergroup within the component AddPersons;
- add necessary normalization and denormalization process for matching the selected usergroup with entities in database
2024-09-26 15:39:12 +02:00
9e69c97250 Add search functionality for user groups
Implemented `SearchUserGroupApiProvider` to handle user group search requests. Added `UserGroupRepository` and its interface to support search queries. Updated API specs to include user group as a searchable type.
2024-09-26 15:39:11 +02:00
e831cb1656 Change PickGenderType form field to use in Person creation form 2024-09-26 13:26:30 +02:00
94875d83b3 Create genderEnum, add genderTranslation property to Gender entity and new gender property to Person entity
Also migrations were created to handle the changes in the database.
2024-09-26 12:20:36 +02:00
b4fa478177 Add UserGroup to chill (import from branch ticket-app-master)
Import the UserGrou feature from ticket-app-master branch. This includes:

- import all the entities and migrations, modification of typescript types, templating, and so on;
- apply some verification and formatting rules, like:
  - reformat file on chill.api.specs.yaml (MainBundle)
  - reformat file on types.ts (Main Bundle)

Migrations kept the same filename.
2024-09-26 11:17:50 +02:00
8e30873001 Create gender admin entity and add configuration to use it
entity, migration, controller, repository, templates, form added
2024-09-25 16:02:40 +02:00
42438d5bb5 Merge branch 'signature-app/OP722-cancel-refuse-signature' into 'signature-app-master'
Adjust logic for removing the hold on a workflow only by user who owns the...

Closes #307

See merge request Chill-Projet/chill-bundles!738
2024-09-25 10:04:04 +00:00
5287824dbe Add async handling for signature state changes
Introduce MessageBus to handle post-signature operations asynchronously. This ensures that further steps are executed through dispatched messages, improving system scalability and performance. Implement new handlers and messages for the workflow state transitions.
2024-09-25 11:58:41 +02:00
cfce531754 Add reject functionality for workflow signatures
Implemented the ability to reject workflow signatures by adding necessary templates, routes, and authorization checks. Updated the `WorkflowSignatureCancelController` to handle rejection and modified existing templates and translations to support the new feature.
2024-09-25 11:31:27 +02:00
83121c2a83 Implement signature cancellation feature
Added functionality to cancel signatures in workflow, including controller, view, and tests. Updated translations and adjusted templates to support and display cancellation actions.
2024-09-25 10:58:53 +02:00
5a467ae38d Add ChillUrlGenerator and ChillUrlGeneratorInterface
Introduced a new interface ChillUrlGeneratorInterface for URL generation with return path handling. Implemented this interface in the ChillUrlGenerator class, which uses Symfony components to manage URL generation and request information.
2024-09-25 10:58:15 +02:00
7edd644963 wip: use script setup and new translator within vue components main bundle 2024-09-25 10:13:04 +02:00
077163a774 Transfer translations from i18n file to yaml file 2024-09-25 10:11:35 +02:00
75005b4ed6 Merge branch 'feature/704-un-related-entity-ne-peut-pas-faire-lobjet-de-deux-workflow-simultanés' into 'signature-app-master'
Prevent creation of a new workflow if one already exists

See merge request Chill-Projet/chill-bundles!737
2024-09-24 12:36:39 +00:00
90c5b0341a Handle null transitionPreviousBy in ListWorkflow.vue
Previously, the getPopContent method assumed transitionPreviousBy would always have a value, which led to errors when it was null. This update adds a conditional check to handle cases where transitionPreviousBy is null, ensuring the component renders correctly.
2024-09-24 14:36:01 +02:00
5a5d259d18 Add duplicate workflow prevention in MetadataExtractor
Integrate DuplicateEntityWorkflowFinder to prevent creating workflows for entities with existing opened or positive final workflows. Updated EntityWorkflowVoter to implement the same check before allowing creation. Removed unnecessary blank workflow parameter from Twig template.
2024-09-24 14:25:00 +02:00
758a14366e Add OpenedEntityWorkflowHelper and tests
Implemented OpenedEntityWorkflowHelper to handle final state checks for EntityWorkflow. This includes methods to determine if a workflow has reached positive or negative final steps. Added corresponding unit tests to ensure proper functionality.
2024-09-24 14:25:00 +02:00
e91fce524e Append workflow name in twig calls to workflow_metadata
Ensuring that the twig template works if there are more than one workflow available
2024-09-24 14:25:00 +02:00
7b06c80c2a Merge branch 'signature-app/wp-706-no-forward-unless-signed' into 'signature-app-master'
Block transition if there is a pending signature for the entityWorkflow

See merge request Chill-Projet/chill-bundles!736
2024-09-24 09:13:45 +00:00
cf2fe1bba7 Add guards and tests for entity workflow transitions
Introduced EntityWorkflowGuardUnsignedTransition to block transitions with pending signatures. Implemented a new center resolver and added comprehensive unit tests for verifying transition rules and permissions.
2024-09-24 11:08:22 +02:00
9c963a2122 Implement translator in vue components and use script setup syntax 2024-09-24 11:04:17 +02:00
27df3b2c9b Add support for ManagerAwareCenterResolverInterface
Introduce ManagerAwareCenterResolverInterface to ensure resolvers can reference their manager. Added a trait for implementing the interface and updated the CenterResolverManager to initialize resolvers correctly.
2024-09-24 10:58:01 +02:00
b350c0cfe8 Merge branch 'signature-app/wp-625-duplicate-ro-element-in-workflows' into 'signature-app-master'
Make stored object read-only if a signature was added to the document and allow to duplicate the related entity in workflow

See merge request Chill-Projet/chill-bundles!731
2024-09-23 14:42:28 +00:00
611a968162 Duplicate and accompanying course evaluation document
- create a service which duplicate the accompanying course work evaluation document
- create a controller to duplicate this document
- update the vuejs component to use this duplicate action
2024-09-23 16:32:47 +02:00
ce80207d98 Create route for duplicating a accompanying course document 2024-09-23 14:36:02 +02:00
5fc5369db6 in constructor for AccompanyingCourseDocumentRepository.php, do not create a property 2024-09-23 14:32:59 +02:00
20e8b03588 Rewrite the Component PickWorkflow.vue into typescript 2024-09-23 14:32:59 +02:00
4b65ec9b54 Create a duplicator service for accompanying course document 2024-09-23 14:32:40 +02:00
c1c632dcb0 Refactor use of translation key in vue template slightly 2024-09-20 14:02:36 +02:00
9732b80298 Implement translation with Symfony translator within vue component 2024-09-20 13:58:23 +02:00
c602c27b39 Remove empty translation key, causing errors 2024-09-20 13:57:56 +02:00
41f13e29e0 Expand detection of duplicates in translations command
Added functionality to specify key namespaces that should be exluded from duplicate detection
Added functionality to check the accidental creation of duplicates based on an md5 hash of translation duplicates.
2024-09-20 12:16:31 +02:00
a8c5d1f660 Remove unused constructor parameter 2024-09-19 17:48:34 +02:00
5f67a7aadc Create a service to duplicate a storedObject into another one 2024-09-19 17:48:03 +02:00
77d06d756a Block document editing if any signature associated to a workflow is signed
Add a check in `WorkflowStoredObjectPermissionHelper` to block document editing once any signature is signed. Accompanied by new tests to verify this behavior.
2024-09-19 16:18:16 +02:00
c4c5c860f0 Merge branch 'signature-app/wp-576-restorestored-object-version' into 'signature-app-master'
See the list of stored object and restore some versions

See merge request Chill-Projet/chill-bundles!733
2024-09-19 13:36:29 +00:00
47f575de92 Enhance version restoration and download features
Introduce a version restoration button and logic to track restored versions throughout the UI. Update download buttons to display action strings conditionally and implement toast notifications for version restoration.
2024-09-19 13:42:23 +02:00
5906171041 Add restoration functionality for stored object versions
Introduce a service to restore stored object versions along with relevant tests and an API endpoint. This includes database migrations for version relationships, enhancing stored object version tracking.
2024-09-19 13:42:23 +02:00
b0e2e65885 Add document history button with modal viewer
This commit introduces a History button to the DocumentActionButtonsGroup component to view document versions. It includes new components for the modal dialog and API integrations to fetch and display version histories. This feature allows users to view and restore previous versions of stored objects.
2024-09-19 13:42:22 +02:00
dd3f6fb0ab Enhance StoredObjectVersion normalization
Add UserNormalizer dependency and pass createdAt context for createdBy normalization, ensuring compatibility with nullable context groups. This improves the accuracy and completeness of the normalized data.
2024-09-19 13:42:21 +02:00
5fa5a2349e Add FileIcon.vue and refactor DropFile.vue to use it
Introduced `FileIcon.vue` to handle file type icons centrally. Refactored `DropFile.vue` to utilize the new `FileIcon` component, improving code clarity and maintainability.
2024-09-19 13:42:20 +02:00
48f727dcfd Update vue version to ^3.5.6 2024-09-19 13:42:20 +02:00
6a0e26ec31 Add point-in-time normalization to stored object versions
Introduced a new normalizer for StoredObjectPointInTime and updated the StoredObjectVersionNormalizer to include point-in-time data when specified in the context. Added corresponding test cases to ensure the new normalization logic works correctly.
2024-09-19 13:42:19 +02:00
943a42cd38 Add StoredObjectVersionApiController and corresponding test
Added a new class StoredObjectVersionApiController in ChillDocGeneratorBundle which lists versions of a specified stored object. Corresponding unit test has been added as well. Made modifications in `StoredObject.php` to make the versions selectable. Also updated the API specifications to include a new GET route for retrieving versions.
2024-09-19 13:42:18 +02:00
d9b36533a2 Fix the query to find staled entity workflows
Add a test to check that the query still works
2024-09-19 12:31:46 +02:00
611261c863 Example usage of translation keys from yaml files within vue component 2024-09-17 16:59:50 +02:00
5921404712 Remove unutilized script 2024-09-17 12:50:32 +02:00
23d882d4cd Improve script to find translation duplicates
Format the output using a table.
Use existing translator.default service to fetch translation files and extract keys and translations from the translation catalogue for a certain locale.
2024-09-17 12:49:41 +02:00
3697aee584 Merge branch '307-permission-apply-all-transitions' into 'signature-app-master'
Create a permission to apply all transitions

Closes #307

See merge request Chill-Projet/chill-bundles!729
2024-09-17 07:52:43 +00:00
33cc308e1e Merge branch 'upgrade-sf5' into signature-app-master 2024-09-16 15:30:01 +02:00
7206e13984 Merge branch 'master' into upgrade-sf5 2024-09-16 15:29:43 +02:00
4d8de46ac9 Apply the voter to allow all transition on EntityWorkflowGuardTransition
This allow to effectively check that a user is allowed to apply all transitions on a workflow and, if yes, enable the given transition.
2024-09-16 14:47:00 +02:00
4696332a46 Create a voter for applying all transitions on all workflow's steps
This voter checks that the related entity's centers is reachable by the user.
2024-09-16 14:42:37 +02:00
0d54637d35 Add missing constructor argument in SignatureStepStateChangerTest 2024-09-16 13:19:14 +02:00
7a7d1d5b16 remove blank file 2024-09-16 12:13:52 +02:00
e5737b0c49 remove temporary method 2024-09-16 11:51:58 +02:00
45323e9136 Merge remote-tracking branch 'origin/upgrade-sf5' into signature-app-master 2024-09-16 11:51:33 +02:00
9f1afb8423 Add access controls and permissions for signature steps
Implemented a Voter to enforce permissions on signature steps, ensuring only authorized users can sign steps. Updated relevant controllers and templates to reflect these permissions, and added corresponding tests to validate the changes.
2024-09-13 17:04:57 +02:00
1494c7ecd7 Merge branch 'signature-app/add-manual-zone' into 'signature-app-master'
Improve signature app

See merge request Chill-Projet/chill-bundles!725
2024-09-13 14:23:44 +00:00
911dfc2878 fix rector errors 2024-09-13 16:22:09 +02:00
8e984f2006 do not allow to sign if the signature is already applyied 2024-09-13 16:16:42 +02:00
f0e8df38af remove the left-arrow on the "retour" button, because it was placed on the right of the page 2024-09-13 16:03:06 +02:00
1c0d334b91 downgrade symfony/event-dispatcher-contracts to version 2.4
This is necessary for using some dependencies which only works with symfony 5.4
2024-09-12 17:34:28 +02:00
nobohan
59c34dabd7 Signature: allow for null index in signature zone 2024-09-12 17:18:13 +02:00
nobohan
119668e415 Signature: allow for null index in signature zone 2024-09-12 17:02:45 +02:00
nobohan
2b516629f6 Signature: refresh document after signature 2024-09-12 17:02:08 +02:00
nobohan
092b5c4f90 Signature: get the stored object back in the check signature API 2024-09-12 15:26:03 +02:00
nobohan
ae1459cf77 Signature: topbar UI 2024-09-12 14:22:58 +02:00
nobohan
57d2929ecd Signature: move buttons to a top toolbar + change behavior on a new zone 2024-09-12 14:03:43 +02:00
bc34d84d63 Merge remote-tracking branch 'origin/master' into upgrade-sf5 2024-09-12 13:36:50 +02:00
f0f651edea update cs after php-cs-fixer upgrade 2024-09-12 12:02:33 +02:00
nobohan
3c987e0b8d Signature: keep selected zone when turning pages 2024-09-12 11:31:31 +02:00
f8a986d59b Add user IP and authenticated user details to signature
Updated the SignatureRequest metadata to include the requester's IP address and currently authenticated user details. Also improved the rendering of signer information by leveraging the `ChillEntityRenderManagerInterface`.
2024-09-12 11:18:35 +02:00
09563979a2 Refactor entity rendering with manager pattern
Introduce ChillEntityRenderManager to centralize entity rendering logic, reducing redundancy and improving code organization. Update dependencies and service configuration to support the new manager pattern, enhancing maintainability and flexibility of entity rendering in templates.
2024-09-12 11:18:35 +02:00
nobohan
0ee91800ab Merge branch 'signature-app/add-manual-zone' of https://gitlab.com/Chill-Projet/chill-bundles into signature-app/add-manual-zone 2024-09-12 10:46:52 +02:00
nobohan
d08212df46 Signature: add and process returnPath in the signature app 2024-09-12 09:46:14 +02:00
nobohan
4933238f3f Signature - improve UI signature app 2024-09-12 09:46:14 +02:00
nobohan
c23568032c Signature: add a signature zone manually 2024-09-12 09:46:13 +02:00
18af2ca70b Handle null transitionBy and improve display logic
Added checks for null transitionBy cases in workflow templates to display "Automated transition" when applicable. Also improved conditional rendering for 'destUser' and 'ccUser' fields to avoid empty elements.
2024-09-11 21:52:34 +02:00
f1505a9d15 Add locale to workflow URLs in notification templates
This is required to send notification within a console command
2024-09-11 21:16:54 +02:00
4e588ed0e0 Add logging to SignatureStepStateChanger
Enhanced the SignatureStepStateChanger by integrating a LoggerInterface to provide detailed logging at key points in the state transition process. This includes informational messages when marking signatures or skipping transitions, as well as debug messages when determining the next steps.
2024-09-11 21:14:07 +02:00
70671dadac Refactor workflow guard logic and add internal methods
Removed guard logic from EntityWorkflowTransitionEventSubscriber and created a new EntityWorkflowGuardTransition class for separation of concerns. Marked several setter methods in EntityWorkflowStepSignature as internal to guide proper usage. Added comprehensive tests to ensure the new guard logic functions correctly.
2024-09-11 21:13:58 +02:00
f0d581b7f8 Merge branch '291_workflow_pdfsignedmessagehandler' into 'signature-app-master'
Lorsque tous les usagers ont signé un workflow, le workflow retourne à l’envoyeur avec une étape « workflow signé »

See merge request Chill-Projet/chill-bundles!726
2024-09-11 07:23:51 +00:00
nobohan
1197a46f5f Refactor PDF signature handling and add signature state changer
Simplified PdfSignedMessageHandler by delegating signature state changes to a new SignatureStepStateChanger class. Added utility method to EntityWorkflowStepSignature for checking pending signatures and created new test cases for the SignatureStepStateChanger.
2024-09-10 21:27:55 +02:00
00e878892e Merge branch '305-convert-to-pdf-on-signature-step' into 'signature-app-master'
Convert a document to pdf when an entity workflow arrives in a signature step

See merge request Chill-Projet/chill-bundles!724
2024-09-10 18:42:10 +00:00
941444b7d5 Add event subscriber to convert docs to PDF before signature
Introduce ConvertToPdfBeforeSignatureStepEventSubscriber to convert documents to PDF when reaching a signature step in the workflow. Includes tests to ensure the conversion process only triggers when necessary.
2024-09-10 17:48:32 +02:00
a60ea0e066 Add StoredObjectToPdfConverter service and unit tests
Introduced the StoredObjectToPdfConverter service to handle conversion of stored objects to PDF format. Added unit tests to ensure proper functionality, including versioning and exception handling.
2024-09-10 17:48:32 +02:00
1ddd283f26 Add signer type differentiation for workflows
Added a method to determine if the signer is a 'person' or 'user'. Updated the signature template to handle both types accordingly, ensuring the correct entity type is displayed in workflow signatures.
2024-09-10 17:48:32 +02:00
669b967899 Enhance object version removal to exclude point-in-time versions
Add a check to exclude versions associated with points in time before deleting old object versions. This ensures that such versions are not mistakenly removed, providing greater data integrity. Updated tests and repository methods accordingly.
2024-09-10 17:48:31 +02:00
d33da6519a Add StoredObjectPointInTime entity and related functionality
Implemented a new StoredObjectPointInTime entity to manage snapshots of stored objects. This includes related migrations, enum for reasons, repository, and integration with StoredObjectVersion.
2024-09-10 17:48:31 +02:00
f5ba5d574b Add WopiConverter service and update Collabora integration tests
Introduce the WopiConverter service to handle document-to-PDF conversion using Collabora Online. Extend and update related tests in WopiConvertToPdfTest and ConvertControllerTest for better coverage and reliability. Enhance the GitLab CI configuration to exclude new test category "collabora-integration".
2024-09-10 17:48:31 +02:00
ccc11b1c1d Merge branch '295-cancel-workflow-after-90-days' into 'signature-app-master'
Create CancelStaleWorkflow message, handler and cronjob

See merge request Chill-Projet/chill-bundles!720
2024-09-09 13:27:12 +00:00
2fb46c65c2 Refactor CancelStaleWorkflowCronJobTest to simplify setup
Replaced KernelTestCase with TestCase to simplify test setup and removed dependency on the database connection. Added NullLogger to replace mocked LoggerInterface during testing. Updated method call in tests to correctly reference CancelStaleWorkflowMessage class.
2024-09-09 15:16:10 +02:00
f4356ac249 Add test for detecting stale workflows and enhance handler
Added a new test to check if workflows are stale in EntityWorkflowTest. Enhanced CancelStaleWorkflowHandler to handle stale workflows more accurately, including checking if workflows have transitioned recently. Updated EntityWorkflow entity to cascade remove workflow steps.

Refactor tests for handler, to avoid using $kernel during tests
2024-09-09 15:08:39 +02:00
d152efe084 Refactor imports and remove redundant type strings
This commit refactors the usage of \DateTimeImmutable to ensure consistent namespacing and removes unnecessary string type declarations from constants in CancelStaleWorkflowCronJob. These changes improve code readability and maintainability.
2024-09-09 14:58:19 +02:00
ee9530d03f More conditions to find staled workflows 2024-09-09 10:46:35 +02:00
b97eabf0d2 Get workflowComponent directly from registry 2024-09-09 10:46:35 +02:00
2e69d2df90 Adjust test to work with actual workflow + minor fix of handler logic 2024-09-09 10:46:33 +02:00
cb446edd18 Suffix message class with 'Message' and add check on workflow to assert no transitions were applied since message placed in queue 2024-09-09 10:40:42 +02:00
5d84e997c1 Php cs fixes 2024-09-09 10:40:42 +02:00
35199b6993 Create test for CancelStaleWorkflowHandler: wip state 2024-09-09 10:40:42 +02:00
dab68fb409 Add CancelStaleWorkflowCronJobTest 2024-09-09 10:40:41 +02:00
6001bb6447 Add logger messages for possible debugging purposes 2024-09-09 10:40:41 +02:00
29fec50515 Add cronjob and repository method to find and cancel stale workflows every other day 2024-09-09 10:40:41 +02:00
34edb02cd0 Create message and handler for canceling stale workflows 2024-09-09 10:40:41 +02:00
860ae5cedf Create CancelStaleWorkflow message and handler 2024-09-09 10:40:40 +02:00
bf056046ab Fix cs 2024-09-06 14:40:25 +02:00
4d73f9b81a Rename Convert to ConvertController for clarity
Renamed Convert class and relevant references to ConvertController to improve clarity and maintain consistency. Updated corresponding test files and route configurations to reflect the new name.
2024-09-06 14:07:51 +02:00
dd159f4379 Merge branch '297-workflow-en-attente' into 'signature-app-master'
Allow user to put workflow on hold

See merge request Chill-Projet/chill-bundles!718
2024-09-06 12:02:40 +00:00
49ad25b4c8 Refactor WorkflowOnHoldController and improve tests
Refactored WorkflowOnHoldController to remove dependencies and improve redirect handling. Updated test cases to use PHPUnit instead of KernelTestCase and mock proper dependencies. Added relationship handling in EntityWorkflowStep to manage EntityWorkflowStepHold instances accurately.
2024-09-06 14:02:11 +02:00
ad94310981 Refactor workflow hold functionality to avoid relying on database to perform some checks on "user holds entityworkflow"
Simplify the logic in handling workflow on hold status by moving related checks and operations to `EntityWorkflowStep` and `EntityWorkflow` entities. This includes implementing new methods to check if a step or workflow is held by a specific user and refactoring the controller actions to use these methods.
2024-09-05 20:46:29 +02:00
e8f09b507f Fix cs after php-cs-fixer upgrade, fix phpstan and rector errors 2024-09-05 18:00:37 +02:00
e29e1db6ed Take into account 'destUserByAccessKey' in the list of workflows associated to a user
Refactor the query to include checks for user membership via both 'destUser' and 'destUserByAccessKey'. This ensures that workflows correctly account for user access by multiple criteria.
2024-09-05 17:38:18 +02:00
8c4f342ca1 Correct instantiation of controller within test 2024-09-05 17:19:28 +02:00
745a29f742 Adjust logic for removing the hold on a workflow only by user who owns the hold and when a transition is applied on the workflow 2024-09-05 17:19:27 +02:00
41ffc470a0 Adjust test to check creation of onHold if user is allowed to apply a transition 2024-09-05 17:19:27 +02:00
46b31ae1ea Adjust logic to only allow on hold if user is allowed to apply a transition 2024-09-05 17:19:26 +02:00
8c5e94e295 Work on test for workflowOnHold controller 2024-09-05 17:19:25 +02:00
9c8a84cdbd Add test for WorkflowOnHoldControllerTest 2024-09-05 17:19:24 +02:00
a82b99aecc Add template-extends on EntityWorkflowStepHoldRepository 2024-09-05 17:19:23 +02:00
deb4bda16e Add unique constraint as attribute on EntityWorkflowStepHold class 2024-09-05 17:19:23 +02:00
c1e5f4a57e Move onHold methods to a separate WorkflowOnHold controller 2024-09-05 17:19:20 +02:00
6fc5a10dc4 Add unique constraint to migration 2024-09-05 17:18:43 +02:00
18abc84e68 Rector fixes 2024-09-05 17:18:43 +02:00
e85c31826f php cs fixes 2024-09-05 17:18:42 +02:00
d119ba49f7 Add on_hold label to vue components 2024-09-05 17:18:42 +02:00
c21de777fd Place on_hold label next to breadcrumb in twig template 2024-09-05 17:18:42 +02:00
15eaf648df Add label to workflow listing and history to indicate whether it's on hold 2024-09-05 17:18:42 +02:00
42471269db Implement logic to put workflow on hold and resume it 2024-09-05 17:16:18 +02:00
9475a708c3 Add EntityWorkflowStepHold entity to allow workflow to be put on hold by user
Entity created, migration, and repository.
2024-09-05 17:13:20 +02:00
bf1af1aaad Merge branch '301-has-signed-statement' into 'signature-app-master'
Adjust behavior when signature in signed state

See merge request Chill-Projet/chill-bundles!717
2024-09-05 14:50:05 +00:00
8ea87053f0 fix some tests 2024-09-05 16:47:45 +02:00
nobohan
479a02bbc7 Signature: add and process returnPath in the signature app 2024-09-05 14:11:57 +02:00
nobohan
0d62d8d1c6 Signature - improve UI signature app 2024-09-05 11:52:11 +02:00
nobohan
5b90632231 Signature: add a signature zone manually 2024-09-05 11:52:08 +02:00
3c9ee41b3b fix some tests 2024-09-04 18:30:18 +02:00
d0031e82e8 Add hover effect and slim class to dev assets and apply in signature list
Introduced a new SCSS file to handle hover effects on rows and added the ability to remove bottom margins with a "slim" class. Updated various twig templates to utilize these new styles for better visual feedback and alignment.
2024-09-04 17:55:01 +02:00
20f2bc6c35 Enhance signature display with detailed person information
Updated the signature view template to include person details using the '_insert_vue_onthefly.html.twig' template. This change adds more contextual information about the signer, such as their name and status, improving the user experience.
2024-09-04 17:26:46 +02:00
71d3aa3969 Refactor signature rendering logic
Reorganized the signature rendering loop for better readability. Moved the row alignment inside the loop and added text alignment for signed statements. Simplified the conditional checks within the loop to enhance code maintainability.
2024-09-04 17:24:11 +02:00
ce781a5b58 Translate datetime object with icu: split date and time
Translate datetime within icu format
2024-09-04 17:14:43 +02:00
2dd275a074 Merge branch '296-signature-menu-tab' into 'signature-app-master'
Add person menu entry for signature  list

See merge request Chill-Projet/chill-bundles!719
2024-09-04 15:13:14 +00:00
5f5d4b8f06 Add person menu entry for signature list 2024-09-04 15:13:14 +00:00
cc8214d52c Add flash message in case signature was already applied 2024-09-04 17:08:38 +02:00
0c797c2997 Redirect to workflow show page if document already signed
Verify the state of the signature. If isSigned is true, redirection to
workflow show page.
2024-09-04 17:08:37 +02:00
ee6edba206 Create isSigned method in EntityWorkflowStepSignature.php
Refactorization and ease of use in template and workflow controller
2024-09-04 17:08:35 +02:00
3e6d764b9b Replace sign button with signed statement if person/user has signed 2024-09-04 17:06:45 +02:00
3e5a558cdf Add exists method to RemoveOldVersionMessageHandlerTest
Introduce the exists method to handle checks for StoredObject or StoredObjectVersion in test cases. This modification ensures consistency and proper exception handling in the testing framework.
2024-09-04 15:18:07 +02:00
0e6b7d76a4 Add exists method to WebdavControllerTest
Included a new method `exists` to handle existence checks for StoredObject or StoredObjectVersion within WebdavControllerTest. This method currently always returns true, ensuring initial compatibility and providing a foundation for future logic refinements.
2024-09-04 15:10:18 +02:00
b2042bd1e4 Merge branch 'signature-app/object-version' into 'signature-app-master'
Add versioning to stored objects

See merge request Chill-Projet/chill-bundles!710
2024-09-04 12:46:43 +00:00
6e9f111fd9 Fix syntax errors in RemoveExpiredStoredObjectCronJob class
Correct syntax errors involving constant definitions in the RemoveExpiredStoredObjectCronJob class. This change ensures compliance with PHP's constant declaration standards.
2024-09-04 14:45:17 +02:00
313fb9ffdf PHP CS Fixer updated (3.63.1 -> v3.64.0) 2024-09-04 14:38:56 +02:00
063bc2857f Remove deprecated constants from StoredObjectNormalizer
Deleted the deprecated constants `ADD_DAV_SEE_LINK_CONTEXT` and `ADD_DAV_EDIT_LINK_CONTEXT` from the `StoredObjectNormalizer` class. These constants are no longer in use and their removal cleans up the codebase.
2024-09-04 14:34:49 +02:00
615629d1b4 Simplify entity relationship and enforce foreign key constraints
Removed the resetStoredObject() method call from StoredObject, adjusted the storedObjectId column in the stored_object_version table to be NOT NULL, and moved the association setup of the StoredObject entity directly into the constructor in StoredObjectVersion. This ensures that every StoredObjectVersion has a valid StoredObject and maintains database integrity.
2024-09-04 14:28:13 +02:00
667e144681 Add PDF signature zone availability checks
Introduce `PDFSignatureZoneAvailable` service to check available PDF signature zones. Updated `WorkflowAddSignatureController` to use the new service. Added unit tests to verify the correctness of the functionality.
2024-09-04 14:09:53 +02:00
e17203ca3a Add PDF signature zone availability checks
Introduce `PDFSignatureZoneAvailable` service to check available PDF signature zones. Updated `WorkflowAddSignatureController` to use the new service. Added unit tests to verify the correctness of the functionality.
2024-09-04 13:55:08 +02:00
c6a6d76790 Add signatureZoneIndex to PdfSignedMessage and related classes
Included signatureZoneIndex for PdfSignedMessage in class definitions, handlers, and serializers to support signature zones. Updated test cases to reflect this new property, ensuring robust validation for handling and serialization.
2024-09-03 15:44:25 +02:00
3d49c959e0 Update DropFile to handle object versioning 2024-09-03 15:42:04 +02:00
nobohan
86896a12e6 Signature: download signed doc if signed 2024-09-03 11:25:05 +02:00
nobohan
3a959b7044 Signature app: rename userSignatureZones, remove zoneIndex, sign on click 2024-09-03 10:28:41 +02:00
nobohan
f8d95384ea Signature: action buttons positions 2024-09-02 18:05:12 +02:00
5d0b531820 Upgrade chill-bundles to v3.1.0 2024-08-30 10:59:04 +02:00
5be3cae288 Merge branch 'add_household_to_activity_list_export' into 'upgrade-sf5'
Add household info to activity exports

See merge request Chill-Projet/chill-bundles!721
2024-08-30 08:57:27 +00:00
4587f66402 Add household info to activity exports 2024-08-30 08:57:27 +00:00
b6edbb3eed Refactor StoredObject normalization handling
Deprecate and remove specific context constants from StoredObjectNormalizer. Update object properties for better clarity and add permissions handling. Introduce related tests and adjust other files relying on the old context constants.
2024-08-28 23:19:24 +02:00
00cc3b7806 Refactor backend for getting signed url 2024-08-28 18:00:20 +02:00
7ab52ff09e Add stored object creation endpoint
Introduced a new API endpoint to create stored objects with access control for roles 'ROLE_ADMIN' and 'ROLE_USER'. Updated corresponding routes, removed unused dependencies, and added unit tests to ensure functionality.
2024-08-28 15:34:42 +02:00
2d82c1e105 rector fixes after rector's upgrade 2024-08-28 15:34:13 +02:00
e477a49c92 Integrate SwaggerUI with direct download and cleanup package
Added a customized SwaggerUI HTML template under Dev directory. Removed outdated swagger-ui dependency from package.json to streamline dependency management.
2024-08-28 15:26:19 +02:00
0db2652f08 Add cron job for removing expired stored objects
Introduced `RemoveExpiredStoredObjectCronJob` to automate the deletion of expired stored objects every 7 days. Enhanced associated tests and updated relevant interfaces and classes to support the new cron job functionality.
2024-08-28 14:06:11 +02:00
c38f7c1179 Add functionality to delete old versions of documents
This commit introduces a feature that automatically deletes old versions of StoredObjects in the Chill application. A cron job, "RemoveOldVersionCronJob", has been implemented to delete versions older than 90 days. A message handler, "RemoveOldVersionMessageHandler", has been added to handle deletion requests. Furthermore, unit tests for the new functionality have been provided.
2024-08-28 14:06:10 +02:00
67d24cb951 Use "createdAt" from database to compute the last modified datetime in StoredObjectManager
The code has been updated to use 'createdAt' from StoredObjectVersion entity in StoredObjectManager. Specifically, if a 'createdAt' datetime is set, we return that datetime. This change also includes corresponding test cases to validate the functionality. The situation helps deal with files created before July 2024.
2024-08-28 14:06:09 +02:00
cb90261309 Update random_bytes length in filename and prefix generation
The size of the random byte string used in the generateFilename method of StoredObjectVersion has been reduced from 16 to 8. Conversely, the size of the random byte string used in the generatePrefix method of StoredObject has been increased from 8 to 32.

The naming generation fit better with the usage, as 16bytes are generated for each file (more version), and less for the version.
2024-08-28 14:06:09 +02:00
2feea24c41 Add Collabora configuration guide and NullProofValidator class
A new document detailing the configuration steps for enabling Collabora in development has been added. This includes setting up ngrok and configuring both the Collabora and Symfony servers. Furthermore, a new class, NullProofValidator, has been created for validation during the development process. This class always returns true, making it useful for debugging purposes.
2024-08-28 14:06:08 +02:00
1b16d4fe3b Flush entities when storing document using webdav / put operation
The WebdavController has been updated to flush the EntityManager after writing a document, while its tests have been adjusted correspondingly. A new test for the document PUT operation has also been added, which ensures the EntityManager flushes and the StoredObjectManager writes to this document.
2024-08-28 14:06:08 +02:00
ce5659219a Fix test 2024-08-28 14:06:07 +02:00
5fefe09a39 Fix test 2024-08-28 14:06:07 +02:00
e21db73b84 Refactor and simplify document management functionality to adapt to StoredObject versioning
This commit includes several updates to the document management functionality within ChillWopiBundle and ChillDocGeneratorBundle, refactoring for simplicity and improved readability.
2024-08-28 14:06:07 +02:00
3978ea9a47 Update StoredObjectManager to handle versioned StoredObjects
The StoredObjectManager and related test cases have been updated to handle versioned StoredObjects, allowing the same methods to work with either a StoredObject or its versions. The changes also involve return information for the write method and enhancements to the write test procedure. This provides more functionality and flexibility for handling StoredObjects in different versions.
2024-08-28 14:06:06 +02:00
4fbb7811ac Refactor StoredObjectDataMapper to use registerVersion method
Removed saveHistory and set methods in StoredObjectDataMapper and replaced them with one call to registerVersion.
2024-08-28 14:06:06 +02:00
2b7ea4178b Add versioning to stored objects
This update introduces a versioning system to the stored objects in the ChillDocStoreBundle. The 'StoredObject' entity now includes several new methods, and maintains a collection of 'StoredObjectVersion' instances. Each time a 'StoredObject' is modified, a new version instance is created and added to the collection, ensuring a history of changes. Migration file for the addition of new database column included. Corresponding tests are also updated.
2024-08-28 14:06:06 +02:00
8a374864fa update code style after upgrade rector and phpstan 2024-08-28 14:03:26 +02:00
bb848746d5 Merge branch 'upgrade-sf5' into signature-app-master 2024-08-28 13:23:12 +02:00
3738c110f8 Add missing import 2024-08-28 12:38:11 +02:00
f57fdb2b4c Add missing import 2024-08-28 12:32:19 +02:00
b57824fc7e Update Rector skip configuration
Replaced Symfony Rector rules with Doctrine rule in the skip list due to a known issue. Refer to the linked GitHub issue for more details on the bug.
2024-08-28 12:21:43 +02:00
6b4e1ed2d3 PHP CS Fixer updated (3.59.3 -> v3.63.1) 2024-08-28 12:06:08 +02:00
b0485dbcc8 Replace ArrayCollection with Collection&Selectable on some entity typing (fix previous commit)
Updated entity properties to use Collection&Selectable for better type safety and interoperability. This change affects User, Household, Calendar, Person, AccompanyingPeriod, and EntityWorkflow classes.
2024-08-28 12:04:43 +02:00
c16219dc6d Force typing for ArrayIterator in EntityWorkflow 2024-08-28 11:48:24 +02:00
ad47804c91 Apply rector changes to Collection typing 2024-08-27 16:23:08 +02:00
85e2466611 Cherry-pick phpstan fixes after rector changes 2024-08-27 16:09:12 +02:00
94d6b5eff8 Merge branch 'upgrade-sf5' of gitlab.com:Chill-Projet/chill-bundles into upgrade-sf5 2024-08-26 18:15:13 +02:00
d87f380f16 Update chill bundles to version 3.0.0 2024-08-26 18:14:48 +02:00
58bf722fae remove the "v" prefix for file, to create release with tags starting with "v". 2024-08-26 14:21:43 +00:00
50fb79ebbf Remove enforcement of https scheme within controller method 2024-08-26 15:42:28 +02:00
58912f1d98 Add changie for fixes to CollectionType js 2024-08-22 14:24:58 +02:00
9604ba5f4b Merge branch 'person_resource_abstract_class' into 'upgrade-sf5'
Create abstract class for person resource and corrections made to CollectionType js

See merge request Chill-Projet/chill-bundles!716
2024-08-22 12:22:52 +00:00
b689a51a48 Changie added for fix connection to azure 2024-08-21 16:56:05 +02:00
8c0d2f58ba Add missing [ ] for schemes option 2024-08-21 16:53:26 +02:00
212230448b Add changie for fix of delete action accompanying periods 2024-08-21 15:14:48 +02:00
2bfb8fe387 Fix delete action for accompanying periods, missed in previous correction 2024-08-21 15:13:18 +02:00
6362b98a00 Specifiy https scheme for the connectAzureCheck controller method 2024-08-21 14:20:37 +02:00
6e2a08cae8 Resolve multiple entries not being saved in collectiontype 2024-08-21 10:22:13 +02:00
155066be13 Remove irrelevant command 2024-08-19 16:48:03 +02:00
a5329c5d69 Create commands to manage translations 2024-08-19 16:11:18 +02:00
305105faae Fix CalendarContextTest after faulty php cs fix 2024-08-14 15:27:00 +02:00
85811cc6ae Run php-cs-fixer and rector 2024-08-14 14:45:59 +02:00
7eee995627 Merge branch 'upgrade-sf5' into person_resource_abstract_class 2024-08-14 14:26:24 +02:00
c0c448fb39 Remove dump from code 2024-08-14 14:26:04 +02:00
6445342136 Fix remove button not showing in CollectionType forms with allow_delete option 2024-08-14 14:23:03 +02:00
d52e54fd2a Make loadDynamicPicker available within windows where dynamicPicker tags are added 2024-08-14 13:38:58 +02:00
547a9d1369 Downgrade bundles to v2.23.0 fix in v2.23.1 undone 2024-08-08 11:01:21 +02:00
288a02f5b7 Undo wrong fix in export filter parcours having activity between dates
Problem reported by users, wrong analysis and fix made. Behavior was in fact
correct.
2024-08-05 15:56:40 +02:00
2f9884072c Add missing use statement for Groups annotation 2024-07-31 15:12:36 +02:00
ee45ff61a6 Reorganize person resource code to create an abstract class 2024-07-31 14:55:35 +02:00
5dfd8daf3a Remove dump causing export to fail 2024-07-30 14:58:48 +02:00
564813ef3d Change attribute in test and add new test method
Updated an existing test to use the 'EDIT' attribute instead of 'SEE' in AbstractStoredObjectVoterTest.php. Added a new test method to check the 'SEE' attribute when the workflow is allowed, ensuring proper access validation.
2024-07-26 00:34:11 +02:00
5fed42a623 Fix decision logic in AbstractStoredObjectVoter
Amend the condition to ensure proper attribute validation before checking workflow association. This prevents unintended execution paths and potential exceptions when the workflow document service is not provided.
2024-07-25 23:34:36 +02:00
a46e987f81 Upgrade version of chill-bundles to v2.23.1 2024-07-25 16:56:43 +02:00
81220b5b22 Correct phpstan error: ParsingException is never thrown
The typing of the exception had to be changed, because \Datetime throws an \Exception
instead of a ParsingException.
2024-07-25 11:30:33 +02:00
5b0019cde7 Fix query in filter: period having activity between dates filter
Adding statement to ensure that subquery only considers records that are identical to the
ones being processed in the main query.
2024-07-25 11:23:36 +02:00
b19dd4fc11 Merge branch '292-signature-form-workflow' into 'signature-app-master'
Modify workflow form to indicate if signatures are wanted

See merge request Chill-Projet/chill-bundles!713
2024-07-24 11:09:07 +00:00
44226d6f7f Fix the config's path to workflow signature
- typo
- load the config's array instead of the path to the config
2024-07-24 13:07:47 +02:00
d75607a1d2 Php cs fixes 2024-07-24 12:00:10 +02:00
bf66af0f25 Fix configuration of workflow signature document kinds 2024-07-24 11:54:07 +02:00
15f3e474a0 Remove trailing end() in MainBundle configuration 2024-07-24 11:32:08 +02:00
5623cf946e Set empty_data option to allow empty array to be passed 2024-07-24 11:12:41 +02:00
0a6f3a99da Fix functioning of show hide 2024-07-23 19:59:10 +02:00
b42473b01d Upgrade bundles version with new features and fix 2024-07-23 16:54:08 +02:00
be19d09bad Fix typing error in ListActivityHelper: string expected got int 2024-07-23 16:43:54 +02:00
50bd9f32c3 Fix merge conflict in show-hide file 2024-07-23 16:23:51 +02:00
1396304af5 Change funtioning of showHide (wip) 2024-07-23 16:20:27 +02:00
c33e4adeec Adjust implementation of showHide (wip) 2024-07-23 12:37:16 +02:00
7351a35c42 Use better namespacing for configuring workflow signature documents 2024-07-23 12:37:16 +02:00
72e3325626 Implement show and hide logic within workflow form 2024-07-23 12:37:16 +02:00
0a46b5304d Adjust implementation of showHide (wip) 2024-07-23 12:18:14 +02:00
nobohan
e57d52d00e Update vue-toast-notification and use in signature app 2024-07-23 10:04:25 +02:00
64e527672d Merge branch 'signature-app-vueapp' into 'signature-app-master'
Signature app vueapp

See merge request Chill-Projet/chill-bundles!714
2024-07-22 21:43:04 +00:00
123168a5ee Effectively process signature request
The processSignature method in SignatureRequestController has been cleaned up and unneeded comments were removed. The process now involves retrieving the EntityWorkflow and StoredObject from the Signature, and reading the content from the StoredObjectManager. Debugging dump functions and commented code were also removed for a cleaner look.
2024-07-22 23:40:38 +02:00
3836d0dc9b Update PdfSignedMessageHandler to manage signature state
Additional dependencies have been added to the PdfSignedMessageHandler to handle the state of the signature. After writing the signed message content, the state is set to 'signed' and the state date is updated with the current time. Also, modifications are flushed in the EntityManager to save these changes to the database. Corresponding updates and tests have been made in the PdfSignedMessageHandlerTest file.
2024-07-22 23:40:10 +02:00
51ab4bef38 Improve rendering for signature zone 2024-07-22 23:06:49 +02:00
nobohan
567ca8a26f integrate signature vueapp to workflow 2024-07-19 11:42:08 +02:00
nobohan
111305d09c DX change function names to camelCase format in vue app signature 2024-07-19 10:00:16 +02:00
nobohan
67395f52b5 signature: fix cs + test PDFParser 2024-07-18 17:16:21 +02:00
nobohan
421226c0dc signature: check for signature state 2024-07-18 17:16:20 +02:00
nobohan
77da2c1ac6 signature: add index on PDFSignatureZone + init POST signature 2024-07-18 17:16:20 +02:00
nobohan
39d3ba2f40 signature: fake POSTing of signature, adjustments 2024-07-18 17:16:20 +02:00
nobohan
fb62e54d63 signature: correct positioning of zones in vue app wrt to PDFSignatureZoneParser 2024-07-18 17:16:19 +02:00
nobohan
c968d6c541 signature: improve layout and some functionalities of the signature app 2024-07-18 17:16:19 +02:00
nobohan
c428e6665f signature: use PDFSignatureZoneParser in vue app signature 2024-07-18 17:16:19 +02:00
nobohan
5b7e3f0336 signature - modale and translations in the vue app 2024-07-18 17:16:19 +02:00
nobohan
0c8ef37860 signature - more css bootstrap layout of the signature vue app 2024-07-18 17:16:19 +02:00
nobohan
794c479b9e signature: layout and css bootstrap class of the vue app 2024-07-18 17:16:19 +02:00
nobohan
1bee3114ac signature: improve signature vue app 2024-07-18 17:16:19 +02:00
nobohan
1344b65dd4 signature: fix using of window variable 2024-07-18 17:16:19 +02:00
nobohan
68dcf4dd28 signature: confirm signature and undo buttons 2024-07-18 17:16:19 +02:00
nobohan
b0a8fd54a8 signature: fully working app with pdfjs-dist 2024-07-18 17:16:19 +02:00
nobohan
0f589ec57e signature: POC of showing PDF with pdfjs-dist 2024-07-18 17:16:19 +02:00
nobohan
2d4fc45a0c signature: manage multi-pages doc 2024-07-18 17:16:19 +02:00
nobohan
c80f23f0db signature: scale the signature zone to the canvas dimension 2024-07-18 17:16:18 +02:00
nobohan
c950400fe2 signature: POC of drawing signature zones and click event on canvas 2024-07-18 17:16:18 +02:00
nobohan
21c1e77d36 signature: POC of showing a pdf with vue-pdf-embed 2024-07-18 17:16:18 +02:00
nobohan
bbfd0caf10 signature: download storedObject document in the vuejs app 2024-07-18 17:16:18 +02:00
nobohan
9192883217 ADDED bootstrap signature vue app 2024-07-18 17:16:18 +02:00
3836622d27 Use better namespacing for configuring workflow signature documents 2024-07-18 16:03:45 +02:00
cc2c4be1b0 Merge branch '288-signature-zone-workflow' into 'signature-app-master'
Signature zone within workflow

See merge request Chill-Projet/chill-bundles!708
2024-07-18 13:51:08 +00:00
873940786f Signature zone within workflow 2024-07-18 13:51:08 +00:00
c82991674e Rector changes: repositories become final readonly classes 2024-07-18 09:49:05 +02:00
3fc3f32c5f Pipeline fixes 2024-07-17 16:21:19 +02:00
20af766cdf Fix the query to return the count of events
Left join was causing events to counted multiple times (once per participation). Using DISTINCT fixes this.
2024-07-17 15:38:55 +02:00
681f637d13 Merge branch 'add-module-emploi' into upgrade-sf5 2024-07-17 14:21:10 +02:00
fb8a6d960e Remove duplicate edit method in events controller 2024-07-17 14:20:15 +02:00
a2310a662f Fix delete request for event status controller 2024-07-17 14:17:19 +02:00
dd7d126bec Fix edit request for event bundle 2024-07-17 14:15:48 +02:00
29f6a43288 Fix translation in event bundle using new pluralization syntax 2024-07-17 13:35:47 +02:00
74be6460d4 Fix delete request for all entities 2024-07-17 13:33:05 +02:00
c8e87ced35 Remove duplicate edit method in events controller 2024-07-17 13:29:14 +02:00
b8002d56ec merge latest changes from upgrade-sf5 branch 2024-07-17 13:17:59 +02:00
a80b36bb31 Fix EntityPersonCRUDController.php add 'person' key 2024-07-17 13:15:22 +02:00
116fe35ad2 Fix delete request for event status controller 2024-07-17 13:11:09 +02:00
5b95336bac Fix event and participation voters 2024-07-17 13:10:51 +02:00
f9d5ba7778 Fix edit request for event bundle 2024-07-17 13:10:34 +02:00
f76379551c Change namespace event voters for consistency 2024-07-17 13:08:48 +02:00
15094d5a91 Fix delete request for all entities 2024-07-17 13:05:14 +02:00
db73dcffc7 Merge branch '286-storedobject-voter' into 'signature-app-master'
Adjust behavoir of voters for stored objects

See merge request Chill-Projet/chill-bundles!701
2024-07-16 12:01:28 +00:00
8aec69f0f9 Merge remote-tracking branch 'origin/signature-app-master' into 286-storedobject-voter 2024-07-16 13:34:36 +02:00
9f88eef249 Fix permission logic in StoredObjectNormalizer
The logic for checking 'see' and 'edit' permissions within the StoredObjectNormalizer has been updated. It now correctly refers to the value of the StoredObjectRoleEnum to check access rights.
2024-07-16 13:24:46 +02:00
d689ce9aef Fix condition for checking if the user is allowed to edit a document attached to a workflow 2024-07-16 13:24:45 +02:00
d5e4991982 Rename WorkflowDocumentService to WorkflowStoredObjectPermissionHelper
The previous name, WorkflowDocumentService, was misleading as its functionality extends to all stored objects and not limited to documents. Therefore, it was renamed to WorkflowStoredObjectPermissionHelper. Consequently, all references to this service were updated throughout the codebase.
2024-07-16 13:24:45 +02:00
1079c7e394 Fix translation in event bundle using new pluralization syntax 2024-07-16 07:07:08 +02:00
ca68b58246 Move classes to dedicated bundle, and avoid plural for namespace name 2024-07-15 21:22:31 +02:00
747a1de321 Add locale requirement to search route, to avoid conflict with profiler route
Introduces a locale requirement to the search route in the ChillMainBundle. This update specifies that a valid locale should consist of 1 to 3 lowercase alphabetic characters. This change will help constrain acceptable locale values.
2024-07-15 21:22:30 +02:00
9e92ede16f Handle cases when there are multiple EntityWorkflows associated with one entity 2024-07-15 21:22:30 +02:00
31f842471a Refactor authorization for AccompanyingPeriodWorkEvaluationDocuments
The AccompanyingPeriodWorkEvaluationStoredObjectVoter has been updated to use the AccompanyingPeriodWorkEvaluationDocument-related classes instead of the AccompanyingPeriodWork classes. Additionally, a new voters class, AccompanyingPeriodWorkEvaluationDocumentVoter has been created. Changes are also made in the repository to find the associated entity in the AccompanyingPeriodWorkEvaluationDocument repository instead of the AccompanyingPeriodWork repository.
2024-07-15 21:22:30 +02:00
7d0f9175be Refactor StoredObjectVoterTest to improve testing logic
The existing StoredObjectVoter test logic was reworked to utilize UsernamePasswordToken and Security mock objects instead of defining its own token. This change improves the testing for different scenarios such as unsupported attributes and cases where role voters cannot see the stored object. Also, the redundancy in the test case provider was removed, which leads to cleaner and more maintainable code.
2024-07-15 17:18:28 +02:00
e83307ca6d Remove obsolete security checks in StoredObjectVoter
This commit eliminates antiquated security checks in the StoredObjectVoter class. Specifically, it removes a chunk of commented out code that checked for certain attributes on the token and also the import for DavTokenAuthenticationEventSubscriber class which is no longer needed. This results in code cleanup and prevents future confusion.
2024-07-15 17:17:56 +02:00
bc2dfd159c merge upgrade-sf5 branch 2024-07-15 15:16:27 +02:00
b100792a34 Fix request to France Travail Api to accomodate for new request limit
A new limit was set to allow a maximum amount of request in a certain timeframe. We need to wait 1 sec to make next request.
2024-07-15 15:11:34 +02:00
00ceee1fd5 Remove "document" from document name 2024-07-15 15:09:45 +02:00
215eba41b7 Fix unit test to accomodate changed constructor in StoredObjectNormalizer 2024-07-11 15:52:47 +02:00
52a3d1be1b Implement show and hide logic within workflow form 2024-07-11 15:16:40 +02:00
8d543be5cc Add configuration on id_document_types to avoid errors 2024-07-11 15:15:04 +02:00
0474b25859 Merge branch 'signature-app/signatur-for-user' into 'signature-app-master'
Add support for user signatures in workflow transitions

See merge request Chill-Projet/chill-bundles!712
2024-07-10 10:52:48 +00:00
db94af0958 Add support for user signatures in workflow transitions
This update introduces the ability to specify user signatures in workflow transitions. It allows a nullable user to be declared that may be requested to apply a signature. The code now handles the use-case of signing a transition by a user in addition to previous functionality of having it signed by a "Person" entity. Corresponding tests are also updated to validate this new feature.
2024-07-10 12:47:02 +02:00
3e8805bdda Merge branch 'signature-app/get-stored-object-from-workflow' into 'signature-app-master'
Allow to retrieve an eventual stored object associated with an EntityWorkflow + handle more effectively transition

See merge request Chill-Projet/chill-bundles!711
2024-07-10 08:45:22 +00:00
a887602f4f Handle storing of new object in PdfSignedMessageHandler
The PdfSignedMessageHandler has been updated to handle pdf signed messages: the content is now stored within the object. Also, a PdfSignedMessageHandlerTest has been created to ensure the correct functionality of the updated handler.
2024-07-10 10:40:19 +02:00
c1cf27c42d Refactor workflow handlers and update comments
Changes include class refactoring for Workflow handlers, using `readonly` and better indentation in constructors for better readability. In addition, outdated comments are removed. Also, entity workflow handlers now implement the EntityWorkflowHandlerInterface type for better type safety.
2024-07-10 10:40:18 +02:00
fe6b4848e6 Implement workflow handlers for stored objects
Added new interface, EntityWorkflowWithStoredObjectHandlerInterface, which provides methods to handle workflows associated with stored objects. Two classes, AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler and AccompanyingCourseDocumentWorkflowHandler, have been updated to implement this new interface. The EntityWorkflowManager class has also been updated to handle workflows associated with stored objects.
2024-07-10 10:40:18 +02:00
b5af9f7b63 Add futurePersonSignatures property to WorkflowTransitionContextDTO
A new property named futurePersonSignatures has been added to the WorkflowTransitionContextDTO class. This will hold a list of Person objects expected to sign the next step, improving the scope of information available within the workflow context.
2024-07-10 10:40:18 +02:00
7f3de62b2c Move the metadata on each workflow transition from the event subscriber to the entity EntityWorkflow::setStep method
The main update is in the setStep method of EntityWorkflow, where parameters are added to capture the transition details. These include the exact transition, the user who made the transition and the time of transition.

The WorkflowController extracts this information and put it into the transition's context. The MarkingStore transfer it to the EntityWorkflow::setStep method, and all metadata are recorded within the entities themselve.
2024-07-10 10:40:17 +02:00
cfa51cd659 php cs fixer 2024-07-09 15:43:22 +02:00
facc4affed Fix testNormalizerSignedUrl method fixed 2024-07-09 14:57:14 +02:00
f9122341d1 Fix phpstan error in match() function 2024-07-09 13:30:58 +02:00
7dd5f542a6 Fix serialization of SignedUrl
An annotation was missing to include the object_name in the serialization.
2024-07-04 16:28:09 +02:00
3b80d9a93b Delete voters that are not in use anymore 2024-07-04 16:24:53 +02:00
790576863f Merge signature-app-master into branch 2024-07-04 15:53:01 +02:00
25e89571f7 Change usage of match function in AsyncUploadVoter 2024-07-04 15:48:08 +02:00
435836c7d1 Delete unused storedobject voter 2024-07-04 15:46:18 +02:00
af4db22184 php cs fixer and rector: add missing comma in AsyncUploadControllerTest 2024-07-04 13:58:10 +02:00
724b98e8c5 Improve naming of downloaded documents in job bundle
When downloaded the title of the document was\ always set to 'Document', which gave little\ indication as to what the document was about.\
Now documents are titled with the name of the\ person and the type of document (CV, permis,...)
2024-07-04 13:28:54 +02:00
2adc8b3bf6 Fix construct of SignedUrlPost 2024-07-04 12:03:43 +02:00
21b79c1981 Php cs fixes 2024-07-04 11:39:02 +02:00
428494ca1f Implement stored object permissions in serialization 2024-07-04 11:38:41 +02:00
5d57ec8a3b Complete AbstractStoredObjectVoterTest.php 2024-07-04 11:38:13 +02:00
719fabc878 Check permissions within StoredObjectNormalizer.php 2024-07-04 11:27:54 +02:00
e9a9a3430f Complete AbstractStoredObjectVoterTest.php 2024-07-04 11:27:16 +02:00
ead1abb825 fix code style for symfony 5 2024-07-03 13:29:22 +02:00
54d045f261 Merge remote-tracking branch 'origin/master' into upgrade-sf5 2024-07-03 13:19:41 +02:00
c648a560cc Fix merge conflict in AuthorizationManager 2024-07-02 15:51:51 +02:00
3d7c8596ee Pass StoredObject instead of Document to check permission in AuthorizationManager.php 2024-07-02 15:49:53 +02:00
345f379650 Implement StoredObject permissions WOPI AuthorizationManager.php 2024-07-02 15:39:31 +02:00
3262a1dd02 Implement StoredObject permissions in AsyncUploadVoter.php 2024-07-02 15:39:06 +02:00
a9f4f8c973 Resolve phpstan erorrs 2024-07-02 14:17:05 +02:00
c19c597ba0 Fix checking of permissions within document_button_group 2024-07-02 12:50:44 +02:00
03800029c9 Fix the import of StoredObjectVoterInterface 2024-07-02 12:49:29 +02:00
064dfc5a56 Fix repositories to fetch entity linked to stored object
getSingleResult() replaced by getOneOrNullResult() to\ avoid error being thrown.
Fix naming of properties.
2024-07-02 12:48:32 +02:00
ba95687f46 Merge branch 'signature-app/signature-doctrine-model' into 'signature-app-master'
Create entity workflow signature

See merge request Chill-Projet/chill-bundles!705
2024-07-02 06:35:23 +00:00
a309cc0774 Refactor workflow classes and forms
- the workflow controller add a context to each transition;
- the state of the entity workflow is applyied using a dedicated marking store
- the method EntityWorkflow::step use the context to associate the new step with the future destination user, cc users and email. This makes the step consistent at every step.
- this allow to remove some logic which was processed in eventSubscribers,
- as counterpart, each workflow must specify a dedicated marking_store:

```yaml
framework:
    workflows:
        vendee_internal:
            # ...
            marking_store:
                service: Chill\MainBundle\Workflow\EntityWorkflowMarkingStore
```
2024-07-02 08:30:28 +02:00
5b0babb9b0 Implement permissions in AsyncUploadVoter.php 2024-07-01 15:37:47 +02:00
ac2f314395 Implement permissions for download button group 2024-07-01 15:23:32 +02:00
8c92d11722 Implement permissions for WOPI 2024-07-01 15:23:07 +02:00
3db4fff80d Add signature functionality to workflow entities
Created new files to add signature functionality to the workflow entities, including signature state enums and signature metadata. Added these changes to the migration script as well. Updated EntityWorkflowStep to include a collection for signatures.
2024-07-01 14:50:03 +02:00
fb743b522d Remove implementation of StoredObjectInterface 2024-07-01 12:23:31 +02:00
d1653a074b Implement test on AbstractStoredObjectVoter
To avoid having to duplicate tests, a test is written\
for the abstract voter.
2024-07-01 12:21:25 +02:00
254122d125 Remove check to see if user is instance of User
The admin user would not be identified as a User.
2024-07-01 12:20:21 +02:00
c9d2e37cee Implement logic to check if editing of document is blocked by workflow
Using the workflow handlers we return the workflow that is attached to an object
so that within the workflowDocumentService we can then check whether this workflow blocks
the edition of a document.
2024-07-01 12:14:03 +02:00
2c99ea17d4 Update new version of chill + more obvious generate jwt keypair command 2024-07-01 09:55:38 +00:00
c9d54a5fea fix cs 2024-06-28 10:47:12 +02:00
86c862e69d Merge remote-tracking branch 'origin/upgrade-sf5' into signature-app-master 2024-06-28 10:41:52 +02:00
d88b5a0098 Remove dump 2024-06-28 10:38:54 +02:00
9bc6fe6aff Add PdfSignedMessage and its serializer
Added a new class, PdfSignedMessage, to handle received signed PDF messages. Also, added a serializer for this class, PdfSignedMessageSerializer, for use with messaging. Furthermore, comment documentation has been added to RequestPdfSignMessage and its serializer for better clarity. Updated unit tests are also included.
2024-06-27 21:52:24 +02:00
18a03fd740 Add signature messenger request serialization and processing
This update introduces a new serializer class for request messages (from messenger component). New features-includes encoding and decoding of request messages and handling unexpected value exceptions. A new test class for the serializer and it also adds functionality to process signature requests in the controller.
2024-06-27 13:38:19 +02:00
e9d4b9e2ab Resolve merge conflicts 2024-06-27 12:50:16 +02:00
efaad1981d Fix namespaces and move voters to corresponding bundles 2024-06-27 12:44:36 +02:00
742f2540f6 Setup AccompanyingPeriodWorkEvaluationStoredObjectVoter.php to use AccompanyingPeriodWorkRepository.php
The voter was not checking the correct permissions to\ establish whether a user can see/edit a storedObject\
The right to see/edit an AccompanyingPeriodWork has to\
be checked.
2024-06-27 11:59:31 +02:00
bab6528ed6 Add test for AccompayingCourseStoredObjectVoter
Mainly to check the voteOnAttribute method, by mocking a scenario where a person
is allowed to see/edit an AccompanyingCourseDocument and not.
2024-06-27 11:31:39 +02:00
a25f2c7539 Ensure single result when retrieving activity and event linked to stored object
Although a many-to-many relationship exists between these entities and stored object,
only one activity or event will ever be linked to a single stored object.
For extra safety measure we return a single result in the repository to ensure our voters
will keep working.
2024-06-27 11:31:39 +02:00
c06e76a0ee Implement context-specific voters for all current entities that can be linked to a document
For reusability an AbstractStoredObjectVoter was created and a StoredObjectVoterInterface.
A WorkflowDocumentService checks whether the StoredObject is involved in a workflow.
2024-06-27 11:31:39 +02:00
4607c36b57 Add WorkflowDocumentService and use in StoredObject voters
A WorkflowDocumentService was created that can be injected\
in context-specific StoredObject voters that need to check whether\
the document in question is attached to a workflow.
2024-06-27 11:31:39 +02:00
7c03a25f1a Refactor AccompanyingCourseDocumentRepository.php
Build where clause using StoredObject directly instead\
of based on it's id.
2024-06-27 11:31:39 +02:00
cce04ee490 Remove implementation of StoredObjectVoterInterface in AccompanyingCourseDocumentVoter.php
This implementation has been moved to the voter\ AccompanyingCourseDocumentStoredObjectVoter.php
2024-06-27 11:31:39 +02:00
e54633d14d Implement voting logic: separation of concerns
A separate AccompanyingCourseDocumentStoredObjectVoter was\
created to handle the specific access to a Stored object\
related to an Accompanying Course Document.
2024-06-27 11:31:39 +02:00
d9892f6822 Correct namespace and use statement for StoredObjectVoterInterface.php
The namespace was formed wrong and needed adjustment
2024-06-27 11:31:39 +02:00
f75c7a0232 Implement StoredObjectVoterInterface
An interface was created to be implemented by Stored Doc voters\
these will automatically be tagged and injected into DocStoreVoter.
2024-06-27 11:31:39 +02:00
062afd6695 Use service tags to inject all voters into StoredObjectVoter.php
Instead of manually injecting services into StoredObjectVoter\
config is added to automatically tag each service that implements\
StoredObjectVoterInterface.php
2024-06-27 11:31:39 +02:00
830dace1ba Rename voter.yaml file to security.yaml
For consistency with other bundles voters are\
registered under the security.yaml file.
2024-06-27 11:31:39 +02:00
2ce9810243 Use constructor property promotion
In accordance with php8.1 use property promotion\
within the constructor method. Less clutter.
2024-06-27 11:31:39 +02:00
26b3d84d62 Add fall-back right for ROLE_ADMIN
Within the StoredObjectVoter.php also the admin\
user should be able to edit documents as a fall-back
2024-06-27 11:31:39 +02:00
30078db841 Type-hint $subject in StoredObjectVoterInterface.php
Since the subject passed to these voters should\
always be of the type StoredObject, type-hinting\ added.
2024-06-27 11:31:39 +02:00
aaac80be84 Add config voter.yaml
The voter.yaml was not configured to be taken into account. Now added\
to ChillDocStoreExtension.php
2024-06-27 11:31:39 +02:00
a0fead48e1 Refactorize StoredObjectVoter.php
The StoredObjectVoter.php has been refactorized to handle context-specific voters.\
This way we can check if the context-specific voter should handle the authorization or not.\
If not, there is a simple fallback to check on the USER_ROLE.
2024-06-27 11:31:39 +02:00
2d09efb2e0 Add StoredObjectVoterInterface
An interface is defined that can be implemented by each context-specific voter in the future.
2024-06-27 11:31:39 +02:00
3a87513a11 initial commit 2024-06-27 11:31:39 +02:00
d3956319ca Add test for AccompayingCourseStoredObjectVoter
Mainly to check the voteOnAttribute method, by mocking a scenario where a person
is allowed to see/edit an AccompanyingCourseDocument and not.
2024-06-26 15:39:58 +02:00
bd36735cb1 Ensure single result when retrieving activity and event linked to stored object
Although a many-to-many relationship exists between these entities and stored object,
only one activity or event will ever be linked to a single stored object.
For extra safety measure we return a single result in the repository to ensure our voters
will keep working.
2024-06-26 14:06:02 +02:00
1310d53589 Implement context-specific voters for all current entities that can be linked to a document
For reusability an AbstractStoredObjectVoter was created and a StoredObjectVoterInterface.
A WorkflowDocumentService checks whether the StoredObject is involved in a workflow.
2024-06-26 14:04:08 +02:00
e38d47ec5e fix pipeline rector and cs 2024-06-26 09:38:13 +02:00
36f2275a56 Delete overriding of generateTemplateParameters method
This method was requiring a person_id to be set, which was\
not the case here so it threw an error. Using the method\
already available in CRUDController works fine, seems to be\
no need to override it.
2024-06-26 09:04:57 +02:00
9a34064b23 Implement chill_document_button_group to allow download of document
At first another download button was used, but not working.\ Elsewhere in Chill the chill_document_button_group seems to\
be used so more coherent to use it here too.
2024-06-26 09:04:41 +02:00
4c3bfc90b5 Import debug-bundle instead of var-dumper 2024-06-25 15:59:56 +00:00
1812e84c92 Merge branch 'testing-2024-03' into add-module-emploi 2024-06-25 15:54:54 +02:00
dfa7de4f38 merge upgrade-sf5 into branch for latest fixes 2024-06-25 15:54:22 +02:00
610239930b Add serialization groups to PDFPage and PDFSignatureZone properties
The Symfony Serializer groups annotation has been added to all properties of the PDFPage and PDFSignatureZone classes. This change allows the serialization and deserialization process to be group-specific, ensuring only relevant data is processed during these operations.
2024-06-25 13:43:48 +02:00
b65e2c62c4 Merge branch 'signature-app/parse-pdf' into 'signature-app-master'
Add PDF signature zone parsing functionality

See merge request Chill-Projet/chill-bundles!703
2024-06-25 11:27:34 +00:00
89f5231649 Refactor PDFSignatureZoneParser to use float values
This update changes how we handle values in PDFSignatureZoneParser class. Specifically, we've modified the 'MediaBox' and 'PDFSignatureZone' variables to use float values. The helps ensure greater precision, minimize errors, and maintain data consistency across the application.
2024-06-25 13:25:49 +02:00
bd41308bbd remove deps to gelf-graylog, which is a dependency of the app 2024-06-24 15:11:00 +02:00
f8fa96d836 Fix download report URL in ChillMainBundle export
An extra "?" was erroneously appended to the download report URL in ChillMainBundle's export feature. This update removes the extraneous character to ensure the function works as expected with the correct URL format.
2024-06-24 14:23:47 +02:00
d28cec3786 Update dependencies and bootstrap configuration
Updated the versions of PHPUnit and Symfony's PHPUnit-Bridge in composer.json to more recent, stable versions. The bootstrap.php code has been modified to now load the regular .env file instead of the .env.test file, the change is made to enable the application fetch the actual environment variables during execution.
2024-06-24 12:12:32 +02:00
7cd36cd483 Remove minimum length assertions in ThirdParty entity
The code changes eliminate the minimum length assertions for 'acronym' and 'nameCompany' in the ThirdParty entity. This modification increases flexibility, accommodating acronyms and company names of any length.
2024-06-24 11:33:54 +02:00
d3d98cdec2 Update method parameter type in ExportController
The parameter type for the 'rebuildRawData' function in the ExportController class has been changed to accept null values. This change is introduced to handle cases where a null key might be passed, preventing potential errors in the application.
2024-06-24 11:33:54 +02:00
49dd7f94fa Fix CS and upgrade issues after mergin master branch 2024-06-24 10:56:02 +02:00
916724c0c5 Merge branch 'master' into upgrade-sf5 2024-06-24 10:46:21 +02:00
nobohan
102d0dad94 DOC: add jwt key generation in the sf5 installationdoc - format doc 2024-06-24 09:17:16 +02:00
nobohan
8d225dd68c DOC: add jwt key generation in the sf5 installationdoc - format doc 2024-06-24 09:16:29 +02:00
nobohan
61d0005be8 DOC: add jwt key generation in the sf5 installationdoc 2024-06-24 09:14:58 +02:00
73797b98f6 Add WorkflowDocumentService and use in StoredObject voters
A WorkflowDocumentService was created that can be injected\
in context-specific StoredObject voters that need to check whether\
the document in question is attached to a workflow.
2024-06-20 17:32:09 +02:00
3d40db7493 Refactor AccompanyingCourseDocumentRepository.php
Build where clause using StoredObject directly instead\
of based on it's id.
2024-06-20 17:28:19 +02:00
760d65b972 Remove implementation of StoredObjectVoterInterface in AccompanyingCourseDocumentVoter.php
This implementation has been moved to the voter\ AccompanyingCourseDocumentStoredObjectVoter.php
2024-06-20 17:27:21 +02:00
d26fa6bde6 Implement voting logic: separation of concerns
A separate AccompanyingCourseDocumentStoredObjectVoter was\
created to handle the specific access to a Stored object\
related to an Accompanying Course Document.
2024-06-20 15:18:26 +02:00
427f232ab8 Correct namespace and use statement for StoredObjectVoterInterface.php
The namespace was formed wrong and needed adjustment
2024-06-20 10:53:33 +02:00
99818c211d Fix cs: upgrade of php-cs-fixer 2024-06-19 12:18:20 +02:00
a9f0059743 Add PDF signature zone parsing functionality
This update introduces new services into the ChillDocStoreBundle for signature zone parsing within PDFs. The PDFSignatureZoneParser service identifies signature zones within PDF content while the additional classes, PDFPage and PDFSignatureZone, help define these zones and pages. Corresponding tests have also been
2024-06-19 12:17:25 +02:00
5bc542a567 remove symfony/phpunit-bridge 2024-06-19 12:16:51 +02:00
482f279dc5 Implement StoredObjectVoterInterface
An interface was created to be implemented by Stored Doc voters\
these will automatically be tagged and injected into DocStoreVoter.
2024-06-19 10:21:24 +02:00
e0828b1f0f Use service tags to inject all voters into StoredObjectVoter.php
Instead of manually injecting services into StoredObjectVoter\
config is added to automatically tag each service that implements\
StoredObjectVoterInterface.php
2024-06-19 10:17:50 +02:00
e015f71bb0 Rename voter.yaml file to security.yaml
For consistency with other bundles voters are\
registered under the security.yaml file.
2024-06-19 10:02:25 +02:00
04a48f22ad Use constructor property promotion
In accordance with php8.1 use property promotion\
within the constructor method. Less clutter.
2024-06-19 10:00:10 +02:00
ad4fe80240 Add fall-back right for ROLE_ADMIN
Within the StoredObjectVoter.php also the admin\
user should be able to edit documents as a fall-back
2024-06-19 09:52:59 +02:00
4b82e67952 Type-hint $subject in StoredObjectVoterInterface.php
Since the subject passed to these voters should\
always be of the type StoredObject, type-hinting\ added.
2024-06-19 09:51:21 +02:00
c8ccce83fd add a dependency on smalot/pdfparser to parse signature zone within pdf 2024-06-18 17:47:16 +02:00
e9a9262fae Add config voter.yaml
The voter.yaml was not configured to be taken into account. Now added\
to ChillDocStoreExtension.php
2024-06-14 17:27:22 +02:00
d9e37d0958 Refactorize StoredObjectVoter.php
The StoredObjectVoter.php has been refactorized to handle context-specific voters.\
This way we can check if the context-specific voter should handle the authorization or not.\
If not, there is a simple fallback to check on the USER_ROLE.
2024-06-14 17:25:24 +02:00
65c41e6fa9 Add StoredObjectVoterInterface
An interface is defined that can be implemented by each context-specific voter in the future.
2024-06-14 16:48:09 +02:00
7923b5a1ef initial commit 2024-06-14 15:35:50 +02:00
4a229ebf6b Initial commit 2024-06-14 15:32:51 +02:00
635b1ee537 merge upgrade-sf5 branch to have latest fixes 2024-06-06 13:01:12 +02:00
6db36d5ab6 Remove ChillEventBundle and refactor framework.yaml configurations
This commit involves the deletion of ChillEventBundle from the bundles configuration. Additionally, test framework configurations are handled in a consolidated manner by moving assets configurations (json_manifest_path) from test/framework.yaml to framework.yaml. The obsolete test/framework.yaml has been deleted as it is no longer needed.
2024-06-04 21:55:53 +02:00
59f721934e Refactor export download script to use ES6 and webpack
The export download script was refactored to use ES6 syntax and webpack's modular system. This included separating out the download script into its own file for better organization, removing globally-scoped JavaScript, and adding the new download script as a webpack entry point. Also, the import method for the 'mime' library was adjusted to use ES6 syntax.
2024-06-04 21:53:32 +02:00
84ce8a93f3 Refactor ISOToDateTime to handle case when timezone's server is UTC
A condition is added to check if the timezone is set as '0000' (UTC timezone), if yes then a new Date is returned with the Date.UTC method. This ensures that the time returned correctly reflects the current timezone
2024-06-01 00:40:22 +02:00
ab5f2ffb65 add script to run php-cs-fixer 2024-06-01 00:35:36 +02:00
73bae8ccb9 fix indentation 2024-06-01 00:35:26 +02:00
dcfa569e3a Upgrade CKEditor and refactor configuration with use of typescript 2024-06-01 00:35:08 +02:00
4b07fe3622 Update address list import to latest compiled addresses
The import of the address list has been upgraded to use the latest version of the compiled addresses from Belgian-best-address. In the AddressReferenceBEFromBestAddress class, the RELEASE constant has been updated to point to the v1.1.1 tag.
2024-05-30 16:02:35 +02:00
3fd6e52e9d remove unnecessary constraints from 3party properties acronym and nameCompany 2024-05-29 11:37:42 +02:00
f60a595ab6 Update vue toast version and implementation 2024-05-29 11:37:04 +02:00
48bf359d2e Restore feature to see chill assets style preview in dev environment
This commit introduces a new dev.assets.html.twig file and updates the chill.yaml file to add new paths for the SASS Assets tests.
2024-05-28 16:34:32 +02:00
60c7ea601c Update form builder parameter in SearchController
Changed the first argument in the `createNamedBuilder` method from `null` to an empty string. This adjustment ensures the form factory correctly creates the builder in the SearchController.
2024-05-28 16:00:03 +02:00
785c01d42d enable parallelization in php-cs-fixer config 2024-05-28 14:58:31 +02:00
06dd7dd4f5 apply rector rules 2024-05-28 14:58:09 +02:00
84f515d451 Merge remote-tracking branch 'origin/master' into upgrade-sf5 2024-05-28 14:16:01 +02:00
436ef33dbc final fix for appellation selector: define metier when appellation already exists 2024-05-23 14:05:14 +02:00
405aad7333 fix rome appellation selector and admin 2024-05-23 13:47:33 +02:00
a5c2576124 Fix the appellation selection for projet professional 2024-05-23 12:46:12 +02:00
33a6f9996e remove dumps 2024-05-22 21:02:17 +02:00
b96cbc5594 rector fixes 2024-05-22 17:13:27 +02:00
854d72fa42 php cs fixes 2024-05-22 17:12:49 +02:00
cd6fd091dc resolve merge conflicts 2024-05-22 16:57:28 +02:00
cb5ade3d14 add changie for module emploi 2024-05-22 16:49:45 +02:00
dddb6d66bc php cs fixes after merge 2024-05-22 16:44:02 +02:00
d34f9450b8 Merge branch 'add-module-emploi' of gitlab.com:Chill-Projet/chill-bundles into add-module-emploi 2024-05-22 16:43:02 +02:00
9ce1788a14 phpstan en rector fixes 2024-05-22 16:42:47 +02:00
2895638f3b php cs fixes 2024-05-22 15:26:23 +02:00
2708bafb1f Export for list person with cs_person columns fixed 2024-05-22 15:24:39 +02:00
7d309136b1 minor last fixes for immersion and remove of dumps 2024-05-22 08:53:56 +02:00
82d3ec4d6f Merge branch 'add-module-emploi' of gitlab.com:Chill-Projet/chill-bundles into add-module-emploi 2024-05-22 08:40:46 +02:00
cad2dea148 Wip: add jsonb fields to export 2024-05-16 09:26:40 +02:00
bff14aa700 minor last fixes for immersion and remove of dumps 2024-05-15 16:02:14 +02:00
66570cd430 merge add-module-emploi into testing 2024-05-15 15:19:24 +02:00
53df2ec9ba Merge branch 'master' into testing-2024-03 2024-05-15 15:17:49 +02:00
068503a830 Merge branch 'master' into add-module-emploi 2024-05-15 14:36:36 +02:00
c07a728f1d Wip: add jsonb fields to export 2024-05-15 14:35:51 +02:00
b7e61c6747 merge master into module emploi branch 2024-05-15 14:26:51 +02:00
97846a5877 add basic fields csperson to list person export 2024-05-14 11:01:45 +02:00
4ed9d3d8e2 Fix API call 2024-05-14 07:49:48 +02:00
d0e27d51fe fix path to doctrine-fixtures-bundles and prefix composer command by "symfony" 2024-05-13 13:20:08 +00:00
d63e1a15bd Language corrections 2024-05-07 14:51:31 +00:00
d82d534a4c Try to fix API: adjust to new urls, but still receiving error code 400 2024-05-07 11:15:10 +02:00
684f28291a reinstate exports 2024-05-07 11:14:39 +02:00
5334779b55 fix issue in installation instructions 2024-05-03 13:20:02 +02:00
1230b7f4c0 documentation for installation process 2024-05-03 13:17:00 +02:00
394c752fc3 undo wrong fix of workflow configuration 2024-04-30 16:29:33 +02:00
43c846d02e Merge branch 'upgrade-sf5' of gitlab.com:Chill-Projet/chill-bundles into upgrade-sf5 2024-04-30 16:21:06 +02:00
e24c4dc2e8 Fix workflow hierarchy 2024-04-30 09:25:09 +02:00
0c75514ec4 Fix validation of household address history 2024-04-29 15:53:08 +02:00
526882a5b6 phpstan, rector and cs fixes 2024-04-29 15:39:05 +02:00
9a010f76cc Fix some translations (already existing in v2) 2024-04-29 15:28:44 +02:00
73d6578a3a Fix workflow configuration 2024-04-29 15:28:24 +02:00
422b6b99eb Change translation for the group of voter rights 2024-04-29 15:28:13 +02:00
02b150b0a5 fix delete of reports in crud config + template 2024-04-29 15:25:15 +02:00
20c27c100c Name change from CSConnecte to Job 2024-04-29 15:20:23 +02:00
12a22bcc13 template + form + property fixes for emploi reports 2024-04-29 14:13:37 +02:00
cba8a342d5 more template fixes 2024-04-24 18:02:06 +02:00
6f55ba15d6 Split crud controllers for each report entity 2024-04-24 17:40:31 +02:00
454ab73303 WIP fix emploi reports 2024-04-24 17:11:26 +02:00
800942bc92 Add missing columns to report tables 2024-04-24 17:10:30 +02:00
c4e7683e48 fix templates for personal situation 2024-04-24 15:02:24 +02:00
28c986fddf controller with crud logic + templates fixed for dispositif 2024-04-24 14:52:19 +02:00
adca4f0d6a php cs fixes 2024-04-24 12:28:55 +02:00
7b25c8e390 New migration to take care of everything needed for ChillJobBundle 2024-04-24 12:27:49 +02:00
0b5be0419b Move old migrations to directory 'old' just in case 2024-04-24 12:27:23 +02:00
650e85c481 Fix crudconfig 2024-04-24 11:44:14 +02:00
56d5d08ed3 Run rector on ListCSPerson file 2024-04-24 11:34:06 +02:00
d3390ca334 Phpstan error for unused parameter fixed 2024-04-24 10:49:19 +02:00
511c0af5fa Last php cs fix 2024-04-24 10:40:09 +02:00
4c354c47c9 Fix construct method for ListCSPerson 2024-04-24 10:39:46 +02:00
d8b6cef7b4 rector fixes 2024-04-24 10:18:07 +02:00
e312929d86 php cs fixes 2024-04-24 10:16:54 +02:00
20b38af812 Create phpstan baseline for level 5 taking into account new bundles 2024-04-24 10:16:16 +02:00
2f07be0843 Revert "adjust phpstan baselines"
This reverts commit a71573136a.
2024-04-24 10:11:02 +02:00
11c069a2ff Revert "phpstan baseline 5 updated"
This reverts commit deaab80270.
2024-04-24 10:10:55 +02:00
3929602f59 Revert "php style fixes"
This reverts commit 38fcccfd83.
2024-04-24 10:09:25 +02:00
38fcccfd83 php style fixes 2024-04-23 21:22:29 +02:00
deaab80270 phpstan baseline 5 updated 2024-04-23 21:22:19 +02:00
a71573136a adjust phpstan baselines 2024-04-23 21:12:57 +02:00
b1082f6a55 fix phpstan errors level 3 2024-04-23 21:03:42 +02:00
dcc285e976 fix phpstan errors level 2 2024-04-23 20:52:22 +02:00
ed3e0f889e Rector changes + namespace changes 2024-04-23 17:43:23 +02:00
63fe8070c4 Rector passed again on JobBundle entities 2024-04-19 11:30:47 +02:00
8e3322f578 rector rules for upgrade to php 8.2 and symfony 5.4 applied + php cs fixer 2024-04-19 10:56:49 +02:00
00756a3bde Move migrations directory to src 2024-04-19 10:33:40 +02:00
2c68224e9c Add jobBundle and FranceTravailApiBundle 2024-04-19 10:21:17 +02:00
ce655ed435 fix cs 2024-04-10 21:15:57 +02:00
b2eb2b0968 Update calendar authorization checks
The CalendarDocVoter now also supports Calendar instances, not only CalendarDoc instances. This allows refining permissions checks based on the actual instance type. In addition, the ChillCalendarBundle's view has been updated to correctly use permissions when displaying action buttons. Obsolete TODO comments are also removed.
2024-04-10 21:15:49 +02:00
ca398195b0 Add missing label for pick-entity / AddPerson 2024-04-10 16:27:23 +02:00
38e5d9c7cc fix task for symfony 5.4 2024-04-10 16:08:35 +02:00
680513a3a6 fix missing librairies 2024-04-10 16:08:09 +02:00
3df57c1569 Remove nullable parameter from createNamedBuilder call
The call to createNamedBuilder in EventController.php and ExportController.php was originally passing null as a parameter. This was generating PHPStan warnings. This commit replaces null with an empty string to comply with the method's expected types.
2024-04-10 12:43:25 +02:00
0b40d807bc Implement HasCentersInterface in Household class (will fix access control)
The Household class now implements the HasCentersInterface and includes a method to get all centers associated with current persons in the household. This enhancement will allow fetching of all household-associated centers easier.
2024-04-10 12:43:04 +02:00
a3efae7831 Update budget element voter and improve form handling in permissions group
The base class of BudgetElementVoter has been changed to Voter, and the form handling in PermissionsGroupController has been improved for better validation. In addition, minor changes were made for better menu building and service configuration was updated. Unnecessary date validation in AbstractElement has been removed as well.
2024-04-10 10:31:00 +02:00
76fdd6d889 Add explicit controller definition requirement for APIs
Updated API creation to require an explicit controller definition. This change has been reflected in the ChillMainExtension and ChillPersonExtension files. Also, it has introduced a new exception, the InvalidCrudConfiguration, which will be thrown when a new API or CRUD is created without this explicit controller definition.
2024-04-08 19:06:47 +02:00
78a3dfd65e Add validation for household metadata
A new validation group 'household_metadata' has been added to the Household form. The 'waitingForBirth' field now has a type check, and for the 'waitingForBirthDate' field, an expression is added to ensure it's set if 'waitingForBirth' is true. Simultaneously, error handling for form submission has been enriched in the HouseholdController to display specific error messages.
2024-04-08 14:52:40 +02:00
29d53c53a4 fixup! Fix configuration and usage of password hasher 2024-04-08 13:45:37 +02:00
e3bd68112e fix test for editing household metadata 2024-04-08 13:44:22 +02:00
8700352cf8 Fix configuration and usage of password hasher 2024-04-08 13:21:34 +02:00
2b3f8948f8 On AsyncFileExists, checks on null value for the customization of the message 2024-04-08 13:21:14 +02:00
19ffef156b Fix use of Ordering constant in doctrine orm association
See https://github.com/doctrine/orm/issues/11313 for a follow-up
2024-04-08 13:10:38 +02:00
e8c7623a1e Refactor Relationship entity to use traits
The Relationship entity in ChillPersonBundle has been refactored to use TrackCreationTrait and TrackUpdateTrait. As a result, the redundant code for handling creation and update tracking has been removed. This change will simplify future development by reusing core functionality from the trait instead of manually controlling the process in each entity.
2024-04-08 12:13:39 +02:00
5be85a4fc6 Refactored code to use PHP8 attributes instead of annotations
In this change, Doctrine and validation annotations have been replaced with PHP8 Attributes. The Rector tool has been configured with a list of annotations to convert to attributes. As a consequence, the PHPStan's rules have been updated to reflect these changes. The PHP8's nullable operator (?) has been added where required, and comments in field declaration have been replaced with #[Attribute] syntax.
2024-04-08 12:11:29 +02:00
0ff4593863 Apply rector rules: add annotation for doctrine mapping 2024-04-05 13:11:42 +02:00
a3f775a69b Apply rector rules: add annotation for doctrine mapping 2024-04-05 00:19:30 +02:00
72016e1a21 Apply rector rules: add annotation for doctrine mapping 2024-04-05 00:01:30 +02:00
579bd829f8 Apply rector rules: symfony up to 54 2024-04-04 23:30:25 +02:00
1ee3b9e2f0 Remove the tearDown method, because we are not able to delete entities linked with materialized views 2024-04-04 23:00:27 +02:00
e5e9ba6d31 make static required method in AbstractExportTests 2024-04-04 22:46:13 +02:00
3e676c235e remove option in phpunit.xml.dist 2024-04-04 22:37:56 +02:00
a497c3ffca fix return type of getFormData 2024-04-04 22:37:44 +02:00
553fb271e4 fix container operations within tests 2024-04-04 22:26:42 +02:00
92800f5dd0 fix cs 2024-04-04 22:19:56 +02:00
409a571010 fix upgrade in document generation request 2024-04-04 22:17:51 +02:00
828304d983 Replace getUsername with getUserIdentifier in activity checks
Updated activity checks in ListActivitiesByAccompanyingPeriodContext to use getUserIdentifier method instead of getUsername. This change corresponds to check for both activity users and work referrers. The getUserIdentifier method grants a more reliable way to identify users.
2024-04-04 22:12:49 +02:00
931c69eee4 Merge remote-tracking branch 'origin/master' into upgrade-sf5 2024-04-04 18:45:01 +02:00
d6a6cc2572 Rename chill.role tag to chill_main.provide_role and optimize role provider
The `chill.role` tag has been renamed to `chill_main.provide_role` to prevent any confusion and make the namespaces more consistent. During this process, the class RoleProvidersCompilerPass was deleted, simplifying the role provision process by injecting tagged services directly into the RoleProvider. The change is also reflected in multiple YAML service configurations and explained in the MIGRATION.md file.
2024-04-03 17:14:02 +02:00
166d7fe0b0 Merge branch 'master' into testing-2024-03 2024-03-26 22:14:51 +01:00
ab9d5439c1 Release 2.18.1 2024-03-26 22:08:30 +01:00
0737838dd6 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:08:01 +01:00
88bac5b5d8 Merge remote-tracking branch 'origin/145-permettre-de-visualiser-les-documents-dans-libreoffice-en-utilisant-webdav' into testing-2024-03 2024-03-26 21:34:15 +01:00
0081146a78 Change non-static class-level variables and methods to static in tests's data providers
The update modifies several test classes within the "chill-project" to change non-static class-level variables and methods to static ones. This change has been made to improve readability, performance, and to eliminate unnecessary instantiation of class objects in test scenarios. Also, flush and clear actions on the entity manager are moved to individual data providers.
2024-02-19 15:38:28 +01:00
d0f23eb6b1 fixup! Make all existing export test data provider static 2024-02-18 23:17:33 +01:00
d135b2ba0a Refactor rector rules to simplify code and fix rule definition 2024-02-18 23:14:33 +01:00
bb4b7e9735 Make all existing export test data provider static 2024-02-16 21:52:47 +01:00
07f03ab715 Make data providers static on AbstractExportTest.php and Write a rector rule to adapt existing 2024-02-16 21:49:27 +01:00
b9ae878791 Aggregators: Update test methods to static and return array
Modified aggregator test methods throughout the Chill project to be now static methods. Also updated yield construction to array returns for more standardised code.
2024-02-16 21:33:57 +01:00
94725bc92f fixup! Update test methods to static in AbstractFilterTest 2024-02-16 19:17:10 +01:00
11f6b78b26 Make static some methods in AbstractAggregatorTest.php + rector rule to adapt existing 2024-02-16 19:16:07 +01:00
35d55cced4 Update test methods to static in AbstractFilterTest
The methods getFormData() and getQueryBuilders() across multiple test classes have been updated to static methods. This refactoring is part of a broader effort to improve code structure and readability. A rector rule has been employed to assist in the systematic update of these existing methods.
2024-02-16 19:09:15 +01:00
1f460916b6 fixup! Update PHPUnit configuration and reorganize test files for rector rules 2024-02-14 22:31:43 +01:00
fa0204adbc Refactor test methods in AbstractFilterTest to be static + rector rules for updating existing
All test methods in AbstractFilterTest class have been refactored to be static.

A rector rule has been created to refactor existing test.
2024-02-14 22:30:16 +01:00
edcf78d6cc Update PHPUnit configuration and reorganize test files for rector rules 2024-02-14 22:28:39 +01:00
f251e6f100 upgrade phpunit: make data provider static 2024-02-14 12:28:14 +01:00
d5115b3718 upgrade rector and adapt list 2024-02-14 11:10:31 +01:00
9064356bd1 allow 45 direct deprecations 2024-02-14 10:08:53 +01:00
8a2f3d3dd0 Simplify setCenters method and remove readonly property
The commit simplifies the setCenters method in the ThirdParty class by directly assigning the incoming centers collection to the $centers property. Additionally, the readonly keyword has been removed from the $centers property declaration, allowing its value to be modified.
2024-02-13 21:04:22 +01:00
510023d630 fix cs 2024-02-13 21:04:09 +01:00
2ddfd56401 fix phpstan and rector errors, fix path for rector rules 2024-02-13 19:12:14 +01:00
f889d67e94 fixes after merge of master into upgrade-sf4 2024-02-12 22:31:16 +01:00
37af488f69 Merge branch 'master' into upgrade-sf5 2024-02-12 21:50:34 +01:00
cf1df462dc optional parameter after the required one 2024-01-15 21:18:51 +01:00
a0328b9d68 Apply new CS rules on the webdav feature 2024-01-15 20:38:03 +01:00
813a80d6f9 Dav: add UI to edit document 2024-01-15 20:22:14 +01:00
ab95bb157e Dav: add some documentation on classes 2024-01-15 20:19:03 +01:00
18fd1dbc4a Dav: Introduce access control inside de dav controller 2024-01-15 20:19:03 +01:00
a35f7656cb Dav: refactor WebdavController 2024-01-15 20:19:03 +01:00
ff05f9f48a Dav: implements JWT extraction from the URL, and add the access_token in dav urls 2024-01-15 20:19:02 +01:00
482c494034 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-01-15 20:19:02 +01:00
825cd127d1 update php-cs-fixer and rector + fix rules 2024-01-09 13:50:45 +01:00
a63b40fb6c use service subscriber injection to inject manager registry 2024-01-09 13:48:14 +01:00
5703fd0046 Refactor code to directly use Doctrine's ManagerRegistry
Replaced most of the invocations of getDoctrine()->getManager() with ManagerRegistry->getManager(), and added ManagerRegistry injection to controllers where needed. This is part of an ongoing effort to improve code clarity, and avoid unnecessary method chaining in various parts of the codebase.
2023-12-16 19:09:34 +01:00
655dc02538 CRUDRoutesLoader: use the syntax controller::method instead of the deprecated controller:method 2023-12-14 23:57:20 +01:00
1098bafd3d Replaced the deprecated 'self::$container->get' with 'self::getContainer()->get' using rector
This change is made to comply with the new Symfony standards and to avoid deprecation warnings for future versions. The update touches various functionalities, including retrieving EntityManagerInterface instance and various service classes within the test files.
2023-12-14 23:36:56 +01:00
4a99480f50 fixup! Fix some tests 2023-12-14 23:22:48 +01:00
8fcdb58556 Adjust SYMFONY_DEPRECATIONS_HELPER value in phpunit.xml.dist
Modified the `SYMFONY_DEPRECATIONS_HELPER` value from 'max[direct]=0' to 'max[direct]=93' in the PHPUnit configuration file. This change allows up to 93 direct deprecations before the PHPUnit test suite will return a failure, helping to manage the process of upgrading Symfony components and maintaining compatibility.

This number of 93 match the current number of deprecations in the CI for the execution of whole tests.
2023-12-14 23:18:03 +01:00
4e1f46154c Remove ReportSearch class and update services config
Removed the ReportSearch class from ChillReportBundle and updated the corresponding services configuration. This removal is part of a larger refactoring process to enhance maintainability, eliminate unused code and simplify application architecture. This will not affect the application's functionality as the class was not used.
2023-12-14 23:05:36 +01:00
312eb5ec7c Refactor parseDate function signature in AbstractSearch
Removed unnecessary comments and added type hinting to the function parseDate in the AbstractSearch class. Any string passed to this function will now explicitly be expected as a string data type, increasing code robustness and easing debugging process.
2023-12-14 23:05:36 +01:00
2dd1b7c943 Fix some tests 2023-12-14 23:05:35 +01:00
d5476df14c rename main firewall 2023-12-14 22:56:50 +01:00
7ba3435c41 Refactor PrepareClientTrait to use the loginUser method 2023-12-14 22:56:50 +01:00
5030b67c5d fix gitlab-ci configuration 2023-12-14 18:14:02 +01:00
d6ff3f422f change messenger configuration 2023-12-14 14:33:23 +01:00
912f7d3211 remove some deprecations 2023-12-14 14:09:57 +01:00
47c3be6217 Merge remote-tracking branch 'origin/master' into upgrade-sf5 2023-12-13 16:04:48 +01:00
9c17261175 update phpunit configuration file 2023-12-13 15:54:33 +01:00
8c2dc490d0 re-configure test app with new scripts (wip) 2023-12-13 15:47:38 +01:00
b4063bf1df Update path for Symfony container XML in rector.php
The path for Symfony container XML in the rector configuration file has been updated. This adjustment specifically refers to the internal testing application. By updating this path, consistency and efficiency within the testing process will be promoted.
2023-12-13 15:27:27 +01:00
de6277494a update configuration of app for internal testing app 2023-12-13 15:00:31 +01:00
da997badd9 Fix phpstan issues 2023-12-12 22:43:44 +01:00
af663cf27c Create the helper ChillSecurity
En symfony 5.4 le typage a été vraiment amélioré, et phpstan peut détecter plus d'erreur potentielles.

Mais le problème est que Symfony "type" les `User` avec son propre `Symfony\Component\Security\Core\User\UserInterface` alors qu'on a besoin de `Chill\MainBundle\Entity\User`.

Imaginons qu'on a ceci:

```php

namespace Chill\Bundle\Service;

final readonly class SomeService
{
    public function myMethod(\Chill\MainBundle\Entity\User $user): void
    {
        // ...
    }
}
```

Quand on l'appelle dans un contrôleur ou dans un service:

```php

namespace Chill\Bundle\Service;

use Symfony\Component\Security\Core\Security;

final readonly OtherService
{
    public function __construct(private Security $security, private SomeService $service) {}

    public function __invoke(): void
    {
        $this->service->myMethod($this->security->getUser());
    }
}
```

PHPstan va se plaindre:

```
Parameter #1 $user of method SomeService::myMethod() expects Chill\MainBundle\Entity\User, Symfony\Component\Security\Core\User\UserInterface|null given.
```

Du coup, j'ai créé ce service:

```php
<?php

namespace Chill\MainBundle\Security;

use Chill\MainBundle\Entity\User;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Security\Core\Security;

/**
 * Security helper for Chill user
 *
 * Provides security-related functionality such as user retrieval, authorization checks,
 * and token retrieval, in a context where only an authenticated @see{User::class} is expected.
 *
 */
final readonly class ChillSecurity implements AuthorizationCheckerInterface
{

    public function hasUser(): bool
    {
        // implementation detail not shown here
    }

    public function getUser(): User
    {
        // implementation detail not shown here
    }

    public function isGranted($attribute, $subject = null): bool
    {
        // implementation detail not shown here
    }

    public function getToken(): ?TokenInterface
    {
        // implementation detail not shown here
    }
}
```

Et maintenant, on peut faire:

```php

namespace Chill\Bundle\Service;

use Chill\MainBundle\Security\ChillSecurity;

final readonly OtherService
{
    public function __construct(private ChillSecurity $security, private SomeService $service) {}

    public function __invoke(): void
    {
        $this->service->myMethod($this->security->getUser());
    }
}
```

Et tout va bien se passer.

Ca sera dans la version de chill qui fait passer à symfony 5.4.
2023-12-12 22:43:24 +01:00
ac98ba4555 re-organize phpstan deprecations files, with a baseline of deprecations for symfony 5.4 2023-12-12 17:56:27 +01:00
f35f5f0876 fixup! fix typo in classname (Phonenumber => PhoneNumber) 2023-12-12 17:19:28 +01:00
99b7b2ec88 upgrade rector rules and apply them 2023-12-12 17:17:15 +01:00
e2a37fd80b fix typo in classname (Phonenumber => PhoneNumber) 2023-12-12 17:12:01 +01:00
b64ac8fd20 Merge MR !636 into master: Merge async upload bundle into chill-bundles
See https://gitlab.com/Chill-Projet/chill-bundles/-/merge_requests/636

Merge remote-tracking branch 'origin/async-upload-merge' into upgrade-sf5
2023-12-12 16:18:49 +01:00
f68deca992 Fix icu message 2023-12-12 16:13:58 +01:00
f9a2d7f2d5 Add symfony runtime to composer.json 2023-12-12 16:08:47 +01:00
2f8de4bf01 Upgrade recipes: symfony/security-bundle 2023-12-12 16:08:46 +01:00
c6bb7b1d98 Rector rules: apply rules for 5.0 types 2023-12-12 16:08:46 +01:00
4c52aa366a Rector rules: add rules for 5.0 types 2023-12-12 16:08:46 +01:00
ceaabfb034 Downgrade symfony bundle to ^5.4 (some were on 6.3)
composer: restrict missing bundle to symfony 5.4
2023-12-12 16:08:46 +01:00
16a5745df9 Update composer to symfony 5 (without config) 2023-12-12 16:08:45 +01:00
3fb04594eb add changie [ci-skip] 2023-12-12 15:55:14 +01:00
1065706e60 Re-configure test app 2023-12-12 15:55:14 +01:00
f131572344 Remove references to old async upload bundle 2023-12-12 15:55:14 +01:00
45e1ce034a Add ConfigureOpenstackObjectStorageCommand to ChillDocStoreBundle
Added new command file "ConfigureOpenstackObjectStorageCommand.php" under ChillDocStoreBundle that helps in setting up OpenStack container for document storage. Along with the command, added corresponding test file "ConfigureOpenstackObjectStorageCommandTest.php" to ensure the functionality is working as expected.
2023-12-12 15:55:14 +01:00
82ca321715 Add exceptions for async file handling failures
Introduced two new exceptions, `BadCallToRemoteServer` and `TempUrlRemoteServerException`, to improve error handling in asynchronous file operations. These exceptions are thrown when there are issues with the remote server during an async file operation such as HTTP status codes >= 400 and if the server is unreachable.
2023-12-12 15:55:13 +01:00
28d09a8206 Add form and types to handle async files 2023-12-12 15:55:13 +01:00
1195767eb3 Add Twig AsyncUploadExtension and its associated test
Created AsyncUploadExtension under Chill\DocStoreBundle\AsyncUpload\Templating to provide Twig filter functions for generating URLs for asynchronous file uploads. To ensure correctness, AsyncUploadExtensionTest was implemented in Bundle\ChillDocStoreBundle\Tests\AsyncUpload\Templating. Service definitions were also updated in services.yaml.
2023-12-12 15:55:13 +01:00
4fd5a37df3 Add serializer groups to SignedUrl and SignedUrlPost classes, include tests
Serializer groups have been added to the SignedUrl and SignedUrlPost classes to ensure correct serialization. Two new test files were also included: SignedUrlNormalizerTest and SignedUrlPostNormalizerTest which test the normalization of instances of the classes.
2023-12-12 15:55:13 +01:00
450e7c348b Fix and clean DI configuration for chill_doc_store for usage with AsyncUpload 2023-12-12 15:55:12 +01:00
a70572266f Refactor TempUrlOpenstackGenerator to use parameter bag and Bundle configuration
The TempUrlOpenstackGenerator now uses a ParameterBag for configuration instead of individual parameters. This simplifies the handling of configuration values and makes the code more maintainable. The parameter configuration has also been included in the chill_doc_store configuration array for a unified approach.
2023-12-12 15:55:12 +01:00
d688022825 Add Controller to get asyncUpload signatures
Added new files for handling asynchronous file uploads in ChillDocStoreBundle. The new files include a controller for generating temporary URLs (AsyncUploadController.php), a security authorization file (AsyncUploadVoter.php), and a corresponding test file (AsyncUploadControllerTest.php). These implementations permit asynchronous uploads via POST, GET, and HEAD methods while maintaining security protocols.
2023-12-12 11:36:14 +01:00
264fff5c36 Implement asynchronous upload feature in Openstack Object Store
Those features were previously stored in champs-libres/async-upload-bundle

This commit introduces several new classes within the ChillDocStore bundle for handling asynchronous uploads onto an Openstack Object Store. Specifically, the TempUrlOpenstackGenerator, SignedUrl, TempUrlGeneratorInterface, TempUrlGenerateEvent, and TempUrlGeneratorException classes have been created.

This implementation will allow for generating "temporary URLs", which assist in securely and temporarily uploading resources to the OpenStack Object Store. This feature enables the handling of file uploads in a more scalable and efficient manner in high-volume environments.

Additionally, corresponding unit tests have also been added to ensure the accuracy of this new feature.
2023-12-12 11:36:14 +01:00
2878 changed files with 117534 additions and 66875 deletions

View File

@@ -1,6 +0,0 @@
kind: Fixed
body: Show only the current referrer in the page "show" for an accompanying period
workf
time: 2024-09-16T15:18:43.017401122+02:00
custom:
Issue: "308"

View File

@@ -1,6 +0,0 @@
kind: Fixed
body: |
Correctly compute the grouping by referrer aggregator
time: 2024-09-16T15:51:50.268336979+02:00
custom:
Issue: "309"

View File

@@ -0,0 +1,6 @@
kind: Fixed
body: Fix display of 'duplicate' and 'merge' buttons in CRUD templates
time: 2025-09-09T17:36:39.960419639+02:00
custom:
Issue: ""
SchemaChange: No schema change

View File

@@ -1,5 +1,11 @@
## v2.23.0 - 2024-07-19
## v2.23.0 - 2024-07-23 & 2024-07-19
### Feature
* ([#221](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/221)) [DX] move async-upload-bundle features into chill-bundles
* Add job bundle (module emploi)
* Upgrade import of address list to the last version of compiled addresses of belgian-best-address
* Upgrade CKEditor and refactor configuration with use of typescript
* ([#123](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/123)) Add a button to duplicate calendar ranges from a week to another one
* [admin] filter users by active / inactive in the admin user's list
* ([#273](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/273)) Add the possibility to mark all notifications as read
@@ -9,6 +15,8 @@
* Do not update the "createdAt" column when importing postal code which does not change
* Display filename on file upload within the UI interface
### Fixed
* Fix resolving of centers for an household, which will fix in turn the access control
* Resolved type hinting error in activity list export
* ([#271](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/271)) Take into account the acp closing date in the acp works date filter
### Traduction française des principaux changements

5
.changes/v3.0.0.md Normal file
View File

@@ -0,0 +1,5 @@
## v3.0.0 - 2024-08-26
### Fixed
* Fix delete action for accompanying periods in draft state
* Fix connection to azure when making an calendar event in chill
* CollectionType js fixes for remove button and adding multiple entries

3
.changes/v3.1.0.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.1.0 - 2024-08-30
### Feature
* Add export aggregator to aggregate activities by household + filter persons that are not part of an accompanyingperiod during a certain timeframe.

6
.changes/v3.1.1.md Normal file
View File

@@ -0,0 +1,6 @@
## v3.1.1 - 2024-10-01
### Fixed
* ([#308](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/308)) Show only the current referrer in the page "show" for an accompanying period workf
* ([#309](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/309)) Correctly compute the grouping by referrer aggregator
* Fixed typing of custom field long choice and custom field group

6
.changes/v3.10.0.md Normal file
View File

@@ -0,0 +1,6 @@
## v3.10.0 - 2025-03-17
### Feature
* ([#363](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/363)) Display social actions grouped per social issue within activity form
### Fixed
* ([#362](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/362)) Fix Dependency Injection, which prevented to save the CalendarRange
* ([#368](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/368)) fix search query for user groups

3
.changes/v3.10.1.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.10.1 - 2025-03-17
### DX
* Remove yarn dependency to symfony/ux-translator, to ease the build process

3
.changes/v3.10.2.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.10.2 - 2025-03-17
### Fixed
* Replace a ts-expect-error with a ts-ignore

3
.changes/v3.10.3.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.10.3 - 2025-03-18
### DX
* Eslint fixes

19
.changes/v3.11.0.md Normal file
View File

@@ -0,0 +1,19 @@
## v3.11.0 - 2025-04-17
### Feature
* ([#365](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/365)) Add counters of actions and activities, with 2 boxes to (1) show the number of active actions on total actions and (2) show the number of activities in a accompanying period, and pills in menus for showing the number of active actions and the number of activities.
* ([#364](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/364)) Added a second phone number "telephone2" to the thirdParty entity. Adapted twig templates and vuejs apps to handle this phone number
**Schema Change**: Add columns or tables
* Signature: add a button to go directly to the signature zone, even if there is only one
### Fixed
* Fixed wrong translations in the on-the-fly for creation of thirdParty
* Fixed update of phone number in on-the-fly edition of thirdParty
* Fixed closing of modal when editing thirdParty in accompanying course works
* Shorten the delay between two execution of AccompanyingPeriodStepChangeCronjob, to ensure at least one execution in a day
* ([#102](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/102)) Fix display of title in document list
* When cleaning the old stored object versions, do not throw an error if the stored object is not found on disk
* Add consistent log prefix and key to logs when stale workflows are automatically canceled
* ([#380](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/380)) Remove the "not null" validation constraint on recently added properties on HouseholdComposition
### DX
* Add new chill-col style for displaying title and aside in a flex table

22
.changes/v3.12.0.md Normal file
View File

@@ -0,0 +1,22 @@
## v3.12.0 - 2025-06-30
### Feature
* ([#377](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/377)) Add the document file name to the document title when a user upload a document, unless there is already a document title.
* Add desactivation date for social action and issue csv export
* Add Emoji and Fullscreen feature to ckeditor configuration
* ([#321](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/321)) Create editor which allow us to toggle between rich and simple text editor
* Do not remove workflow which are automatically canceled after staling for more than 30 days
### Fixed
* ([#376](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/376)) trying to prevent bug of typeerror in doc-history + improved display of document history
* ([#381](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/381)) Display previous participation in acc course work even if the person has left the acc course
* ([#372](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/372)) Fix display of text in calendar events
* Add missing translation for user_group.no_user_groups
* Fix admin entity edit actions for event admin entities and activity reason (category) entities
* ([#392](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/392)) Allow null and cast as string to setContent method for NewsItem
* ([#393](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/393)) Doc Generation: the "dump only" method send the document as an email attachment.
### DX
* ([#352](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/352)) Remove dead code for wopi-link module
* Replace library node-sass by sass, and upgrade bootstrap to version 5.3 (yarn upgrade / install is required)
### UX
* ([#374](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/374)) Remove default filter in_progress for the page 'my tasks'; Allows for new tasks to be displayed upon opening of the page
* Improve labeling of fields in person resource creation form

3
.changes/v3.12.1.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.12.1 - 2025-06-30
### Fixed
* Fix loading of the list of documents

3
.changes/v3.2.0.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.2.0 - 2024-10-30
### Feature
* Introduce a gender entity

4
.changes/v3.2.1.md Normal file
View File

@@ -0,0 +1,4 @@
## v3.2.1 - 2024-10-31
### Fixed
* Add the possibility of unknown to the gender entity
* Fix the fusion of person doubles by excluding accompanyingPeriod work entities to be deleted. They are moved instead.

3
.changes/v3.2.2.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.2.2 - 2024-10-31
### Fixed
* Fix gender translation for unknown

4
.changes/v3.2.3.md Normal file
View File

@@ -0,0 +1,4 @@
## v3.2.3 - 2024-11-05
### Fixed
* ([#315](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/315)) Fix display of accompanying period work referrers. Only current referrers should be displayed.
Fix color of Chill footer

3
.changes/v3.2.4.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.2.4 - 2024-11-06
### Fixed
* Fix compilation of chill assets

13
.changes/v3.3.0.md Normal file
View File

@@ -0,0 +1,13 @@
## v3.3.0 - 2024-11-20
### Feature
* Electronic signature
Implementation of the electronic signature for documents within chill.
* ([#286](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/286)) The behavoir of the voters for stored objects is adjusted so as to limit edit and delete possibilities to users related to the activity, social action or workflow entity.
* ([#288](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/288)) Metadata form added for person signatures
* Add a signature step in workflow, which allow to apply an electronic signature on documents
* Keep an history of each version of a stored object.
* Add a "send external" step in workflow, which allow to send stored objects and other elements to remote people, by sending them a public url
### Fixed
* Adjust household list export to include households even if their address is NULL
* Remove validation of date string on deathDate

4
.changes/v3.4.0.md Normal file
View File

@@ -0,0 +1,4 @@
## v3.4.0 - 2024-11-20
### Feature
* ([#314](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/314)) Admin: improve document type admin form with a select field for related class.
Admin: Allow administrator to assign multiple group centers in one go to a user.

3
.changes/v3.4.1.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.4.1 - 2024-11-22
### Fixed
* Set the workflow's title to notification content and subject

6
.changes/v3.4.2.md Normal file
View File

@@ -0,0 +1,6 @@
## v3.4.2 - 2024-12-05
### Fixed
* ([#329](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/329)) Fix the serialization of gender for the generation of documents
* ([#337](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/337)) Enforce unique contraint on activity storedobject
### DX
* ([#310](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/310)) Clean migrations, to reduce the number of bloated migration when running diff on schema

4
.changes/v3.4.3.md Normal file
View File

@@ -0,0 +1,4 @@
## v3.4.3 - 2024-12-05
### Fixed
* Remove the "not null" constraint on person supplementary phones
* Remove doctrine annotation that prevent from adding documents to activities

6
.changes/v3.5.0.md Normal file
View File

@@ -0,0 +1,6 @@
## v3.5.0 - 2024-12-09
### Feature
* ([#318](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/318)) Show all the pages of the documents in the signature app
### Fixed
* Wrap the signature's change state into a transaction, to avoid race conditions
* Fix display of gender label

4
.changes/v3.5.1.md Normal file
View File

@@ -0,0 +1,4 @@
## v3.5.1 - 2024-12-16
### Fixed
* Filiation: fix the display of the gender label in the graph
* Wrap handling of PdfSignedMessage into transactions

3
.changes/v3.5.2.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.5.2 - 2024-12-19
### Fixed
* ([#345](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/345)) Export: activity filtering of users that were associated to an activity between certain dates. Results contained activities that were not within the specified date range"

3
.changes/v3.5.3.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.5.3 - 2025-01-07
### Fixed
* Fix the EntityToJsonTransformer to return an empty array if the value is ""

9
.changes/v3.6.0.md Normal file
View File

@@ -0,0 +1,9 @@
## v3.6.0 - 2025-01-16
### Feature
* Importer for addresses does not fails when the postal code is not found with some addresses, and compute a recap list of all addresses that could not be imported. This recap list can be send by email.
* ([#346](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/346)) Create a driver for storing documents on disk (instead of openstack object store)
* Add address importer from french Base d'Adresse Nationale (BAN)
* ([#343](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/343)) Add csv export for social issues and social actions
### Fixed
* Export: fix missing alias in activity between certain dates filter. Condition added for alias.

62
.changes/v3.7.0.md Normal file
View File

@@ -0,0 +1,62 @@
## v3.7.0 - 2025-01-21
### Feature
* Use the Notifier component from Symfony to sens short messages (SMS). This allow to use more provider.
### Fixed
* ([#348](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/348)) [export] Fix aggregation of referrer's scope and job: fix the date range comparison
### Warning on configuration of Notifier component
If installed in an symfony app where the recipes are activated, this configuration should be added automatically:
```yaml
framework:
notifier:
chatter_transports:
texter_transports:
ovhcloud: '%env(OVHCLOUD_DSN)%'
channel_policy:
# use chat/slack, chat/telegram, sms/twilio or sms/nexmo
urgent: ['email']
high: ['email']
medium: ['email']
low: ['email']
admin_recipients:
- { email: admin@example.com }
```
Actually, you should either:
- remove the configuration of ovhcloud added by the recipe
- or remove the previous configuration of chill, to avoid keeping legacy configuration
#### Remove the added configuration and keep the legacy configuration
To remove the configuration:
```diff
framework:
notifier:
chatter_transports:
texter_transports:
- ovhcloud: '%env(OVHCLOUD_DSN)%'
```
In that case, the previous configuration, which was stored under the `chill_main.short_messages.dsn` will be reconfigured into the Notifier component's configuration.
#### Properly configure SMS
You can also properly configure it, as [described in the OVH cloud provider repository](https://github.com/symfony/ovh-cloud-notifier/tree/5.4?tab=readme-ov-file#dsn-example) (where the scheme is `ovhcloud`):
**NOTE**: You have access to all notifier available with the [Notifier component](https://symfony.com/doc/current/notifier.html#notifier-sms-channel). You are not restricted to use OVH as a provider.
```diff
framework:
notifier:
chatter_transports:
texter_transports:
+ ovhcloud: '%env(OVHCLOUD_DSN)%' # this value should be located in a variable, and have `ovhcloud://` as a scheme
chill_main:
- short_messages:
- dsn: '%env(string:SHORT_MESSAGE_DSN)%'
```

3
.changes/v3.7.1.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.7.1 - 2025-01-21
### Fixed
* Fix legacy configuration processor for notifier component

11
.changes/v3.8.0.md Normal file
View File

@@ -0,0 +1,11 @@
## v3.8.0 - 2025-02-03
### Feature
* Improve the UX of the news item admin form to prevent wrong usage
* ([#319](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/319)) Notification list: display the concerned person's badges in the list
* ([#320](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/320)) Show the first 3 persons directly in the accompanying period's banner
* ([#334](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/334)) Suggest current user when creating an activity
* ([#331](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/331)) Add attachments to workflows
### Fixed
* ([#350](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/350)) Add validation error to manual selection of person in PersonDuplicateController
* ([#354](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/354)) Fix document category creation
* ([#351](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/351)) Add definitive whitespace between span elements in vue PersonText component

3
.changes/v3.8.1.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.8.1 - 2025-02-05
### Fixed
* Fix household link in the parcours banner

3
.changes/v3.8.2.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.8.2 - 2025-02-10
### Fixed
* ([#358](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/358)) Remove "filter" button on list of documents in the workflow's "add attachement" modal

10
.changes/v3.9.0.md Normal file
View File

@@ -0,0 +1,10 @@
## v3.9.0 - 2025-02-27
### Feature
* ([#349](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/349)) Suggest all referrers within actions of the accompanying period when creating an activity
* ([#343](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/343)) Add possibility to export a csv with all social issues and social actions
* ([#360](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/360)) Restore document to previous kept version when a workflow is canceled
* ([#341](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/341)) Add a list of third parties from within the admin (csv download)
### Fixed
* fix generation of document with accompanying period context, and list of activities and works
### DX
* ([#333](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/333)) Create an unique source of trust for translations

3
.changes/v3.9.1.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.9.1 - 2025-02-27
### Fixed
* Fix post/patch request with missing 'type' property for gender

3
.changes/v3.9.2.md Normal file
View File

@@ -0,0 +1,3 @@
## v3.9.2 - 2025-02-27
### Fixed
* Use fetchResults method to fetch all social issues instead of only the first page

74
.changes/v4.0.0.md Normal file
View File

@@ -0,0 +1,74 @@
## v4.0.0 - 2025-07-08
### Feature
* ([#359](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/359)) Allow the merge of two accompanying period works
### Fixed
* ([#390](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/390)) Display the list of participant in the results, even if there is only one participant and that the search result display the requestor
* Fix admin entity edit actions for event admin entities and activity reason (category) entities
* Fix translations for social action fields in admin form: results, goals, evaluations
### DX
* Rewrite exports to run them asynchronously
**Schema Change**: Add columns or tables
* Allow TranslatableMessage in flash messages
### UX
* Improve labeling of fields in person resource creation form
**Release notes**
- Add new methods to serialize data using the rector rule
- Remove all references to the Request in filters, aggregators, filters. Actually, the most frequent occurence is `$security->getUser()`.
- Refactor manually the initializeQuery method
- Remove the injection of ExportManager into the constructor of each export element:
```diff
- class MyFormatter implements FormatterInterface
+ class MyFormatter implements FormatterInterface, \Chill\MainBundle\Export\ExportManagerAwareInterface
{
+ use \Chill\MainBundle\Export\Helper\ExportManagerAwareTrait;
- public function __construct(private ExportManager $exportmanager) {}
public function MyMethod(): void
{
- $this->exportManager->getFilter('alias');
+ $this->getExportManager()->getFilter('alias');
}
}
```
- configure messenger to handle export in a queue:
```diff
# config/packages/messenger.yaml
framework:
messenger:
routing:
+ 'Chill\MainBundle\Export\Messenger\ExportRequestGenerationMessage': priority
```
- add missing methods to exports, aggregators, filters, formatter:
```php
public function normalizeFormData(array $formData): array;
public function denormalizeFormData(array $formData, int $fromVersion): array;
```
There are rector rules to generate those methods:
- `Chill\Utils\Rector\Rector\ChillBundleAddNormalizationMethodsOnExportRector`
See:
```php
// upgrade chill exports
$rectorConfig->rules([\Chill\Utils\Rector\Rector\ChillBundleAddNormalizationMethodsOnExportRector::class]);
```
This rule will create most of the work necessary, but some manuals changes are still necessary:
- we must set manually the correct repository for method `denormalizeDoctrineEntity`;
- when the form data contains some entities, and the form type is not one of EntityType::class, PickUserDynamicType::class, PickUserLocationType::class, PickThirdpartyDynamicType::class, Select2CountryType::class, then we must handle the normalization manually (using the `\Chill\MainBundle\Export\ExportDataNormalizerTrait`)

4
.changes/v4.0.1.md Normal file
View File

@@ -0,0 +1,4 @@
## v4.0.1 - 2025-07-08
### Fixed
* Fix package.json for compilation

4
.changes/v4.0.2.md Normal file
View File

@@ -0,0 +1,4 @@
## v4.0.2 - 2025-07-09
### Fixed
* Fix add missing translation
* Fix the transfer of evaluations and documents during of accompanyingperiodwork

12
.changes/v4.1.0.md Normal file
View File

@@ -0,0 +1,12 @@
## v4.1.0 - 2025-08-26
### Feature
* ([#400](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/400)) Add filter to social actions list to filter out actions where current user intervenes
* ([#399](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/399)) Show filters on list pages unfolded by default
* Expansion of event module with new fields in the creation form: thematic, internal/external animator, responsable, and budget elements. Filtering options in the event list + adapted exports
**Schema Change**: Add columns or tables
### Fixed
* ([#382](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/382)) adjust display logic for accompanying period dates, include closing date if period is closed.
* ([#384](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/384)) add min and step attributes to integer field in DateIntervalType
### UX
* Limit display of participations in event list

10
.changes/v4.2.0.md Normal file
View File

@@ -0,0 +1,10 @@
## v4.2.0 - 2025-09-02
### Feature
* ([#64](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/64)) Add external identifier for a Person
**Schema Change**: Add columns or tables
* ([#330](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/330) Allow users to choose for which notifications they want to receive an email
### Fixed
* ([#422](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/422)) Fixed html layout of pages for recovering password
* Fix typo in 'uncheckAll' script for centers selection
* Fix incorrect parameter name in event details link

6
.changes/v4.2.1.md Normal file
View File

@@ -0,0 +1,6 @@
## v4.2.1 - 2025-09-03
### Fixed
* Fix exports to work with DirectExportInterface
### DX
* Improve error message when a stored object cannot be written on local disk

10
.changes/v4.3.0.md Normal file
View File

@@ -0,0 +1,10 @@
## v4.3.0 - 2025-09-08
### Feature
* ([#409](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/409)) Add 45 and 60 min calendar ranges
* Add a command to generate a list of permissions
* ([#412](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/412)) Add an absence end date
**Schema Change**: Add columns or tables
### Fixed
* fix date formatting in calendar range display
* Change route URL to avoid clash with person duplicate controller method

View File

@@ -7,15 +7,29 @@ versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}'
kindFormat: '### {{.Kind}}'
# Note: it is possible to add a `.custom.Long` text manually into the yaml file produced by `changie new`. This will add a long description.
changeFormat: >-
* {{ if not (eq .Custom.Issue "") }}([#{{ .Custom.Issue }}](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/{{ .Custom.Issue }})) {{ end }}{{.Body}} {{ if and (.Custom.Long) (not (eq .Custom.Long "")) }}
* {{ if not (eq .Custom.Issue "") }}([#{{ .Custom.Issue }}](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/{{ .Custom.Issue }})) {{ end }}{{ .Body }} {{ if and .Custom.SchemaChange (ne .Custom.SchemaChange "No schema change") }}
**Schema Change**: {{ .Custom.SchemaChange }}
{{- end -}}
{{ if and (.Custom.Long) (not (eq .Custom.Long "")) }}{{ .Custom.Long }}{{ end }}
{{ .Custom.Long }}{{ end }}
custom:
- key: SchemaChange
label: Is a schema change required?
optional: false
type: enum
enumOptions:
- "No schema change"
- "Add columns or tables"
- "Drop or rename table or columns, or enforce new constraint that must be manually fixed"
- key: Issue
label: Issue number (on chill-bundles repository) (optional)
optional: true
type: int
minInt: 1
body:
# allow multiline messages
block: true

94
.env Normal file
View File

@@ -0,0 +1,94 @@
# * .env contains default values for the environment variables needed by the app
# * .env.local uncommitted file with local overrides
# * .env.$APP_ENV committed environment-specific defaults
# * .env.$APP_ENV.local uncommitted environment-specific overrides
#
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
# https://symfony.com/doc/current/configuration/secrets.html
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
###> symfony/framework-bundle ###
APP_ENV=prod
APP_SECRET=!ChangeMeInAppEnv!
###< symfony/framework-bundle ###
## Wopi server for editing documents online
EDITOR_SERVER=http://collabora:9980
# must be manually set in .env.local
# ADMIN_PASSWORD=
###> symfony/mailer ###
# MAILER_DSN=null://null
###< symfony/mailer ###
###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
# MESSENGER_TRANSPORT_DSN=sync://
# MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
MESSENGER_TRANSPORT_DSN=${RABBITMQ_URL}/%2f
###< symfony/messenger ###
###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
DATABASE_URL="postgresql://postgres:postgres@db:5432/postgres?serverVersion=14&charset=utf8"
###< doctrine/doctrine-bundle ###
###> lexik/jwt-authentication-bundle ###
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
JWT_PASSPHRASE=2a30f6ba26521a2613821da35f28386e
###< lexik/jwt-authentication-bundle ###
###> chill-project/chill-bundles ###
# Generate a password using `symfony console security:hash-password --empty-salt <password> 'Symfony\Component\Security\Core\User\User'` and paste it into .env.local file
# ADMIN_PASSWORD=
# Add a configuration for sending SMS (before calendar appointments, aka "Rendez-vous"). See https://symfony.com/doc/current/notifier.html#sms-channel
# Configuration for using ovh custom notifier
# SHORT_MESSAGE_DSN="ovh://user:password@ovh-eu?consumer_key=123456&sender=%2B32475123456&service_name=sms-xx123456-1"
SHORT_MESSAGE_DSN=null://null
# Default locale for the project
LOCALE=fr
# Those keys are required to configure the access to store documents
ASYNC_UPLOAD_TEMP_URL_KEY=
ASYNC_UPLOAD_TEMP_URL_BASE_PATH=
ASYNC_UPLOAD_TEMP_URL_CONTAINER=
# Twilio configuration, to check for the existence of phonenumber in a directory (may be deprecated in a near future)
TWILIO_SID=
TWILIO_SECRET=
# Default carrier code will replace all leading zero by an international code. Set here the country as two letters
DEFAULT_CARRIER_CODE=FR
# Configuration for the notification emails
NOTIFICATION_FROM_EMAIL=chill@instance.com
NOTIFICATION_FROM_NAME=Chill
# Will set the default host when sending email from command or services (see https://symfony.com/doc/5.x/routing.html#generating-urls-in-commands)
NOTIFICATION_HOST=my.chill.social
# Variables for relatorio host, which generates documents
RELATORIO_HOST=
RELATORIO_PORT=
# Address for your collabora server
#EDITOR_SERVER=https://code.example.com
EDITOR_SERVER=https://collabora.champs-libres.be
# center address widget when empty
ADD_ADDRESS_DEFAULT_COUNTRY=BE
ADD_ADDRESS_MAP_CENTER_X=50.8443
ADD_ADDRESS_MAP_CENTER_Y=4.3523
ADD_ADDRESS_MAP_CENTER_Z=15
## Redis Cache & redis database
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
###< chill-project/chill-bundles ###
###> symfony/ovh-cloud-notifier ###
# OVHCLOUD_DSN=ovhcloud://APPLICATION_KEY:APPLICATION_SECRET@default?consumer_key=CONSUMER_KEY&service_name=SERVICE_NAME
###< symfony/ovh-cloud-notifier ###

View File

@@ -6,11 +6,6 @@ APP_SECRET='$ecretf0rt3st'
ADMIN_PASSWORD=password
LOCALE=fr
REDIS_URL=redis
REDIS_PORT=6379
REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
JWT_PASSPHRASE=2a30f6ba26521a2613821da35f28386e
@@ -20,22 +15,25 @@ TWILIO_SECRET=~
DEFAULT_CARRIER_CODE=BE
ADD_ADDRESS_DEFAULT_COUNTRY=BE
ADD_ADDRESS_MAP_CENTER_X=50.8443
ADD_ADDRESS_MAP_CENTER_Y=4.3523
ADD_ADDRESS_MAP_CENTER_Z=15
SHORT_MESSAGE_DSN=null://null
MESSENGER_TRANSPORT_DSN=sync://
###< symfony/messenger ###
###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
DATABASE_URL="postgresql://postgres:postgres@db:5432/test?serverVersion=14&charset=utf8"
DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5454/test?serverVersion=14&charset=utf8"
###< doctrine/doctrine-bundle ###
ASYNC_UPLOAD_TEMP_URL_KEY=
ASYNC_UPLOAD_TEMP_URL_BASE_PATH=
ASYNC_UPLOAD_TEMP_URL_CONTAINER=
MAILER_DSN=null://null
REDIS_HOST=127.0.0.1
REDIS_PORT=6363

1658
.eslint-baseline.json Normal file

File diff suppressed because it is too large Load Diff

40
.gitignore vendored
View File

@@ -3,9 +3,23 @@ composer
composer.phar
composer.lock
docs/build/
node_modules/*
.php_cs.cache
.cache/*
yarn.lock
docker/db/data
docker/rabbitmq/data
# in this development bundle, we want to ignore directories related to a real app
assets/*
!assets/translator.ts
!assets/ux-translator
migrations/*
templates/*
translations/*
# we allow developers to add customization on their installation, without commiting it
config/packages/dev/*
###> symfony/framework-bundle ###
/.env.local
@@ -15,7 +29,6 @@ node_modules/*
/public/bundles/
/var/
/vendor/
/bin/
###< symfony/framework-bundle ###
###> phpunit/phpunit ###
@@ -27,4 +40,25 @@ node_modules/*
/.idea/
/.psalm/
node_modules/*
###> phpstan/phpstan ###
phpstan.neon
###< phpstan/phpstan ###
###> lexik/jwt-authentication-bundle ###
/config/jwt/*.pem
###< lexik/jwt-authentication-bundle ###
###> symfony/phpunit-bridge ###
###< symfony/phpunit-bridge ###
###> symfony/webpack-encore-bundle ###
/node_modules/
/public/build/
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-bundle ###
###> friendsofphp/php-cs-fixer ###
/.php-cs-fixer.php
/.php-cs-fixer.cache
###< friendsofphp/php-cs-fixer ###

View File

@@ -5,11 +5,12 @@ cache:
paths:
- /vendor/
- .cache
- node_modules/
# Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
# See http://docs.gitlab.com/ee/ci/services/README.html for examples.
services:
- name: postgis/postgis:14-3.3-alpine
- name: postgis/postgis:17-3.5-alpine
alias: db
command:
- postgres
@@ -20,12 +21,13 @@ services:
# Set any variables we need
variables:
APP_ENV: test
GIT_DEPTH: 1
# Configure postgres environment variables (https://hub.docker.com/r/_/postgres/)
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
# configure database access
DATABASE_URL: postgresql://postgres:postgres@db:5432/postgres?serverVersion=14&charset=utf8
DATABASE_URL: postgresql://postgres:postgres@db:5432/postgres?serverVersion=17&charset=utf8
# fetch the chill-app using git submodules
# GIT_SUBMODULE_STRATEGY: recursive
REDIS_HOST: redis
@@ -35,7 +37,7 @@ variables:
# 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
SYMFONY_DEPRECATIONS_HELPER: max[total]=99999999&max[self]=0&max[direct]=45&verbose=0
stages:
- Composer install
@@ -44,7 +46,7 @@ stages:
build:
stage: Composer install
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
image: chill/base-image:8.3-edge
before_script:
- composer config -g cache-dir "$(pwd)/.cache"
script:
@@ -55,12 +57,11 @@ build:
artifacts:
expire_in: 1 day
paths:
- bin
- vendor/
code_style:
stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
image: chill/base-image:8.3-edge
script:
- php-cs-fixer fix --dry-run -v --show-progress=none
cache:
@@ -69,38 +70,54 @@ code_style:
artifacts:
expire_in: 1 day
paths:
- bin
- vendor/
phpstan_tests:
stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
image: chill/base-image:8.3-edge
variables:
COMPOSER_MEMORY_LIMIT: 3G
before_script:
- bin/console cache:clear --env=dev
script:
- bin/phpstan analyze --memory-limit=2G
- composer exec phpstan -- analyze --memory-limit=3G
cache:
paths:
- .cache/
artifacts:
expire_in: 1 day
paths:
- bin
- vendor/
rector_tests:
stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
image: chill/base-image:8.3-edge
before_script:
- bin/console cache:clear --env=dev
script:
- tests/console cache:clear
- bin/rector process --dry-run
- composer exec rector -- process --dry-run
cache:
paths:
- .cache/
artifacts:
expire_in: 1 day
paths:
- bin
- vendor/
lint:
stage: Tests
image: node:20-alpine
before_script:
- apk add --no-cache python3 make g++ py3-setuptools
- export PYTHON="$(which python3)"
- export PATH="./node_modules/.bin:$PATH"
script:
- yarn install --ignore-optional
- npx eslint-baseline "src/**/*.{js,ts,vue}"
cache:
paths:
- node_modules/
# psalm_tests:
# stage: Tests
# image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
@@ -115,17 +132,20 @@ rector_tests:
unit_tests:
stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
image: chill/base-image:8.3-edge
variables:
COMPOSER_MEMORY_LIMIT: 3G
before_script:
- php bin/console doctrine:database:create -n --env=test
- php bin/console doctrine:migrations:migrate -n --env=test
- php bin/console chill:db:sync-views --env=test
- php bin/console cache:clear --env=test
- php bin/console doctrine:fixtures:load -n --env=test
script:
- php tests/console doctrine:migrations:migrate -n --env=test
- php tests/console chill:db:sync-views --env=test
- php -d memory_limit=2G tests/console cache:clear --env=test
- php -d memory_limit=3G tests/console doctrine:fixtures:load -n
- php -d memory_limit=4G bin/phpunit --colors=never --exclude-group dbIntensive
- composer exec phpunit -- --colors=never --exclude-group dbIntensive,openstack-integration
artifacts:
expire_in: 1 day
paths:
- bin
- vendor/
release:
@@ -137,4 +157,4 @@ release:
- echo "running release_job"
release:
tag_name: '$CI_COMMIT_TAG'
description: "./.changes/v$CI_COMMIT_TAG.md"
description: "./.changes/$CI_COMMIT_TAG.md"

391
.junie/guidelines.md Normal file
View File

@@ -0,0 +1,391 @@
# Project Guidelines for Junie
## Project Overview
Chill is a comprehensive web application built as a set of Symfony bundles. It is a case management system, for social work. The project consists of multiple specialized bundles that provide different functionalities:
- **ChillMainBundle**: Core bundles that provide the foundation of the application
- **ChillPersonBundle**: Core bundles that provide the foundation of the bundles associated to person (which is the case for all other bundles)
- **ChillCalendarBundle**: Calendar and scheduling functionality
- **ChillDocStoreBundle** and **ChillDocGeneratorBundle**: Document management and generation
- **ChillActivityBundle**, **ChillEventBundle**, **ChillTaskBundle**: Activity and task tracking
- **ChillBudgetBundle**: Financial management
- **ChillThirdPartyBundle**: Integration with external systems
- **ChillCustomFieldsBundle**: Extensibility through custom fields
- **ChillReportBundle**: Save arbitrary reports about persons
- **ChillTicketBundle**: Record and track issues about persons
- And several other specialized bundles
## Technology Stack
- **Backend**: PHP 8.3+, Symfony 5.4
- **Frontend**: JavaScript/TypeScript, Vue.js 3, Bootstrap 5
- **Build Tools**: Webpack Encore, Yarn
- **Database**: PostgreSQL with materialized views. We do not support other databases.
- **Other Services**: Redis, AMQP (RabbitMQ), SMTP
## Project Structure
Note: This is a project that's existed for a long time, and throughout the years we've used multiple structures inside each bundle. When having the choice, the developers should choose the new structure.
The project follows a standard Symfony bundle structure:
- `/src/Bundle/`: Contains all the Chill bundles. The code is either at the root of the bundle directory, or within a `src/` directory (preferred). See psr4 mapping at the root's `composer.json`.
- each bundle comes with its own tests, either in the `Tests` directory (when the code is directly within the bundle directory (for instance `src/Bundle/ChillMainBundle/Tests`, `src/Bundle/ChillPersonBundle/Tests`)), or inside the `tests` directory, alongside the `src/` sub-directory (example: `src/Bundle/ChillWopiBundle/tests`) (this is the preferred way).
- `/docs/`: Contains project documentation
Each bundle typically has the following structure:
- `Controller/`: Contains controllers
- `Entity/`: Contains Doctrine entities
- `Repository/`: Contains Doctrine repositories
- `Resources/`: Contains views, translations, and public assets
- `DependencyInjection/`: Contains service configuration
- `Export/`: Contains services related to exports
- `Security/`: Contains services related to security. Most of the time, those are new voters, and so on.
### A special word about TicketBundle
The ticket bundle is developed using a kind of "Command" pattern. The controller fills a "Command," and a "CommandHandler" handles this command. They are saved in the `src/Bundle/ChillTicketBundle/src/Action` directory.
## Development Guidelines
### Building and Configuration Instructions
All the commands should be run through the `symfony` command, which will configure the required variables.
For assets, we must ensure that we use node at version `^20.0.0`. This is done using `nvm use 20`.
#### Initial Setup
1. **Clone the Repository**:
```bash
git clone <repository-url>
cd chill-bundles
```
2. **Install PHP Dependencies**:
```bash
composer install
```
3. **Install JavaScript Dependencies**:
```bash
nvm use 20
yarn install
```
4. **Configure Environment Variables**:
- Create a `.env.local` file with minimal configuration
```bash
echo "APP_ENV=dev" >> .env.local
```
5. Start the associated services (database, and so on):
```bash
docker compose up -d
```
6. **Set Up the Database**:
```bash
# Create the database
symfony console doctrine:database:create
# Run migrations
symfony console doctrine:migrations:migrate
# Load fixtures (optional)
symfony console doctrine:fixtures:load
```
7. **Build Assets**:
```bash
nvm use 20
yarn run encore dev
```
8. **Start the Development Server**:
```bash
symfony server:start -d
```
#### Docker Setup
The project includes a Docker configuration for easier development:
1. **Start Docker Services**:
```bash
docker-compose up -d
```
2. **Access the Application**:
- The application will be available at `http://localhost:8000`
- PostgreSQL will be available at `localhost:5432`
- Redis will be available at `localhost:6379`
#### Building Assets
Before submitting any changes, you should build the project to ensure that all assets are properly compiled:
```bash
# For production
yarn run encore production
# For development with hot-reloading
yarn run encore dev --watch
# for development
yarn run encore dev
```
#### Configuration Files
Key configuration files:
- `config/packages/*.yaml`: Symfony bundle configurations
- `webpack.config.js`: Webpack Encore configuration
- `composer.json`: PHP dependencies and scripts
- `package.json`: JavaScript dependencies and scripts
- `.env`: Default environment variables. Must usually not be updated: use `.env.local` instead.
### Database migrations
Each time a doctrine entity is created, we generate migration to adapt the database.
The migration is created using the command `symfony console doctrine:migrations:diff --no-interaction --namespace <namespace>`, where the namespace is the relevant namespace for migration. As this is a bash script, remember to quote the `\` (`\` must become `\\` in your command).
Each bundle has his own namespace for migration (always ask me to confirm that command with a list of updated / created entities so that I can confirm to you that it is ok):
- `Chill\Bundle\ActivityBundle` writes migrations to `Chill\Migrations\Activity`;
- `Chill\Bundle\BudgetBundle` writes migrations to `Chill\Migrations\Budget`;
- `Chill\Bundle\CustomFieldsBundle` writes migrations to `Chill\Migrations\CustomFields`;
- `Chill\Bundle\DocGeneratorBundle` writes migrations to `Chill\Migrations\DocGenerator`;
- `Chill\Bundle\DocStoreBundle` writes migrations to `Chill\Migrations\DocStore`;
- `Chill\Bundle\EventBundle` writes migrations to `Chill\Migrations\Event`;
- `Chill\Bundle\CalendarBundle` writes migrations to `Chill\Migrations\Calendar`;
- `Chill\Bundle\FamilyMembersBundle` writes migrations to `Chill\Migrations\FamilyMembers`;
- `Chill\Bundle\FranceTravailApiBundle` writes migrations to `Chill\Migrations\FranceTravailApi`;
- `Chill\Bundle\JobBundle` writes migrations to `Chill\Migrations\Job`;
- `Chill\Bundle\MainBundle` writes migrations to `Chill\Migrations\Main`;
- `Chill\Bundle\PersonBundle` writes migrations to `Chill\Migrations\Person`;
- `Chill\Bundle\ReportBundle` writes migrations to `Chill\Migrations\Report`;
- `Chill\Bundle\TaskBundle` writes migrations to `Chill\Migrations\Task`;
- `Chill\Bundle\ThirdPartyBundle` writes migrations to `Chill\Migrations\ThirdParty`;
- `Chill\Bundle\TicketBundle` writes migrations to `Chill\Migrations\Ticket`;
- `Chill\Bundle\WopiBundle` writes migrations to `Chill\Migrations\Wopi`;
Once created the, comment's classes should be removed and a description of the changes made to the entities should be added to the migrations, using the `getDescription` method. The migration should not be cleaned by any artificial intelligence, as modifying this migration is error prone.
### Guidelines related to code structure and requirements
#### Usage of clock
When we need to use a DateTime or DateTimeImmutable that need to express "now", we prefer the usage of
`Symfony\Component\Clock\ClockInterface`, where possible. This is usually not possible in doctrine entities,
where injection does not work when restoring an entity from a database, but usually possible in services.
In test, we use `\Symfony\Component\Clock\MockClock` which is an implementation of `Symfony\Component\Clock\ClockInterface`
where we have full and easy control of the date.
### Testing Information
The project uses PHPUnit for testing. Each bundle has its own test suite, and there's also a global test suite at the root level.
#### Use of mock in tests
##### General mocking
For creating mock, we prefer using prophecy (library phpspec/prophecy).
##### Useful helpers and tips that avoid creating a mock
Some notable implementations that are test helpers and avoid creating a mock:
- `\Psr\Log\NullLogger`, an implementation of `\Psr\Log\LoggerInterface`;
- `\Symfony\Component\Clock\MockClock`, an implementation of `Symfony\Component\Clock\ClockInterface` (already mentioned above);
- `\Symfony\Component\HttpClient\MockHttpClient`, an implementation of `\Symfony\Contracts\HttpClient\HttpClientInterface`;
- When using `\Symfony\Component\Mailer\MailerInterface`, we can create the mock with "InMemoryTransport":
```php
use Symfony\Component\Mailer\Transport\InMemoryTransport;
use \Symfony\Component\Mailer\Mailer;
$transport = new InMemoryTransport();
$mailer = new Mailer($transport);
// After sending:
$messages = $transport->getSent(); // array of SentMessage
```
- When using `\Symfony\Contracts\EventDispatcher\EventDispatcherInterface`, we can use directly an instance of `\Symfony\Component\EventDispatcher\EventDispatcher`;
##### When we prefer not creating a mock
- When we use Doctrine Entities related to the project, we prefer not to use a mock: we instantiate them directly (unless it requires too much code to write);
##### Mocking final and readonly classes
Classes marked as final can't be mocked. To avoid that, either:
- we remove the `final` keyword from the class;
- we extract an interface from the final class.
This must be a decision made by a human, not by an AI. Every AI task must abort with an explicit message in that case.
#### Running Tests
The tests are run from the project's root (not from the bundle's root).
```bash
# Run all tests
vendor/bin/phpunit
# Run tests for a specific bundle
vendor/bin/phpunit --testsuite NameBundle
# Run a specific test file
vendor/bin/phpunit path/to/TestFile.php
# Run a specific test method
vendor/bin/phpunit --filter methodName path/to/TestFile.php
```
#### Test Structure
Tests are organized by bundle and follow the same structure as the bundle itself:
- Unit tests: Test individual components in isolation
- Integration tests: Test components working together
- Functional tests: Test the application from the user's perspective
#### Writing Tests
Tests should be placed in the appropriate bundle's test directory. For example, tests for the TicketBundle should be placed in `src/Bundle/ChillTicketBundle/tests/`.
Here's an example of a simple entity test:
```php
<?php
namespace Chill\TicketBundle\Tests\Entity;
use Chill\TicketBundle\Entity\Ticket;
use PHPUnit\Framework\TestCase;
class TicketTest extends TestCase
{
public function testGetAndSetExternalRef(): void
{
$ticket = new Ticket();
$externalRef = 'REF-123';
// Set the external reference
$ticket->setExternalRef($externalRef);
// Verify that getExternalRef returns the correct value
self::assertSame($externalRef, $ticket->getExternalRef());
// Change the external reference
$newExternalRef = 'REF-456';
$ticket->setExternalRef($newExternalRef);
// Verify that getExternalRef returns the updated value
self::assertSame($newExternalRef, $ticket->getExternalRef());
}
}
```
#### Test Database
For tests that require a database, the project uses a postgresql database filled with fixtures (usage of doctrine-fixtures). You can configure a different database for testing in the `.env.test` file.
### Code Quality Tools
The project uses several tools to maintain code quality:
#### PHP Code Style
The project uses PHP-CS-Fixer for code style. You can run it with:
```bash
# Using the composer script
composer php-cs-fixer
# Or directly
php-cs-fixer fix --config=./.php-cs-fixer.dist.php
```
#### Static Analysis
The project uses PHPStan for static analysis. You can run it with:
```bash
# Using the composer script
composer phpstan
# Or directly
vendor/bin/phpstan analyse
```
#### Automated Refactoring
The project uses Rector for automated refactoring. You can run it with:
```bash
# Using the composer script
composer rector
# Or directly
vendor/bin/rector
```
#### JavaScript/TypeScript Linting
The project uses ESLint for JavaScript/TypeScript code quality. You can run it with:
```bash
yarn run eslint
```
## Deployment
The project can be deployed in a production environment following Symfony's deployment guidelines. The documentation provides detailed instructions for setting up a production environment.
### Production Deployment Checklist
1. Set environment variables for production
2. Optimize Composer autoloader: `composer install --no-dev --optimize-autoloader`
3. Compile assets for production: `yarn run encore production`
4. Clear and warm up the cache: `php bin/console cache:clear --env=prod`
5. Run database migrations: `php bin/console doctrine:migrations:migrate --env=prod`
## Documentation
Comprehensive documentation is available in the `/docs/` directory, including installation instructions, configuration guides, and operational procedures.
## Development Workflow
1. **Create a Feature Branch**: Always create a new branch for your feature or bugfix
2. **Write Tests**: Write tests for your changes before implementing them
3. **Implement Changes**: Implement your changes following the project's coding standards
4. **Run Tests**: Make sure all tests pass
5. **Run Code Quality Tools**: Make sure your code passes all code quality checks
6. **Submit a Pull Request**: Submit a pull request for review
## Debugging
The project includes several tools for debugging:
- **Symfony Profiler**: Available in development mode at `/_profiler`
- **Xdebug**: Configure your IDE to use Xdebug for step-by-step debugging
- **Symfony Debug Toolbar**: Available at the bottom of the page in development mode
## Conclusion
When working with this project, Junie should:
1. Understand the modular bundle structure and how the different components interact
2. Build the project before submitting changes to ensure assets are properly compiled
3. Run relevant tests to ensure changes don't break existing functionality
4. Follow the established code style and patterns
5. Use the provided tools for debugging and code quality

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
20

View File

@@ -25,8 +25,9 @@ $config = new PhpCsFixer\Config();
$config
->setFinder($finder)
->setRiskyAllowed(true)
->setCacheFile('.cache/php-cs-fixer.cache')
->setCacheFile('var/php-cs-fixer.cache')
->setUsingCache(true)
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
;
$rules = $config->getRules();
@@ -112,12 +113,13 @@ $rules = array_merge(
],
'sort_algorithm' => 'alpha',
],
'single_line_empty_body' => true,
],
$rules,
$riskyRules,
$untilFullSwitchToPhp8,
);
$rules['header_comment']['header'] = trim(file_get_contents(__DIR__.'/resource/header.txt'));
$rules['header_comment']['header'] = trim(file_get_contents(__DIR__.'/resources/header.txt'));
return $config->setRules($rules);

2
.symfony.local.yaml Normal file
View File

@@ -0,0 +1,2 @@
workers:
docker_compose: ~

View File

@@ -6,12 +6,421 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
## v4.3.0 - 2025-09-08
### Feature
* ([#409](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/409)) Add 45 and 60 min calendar ranges
* Add a command to generate a list of permissions
* ([#412](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/412)) Add an absence end date
**Schema Change**: Add columns or tables
### Fixed
* fix date formatting in calendar range display
* Change route URL to avoid clash with person duplicate controller method
## v4.2.1 - 2025-09-03
### Fixed
* Fix exports to work with DirectExportInterface
### DX
* Improve error message when a stored object cannot be written on local disk
## v4.2.0 - 2025-09-02
### Feature
* ([#64](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/64)) Add external identifier for a Person
**Schema Change**: Add columns or tables
* ([#330](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/330) Allow users to choose for which notifications they want to receive an email
### Fixed
* ([#422](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/422)) Fixed html layout of pages for recovering password
* Fix typo in 'uncheckAll' script for centers selection
* Fix incorrect parameter name in event details link
## v4.1.0 - 2025-08-26
### Feature
* ([#400](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/400)) Add filter to social actions list to filter out actions where current user intervenes
* ([#399](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/399)) Show filters on list pages unfolded by default
* Expansion of event module with new fields in the creation form: thematic, internal/external animator, responsable, and budget elements. Filtering options in the event list + adapted exports
**Schema Change**: Add columns or tables
### Fixed
* ([#382](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/382)) adjust display logic for accompanying period dates, include closing date if period is closed.
* ([#384](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/384)) add min and step attributes to integer field in DateIntervalType
### UX
* Limit display of participations in event list
## v4.0.2 - 2025-07-09
### Fixed
* Fix add missing translation
* Fix the transfer of evaluations and documents during of accompanyingperiodwork
## v4.0.1 - 2025-07-08
### Fixed
* Fix package.json for compilation
## v4.0.0 - 2025-07-08
### Feature
* ([#359](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/359)) Allow the merge of two accompanying period works
### Fixed
* ([#390](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/390)) Display the list of participant in the results, even if there is only one participant and that the search result display the requestor
* Fix admin entity edit actions for event admin entities and activity reason (category) entities
* Fix translations for social action fields in admin form: results, goals, evaluations
### DX
* Rewrite exports to run them asynchronously
**Schema Change**: Add columns or tables
* Allow TranslatableMessage in flash messages
### UX
* Improve labeling of fields in person resource creation form
**Release notes**
- Add new methods to serialize data using the rector rule
- Remove all references to the Request in filters, aggregators, filters. Actually, the most frequent occurence is `$security->getUser()`.
- Refactor manually the initializeQuery method
- Remove the injection of ExportManager into the constructor of each export element:
```diff
- class MyFormatter implements FormatterInterface
+ class MyFormatter implements FormatterInterface, \Chill\MainBundle\Export\ExportManagerAwareInterface
{
+ use \Chill\MainBundle\Export\Helper\ExportManagerAwareTrait;
- public function __construct(private ExportManager $exportmanager) {}
public function MyMethod(): void
{
- $this->exportManager->getFilter('alias');
+ $this->getExportManager()->getFilter('alias');
}
}
```
- configure messenger to handle export in a queue:
```diff
# config/packages/messenger.yaml
framework:
messenger:
routing:
+ 'Chill\MainBundle\Export\Messenger\ExportRequestGenerationMessage': priority
```
- add missing methods to exports, aggregators, filters, formatter:
```php
public function normalizeFormData(array $formData): array;
public function denormalizeFormData(array $formData, int $fromVersion): array;
```
There are rector rules to generate those methods:
- `Chill\Utils\Rector\Rector\ChillBundleAddNormalizationMethodsOnExportRector`
See:
```php
// upgrade chill exports
$rectorConfig->rules([\Chill\Utils\Rector\Rector\ChillBundleAddNormalizationMethodsOnExportRector::class]);
```
This rule will create most of the work necessary, but some manuals changes are still necessary:
- we must set manually the correct repository for method `denormalizeDoctrineEntity`;
- when the form data contains some entities, and the form type is not one of EntityType::class, PickUserDynamicType::class, PickUserLocationType::class, PickThirdpartyDynamicType::class, Select2CountryType::class, then we must handle the normalization manually (using the `\Chill\MainBundle\Export\ExportDataNormalizerTrait`)
## v3.12.1 - 2025-06-30
### Fixed
* Fix loading of the list of documents
## v3.12.0 - 2025-06-30
### Feature
* ([#377](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/377)) Add the document file name to the document title when a user upload a document, unless there is already a document title.
* Add desactivation date for social action and issue csv export
* Add Emoji and Fullscreen feature to ckeditor configuration
* ([#321](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/321)) Create editor which allow us to toggle between rich and simple text editor
* Do not remove workflow which are automatically canceled after staling for more than 30 days
### Fixed
* ([#376](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/376)) trying to prevent bug of typeerror in doc-history + improved display of document history
* ([#381](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/381)) Display previous participation in acc course work even if the person has left the acc course
* ([#372](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/372)) Fix display of text in calendar events
* Add missing translation for user_group.no_user_groups
* Fix admin entity edit actions for event admin entities and activity reason (category) entities
* ([#392](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/392)) Allow null and cast as string to setContent method for NewsItem
* ([#393](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/393)) Doc Generation: the "dump only" method send the document as an email attachment.
### DX
* ([#352](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/352)) Remove dead code for wopi-link module
* Replace library node-sass by sass, and upgrade bootstrap to version 5.3 (yarn upgrade / install is required)
### UX
* ([#374](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/374)) Remove default filter in_progress for the page 'my tasks'; Allows for new tasks to be displayed upon opening of the page
* Improve labeling of fields in person resource creation form
## v3.11.0 - 2025-04-17
### Feature
* ([#365](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/365)) Add counters of actions and activities, with 2 boxes to (1) show the number of active actions on total actions and (2) show the number of activities in a accompanying period, and pills in menus for showing the number of active actions and the number of activities.
* ([#364](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/364)) Added a second phone number "telephone2" to the thirdParty entity. Adapted twig templates and vuejs apps to handle this phone number
**Schema Change**: Add columns or tables
* Signature: add a button to go directly to the signature zone, even if there is only one
### Fixed
* Fixed wrong translations in the on-the-fly for creation of thirdParty
* Fixed update of phone number in on-the-fly edition of thirdParty
* Fixed closing of modal when editing thirdParty in accompanying course works
* Shorten the delay between two execution of AccompanyingPeriodStepChangeCronjob, to ensure at least one execution in a day
* ([#102](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/102)) Fix display of title in document list
* When cleaning the old stored object versions, do not throw an error if the stored object is not found on disk
* Add consistent log prefix and key to logs when stale workflows are automatically canceled
* ([#380](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/380)) Remove the "not null" validation constraint on recently added properties on HouseholdComposition
### DX
* Add new chill-col style for displaying title and aside in a flex table
## v3.10.3 - 2025-03-18
### DX
* Eslint fixes
## v3.10.2 - 2025-03-17
### Fixed
* Replace a ts-expect-error with a ts-ignore
## v3.10.1 - 2025-03-17
### DX
* Remove yarn dependency to symfony/ux-translator, to ease the build process
## v3.10.0 - 2025-03-17
### Feature
* ([#363](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/363)) Display social actions grouped per social issue within activity form
### Fixed
* ([#362](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/362)) Fix Dependency Injection, which prevented to save the CalendarRange
* ([#368](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/368)) fix search query for user groups
## v3.9.2 - 2025-02-27
### Fixed
* Use fetchResults method to fetch all social issues instead of only the first page
## v3.9.1 - 2025-02-27
### Fixed
* Fix post/patch request with missing 'type' property for gender
## v3.9.0 - 2025-02-27
### Feature
* ([#349](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/349)) Suggest all referrers within actions of the accompanying period when creating an activity
* ([#343](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/343)) Add possibility to export a csv with all social issues and social actions
* ([#360](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/360)) Restore document to previous kept version when a workflow is canceled
* ([#341](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/341)) Add a list of third parties from within the admin (csv download)
### Fixed
* fix generation of document with accompanying period context, and list of activities and works
### DX
* ([#333](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/333)) Create an unique source of trust for translations
## v3.8.2 - 2025-02-10
### Fixed
* ([#358](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/358)) Remove "filter" button on list of documents in the workflow's "add attachement" modal
## v3.8.1 - 2025-02-05
### Fixed
* Fix household link in the parcours banner
## v3.8.0 - 2025-02-03
### Feature
* Improve the UX of the news item admin form to prevent wrong usage
* ([#319](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/319)) Notification list: display the concerned person's badges in the list
* ([#320](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/320)) Show the first 3 persons directly in the accompanying period's banner
* ([#334](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/334)) Suggest current user when creating an activity
* ([#331](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/331)) Add attachments to workflows
### Fixed
* ([#350](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/350)) Add validation error to manual selection of person in PersonDuplicateController
* ([#354](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/354)) Fix document category creation
* ([#351](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/351)) Add definitive whitespace between span elements in vue PersonText component
## v3.7.1 - 2025-01-21
### Fixed
* Fix legacy configuration processor for notifier component
## v3.7.0 - 2025-01-21
### Feature
* Use the Notifier component from Symfony to sens short messages (SMS). This allow to use more provider.
### Fixed
* ([#348](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/348)) [export] Fix aggregation of referrer's scope and job: fix the date range comparison
### Warning on configuration of Notifier component
If installed in an symfony app where the recipes are activated, this configuration should be added automatically:
```yaml
framework:
notifier:
chatter_transports:
texter_transports:
ovhcloud: '%env(OVHCLOUD_DSN)%'
channel_policy:
# use chat/slack, chat/telegram, sms/twilio or sms/nexmo
urgent: ['email']
high: ['email']
medium: ['email']
low: ['email']
admin_recipients:
- { email: admin@example.com }
```
Actually, you should either:
- remove the configuration of ovhcloud added by the recipe
- or remove the previous configuration of chill, to avoid keeping legacy configuration
#### Remove the added configuration and keep the legacy configuration
To remove the configuration:
```diff
framework:
notifier:
chatter_transports:
texter_transports:
- ovhcloud: '%env(OVHCLOUD_DSN)%'
```
In that case, the previous configuration, which was stored under the `chill_main.short_messages.dsn` will be reconfigured into the Notifier component's configuration.
#### Properly configure SMS
You can also properly configure it, as [described in the OVH cloud provider repository](https://github.com/symfony/ovh-cloud-notifier/tree/5.4?tab=readme-ov-file#dsn-example) (where the scheme is `ovhcloud`):
**NOTE**: You have access to all notifier available with the [Notifier component](https://symfony.com/doc/current/notifier.html#notifier-sms-channel). You are not restricted to use OVH as a provider.
```diff
framework:
notifier:
chatter_transports:
texter_transports:
+ ovhcloud: '%env(OVHCLOUD_DSN)%' # this value should be located in a variable, and have `ovhcloud://` as a scheme
chill_main:
- short_messages:
- dsn: '%env(string:SHORT_MESSAGE_DSN)%'
```
## v3.6.0 - 2025-01-16
### Feature
* Importer for addresses does not fails when the postal code is not found with some addresses, and compute a recap list of all addresses that could not be imported. This recap list can be send by email.
* ([#346](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/346)) Create a driver for storing documents on disk (instead of openstack object store)
* Add address importer from french Base d'Adresse Nationale (BAN)
* ([#343](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/343)) Add csv export for social issues and social actions
### Fixed
* Export: fix missing alias in activity between certain dates filter. Condition added for alias.
## v3.5.3 - 2025-01-07
### Fixed
* Fix the EntityToJsonTransformer to return an empty array if the value is ""
## v3.5.2 - 2024-12-19
### Fixed
* ([#345](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/345)) Export: activity filtering of users that were associated to an activity between certain dates. Results contained activities that were not within the specified date range"
## v3.5.1 - 2024-12-16
### Fixed
* Filiation: fix the display of the gender label in the graph
* Wrap handling of PdfSignedMessage into transactions
## v3.5.0 - 2024-12-09
### Feature
* ([#318](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/318)) Show all the pages of the documents in the signature app
### Fixed
* Wrap the signature's change state into a transaction, to avoid race conditions
* Fix display of gender label
## v3.4.3 - 2024-12-05
### Fixed
* Remove the "not null" constraint on person supplementary phones
* Remove doctrine annotation that prevent from adding documents to activities
## v3.4.2 - 2024-12-05
### Fixed
* ([#329](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/329)) Fix the serialization of gender for the generation of documents
* ([#337](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/337)) Enforce unique contraint on activity storedobject
### DX
* ([#310](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/310)) Clean migrations, to reduce the number of bloated migration when running diff on schema
## v3.4.1 - 2024-11-22
### Fixed
* Set the workflow's title to notification content and subject
## v3.4.0 - 2024-11-20
### Feature
* ([#314](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/314)) Admin: improve document type admin form with a select field for related class.
Admin: Allow administrator to assign multiple group centers in one go to a user.
## v3.3.0 - 2024-11-20
### Feature
* Electronic signature
Implementation of the electronic signature for documents within chill.
* ([#286](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/286)) The behavoir of the voters for stored objects is adjusted so as to limit edit and delete possibilities to users related to the activity, social action or workflow entity.
* ([#288](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/288)) Metadata form added for person signatures
* Add a signature step in workflow, which allow to apply an electronic signature on documents
* Keep an history of each version of a stored object.
* Add a "send external" step in workflow, which allow to send stored objects and other elements to remote people, by sending them a public url
### Fixed
* Adjust household list export to include households even if their address is NULL
* Remove validation of date string on deathDate
## v3.2.4 - 2024-11-06
### Fixed
* Fix compilation of chill assets
## v3.2.3 - 2024-11-05
### Fixed
* ([#315](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/315)) Fix display of accompanying period work referrers. Only current referrers should be displayed.
Fix color of Chill footer
## v3.2.2 - 2024-10-31
### Fixed
* Fix gender translation for unknown
## v3.2.1 - 2024-10-31
### Fixed
* Add the possibility of unknown to the gender entity
* Fix the fusion of person doubles by excluding accompanyingPeriod work entities to be deleted. They are moved instead.
## v3.2.0 - 2024-10-30
### Feature
* Introduce a gender entity
## v3.1.1 - 2024-10-01
### Fixed
* ([#308](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/308)) Show only the current referrer in the page "show" for an accompanying period workf
* ([#309](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/309)) Correctly compute the grouping by referrer aggregator
* Fixed typing of custom field long choice and custom field group
## v3.1.0 - 2024-08-30
### Feature
* Add export aggregator to aggregate activities by household + filter persons that are not part of an accompanyingperiod during a certain timeframe.
## v3.0.0 - 2024-08-26
### Fixed
* Fix delete action for accompanying periods in draft state
* Fix connection to azure when making an calendar event in chill
* CollectionType js fixes for remove button and adding multiple entries
## v2.24.0 - 2024-09-11
### Feature
* ([#306](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/306)) When a document is converted or downloaded in the browser, this document is removed from the browser memory after 45s. Future click on the button re-download the document.
## v2.23.0 - 2024-07-19
## v2.23.0 - 2024-07-23 & 2024-07-19
### Feature
* ([#221](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/221)) [DX] move async-upload-bundle features into chill-bundles
* Add job bundle (module emploi)
* Upgrade import of address list to the last version of compiled addresses of belgian-best-address
* Upgrade CKEditor and refactor configuration with use of typescript
* ([#123](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/123)) Add a button to duplicate calendar ranges from a week to another one
* [admin] filter users by active / inactive in the admin user's list
* ([#273](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/273)) Add the possibility to mark all notifications as read
@@ -21,6 +430,8 @@ and is generated by [Changie](https://github.com/miniscruff/changie).
* Do not update the "createdAt" column when importing postal code which does not change
* Display filename on file upload within the UI interface
### Fixed
* Fix resolving of centers for an household, which will fix in turn the access control
* Resolved type hinting error in activity list export
* ([#271](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/271)) Take into account the acp closing date in the acp works date filter
### Traduction française des principaux changements

386
CONVENTIONS-en.md Normal file
View File

@@ -0,0 +1,386 @@
# Chill Conventions
In Progress
## Translations
Per bundle, all translations for Twig pages are located in a single file: translations/messages.fr.yaml.
## File Locations
Controllers, form types, and Twig templates are placed in the root folders Controller, Form, and Resources/views, respectively.
Admin pages are no longer placed in subfolders under Admin.
## Assets: Entrypoint Naming
There are three types of entry points:
* Vue application-specific (often for a single page): Prefixed with vue_.
* Reusable JavaScript/CSS code:
Examples include:
* ckeditor
* async_upload (used for forms)
* bootstrap
* chill.js
* ...
=> We prefix with `mod_`
* Page-specific CSS/JS:
* Often reuses functionalities like ShowHide.
=> We prefix with `page_`.
## Folder Structure
````
# Under Resources/public:
- chill/ => Contains the theme (Chill).
- chillmain.scss: Compiled into the chill entrypoint.
- lib/ => Libraries never used as entrypoints but reused elsewhere.
- Examples: ShowHide, Collection, Select2.
- module/: Ends up in reusable entrypoints (mod_).
- bootstrap
- custom.scss
- custom/
- variable.scss
- ...
- AsyncUpload.
- vue/ => Vue applications only (vue_).
- Examples: _components, app.
- page/ => Page-specific assets (page_).
- login
- person
- personvendee
- household_edit_metadata
- index.js
````
# Stylesheet Organization
1. The mod_bootstrap (module bootstrap) entry point is the first level. All parts (modules) of bootstrap are included in the bootstrap.js file located in ChillMainBundle/Resources/public/module/bootstrap.
* At the beginning, this file imports the variables.scss file, which determines most of the bootstrap settings as customized. This file overrides the original, and many variables are adjusted for Chill.
* Care must be taken to ensure this file can always be compared to the original bootstrap file. In the event of a bootstrap update, a diff must be generated and this diff applied to the variable file of the new version.
* At the end, it imports the custom.scss file, which includes bootstrap adaptations to prepare it for our Chill theme.
* This `custom.scss` file can be split into smaller files using `@import 'custom/...'`.
* The idea is that this first bootstrap layer sets an important part of the applications styles, particularly those related to layout positioning, responsive breakpoints, and the default margins and spacing applied to elements being manipulated.
2. The chill entry point is the second level. It contains the Chill theme, which is recognizable in the application.
* Each bundle has a `Resources/public/chill` folder containing a main sass file, which can optionally be split using `@imports`. All these files are compiled into a single Chill entry point, which serves as the applications theme and overrides bootstrap.
* The chillmain.scss file should contain the most general style cascades, those applied to many areas of the application.
* The chillperson.scss file also includes styles specific to different contexts related to people: person, household, and accompanying course.
* Some smaller bundles contain only styles specific to their functionality.
3. The vue_ entry points are used for Vue components. Vue files can contain an scss style block. These styles are specific to the component and its inheritance, with the scoped tag precisely defining their scope (see the documentation).
4. The page_ entry points are used to add assets specific to certain pages, most often scripts and styles.
## HTML Tagging and Style Cascades
The following example shows how to tag a code element without overdoing it. Note that:
* It is not necessary to tag all inner classes.
* The parent class should not be repeated in all child classes. Sass cascading allows for flexible HTML structuring without overloading the tag hierarchy.
* Often, the first class will have variations created with additional classes that start in the same way: bloc-dark simply adds the dark version of bloc. We do not use bloc dark because we dont want the dark class of bloc to interact with the same dark class of table. As a result, we will have an element bloc bloc-dark and another element table table-dark.
```html
<div class="bloc bloc-dark my-bloc">
<h3>My Title</h3>
<ul class="record_actions">
<li>
<a class="btn btn-edit"></a>
</li>
</ul>
</div>
```
Finally, it is important to define what a block, an action zone, and a button are. These three elements exist independently and are the only ones we tag.
For example, to style the title, we simply specify h3 within the block cascade.
```scss
div.bloc {
// un bloc générique, utilisé à plusieurs endroits
&.bloc-dark {
// la version sombre du bloc
}
h3 {}
ul {
// une liste standard dans bloc
li {
// des items de liste standard dans bloc
}
}
}
div.mon-bloc {
// des exceptions spécifiques à mon-bloc,
// qui sont des adaptations de bloc
}
ul.record_actions {
// va uniformiser tous les record_actions de l'application
li {
//...
}
}
.btn {
// les boutons de bootstrap
.btn-edit {
// chill étends les boutons bootstrap pour ses propres besoins
}
}
</style>
```
## Render box
## URL
## Route Naming Conventions
:::warning
These rules have not always been followed in the past. They are desired for the future.
:::
Routes follow this structure:
`chill_(api|crud)_bundle_(api)_entity_action`
1. First, chill_ (for all Chill modules).
2. Then, crud or api, optional, automatically added if the route is generated by the configuration.
3. Then, a string indicating the bundle (`main`, `person`, `activity`, ...).
4. Then, api, if the route is an API route.
5. Then, a string indicating the entity the route targets, and possibly the sub-entities.
6. Then, an action (`list`, `view`, `edit`, `new`, ...).
Indicating `api` in the fourth position allows distinguishing API routes generated by the configuration (which are all prefixed with `chill_api`) from those generated manually. (For example: `chill_api_household__index` and `chill_person_api_household_members_move`).
If points 4 and 5 are missing, they are replaced by other elements to ensure the uniqueness of the route and its clear understanding.
#### HTML pages
:::warning
These rules have not always been followed in the past. They are desired for the future.
:::
Syntaxe:
```
/{_locale}/bundle/entity/{id}/action
/{_locale}/bundle/entity/sub-entity/{id}/action
```
The following elements should be included in the list:
1. The locale;
2. An identifier for the bundle;
3. The entity it relates to;
4. Any sub-entities that the URL refers to;
5. The action.
```
# list of activities for a person
/fr/activity/person/25/activity/list
# new activity
/fr/activity/activity/new?person_id=25
```
#### Pour les API
:::info
Automatically generated routes are prefixed with `chill_api`
:::
Syntaxe:
```
/api/1.0/bundle/entity/{id}/action
/api/1.0/bundle/entity/sub-entity/{id}/action
```
The following elements should be included in the list:
1. The string `/api/` followed by the version (e.g., 1.0);
2. An identifier for the bundle;
3. The entity it relates to;
4. Any sub-entities that the URL refers to;
5. The action.
These elements may be interspersed with the entity identifier. In this case, the identifier should be placed immediately after the entity it relates to.
#### URLS for admin pages
Same conventions as for other html pages, **but `admin` is added in second position**. Soit:
`/{_locale}/admin/bundle/entity/{id}/action`
## Database table naming convention
When creating a new entity and the corresponding database table, we follow the following naming convention for the database table:
`chill_{bundle_identifier}_{entity_name}`.
Eg. chill_person_spoken_languages
## UI Rules
### Page Titles
#### Every page must have a title (in the head tag and page header).
Each page contains a title in the <head> tag. This title is typically the same as the header title on the page.
Tip: It is possible to use the block function in Twig for this.
Example:
```htmlmixed=
{% block title "Titre de la page" %}
{% block content %}
<h1>
{{ block('title')}}
</h1>
{% endblock %}
```
### entity_render usage
#### in Twig
Always use chill_entity_render_box for rendering entities like:
* User
* Person
* SocialAction
* SocialIssue
* Address
* Thirdparty
* ...
Example:
```
address|chill_entity_render_box
```
Justification:
1. Customization by installation: Some elements are sometimes customized during installation (for example, the name of each user will be followed by the name of the service).
2. To streamline and make displays consistent: Ensures uniformity in the way information is displayed across different pages or sections.
3. To simplify Twig code: By using blocks and centralizing title logic, it reduces repetition and makes the Twig code easier to maintain.
* Three rendering modes:
* inline
* block
* item.
#### In Vue
There is always a renderbox equivalent in vue.
#### HTML Links to Sections
Always include links/icons for accessing records, such as person or household details, if the user has access.
### Form Guidelines
#### Vocabulary:
* `Create` in a `bt bt-create` for links to the form to create an entity (to access the form).
* `Save` in a `bt bt-save` for "Save" buttons (in either an edit or create form).
* `Save and new`
* `Save and view`
* `Edit` in a `bt bt-edit` for links to the edit form.
* `Duplicate` (specify where it can be seen).
* `Cancel` for leaving an edit page with a link to the list, or the `returnPath`.
#### After Saving:
Redirect to the returnPath if available; otherwise, redirect to the view page.
### Sticky Form Buttons:
Buttons like "Cancel" and "Save" must be within a "sticky-form" bar at the bottom of the form.
If relevant:
* The banner contains a "Cancel" button that returns to the previous page. It is mandatory for forms, but optional for lists or "summary" pages.
* This "Cancel" button is always on the left.
```
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ chill_entity_return_path('route_name' { 'route': 'option' } )}}">{{ return_path_label }}</a>
</li>
<li>
<!-- action 1 -->
</li>
</ul>
```
### Flash Messages
#### Display a flash message upon entity creation:
Everytime an entity has been created
> "The entity has been created."
The name of the element can be replaced with something more relevant:
> * The activity has been created
> * The appointment has been created
> * ...
#### On Saving an Entity
Each time an entity is saved, a flash message should appear:
> The data has been modified
#### Form Error (Validation Error)
At the top of the form, a flash message should indicate that validations have failed:
> This form contains errors
Errors should appear attached to the field they concern. However, it is acceptable to display errors at the root of the form if it is technically difficult to attach errors.
### Return Links
Each time a link is provided, check whether the function chill_return_path, chill_forward_return_path, or chill_return_path_or should be used.
* From the list page, to the opening of an element, or the creation button => use chill_path_add_return_path
* In these edit pages:
* use chill_return_path_or in the "Cancel" button;
* for the "Save and view" and "Save and close" buttons => ?
### Assets for Suggestion Lists
Create a list of suggestions to add (the entire item is clickable)
```html
<ul class="list-suggest add-items">
<li>
<span>item</span>
</li>
</ul>
```
Create a list of suggestions to remove (with a clickable red cross, the anchor <a> is empty)
```html
<ul class="list-suggest remove-items">
<li>
<span>
item
</span>
</li>
</ul>
```
Create a removable title (with a clickable red cross, the anchor <a> is empty)
```html
<div class="item-title">
<span>title</span>
</div>
```
The classes `cols` or `inline` can be added alongside `list-suggest` to modify the layout of the list. In the last example, add a `removable` class to the `<span>` if you want to make the item removable.

View File

@@ -4,7 +4,6 @@ en cours de rédaction
## Translations
Par bundle, toutes les traductions des pages twig se trouvent dans un seul fichier `translations/messages.fr.yaml`.
## Emplacement des fichiers
@@ -142,7 +141,6 @@ ul.record_actions {
## Render box
## URL
### Nommage des routes
@@ -234,6 +232,13 @@ Même conventions que dans les autres pages html de l'application, **mais `admin
`/{_locale}/admin/bundle/entity/{id}/action`
### Nommage des tables de base de donnée
Lors de la création d'une nouvelle entité et de la table de base de données correspondante, nous suivons la convention d'appellation suivante pour la table de base de données :
`chill_{bundle_identifier}_{nom_de_l'entité}`.
Par exemple : chill_person_spoken_languages
## Règles UI chill
@@ -293,8 +298,6 @@ A prevoir:
> quand on passe loption render: bloc, on peut placer le render_box dans une boucle for plus large qui fonctionne avec la classe flex-table ou la classe flex-bloc, ce qui donnera un affichage en rangée (table) ou en blocs. [name=Mathieu]
#### En vue
Il existe systématiquement une "box" équivalente en vue.

117
MIGRATION.md Normal file
View File

@@ -0,0 +1,117 @@
# Switch to symfony 5.0
- the tag `chill.role` is now renamed to `chill_main.provide_role`.
**Note**: It is not necessary to apply this tag on service definition: the tag is automatically applyied if the
service implements `\Chill\MainBundle\Security\ProvideRoleInterface`.
- those annotation can be converted to attribute:
- `Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\AccompanyingPeriodValidity`
- `Chill\PersonBundle\Validator\Constraints\Household\HouseholdMembershipSequential`
- `Chill\PersonBundle\Validator\Constraints\Household\MaxHolder`
- `Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ConfidentialCourseMustHaveReferrer`
- `Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\LocationValidity`
- `Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ParticipationOverlap`
- `Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ResourceDuplicateCheck`
- `Chill\PersonBundle\Validator\Constraints\Person\Birthdate`
- `Chill\PersonBundle\Validator\Constraints\Person\PersonHasCenter`
- `Chill\PersonBundle\Validator\Constraints\Relationship\RelationshipNoDuplicate`
- `Chill\ActivityBundle\Validator\Constraints\ActivityValidity`
- `Chill\DocStoreBundle\Validator\Constraints\AsyncFileExists`
- `Chill\MainBundle\Validation\Constraint\PhonenumberConstraint`
- `Chill\MainBundle\Validator\Constraints\Entity\UserCircleConsistency`
- `Chill\MainBundle\Workflow\Validator\EntityWorkflowCreation`
Here is the rector rule that can be used to switch attributes to annotations:
```php
$rectorConfig->ruleWithConfiguration(\Rector\Php80\Rector\Class_\AnnotationToAttributeRector::class, [
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\AccompanyingPeriodValidity'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Household\HouseholdMembershipSequential'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Household\MaxHolder'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ConfidentialCourseMustHaveReferrer'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\LocationValidity'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ParticipationOverlap'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ResourceDuplicateCheck'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Person\Birthdate'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Person\PersonHasCenter'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Relationship\RelationshipNoDuplicate'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\ActivityBundle\Validator\Constraints\ActivityValidity'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\DocStoreBundle\Validator\Constraints\AsyncFileExists'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\MainBundle\Validation\Constraint\PhonenumberConstraint'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\MainBundle\Validator\Constraints\Entity\UserCircleConsistency'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\MainBundle\Workflow\Validator\EntityWorkflowCreation'),
]);
```
- to keep cleaner definition in container's dependency injection and framework bundle, the definition of crud or api
requires to define explicitly a controller.
Before:
```php
$container->prependExtensionConfig('chill_main', [
'apis' => [
[
'class' => ThirdParty::class,
'name' => 'thirdparty',
'base_path' => '/api/1.0/thirdparty/thirdparty',
'actions' => [
'_entity' => [
'methods' => [
Request::METHOD_GET => true,
Request::METHOD_HEAD => true,
Request::METHOD_POST => true,
Request::METHOD_PUT => true,
Request::METHOD_PATCH => true,
],
'roles' => [
Request::METHOD_GET => ThirdPartyVoter::SHOW,
Request::METHOD_HEAD => ThirdPartyVoter::SHOW,
Request::METHOD_POST => ThirdPartyVoter::CREATE,
Request::METHOD_PUT => ThirdPartyVoter::CREATE,
Request::METHOD_PATCH => ThirdPartyVoter::CREATE,
],
],
],
],
],
]);
After:
```php
$container->prependExtensionConfig('chill_main', [
'apis' => [
[
'class' => ThirdParty::class,
'controller' => ThirdPartyApiController::class,
'name' => 'thirdparty',
'base_path' => '/api/1.0/thirdparty/thirdparty',
'actions' => [
'_entity' => [
'methods' => [
Request::METHOD_GET => true,
Request::METHOD_HEAD => true,
Request::METHOD_POST => true,
Request::METHOD_PUT => true,
Request::METHOD_PATCH => true,
],
'roles' => [
Request::METHOD_GET => ThirdPartyVoter::SHOW,
Request::METHOD_HEAD => ThirdPartyVoter::SHOW,
Request::METHOD_POST => ThirdPartyVoter::CREATE,
Request::METHOD_PUT => ThirdPartyVoter::CREATE,
Request::METHOD_PATCH => ThirdPartyVoter::CREATE,
],
],
],
],
],
]);
```

View File

@@ -1,9 +1,15 @@
# Chill framework
# Main Chill Bundles and Chill framework
Documentation of the Chill software.
Chill is a software for social workers. It allows them to keep track of the social work they do.
The online documentation can be found at http://docs.chill.social
See our website for more information https://www.chill.social
See the [`docs`][1] directory for more.
## Installation
[1]: docs/README.md
Chill-bundles is a set of bundles that should be used within a Symfony application.
A symfony application will help you to customize all the configuration options, change the behaviour of some parts of the usual-way that chill works, … without to have to fork this repository !
See [the instructions in the docs](./docs/source/installation/index.rst).
Those instructions are also built [online](https://docs.chill.social).

7
assets/translator.ts Normal file
View File

@@ -0,0 +1,7 @@
import { trans, setLocale, setLocaleFallbacks } from "./ux-translator";
setLocaleFallbacks({"en": "fr", "nl": "fr", "fr": "en"});
setLocale('fr');
export { trans };
export * from '../var/translations';

View File

@@ -0,0 +1,3 @@
This directory import the symfony ux-translator files directly into chill-bundles.
This remove the yarn dependencies from the real package, which breaks our installation.

View File

@@ -0,0 +1 @@
export declare function format(id: string, parameters: Record<string, string | number>, locale: string): string;

View File

@@ -0,0 +1 @@
export declare function formatIntl(id: string, parameters: Record<string, string | number>, locale: string): string;

View File

@@ -0,0 +1,27 @@
export type DomainType = string;
export type LocaleType = string;
export type TranslationsType = Record<DomainType, {
parameters: ParametersType;
}>;
export type NoParametersType = Record<string, never>;
export type ParametersType = Record<string, string | number | Date> | NoParametersType;
export type RemoveIntlIcuSuffix<T> = T extends `${infer U}+intl-icu` ? U : T;
export type DomainsOf<M> = M extends Message<infer Translations, LocaleType> ? keyof Translations : never;
export type LocaleOf<M> = M extends Message<TranslationsType, infer Locale> ? Locale : never;
export type ParametersOf<M, D extends DomainType> = M extends Message<infer Translations, LocaleType> ? Translations[D] extends {
parameters: infer Parameters;
} ? Parameters : never : never;
export interface Message<Translations extends TranslationsType, Locale extends LocaleType> {
id: string;
translations: {
[domain in DomainType]: {
[locale in Locale]: string;
};
};
}
export declare function setLocale(locale: LocaleType | null): void;
export declare function getLocale(): LocaleType;
export declare function throwWhenNotFound(enabled: boolean): void;
export declare function setLocaleFallbacks(localeFallbacks: Record<LocaleType, LocaleType>): void;
export declare function getLocaleFallbacks(): Record<LocaleType, LocaleType>;
export declare function trans<M extends Message<TranslationsType, LocaleType>, D extends DomainsOf<M>, P extends ParametersOf<M, D>>(...args: P extends NoParametersType ? [message: M, parameters?: P, domain?: RemoveIntlIcuSuffix<D>, locale?: LocaleOf<M>] : [message: M, parameters: P, domain?: RemoveIntlIcuSuffix<D>, locale?: LocaleOf<M>]): string;

View File

@@ -0,0 +1 @@
export * from './translator';

View File

@@ -0,0 +1,283 @@
import { IntlMessageFormat } from 'intl-messageformat';
function strtr(string, replacePairs) {
const regex = Object.entries(replacePairs).map(([from]) => {
return from.replace(/([-[\]{}()*+?.\\^$|#,])/g, '\\$1');
});
if (regex.length === 0) {
return string;
}
return string.replace(new RegExp(regex.join('|'), 'g'), (matched) => replacePairs[matched].toString());
}
function format(id, parameters, locale) {
if (null === id || '' === id) {
return '';
}
if (typeof parameters['%count%'] === 'undefined' || Number.isNaN(parameters['%count%'])) {
return strtr(id, parameters);
}
const number = Number(parameters['%count%']);
let parts = [];
if (/^\|+$/.test(id)) {
parts = id.split('|');
}
else {
parts = id.match(/(?:\|\||[^|])+/g) || [];
}
const intervalRegex = /^(?<interval>({\s*(-?\d+(\.\d+)?[\s*,\s*\-?\d+(.\d+)?]*)\s*})|(?<left_delimiter>[[\]])\s*(?<left>-Inf|-?\d+(\.\d+)?)\s*,\s*(?<right>\+?Inf|-?\d+(\.\d+)?)\s*(?<right_delimiter>[[\]]))\s*(?<message>.*?)$/s;
const standardRules = [];
for (let part of parts) {
part = part.trim().replace(/\|\|/g, '|');
const matches = part.match(intervalRegex);
if (matches) {
const matchGroups = matches.groups || {};
if (matches[2]) {
for (const n of matches[3].split(',')) {
if (number === Number(n)) {
return strtr(matchGroups.message, parameters);
}
}
}
else {
const leftNumber = '-Inf' === matchGroups.left ? Number.NEGATIVE_INFINITY : Number(matchGroups.left);
const rightNumber = ['Inf', '+Inf'].includes(matchGroups.right)
? Number.POSITIVE_INFINITY
: Number(matchGroups.right);
if (('[' === matchGroups.left_delimiter ? number >= leftNumber : number > leftNumber) &&
(']' === matchGroups.right_delimiter ? number <= rightNumber : number < rightNumber)) {
return strtr(matchGroups.message, parameters);
}
}
}
else {
const ruleMatch = part.match(/^\w+:\s*(.*?)$/);
standardRules.push(ruleMatch ? ruleMatch[1] : part);
}
}
const position = getPluralizationRule(number, locale);
if (typeof standardRules[position] === 'undefined') {
if (1 === parts.length && typeof standardRules[0] !== 'undefined') {
return strtr(standardRules[0], parameters);
}
throw new Error(`Unable to choose a translation for "${id}" with locale "${locale}" for value "${number}". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %count% apples").`);
}
return strtr(standardRules[position], parameters);
}
function getPluralizationRule(number, locale) {
number = Math.abs(number);
let _locale = locale;
if (locale === 'pt_BR' || locale === 'en_US_POSIX') {
return 0;
}
_locale = _locale.length > 3 ? _locale.substring(0, _locale.indexOf('_')) : _locale;
switch (_locale) {
case 'af':
case 'bn':
case 'bg':
case 'ca':
case 'da':
case 'de':
case 'el':
case 'en':
case 'en_US_POSIX':
case 'eo':
case 'es':
case 'et':
case 'eu':
case 'fa':
case 'fi':
case 'fo':
case 'fur':
case 'fy':
case 'gl':
case 'gu':
case 'ha':
case 'he':
case 'hu':
case 'is':
case 'it':
case 'ku':
case 'lb':
case 'ml':
case 'mn':
case 'mr':
case 'nah':
case 'nb':
case 'ne':
case 'nl':
case 'nn':
case 'no':
case 'oc':
case 'om':
case 'or':
case 'pa':
case 'pap':
case 'ps':
case 'pt':
case 'so':
case 'sq':
case 'sv':
case 'sw':
case 'ta':
case 'te':
case 'tk':
case 'ur':
case 'zu':
return 1 === number ? 0 : 1;
case 'am':
case 'bh':
case 'fil':
case 'fr':
case 'gun':
case 'hi':
case 'hy':
case 'ln':
case 'mg':
case 'nso':
case 'pt_BR':
case 'ti':
case 'wa':
return number < 2 ? 0 : 1;
case 'be':
case 'bs':
case 'hr':
case 'ru':
case 'sh':
case 'sr':
case 'uk':
return 1 === number % 10 && 11 !== number % 100
? 0
: number % 10 >= 2 && number % 10 <= 4 && (number % 100 < 10 || number % 100 >= 20)
? 1
: 2;
case 'cs':
case 'sk':
return 1 === number ? 0 : number >= 2 && number <= 4 ? 1 : 2;
case 'ga':
return 1 === number ? 0 : 2 === number ? 1 : 2;
case 'lt':
return 1 === number % 10 && 11 !== number % 100
? 0
: number % 10 >= 2 && (number % 100 < 10 || number % 100 >= 20)
? 1
: 2;
case 'sl':
return 1 === number % 100 ? 0 : 2 === number % 100 ? 1 : 3 === number % 100 || 4 === number % 100 ? 2 : 3;
case 'mk':
return 1 === number % 10 ? 0 : 1;
case 'mt':
return 1 === number
? 0
: 0 === number || (number % 100 > 1 && number % 100 < 11)
? 1
: number % 100 > 10 && number % 100 < 20
? 2
: 3;
case 'lv':
return 0 === number ? 0 : 1 === number % 10 && 11 !== number % 100 ? 1 : 2;
case 'pl':
return 1 === number
? 0
: number % 10 >= 2 && number % 10 <= 4 && (number % 100 < 12 || number % 100 > 14)
? 1
: 2;
case 'cy':
return 1 === number ? 0 : 2 === number ? 1 : 8 === number || 11 === number ? 2 : 3;
case 'ro':
return 1 === number ? 0 : 0 === number || (number % 100 > 0 && number % 100 < 20) ? 1 : 2;
case 'ar':
return 0 === number
? 0
: 1 === number
? 1
: 2 === number
? 2
: number % 100 >= 3 && number % 100 <= 10
? 3
: number % 100 >= 11 && number % 100 <= 99
? 4
: 5;
default:
return 0;
}
}
function formatIntl(id, parameters, locale) {
if (id === '') {
return '';
}
const intlMessage = new IntlMessageFormat(id, [locale.replace('_', '-')], undefined, { ignoreTag: true });
parameters = { ...parameters };
Object.entries(parameters).forEach(([key, value]) => {
if (key.includes('%') || key.includes('{')) {
delete parameters[key];
parameters[key.replace(/[%{} ]/g, '').trim()] = value;
}
});
return intlMessage.format(parameters);
}
let _locale = null;
let _localeFallbacks = {};
let _throwWhenNotFound = false;
function setLocale(locale) {
_locale = locale;
}
function getLocale() {
return (_locale ||
document.documentElement.getAttribute('data-symfony-ux-translator-locale') ||
(document.documentElement.lang ? document.documentElement.lang.replace('-', '_') : null) ||
'en');
}
function throwWhenNotFound(enabled) {
_throwWhenNotFound = enabled;
}
function setLocaleFallbacks(localeFallbacks) {
_localeFallbacks = localeFallbacks;
}
function getLocaleFallbacks() {
return _localeFallbacks;
}
function trans(message, parameters = {}, domain = 'messages', locale = null) {
if (typeof domain === 'undefined') {
domain = 'messages';
}
if (typeof locale === 'undefined' || null === locale) {
locale = getLocale();
}
if (typeof message.translations === 'undefined') {
return message.id;
}
const localesFallbacks = getLocaleFallbacks();
const translationsIntl = message.translations[`${domain}+intl-icu`];
if (typeof translationsIntl !== 'undefined') {
while (typeof translationsIntl[locale] === 'undefined') {
locale = localesFallbacks[locale];
if (!locale) {
break;
}
}
if (locale) {
return formatIntl(translationsIntl[locale], parameters, locale);
}
}
const translations = message.translations[domain];
if (typeof translations !== 'undefined') {
while (typeof translations[locale] === 'undefined') {
locale = localesFallbacks[locale];
if (!locale) {
break;
}
}
if (locale) {
return format(translations[locale], parameters, locale);
}
}
if (_throwWhenNotFound) {
throw new Error(`No translation message found with id "${message.id}".`);
}
return message.id;
}
export { getLocale, getLocaleFallbacks, setLocale, setLocaleFallbacks, throwWhenNotFound, trans };

1
assets/ux-translator/dist/utils.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export declare function strtr(string: string, replacePairs: Record<string, string | number>): string;

View File

@@ -0,0 +1,34 @@
{
"name": "@symfony/ux-translator",
"description": "Symfony Translator for JavaScript",
"license": "MIT",
"version": "1.0.0",
"main": "dist/translator_controller.js",
"types": "dist/translator_controller.d.ts",
"scripts": {
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"importmap": {
"intl-messageformat": "^10.5.11",
"@symfony/ux-translator": "path:%PACKAGE%/dist/translator_controller.js",
"@app/translations": "path:var/translations/index.js",
"@app/translations/configuration": "path:var/translations/configuration.js"
}
},
"peerDependencies": {
"intl-messageformat": "^10.5.11"
},
"peerDependenciesMeta": {
"intl-messageformat": {
"optional": false
}
},
"devDependencies": {
"intl-messageformat": "^10.5.11"
}
}

21
bin/console Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env php
<?php
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
if (!is_dir(dirname(__DIR__).'/vendor')) {
throw new LogicException('Dependencies are missing. Try running "composer install".');
}
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
return new Application($kernel);
};

34
compose.override.yaml Normal file
View File

@@ -0,0 +1,34 @@
services:
###> doctrine/doctrine-bundle ###
database:
ports:
- "127.0.0.1:5454:5432"
###< doctrine/doctrine-bundle ###
###> symfony/mailer ###
mailer:
image: axllent/mailpit
ports:
- "1025"
- "8025"
environment:
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
###< symfony/mailer ###
redis:
ports:
- 127.0.0.1:6363:6379
relatorio:
ports:
- 8888
rabbitmq:
ports:
- 127.0.0.1:5689:5672
- 127.0.0.1:15689:15672
# required to make data persistent
hostname: my-rabbit
volumes:
- ./docker/rabbitmq/data:/var/lib/rabbitmq

56
compose.yaml Normal file
View File

@@ -0,0 +1,56 @@
services:
###> doctrine/doctrine-bundle ###
database:
image: postgis/postgis:${POSTGRES_VERSION:-16}-3.4-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-app}
# You should definitely change the password in production
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}
POSTGRES_USER: ${POSTGRES_USER:-app}
volumes:
# - database_data:/var/lib/postgresql/data:rw
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
- ./docker/db/data:/var/lib/postgresql/data:rw
###< doctrine/doctrine-bundle ###
redis:
image: redis
relatorio:
image: registry.gitlab.com/champs-libres/public/relatorio-tornado/app:latest
sign-worker:
image: h3m6q87t.gra7.container-registry.ovh.net/sign-pdf-worker/worker:latest
environment:
AMQP_URL: amqp://guest:guest@rabbitmq:5672/%2f/to_python_sign
LOG_LEVEL: INFO
PKCS12_PATH: /etc/sign-pdf/dummy.p12
TIMESTAMP_URL: http://freetsa.org/tsr
QUEUE_IN: to_python_sign
EXCHANGE_OUT: signed_docs
OUT_ROUTING_KEY: signed_doc
TSA_CERT_CHAIN: /etc/sign-pdf/tsa/tsa-chain.pem
TSA_CONFIG_PATH: /etc/sign-pdf/rootca.conf
TSA_KEY_PASSWORD: "5678"
volumes:
- "./resources/dev-certificate/dummy.p12:/etc/sign-pdf/dummy.p12:ro"
- "./resources/dev-certificate/rootca.conf:/etc/sign-pdf/rootca.conf:ro"
- "./resources/dev-certificate/tsa:/etc/sign-pdf/tsa:ro"
- "./resources/dev-certificate/tsa_serial:/var/lib/tsa/tsa_serial:rw"
links:
- rabbitmq
depends_on:
rabbitmq:
condition: service_healthy
rabbitmq:
image: rabbitmq:3-management-alpine
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
volumes:
###> doctrine/doctrine-bundle ###
database_data:
###< doctrine/doctrine-bundle ###

View File

@@ -13,14 +13,14 @@
"ext-json": "*",
"ext-openssl": "*",
"ext-redis": "*",
"champs-libres/async-uploader-bundle": "dev-sf4#d57134aee8e504a83c902ff0cf9f8d36ac418290",
"ext-zlib": "*",
"champs-libres/wopi-bundle": "dev-master@dev",
"champs-libres/wopi-lib": "dev-master@dev",
"doctrine/data-fixtures": "^1.8",
"doctrine/doctrine-bundle": "^2.1",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^2.13.0",
"erusev/parsedown": "^1.7",
"graylog2/gelf-php": "^1.5",
"knplabs/knp-menu-bundle": "^3.0",
"knplabs/knp-time-bundle": "^1.12",
"knpuniversity/oauth2-client-bundle": "^2.10",
@@ -33,28 +33,53 @@
"phpoffice/phpspreadsheet": "^1.16",
"ramsey/uuid-doctrine": "^1.7",
"sensio/framework-extra-bundle": "^5.5",
"smalot/pdfparser": "^2.10",
"spomky-labs/base64url": "^2.0",
"symfony/browser-kit": "^4.4",
"symfony/asset": "^5.4",
"symfony/browser-kit": "^5.4",
"symfony/cache": "^5.4",
"symfony/clock": "^6.2",
"symfony/css-selector": "^4.4",
"symfony/expression-language": "^4.4",
"symfony/form": "^4.4",
"symfony/framework-bundle": "^4.4",
"symfony/http-client": "^4.4 || ^5",
"symfony/http-foundation": "^4.4",
"symfony/intl": "^4.4",
"symfony/config": "^5.4",
"symfony/console": "^5.4",
"symfony/css-selector": "^5.4",
"symfony/dom-crawler": "^5.4",
"symfony/error-handler": "^5.4",
"symfony/event-dispatcher": "^5.4",
"symfony/event-dispatcher-contracts": "^2.4",
"symfony/expression-language": "^5.4",
"symfony/filesystem": "^5.4",
"symfony/finder": "^5.4",
"symfony/form": "^5.4",
"symfony/framework-bundle": "^5.4",
"symfony/http-client": "^5.4",
"symfony/http-foundation": "^5.4",
"symfony/intl": "^5.4",
"symfony/mailer": "^5.4",
"symfony/messenger": "^5.4",
"symfony/mime": "^5.4",
"symfony/monolog-bundle": "^3.5",
"symfony/security-bundle": "^4.4",
"symfony/serializer": "^5.3",
"symfony/translation": "^4.4",
"symfony/twig-bundle": "^4.4",
"symfony/validator": "^4.4",
"symfony/notifier": "^5.4",
"symfony/options-resolver": "^5.4",
"symfony/ovh-cloud-notifier": "^5.4",
"symfony/process": "^5.4",
"symfony/property-access": "^5.4",
"symfony/property-info": "^5.4",
"symfony/routing": "^5.4",
"symfony/security-bundle": "^5.4",
"symfony/security-core": "^5.4",
"symfony/security-csrf": "^5.4",
"symfony/security-guard": "^5.4",
"symfony/security-http": "^5.4",
"symfony/serializer": "^5.4",
"symfony/string": "^5.4",
"symfony/templating": "^5.4",
"symfony/translation": "^5.4",
"symfony/twig-bundle": "^5.4",
"symfony/ux-translator": "^2.22",
"symfony/validator": "^5.4",
"symfony/webpack-encore-bundle": "^1.11",
"symfony/workflow": "^4.4",
"symfony/yaml": "^4.4",
"symfony/workflow": "^5.4",
"symfony/yaml": "^5.4",
"thenetworg/oauth2-azure": "^2.0",
"twig/extra-bundle": "^3.0",
"twig/intl-extra": "^3.0",
@@ -65,6 +90,7 @@
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3",
"fakerphp/faker": "^1.13",
"friendsofphp/php-cs-fixer": "3.65.0",
"jangregor/phpstan-prophecy": "^1.0",
"nelmio/alice": "^3.8",
"nikic/php-parser": "^4.15",
@@ -73,17 +99,18 @@
"phpstan/phpstan": "^1.9",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": ">= 7.5",
"psalm/plugin-phpunit": "^0.18.4",
"psalm/plugin-symfony": "^4.0.2",
"rector/rector": "1.1.1",
"symfony/debug-bundle": "^5.1",
"symfony/dotenv": "^4.4",
"phpunit/phpunit": "^10.5.24",
"rector/rector": "^1.1.0",
"symfony/amqp-messenger": "^5.4.45",
"symfony/debug-bundle": "^5.4",
"symfony/dotenv": "^5.4",
"symfony/flex": "^2.4",
"symfony/maker-bundle": "^1.20",
"symfony/phpunit-bridge": "^4.4",
"symfony/stopwatch": "^4.4",
"symfony/var-dumper": "^4.4",
"vimeo/psalm": "^4.30.0"
"symfony/phpunit-bridge": "^7.1",
"symfony/runtime": "^5.4",
"symfony/stopwatch": "^5.4",
"symfony/var-dumper": "^5.4",
"symfony/web-profiler-bundle": "^5.4"
},
"conflict": {
"symfony/symfony": "*"
@@ -98,6 +125,8 @@
"Chill\\DocGeneratorBundle\\": "src/Bundle/ChillDocGeneratorBundle",
"Chill\\DocStoreBundle\\": "src/Bundle/ChillDocStoreBundle",
"Chill\\EventBundle\\": "src/Bundle/ChillEventBundle",
"Chill\\FranceTravailApiBundle\\": "src/Bundle/ChillFranceTravailApiBundle/src",
"Chill\\JobBundle\\": "src/Bundle/ChillJobBundle/src",
"Chill\\MainBundle\\": "src/Bundle/ChillMainBundle",
"Chill\\PersonBundle\\": "src/Bundle/ChillPersonBundle",
"Chill\\ReportBundle\\": "src/Bundle/ChillReportBundle",
@@ -109,7 +138,7 @@
},
"autoload-dev": {
"psr-4": {
"App\\": "tests/",
"App\\": "src/app",
"Chill\\DocGeneratorBundle\\Tests\\": "src/Bundle/ChillDocGeneratorBundle/tests",
"Chill\\WopiBundle\\Tests\\": "src/Bundle/ChillDocGeneratorBundle/tests",
"Chill\\Utils\\Rector\\Tests\\": "utils/rector/tests"
@@ -123,15 +152,24 @@
"phpro/grumphp": true,
"phpstan/extension-installer": true,
"roave/you-are-using-it-wrong": true,
"symfony/runtime": true
"symfony/runtime": true,
"symfony/flex": true
},
"bin-dir": "bin",
"optimize-autoloader": true,
"sort-packages": true
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd"
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"php-cs-fixer": "php-cs-fixer fix --config=./.php-cs-fixer.dist.php --show-progress=none",
"phpstan": "phpstan --no-progress",
"rector": "rector --no-progress-bar"
},
"extra": {
"symfony": {
"docker": true
}
}
}

View File

@@ -1,16 +1,26 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
return [
ChampsLibres\AsyncUploaderBundle\ChampsLibresAsyncUploaderBundle::class => ['all' => true],
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
loophp\PsrHttpMessageBridgeBundle\PsrHttpMessageBridgeBundle::class => ['all' => true],
ChampsLibres\WopiBundle\WopiBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true],
KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['dev' => true, 'test' => true],
Misd\PhoneNumberBundle\MisdPhoneNumberBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Chill\ActivityBundle\ChillActivityBundle::class => ['all' => true],
Chill\AsideActivityBundle\ChillAsideActivityBundle::class => ['all' => true],
Chill\CalendarBundle\ChillCalendarBundle::class => ['all' => true],
@@ -24,26 +34,7 @@ return [
Chill\TaskBundle\ChillTaskBundle::class => ['all' => true],
Chill\ThirdPartyBundle\ChillThirdPartyBundle::class => ['all' => true],
Chill\BudgetBundle\ChillBudgetBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
//Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
loophp\PsrHttpMessageBridgeBundle\PsrHttpMessageBridgeBundle::class => ['all' => true],
\Misd\PhoneNumberBundle\MisdPhoneNumberBundle::class => ['all' => true],
ChampsLibres\WopiBundle\WopiBundle::class => ['all' => true],
Chill\WopiBundle\ChillWopiBundle::class => ['all' => true],
\Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
Chill\EventBundle\ChillEventBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\UX\Translator\UxTranslatorBundle::class => ['all' => true],
];

View File

@@ -17,17 +17,3 @@ framework:
# Namespaced pools use the above "app" backend by default
#pools:
#my.dedicated.cache: null
default_redis_provider: '%env(resolve:REDIS_URL)%'
pools:
cache.user_data:
adapter: cache.adapter.redis
public: true
default_lifetime: 300 # 5 minutes
# will be used in chill_main.tag_aware_cache service
cache.tags:
adapter: cache.adapter.redis
public: false
default_lifetime: 300

View File

@@ -0,0 +1,14 @@
framework:
cache:
default_redis_provider: '%env(resolve:REDIS_URL)%'
pools:
cache.user_data:
adapter: cache.adapter.redis
public: true
default_lifetime: 300 # 5 minutes
# will be used in chill_main.tag_aware_cache service
cache.tags:
adapter: cache.adapter.redis
public: false
default_lifetime: 300

122
config/packages/chill.yaml Normal file
View File

@@ -0,0 +1,122 @@
chill_main:
available_languages: [ '%env(resolve:LOCALE)%', 'en' ]
available_countries: ['BE', 'FR']
notifications:
from_email: '%env(resolve:NOTIFICATION_FROM_EMAIL)%'
from_name: '%env(resolve:NOTIFICATION_FROM_NAME)%'
host: '%env(resolve:NOTIFICATION_HOST)%'
redis:
host: '%env(resolve:REDIS_HOST)%'
port: '%env(resolve:REDIS_PORT)%'
phone_helper:
twilio_sid: '%env(resolve:TWILIO_SID)%'
twilio_secret: '%env(resolve:TWILIO_SECRET)%'
default_carrier_code: '%env(resolve:DEFAULT_CARRIER_CODE)%'
short_messages:
dsn: '%env(string:SHORT_MESSAGE_DSN)%'
acl:
form_show_scopes: true
form_show_centers: true
filter_stats_by_center: true
access_global_history: false
access_user_change_password: true
access_permissions_group_list: true
add_address:
default_country: '%env(string:ADD_ADDRESS_DEFAULT_COUNTRY)%'
map_center:
x: '%env(float:ADD_ADDRESS_MAP_CENTER_X)%'
y: '%env(float:ADD_ADDRESS_MAP_CENTER_Y)%'
z: '%env(float:ADD_ADDRESS_MAP_CENTER_Z)%'
when@test:
chill_main:
available_languages:
- 'fr'
- 'en'
chill_custom_fields:
show_empty_values_in_views: false
chill_person:
create_person_allowed: false
create_parcours_allowed: false
allow_multiple_simultaneous_accompanying_periods: true
accompanying_periods_fields:
user: visible
# createdBy, step, origin, intensity, scopes, requestor, anonymous, emergency, confidential : visible(default) | hidden
person_fields:
acceptEmail: hidden
alt_names:
- key: jeune_fille
labels:
lang: fr
label: Nom de naissance
marital_status: visible
civility: visible
deathdate: visible
validation:
center_required: true
chill_activity:
form:
time_duration:
-
label: '5 minutes'
seconds: 300
-
label: '10 minutes'
seconds: 600
-
label: '15 minutes'
seconds: 900
-
label: '20 minutes'
seconds: 1200
-
label: '25 minutes'
seconds: 1500
-
label: '30 minutes'
seconds: 1800
-
label: '45 minutes'
seconds: 2700
-
label: '1 hour'
seconds: 3600
-
label: '1 hour 15'
seconds: 4500
-
label: '1 hour 30'
seconds: 5400
-
label: '1 hour 45'
seconds: 6300
-
label: '2 hours'
seconds: 7200
-
label: '2 hours 15'
seconds: 8100
-
label: '2 hours 30'
seconds: 9000
-
label: '2 hours 45'
seconds: 9900
-
label: '3 hours'
seconds: 10800
-
label: '3 hours 30'
seconds: 12600
-
label: '4 hours'
seconds: 14400
-
label: '4 hours 30'
seconds: 16200
-
label: '5 hours'
seconds: 18000

View File

@@ -0,0 +1,85 @@
chill_budget:
resources:
- { key: fixed_contract, labels: [{ lang: fr, label: "Salarié en CDI" }]}
- { key: temporary_contract, labels: [{ lang: fr, label: "Salarié en CDD"}]}
- { key: interim, labels: [{ lang: fr, label: "Salarié en intérim"}]}
- { key: other_revenues, labels: [{ lang: fr, label: "Revenus non salariés, commerçant, artisan,..."}]}
- { key: agricultural_activity, labels: [{ lang: fr, label: "Exploitant agricole"}]}
- { key: chomage_ass, labels: [{ lang: fr, label: "Allocations chômage ASS"}]}
- { key: chomage_are, labels: [{ lang: fr, label: "Allocations chômage ARE"}]}
- { key: remuneration_stage, labels: [{ lang: fr, label: "Rémunération de stage, dapprentissage,..."}]}
- { key: daily_allowences, labels: [{ lang: fr, label: "Indemnités journalières"}]}
- { key: others, labels: [{ lang: fr, label: "Autres"}]}
- { key: pension, labels: [{ lang: fr, label: "Pension de retraite"}]}
- { key: invalidity, labels: [{ lang: fr, label: "Pension d'invalidité"}]}
- { key: reversion, labels: [{ lang: fr, label: "Pension de réversion"}]}
- { key: widowhood, labels: [{ lang: fr, label: "Pension de veuvage"}]}
- { key: military, labels: [{ lang: fr, label: "Pension militaire"}]}
- { key: food, labels: [{ lang: fr, label: "Pension alimentaire"}]}
- { key: compensation, labels: [{ lang: fr, label: "Pension de prestation compensatoire"}]}
- { key: allocation_handicap_adult, labels: [{ lang: fr, label: "Allocation aux adultes handicapés"}]}
- { key: rsa, labels: [{ lang: fr, label: "RSA"}]}
- { key: annuity_accident, labels: [{ lang: fr, label: "Rente accident"}]}
- { key: premium_al_pl, labels: [{ lang: fr, label: "Prime dactivité AL/APL au bénéficiaire"}]}
- { key: premium_thirdparty, labels: [{ lang: fr, label: "Prime dactivité versé au tiers"}]}
- { key: other_income, labels: [{ lang: fr, label: "Autres ressources (ARS, ...)"}]}
- { key: allocation_family, labels: [{ lang: fr, label: "Allocations familiales"}]}
- { key: allocation_basic, labels: [{ lang: fr, label: "Allocation de base"}]}
- { key: free_choice_saving, labels: [{ lang: fr, label: "Complément de libre choix du mode de garde"}]}
- { key: shared_benefits_child, labels: [{ lang: fr, label: "Prestation partagée éducation de lenfant"}]}
- { key: complimentary_family, labels: [{ lang: fr, label: "Complément familial"}]}
- { key: allocation_family_support, labels: [{ lang: fr, label: "Allocation de soutien familial"}]}
- { key: allocation_education_child_handicap, labels: [{ lang: fr, label: "Allocation déducation de lenfant handicapé"}]}
charges:
- { key: rent, labels: [{ lang: fr, label: "Loyer" }]}
- { key: home_ownership, labels: [{ lang: fr, label: "Accession à la propriété" }]}
- { key: costs_accomodation, labels: [{ lang: fr, label: "Frais dhébergement" }]}
- { key: home_insurance, labels: [{ lang: fr, label: "Assurance habitation" }]}
- { key: taxes, labels: [{ lang: fr, label: "Impôts (taxe habitation, taxe foncière, ordures ménagères, redevances incitatives)" }]}
- { key: impots, labels: [{lang: fr, label: "Impôts"}]}
- { key: electricity, labels: [{ lang: fr, label: "Electricité" }]}
- { key: gas, labels: [{ lang: fr, label: "Gaz en bouteille" }]}
- { key: heating, labels: [{ lang: fr, label: "Autre moyen de chauffage" }]}
- { key: water, labels: [{ lang: fr, label: "Eau" }]}
- { key: school_fees, labels: [ { lang: fr, label: "Frais de scolarité"}]}
- { key: alimony, labels: [ { lang: fr, label: "Pension alimentaire à reverser"}]}
- { key: child_care, labels: [ { lang: fr, label: "Frais de garde (en totalité)"}]}
- { key: telecom, labels: [ { lang: fr, label: "Frais de communication fixe"}]}
- { key: mobilephone, labels: [ { lang: fr, label: "Frais de communication mobile"}]}
- { key: internet, labels: [ { lang: fr, label: "Frais de communication internet"}]}
- { key: insurance, labels: [{ lang: fr, label: "Assurances"}]}
- { key: debt_commission, labels: [{ lang: fr, label: "Saisine de la commission surendettement"}]}
- { key: recovery_plan, labels: [{ lang: fr, label: "Plan de redressement"}]}
- { key: rpr, labels: [{ lang: fr, label: "PRP"}]}
- { key: moratoire, labels: [{lang: fr, label: "Moratoire"}]}
- { key: mutuelle, labels: [{lang: fr, label: "Mutuelle"}]}
- { key: transport, labels: [{lang: fr, label: "Frais de transport"}]}
- { key: decouvbank, labels: [{lang: fr, label: "Découvert bancaire utilisé"}]}
- { key: procsaisie, labels: [{lang: fr, label: "Procédure de saisie"}]}
- { key: indus, labels: [{lang: fr, label: "Indus"}]}
- { key: apurement, labels: [{lang: fr, label: "Plan d'apurement"}]}
- { key: debt_rent, labels: [{lang: fr, label: "Dette de loyer (hors APL)"}]}
- { key: debt_property, labels: [{lang: fr, label: "Dette d'accession à la propriété"}]}
- { key: debt_lodging, labels: [{lang: fr, label: "Dette de frais dhébergement"}]}
- { key: debt_electricity, labels: [{lang: fr, label: "Dette d'électricité"}]}
- { key: debt_water, labels: [{lang: fr, label: "Dette d'eau"}]}
- { key: debt_heating, labels: [{lang: fr, label: "Dette d'autre moyen de chauffage"}]}
- { key: debt_gas, labels: [{lang: fr, label: "Dette de gaz en bouteille"}]}
- { key: debt_house_insurance, labels: [{lang: fr, label: "Dette d'assurance habitation"}]}
- { key: debt_housing_taxes, labels: [{lang: fr, label: "Dette d'impôts liées au logement"}]}
- { key: debt_taxes, labels: [{lang: fr, label: "Dette d'impôts autres"}]}
- { key: debt_school, labels: [{lang: fr, label: "Dette de frais de scolarité (cantine, transport, frais de scolarité, frais de garde)"}]}
- { key: debt_alimentation, labels: [{lang: fr, label: "Dette de pension alimentaire à reverser"}]}
- { key: debt_childcare, labels: [{lang: fr, label: "Dette de frais de garde (en totalité)"}]}
- { key: debt_phone, labels: [{lang: fr, label: "Dette de communication fixe"}]}
- { key: debt_mobile, labels: [{lang: fr, label: "Dette de communication portable"}]}
- { key: debt_internet, labels: [{lang: fr, label: "Dette de communication internet"}]}
- { key: debt_car_insurance, labels: [{lang: fr, label: "Dette d'assurance auto"}]}
- { key: debt_mutual, labels: [{lang: fr, label: "Dette de mutuelle"}]}
- { key: debt_transport, labels: [{lang: fr, label: "Dette de frais de transport"}]}
- { key: debt_bank, labels: [{lang: fr, label: "Dette de découvert bancaire utilisé"}]}
- { key: debt_garbage, labels: [{lang: fr, label: "Dette de taxe dordures ménagère"}]}
- { key: debt_other, labels: [{lang: fr, label: "Dette autre"}]}
- { key: autre, labels: [{lang: fr, label: "Autre"}]}

View File

@@ -0,0 +1,3 @@
chill_calendar:
remote_calendars_sync:
enabled: false

View File

@@ -0,0 +1,5 @@
chill_doc_generator:
driver:
type: relatorio
relatorio:
url: 'http://%env(RELATORIO_HOST)%:%env(RELATORIO_PORT)%/'

View File

@@ -0,0 +1,9 @@
chill_doc_store:
use_driver: openstack
local_storage:
storage_path: '%kernel.project_dir%/var/storage'
openstack:
temp_url:
temp_url_key: '%env(resolve:ASYNC_UPLOAD_TEMP_URL_KEY)%' # Required
container: '%env(resolve:ASYNC_UPLOAD_TEMP_URL_CONTAINER)%' # Required
temp_url_base_path: '%env(resolve:ASYNC_UPLOAD_TEMP_URL_BASE_PATH)%' # Required

View File

@@ -0,0 +1,11 @@
chill_main:
workflow_signature:
base_signer:
document_kinds:
- { key: id_card, labels: [ { lang: fr, label: "Carte d'identité" } ] }
- { key: passport, labels: [ { lang: fr, label: "Passeport" } ] }
- { key: drivers_license, labels: [ { lang: fr, label: "Permis de conduire" } ] }
- { key: visa_long_stay, labels: [ { lang: fr, label: "Visa de long séjour" } ] }
- { key: resident_permit, labels: [ { lang: fr, label: "Carte de séjour" } ] }
- { key: residency_card, labels: [ { lang: fr, label: "Carte de résident" } ] }
- { key: provisionary_residency_permit, labels: [ { lang: fr, label: "Autorisation provisoire de séjour" } ] }

View File

@@ -0,0 +1,5 @@
when@dev:
debug:
# Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser.
# See the "server:dump" command to start a new server.
dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"

View File

@@ -0,0 +1,38 @@
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '16'
use_savepoints: true
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.default
auto_mapping: true
when@test:
doctrine:
dbal:
# "TEST_TOKEN" is typically set by ParaTest
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
when@prod:
doctrine:
orm:
auto_generate_proxy_classes: false
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
query_cache_driver:
type: pool
pool: doctrine.system_cache_pool
result_cache_driver:
type: pool
pool: doctrine.result_cache_pool
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system

View File

@@ -0,0 +1,2 @@
doctrine_migrations:
enable_profiler: false

View File

@@ -7,24 +7,15 @@ doctrine_migrations:
'Chill\Migrations\CustomFields': '@ChillCustomFieldsBundle/migrations'
'Chill\Migrations\Event': '@ChillEventBundle/migrations'
'Chill\Migrations\Person': '@ChillPersonBundle/migrations'
'Chill\Migrations\Report': '@ChillReportBundle/migrations'
'Chill\Migrations\Task': '@ChillTaskBundle/migrations'
'Chill\Migrations\ThirdParty': '@ChillThirdPartyBundle/migrations'
'Chill\Migrations\AsideActivity': '@ChillAsideActivityBundle/migrations'
'Chill\Migrations\DocGenerator': '@ChillDocGeneratorBundle/migrations'
'Chill\Migrations\AsideActivity': '@ChillAsideActivityBundle/migrations'
'Chill\Migrations\Calendar': '@ChillCalendarBundle/migrations'
'Chill\Migrations\Budget': '@ChillBudgetBundle/migrations'
'Chill\Migrations\Report': '@ChillReportBundle/migrations'
all_or_nothing:
true
services:
'Doctrine\Migrations\Version\Comparator': 'Chill\MainBundle\Doctrine\Migrations\VersionComparator'
storage:
table_storage:
table_name: 'migration_versions'
version_column_name: 'version'
version_column_length: 1024
executed_at_column_name: 'executed_at'
execution_time_column_name: 'execution_time'

View File

@@ -1,14 +1,8 @@
# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
secret: '%env(APP_SECRET)%'
# DIRTY FIX un bug dans symfony4 empêche de récupérer un tableau de variables depuis .env
# cfr. https://github.com/symfony/symfony/issues/28599
trusted_hosts:
- '^(localhost|127.0.0.1)$'
#csrf_protection: true
#http_method_override: true
http_method_override: false
# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
@@ -16,12 +10,17 @@ framework:
handler_id: null
cookie_secure: auto
cookie_samesite: lax
storage_factory_id: session.storage.factory.native
#esi: true
#fragments: true
php_errors:
log: true
## sf4 check: ou à déplacer dans un chill.yaml
assets:
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
when@test:
framework:
test: true
session:
storage_factory_id: session.storage.factory.mock_file
assets:
json_manifest_path: null

View File

@@ -1,3 +1,8 @@
framework:
assets:
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
when@test:
framework:
assets:
json_manifest_path: null

View File

@@ -0,0 +1,3 @@
knpu_oauth2_client:
clients:
# configure your clients as described here: https://github.com/knpuniversity/oauth2-client-bundle#configuration

View File

@@ -0,0 +1,4 @@
lexik_jwt_authentication:
secret_key: '%env(resolve:JWT_SECRET_KEY)%'
public_key: '%env(resolve:JWT_PUBLIC_KEY)%'
pass_phrase: '%env(JWT_PASSPHRASE)%'

View File

@@ -0,0 +1,9 @@
lexik_jwt_authentication:
# required for wopi - recommended duration
token_ttl: 36000
# required for wopi - token in parameter access_token
token_extractors:
query_parameter:
enabled: true
name: access_token

View File

@@ -0,0 +1,3 @@
framework:
mailer:
dsn: '%env(MAILER_DSN)%'

View File

@@ -0,0 +1,4 @@
framework:
mailer:
envelope:
sender: '%env(NOTIFICATION_FROM_EMAIL)%'

View File

@@ -0,0 +1,80 @@
framework:
messenger:
# reset services after consuming messages
reset_on_message: true
# Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
failure_transport: failed
transports:
# those transports are added by chill-bundles recipes
sync: sync://
async:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%/async'
options:
exchange:
name: async
type: fanout
queues:
async: ~
auto_setup: true
priority:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%/priority'
# end of transports added by chill-bundles recipes
# https://symfony.com/doc/current/messenger.html#transport-configuration
failed: 'doctrine://default?queue_name=failed'
to_sign_worker:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%/to_python_sign'
serializer: Chill\DocStoreBundle\Service\Signature\Driver\BaseSigner\RequestPdfSignMessageSerializer
options:
exchange:
name: to_python_sign
type: direct
queues:
to_python_sign: ~
signed_docs:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%/signed_docs'
serializer: Chill\DocStoreBundle\Service\Signature\Driver\BaseSigner\PdfSignedMessageSerializer
options:
exchange:
name: signed_docs
type: direct
queues:
signed_docs:
binding_keys: [signed_doc]
auto_setup: false
routing:
# routes added by chill-bundles recipes
'Chill\CalendarBundle\Messenger\Message\CalendarRangeMessage': async
'Chill\CalendarBundle\Messenger\Message\CalendarRangeRemovedMessage': async
'Chill\CalendarBundle\Messenger\Message\CalendarRemovedMessage': async
'Chill\CalendarBundle\Messenger\Message\CalendarMessage': async
'Chill\CalendarBundle\Messenger\Message\InviteUpdateMessage': async
'Chill\CalendarBundle\Messenger\Message\MSGraphChangeNotificationMessage': async
'Chill\MainBundle\Service\ShortMessage\ShortMessage': async
'Chill\DocGeneratorBundle\Service\Messenger\RequestGenerationMessage': priority
'Chill\PersonBundle\AccompanyingPeriod\Lifecycle\AccompanyingPeriodStepChangeRequestMessage': async
'Chill\DocStoreBundle\Service\Signature\Driver\BaseSigner\RequestPdfSignMessage': to_sign_worker
'Chill\DocStoreBundle\Service\StoredObjectCleaner\RemoveOldVersionMessage': async
'Chill\MainBundle\Workflow\Messenger\PostSignatureStateChangeMessage': priority
'Chill\MainBundle\Workflow\Messenger\PostPublicViewMessage': async
'Chill\MainBundle\Service\Workflow\CancelStaleWorkflowMessage': async
'Chill\MainBundle\Notification\Email\NotificationEmailMessages\SendImmediateNotificationEmailMessage': async
'Chill\MainBundle\Export\Messenger\ExportRequestGenerationMessage': priority
'Chill\MainBundle\Export\Messenger\RemoveExportGenerationMessage': async
'Chill\MainBundle\Notification\Email\NotificationEmailMessages\ScheduleDailyNotificationDigestMessage': async
# end of routes added by chill-bundles recipes
# Route your messages to the transports
# 'App\Message\YourMessage': async
# 'Symfony\Component\Mailer\Messenger\SendEmailMessage': async
when@test:
framework:
messenger:
transports:
async: 'in-memory://'
priority: 'in-memory://'
signed_docs: 'in-memory://'

View File

@@ -0,0 +1,13 @@
# To persist libphonenumber\PhoneNumber objects, add the Misd\PhoneNumberBundle\Doctrine\DBAL\Types\PhoneNumberType mapping to your application's config.
# This requires: doctrine/doctrine-bundle
#doctrine:
# dbal:
# types:
# phone_number: Misd\PhoneNumberBundle\Doctrine\DBAL\Types\PhoneNumberType
#misd_phone_number:
# twig: false
# form: false
# serializer: false
# validator:
# default_region: GB

View File

@@ -0,0 +1,62 @@
monolog:
channels:
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
when@dev:
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]
when@test:
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
channels: ["!event"]
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
when@prod:
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
nested:
type: stream
path: php://stderr
level: debug
formatter: monolog.formatter.json
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
deprecation:
type: stream
channels: [deprecation]
path: php://stderr
formatter: monolog.formatter.json

View File

@@ -0,0 +1,12 @@
when@dev: &dev
nelmio_alice:
functions_blacklist:
- 'current'
- 'shuffle'
- 'date'
- 'time'
- 'file'
- 'md5'
- 'sha1'
when@test: *dev

View File

@@ -0,0 +1,13 @@
framework:
notifier:
texter_transports:
#ovhcloud: '%env(OVHCLOUD_DSN)%'
#ovhcloud: '%env(SHORT_MESSAGE_DSN)%'
channel_policy:
# use chat/slack, chat/telegram, sms/twilio or sms/nexmo
urgent: ['email']
high: ['email']
medium: ['email']
low: ['email']
admin_recipients:
- { email: admin@example.com }

View File

@@ -7,15 +7,5 @@ services:
Psr\Http\Message\UploadedFileFactoryInterface: '@nyholm.psr7.psr17_factory'
Psr\Http\Message\UriFactoryInterface: '@nyholm.psr7.psr17_factory'
# Register nyholm/psr7 services for autowiring with HTTPlug factories
Http\Message\MessageFactory: '@nyholm.psr7.httplug_factory'
Http\Message\RequestFactory: '@nyholm.psr7.httplug_factory'
Http\Message\ResponseFactory: '@nyholm.psr7.httplug_factory'
Http\Message\StreamFactory: '@nyholm.psr7.httplug_factory'
Http\Message\UriFactory: '@nyholm.psr7.httplug_factory'
nyholm.psr7.psr17_factory:
class: Nyholm\Psr7\Factory\Psr17Factory
nyholm.psr7.httplug_factory:
class: Nyholm\Psr7\Factory\HttplugFactory

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