Compare commits

...

374 Commits

Author SHA1 Message Date
nobohan
5e1dfee70f address render test : more tentatives to use parameter bag (unsuccessful) 2022-01-07 10:22:37 +01:00
nobohan
73f11ccb1a address: add country aware renderCountryLine (make tests failing) 2022-01-06 21:31:02 +01:00
nobohan
d14edd469e address: render address lines in vue AddressRenderBox 2022-01-06 21:15:56 +01:00
nobohan
fd40ae0198 address: fix address lines in case of noAddress + add test 2022-01-06 18:30:21 +01:00
nobohan
7d20f842a2 address: use renderAdress::renderLines in twig template 2022-01-06 17:02:17 +01:00
nobohan
e82a71b833 address: use address lines in address normalizer + fix tests (for distribution) 2022-01-06 15:29:42 +01:00
nobohan
3b20ac85d9 address: more unit test for address render template 2022-01-06 15:14:47 +01:00
nobohan
6bae7606dd address: add unit test for address render template 2022-01-06 15:08:59 +01:00
nobohan
4c4a003977 address: render lines: code style fixed 2022-01-06 11:55:32 +01:00
nobohan
077317c2bf address: renderLines 2022-01-06 11:51:10 +01:00
nobohan
3c2ebee12a address: render distribution in street line + init renderLines function 2022-01-05 18:42:27 +01:00
78cf817921 docgen: add location to accompanying period 2022-01-04 23:50:22 +01:00
Pol Dellaiera
f63afea2ce Autofix code style. 2022-01-04 17:32:05 +01:00
Pol Dellaiera
660e45ac59 tests: Tag failing test as incomplete. 2022-01-04 17:27:30 +01:00
Pol Dellaiera
e619e58a6e tests: Tag failing test as incomplete. 2022-01-04 17:20:25 +01:00
Pol Dellaiera
08de360677 tests: Tag failing test as incomplete. 2022-01-04 16:38:21 +01:00
Pol Dellaiera
e2ad590310 tests: Get rid of PHPUnit deprecations. 2022-01-04 16:29:49 +01:00
Pol Dellaiera
6ebcd87508 tests: Replace assertInternalType with proper method.
See https://github.com/sebastianbergmann/phpunit/issues/3369
2022-01-04 16:21:06 +01:00
nobohan
06f8014b76 Merge branch 'master' into issue303_household_fixes 2022-01-04 16:06:15 +01:00
nobohan
52f817bde7 fix conflicts when merging master 2022-01-04 15:56:32 +01:00
Pol Dellaiera
33913867ee cs: Use Collection more and fix potential duplicates. 2022-01-04 15:55:56 +01:00
bcd25fa950 Merge branch 'issue349-masonry' into 'master'
Issue349 masonry

See merge request Chill-Projet/chill-bundles!274
2022-01-04 14:38:04 +00:00
Pol Dellaiera
acf7142bad cs: Use Collection more. 2022-01-04 15:29:17 +01:00
Pol Dellaiera
c8c5af8d14 cs: Update PersonJsonNormalizer. 2022-01-04 15:18:03 +01:00
nobohan
aa6b770bfe fix conflict 2022-01-04 15:11:43 +01:00
nobohan
4d5d5265df fix alt name choice array 2022-01-04 15:10:03 +01:00
Pol Dellaiera
d19c5c9e41 cs: Autofix. 2022-01-04 15:07:41 +01:00
Pol Dellaiera
cf588c97c0 cs: Autofix. 2022-01-04 14:41:52 +01:00
Pol Dellaiera
f3f5cc550c sa: Fix PHPStan issue. 2022-01-04 14:41:52 +01:00
Pol Dellaiera
c7d00ca937 chore: Optimize composer.json. 2022-01-04 14:41:52 +01:00
nobohan
e3c0dca1d1 upd CHANGELOG 2022-01-04 14:39:43 +01:00
nobohan
f4c8d0b09a Merge remote-tracking branch 'origin/master' into issue230_person 2022-01-04 13:50:27 +01:00
Pol Dellaiera
72a15bb823 chore: Update composer.json. 2022-01-04 11:15:13 +01:00
862f9aefb0 update changelog 2022-01-04 10:27:28 +01:00
dc581fcf57 fix details and corrections 2021-12-29 15:06:33 +01:00
bd909b0061 fix details and corrections 2021-12-29 14:57:18 +01:00
9e67d9586d masonry: add origin bloc 2021-12-29 12:32:19 +01:00
982dd78828 put back warnings inside condition 2021-12-29 12:15:21 +01:00
1055fd9398 masonry: raise comment bloc width 2021-12-29 12:13:39 +01:00
5089bba4d7 improve masonry bloc style 2021-12-29 12:11:20 +01:00
Pol Dellaiera
6a0ce72836 tests: Remove @expectException annotation. 2021-12-21 16:22:31 +01:00
Pol Dellaiera
f93b1935ee ci: Update PHPUnit behavior. 2021-12-21 16:14:27 +01:00
Pol Dellaiera
64ec3e62da ci: Update PHPUnit behavior. 2021-12-21 15:52:47 +01:00
Pol Dellaiera
492d5caaf0 fix: Fix return types in tests. 2021-12-21 15:39:09 +01:00
Pol Dellaiera
2ed3a91d8e fix: Fix return types in tests. 2021-12-21 15:32:58 +01:00
Pol Dellaiera
b55c19cd9e fix: Fix return types in tests. 2021-12-21 15:26:22 +01:00
Pol Dellaiera
70ca203e23 fix: Fix return types in tests. 2021-12-21 15:19:36 +01:00
Pol Dellaiera
58a13d932f fix: Fix return types in tests. 2021-12-21 15:12:15 +01:00
Pol Dellaiera
11c6f6d84a Fix code-style. 2021-12-21 15:02:43 +01:00
Pol Dellaiera
3d0be940f0 fix: Fix return types in tests. 2021-12-21 15:02:12 +01:00
Pol Dellaiera
ea839a4b52 fix: Add missing UUID doctrine type. 2021-12-21 14:54:37 +01:00
793f7724a7 Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2021-12-21 14:44:50 +01:00
40e7bfef4d Merge branch 'design_corrections' 2021-12-21 14:44:23 +01:00
Pol Dellaiera
d692793714 fix: Add missing UUID doctrine type. 2021-12-21 14:31:31 +01:00
Pol Dellaiera
01ef9617d6 chore: Require symfony/serializer ^5.3 because we are using Serialization contexts. 2021-12-21 12:23:10 +01:00
Pol Dellaiera
530ad497bc cs: Fix code-style. 2021-12-21 12:13:20 +01:00
Pol Dellaiera
e2bc868495 sa: Update PSalm baseline. 2021-12-21 12:05:36 +01:00
Pol Dellaiera
b743475761 sa: Fix all issues related to PHP versions and static-analysis. 2021-12-21 11:58:58 +01:00
Pol Dellaiera
b3823161af fix: Do not use deprecated classes. 2021-12-21 11:18:17 +01:00
Pol Dellaiera
beeb69c70d chore: Update composer.json
Restrict to PHP 7.4.
Fix versions of packages using branches.
2021-12-21 11:15:19 +01:00
Pol Dellaiera
8401ce2656 cs: Fix code-style (using PHPCSFixer and PHPCS). 2021-12-21 10:59:23 +01:00
Pol Dellaiera
b7360955f7 chore: Relax dependencies for faster composer install. 2021-12-21 10:52:14 +01:00
Pol Dellaiera
8c3fb6dfa7 Merge branch 'feat/add-psalm-checks' 2021-12-21 10:15:34 +01:00
Pol Dellaiera
c84ba5371d test: Do not use PHP 8 keywords yet.
It's much too early ! :)
2021-12-21 10:06:18 +01:00
Pol Dellaiera
4d9c643977 test: Add psalm checks. 2021-12-21 09:59:20 +01:00
f117dcd703 objective-result-eval: display as a table in lists and dashboards 2021-12-20 15:46:07 +01:00
67c1760b51 fix bootstrap class 2021-12-20 13:53:49 +01:00
97792fd85f Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2021-12-20 12:58:35 +01:00
ae43e23ec6 Merge branch 'master' into issue321_layout_improvements_actionForm 2021-12-20 12:56:41 +01:00
6a4d7fbece AccompanyingCourseWorkEdit: fix bug, remove goal one by one
(adding a temporary negative index on just created goals)
2021-12-20 12:52:29 +01:00
1a0dcfa8d0 Merge branch 'issue265' 2021-12-17 16:20:15 +01:00
66f407ab8c filiation: fix 265 https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/265 2021-12-17 16:19:28 +01:00
c7e992fd1a rename title (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/177) 2021-12-17 11:51:44 +01:00
3d16f68f54 accompanyingcourse-work: improve ui 2021-12-17 08:16:39 +01:00
36890a2256 person document: fix use of deprecated role class 2021-12-17 00:33:02 +01:00
395920bd51 suggest-list: picto is managedby css 2021-12-17 00:22:20 +01:00
773aee5534 address reference: add index for refid 2021-12-16 22:41:37 +01:00
a6cc6221d6 restore badge-title appearance 2021-12-16 22:35:47 +01:00
37ed6b7591 revert some scss conflicts with suggest-list 2021-12-16 22:18:17 +01:00
cdc335372f person denormalization: use object to populate if any 2021-12-16 22:02:00 +01:00
e0bed186b8 normalization of date: allow null 2021-12-16 22:01:35 +01:00
d588c36308 Merge branch '327_pinned_comment' into issue321_layout_improvements_actionForm 2021-12-16 21:41:22 +01:00
06cbe8325c fix person validation 2021-12-16 21:39:59 +01:00
400ce3ac82 remove dead code 2021-12-16 21:28:53 +01:00
14aab637eb start to simplify validation groups for person 2021-12-16 21:23:40 +01:00
6296c7a307 household/address: show date validFrom and validTo when moving Household 2021-12-16 21:23:40 +01:00
b613a2f49b holder: fix when repositionning/moving member on same day
* if holder has not the index '0', validator fails. Use the method
Collection::first
* change constraint to allow a move on household on same day
2021-12-16 21:23:34 +01:00
91bee4aad3 wip goal-result on resume page 2021-12-16 18:55:21 +01:00
45b71b207e activity fix: display comment in list 2021-12-16 13:58:43 +01:00
751a418c1f Update changelog 2021-12-16 10:42:02 +01:00
8cf08f66d5 Fix bug in singleTaskController 2021-12-16 10:41:51 +01:00
b7c0548212 Fix style of dropdown menu 2021-12-16 10:41:36 +01:00
408a14926f Merge branch 'docgen/add-base-context' 2021-12-15 23:52:51 +01:00
efdd96b69f docgen: person normalization: fix typing of age 2021-12-15 23:51:41 +01:00
10ebf0b63a Merge branch 'docgen/add-base-context' into 'master'
Docgen/add base context

See merge request Chill-Projet/chill-bundles!270
2021-12-15 22:43:06 +00:00
d4a5735e15 Docgen/add base context 2021-12-15 22:43:06 +00:00
9453fc2dd5 docgen: add age and base context 2021-12-15 23:42:37 +01:00
f01b87b348 comments: form controller 2021-12-15 23:34:41 +01:00
689f612382 fix cs 2021-12-15 23:05:37 +01:00
17a81d7e66 build base context data 2021-12-15 23:05:25 +01:00
6501a0148e fix downloading document 2021-12-15 22:14:20 +01:00
44d38bcef5 fix typing for email 2021-12-15 22:14:20 +01:00
75dda5b999 userpicker: fix role type: adapt on both allowed types 2021-12-15 22:14:20 +01:00
46ecab24c2 update changelog 2021-12-15 22:14:20 +01:00
45c608cd48 AddPerson: optimize request while searching
* wait for a person to finish to type: delay before launching request;
* cancel previous requests, if any
2021-12-15 22:14:20 +01:00
ecbe30ae53 person create button style changed to full width + update changelog 2021-12-15 14:21:31 +01:00
4e8492db70 Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2021-12-15 00:15:24 +01:00
48f62a2a17 refund template design for person household_history 2021-12-15 00:14:31 +01:00
decc74c040 Merge branch 'issue332_location_activity' into 'master'
fix: add availableForUsers condition from locationType in the location API endpoint

See merge request Chill-Projet/chill-bundles!264
2021-12-14 22:28:09 +00:00
de790d11a8 activity/location: refactor
Refactor the way for loading locations:

* fix showing the default location
* fix when there is not thirdparty default location
* separate api queries instead of inlines;
* use the store instead of the mounted
* refactored for a possible re-use in calendar
2021-12-14 23:20:47 +01:00
3a9fac08c3 Merge remote-tracking branch 'origin/master' into issue332_location_activity 2021-12-14 19:55:16 +01:00
f4fe297765 Merge branch 'issue336_internal_create_action_fixes' into 'master'
Issue336 internal create action fixes

See merge request Chill-Projet/chill-bundles!268
2021-12-14 18:48:31 +00:00
264bd76461 Issue336 internal create action fixes 2021-12-14 18:48:31 +00:00
45bcb27b79 Merge branch 'master' into fixes/thirdparty 2021-12-14 18:42:25 +01:00
cf22a49487 Merge branch 'master' into 327_pinned_comment 2021-12-14 18:40:12 +01:00
e71e369f15 temporary disable comment page in menu 2021-12-14 18:39:22 +01:00
1a604ecf65 Merge branch 'master' into divers 2021-12-14 18:32:12 +01:00
da7bfa8a4e thirdparty: fix denormalization of thirdparty 2021-12-14 15:46:55 +01:00
d3127bed6d thirdparty: add address on kind = contact 2021-12-14 14:57:11 +01:00
3c1c07dc64 comments: edit links with anchor and parameter 2021-12-14 10:54:44 +01:00
530267a9b0 commments: add basic form in template 2021-12-14 10:31:51 +01:00
f9dd1c5231 fix cs 2021-12-13 22:57:50 +01:00
f2fd30b690 add ordering to social issue and social action 2021-12-13 22:48:54 +01:00
3d3cc9aeb4 fix import 2021-12-13 22:19:05 +01:00
8b2a8544b8 form type and controller, wip 2021-12-13 21:58:56 +01:00
be5f54c142 comments: build list 2021-12-13 21:49:03 +01:00
1fbe044729 update schema: an evaluation may be linked to multiple actions 2021-12-13 21:42:29 +01:00
60032c96f7 update changelog and cs-fixer 2021-12-13 19:43:07 +01:00
976f2fd41a fix thirdparty renderbox after merge 2021-12-13 19:37:19 +01:00
19741530bf Corrections after merge (double declares) 2021-12-13 19:24:21 +01:00
6e079fa771 Fix bug remove associated party in activity form 2021-12-13 19:24:03 +01:00
8c14232a91 Conflict resolved after rebase 2021-12-13 19:16:53 +01:00
a983b34f0d styling adjusted 2021-12-13 19:06:27 +01:00
4970cf000e behavior and style changed for adding motifs,obectifs, dispositifs 2021-12-13 19:06:27 +01:00
1422ddeb2a restyling and deleting of console.logs 2021-12-13 19:06:27 +01:00
9afc8c64ad stylefix 2021-12-13 19:06:27 +01:00
200f1749f1 patchOnTheFly action added to store, bug in posting thirdparty though 2021-12-13 19:06:27 +01:00
4645ede7d1 social issue added to title 2021-12-13 19:06:27 +01:00
6016038813 add modal to confirm delete action + delete button changed 2021-12-13 19:06:06 +01:00
d40b0e88ed change of masquer message, removal double import 2021-12-13 19:06:06 +01:00
f26863487b fix badge mixin 2021-12-13 19:06:06 +01:00
5b531a0529 improve docgen wip 2021-12-13 19:04:37 +01:00
a25123ee38 add docgen:normalization for relation 2021-12-13 19:03:42 +01:00
2524229941 docgen normalization for relation 2021-12-13 19:03:22 +01:00
119a9981af Using thirdparty renderbox to display intervening thirdparties 2021-12-13 19:02:26 +01:00
decc18596b minor adjustment to allow for action title banner with correct colors 2021-12-13 19:01:36 +01:00
eea72c9bcd fix after rebase 2021-12-13 19:01:36 +01:00
717b71ff54 first commit 2021-12-13 19:01:36 +01:00
64015479b1 improve docgen, trnslations, admin 2021-12-13 19:01:36 +01:00
18fa4eb586 fix tests (wip) 2021-12-13 19:00:13 +01:00
47574f82aa fix code style 2021-12-13 19:00:13 +01:00
12309ca1b5 fix tests (wip) 2021-12-13 18:59:43 +01:00
20c95a179d first commit 2021-12-13 18:58:17 +01:00
d5290e4bdd create comments page, with menu entry, route and template 2021-12-13 17:25:39 +01:00
f4396459a0 comments: add isPinned() method 2021-12-13 16:42:41 +01:00
f8071d32c0 batch replace/rename initialComment by pinnedComment 2021-12-13 16:31:16 +01:00
3973cdd3f6 update changelog [ci-skip] 2021-12-13 16:19:32 +01:00
4dc490beb7 change public function to protected function 2021-12-13 14:57:36 +00:00
52a137ee77 thirdparty: no need to burst the code: complete commit 1efdade38 2021-12-13 15:46:02 +01:00
985d8f0eae thirdparty form: clean builder, and test if this kind input address 2021-12-13 15:33:43 +01:00
nobohan
f0a8aa6c90 upd CHANGELOG 2021-12-13 15:06:35 +01:00
13a1ab380e fix import social work metadata: use child social issue if any 2021-12-13 15:03:30 +01:00
041655d26e update changelog [ci-skip] 2021-12-13 15:03:30 +01:00
6e412117d3 Merge branch 'issue324_civility_order' into 'master'
main: add order field to civility

See merge request Chill-Projet/chill-bundles!265
2021-12-13 14:00:55 +00:00
nobohan
bbebaa9fae household member editor: comment markNoAddress button 2021-12-13 14:58:01 +01:00
5526790d42 diaplay initialComment on course resume page 2021-12-13 14:49:16 +01:00
cc849e279d fix column name 2021-12-13 14:38:33 +01:00
nobohan
159dba0dc3 household member editor: do not add in new members if the member is included in the members of household 2021-12-13 14:36:08 +01:00
550b4775bf behavior and style changed for adding motifs,obectifs, dispositifs 2021-12-13 14:32:59 +01:00
nobohan
f2c724726a household member editor: fix show other household warning + wording 2021-12-13 14:16:01 +01:00
de262bbc28 civility::order: replace int by a float 2021-12-13 14:12:48 +01:00
133e4858dc household_member_editor: fix translation for onthefly and address modal, fix button appearance 2021-12-13 13:54:29 +01:00
2bafdd9e62 Merge branch 'fix/236-update-social-work-metadata-importer' into 'master'
Update Social Work Metadata importer

Closes champs-libres/departement-de-la-vendee/chill#236

See merge request Chill-Projet/chill-bundles!190
2021-12-13 12:49:03 +00:00
d01eaa8065 various fixes 2021-12-13 13:48:20 +01:00
b3ee745479 fix vue translation 2021-12-13 12:44:47 +01:00
nobohan
4a465b8f78 upd CHANGELOG 2021-12-13 12:39:09 +01:00
nobohan
eaf7ae6f2f php cs fixer 2021-12-13 12:38:18 +01:00
nobohan
b5178c3be3 main: add order field to civility 2021-12-13 12:35:17 +01:00
nobohan
13faf6fe5a household member editor: display when a concerned person already belongs to a household 2021-12-13 12:19:23 +01:00
nobohan
da12aedb53 household: redirect to the household page when a household is created from a person 2021-12-13 11:19:29 +01:00
nobohan
af87b3f6da household: add onthefly translations 2021-12-13 11:19:29 +01:00
nobohan
872090e02a household: change translations + add address i18n in household component 2021-12-13 11:19:29 +01:00
nobohan
4b432c64b0 php cs fixer 2021-12-13 11:07:30 +01:00
nobohan
8493a64794 upd CHANGELOG 2021-12-13 11:05:46 +01:00
nobohan
82c027fe2a add the current location of the user as API point + add it in the activity location list 2021-12-13 11:04:10 +01:00
fdae6c106a Merge remote-tracking branch 'origin/master' into fix/236-update-social-work-metadata-importer 2021-12-13 11:01:19 +01:00
1fff9ef535 stylefix 2021-12-13 10:10:05 +01:00
20c4d07668 fix of aside activity category creation 2021-12-13 10:05:51 +01:00
7f2e3ee8e2 fix filiation error with gender undefined (#331) 2021-12-13 09:45:46 +01:00
7129b3149b undo partial wip resolution 2021-12-13 09:45:05 +01:00
nobohan
1e99ca2ca5 fix: add availableForUsers condition from locationType in the location API endpoint 2021-12-13 09:41:27 +01:00
cc42a4ae51 Merge branch 'divers' of gitlab.com:Chill-Projet/chill-bundles into divers 2021-12-13 09:33:37 +01:00
6c28ff00ab onthefly create thirdparty: use badge-entity for radio buttons label 2021-12-13 09:30:34 +01:00
d7db8400d2 accompanyingCourse list: display badges as clickable onthefly modal 2021-12-13 09:30:34 +01:00
16b3be322a actions list: display badges as clickable onthefly modal 2021-12-13 09:30:34 +01:00
6e1340be27 Merge branch 'master' into 292_activity_acl 2021-12-13 09:21:32 +01:00
118b208f68 Merge branch 'master' into 292_activity_acl 2021-12-13 09:13:43 +01:00
e21f12d96c Merge remote-tracking branch 'origin/master' 2021-12-12 21:05:35 +01:00
4b213dc290 remove dump [ci-skip] 2021-12-12 21:05:12 +01:00
55991a6082 Merge branch 'issue309_format_address' into 'master'
main: change address format for France, in Address render box and normalizer

See merge request Chill-Projet/chill-bundles!259
2021-12-12 15:05:54 +00:00
juminet
898f25c0e4 main: change address format for France, in Address render box and normalizer 2021-12-12 15:05:54 +00:00
b3929321b6 Merge branch 'badge_by_entity_type' into 'master'
Badge-thirdparty

See merge request Chill-Projet/chill-bundles!258
2021-12-12 14:51:43 +00:00
c049a0b78b Badge-thirdparty 2021-12-12 14:51:42 +00:00
10aa897899 Merge branch 'docgen/improve-normalizer' into 'master'
Docgen/improve normalizer

See merge request Chill-Projet/chill-bundles!257
2021-12-12 14:43:05 +00:00
31f5d97912 Docgen/improve normalizer 2021-12-12 14:43:05 +00:00
c6cda437c4 Merge branch 'issue324_person' into 'master'
fix some person issues

See merge request Chill-Projet/chill-bundles!254
2021-12-12 14:39:59 +00:00
juminet
7e045e964a fix some person issues 2021-12-12 14:39:59 +00:00
133ac67794 Merge branch 'issue320_bug_redirect_createPeriod' into 'master'
Issue320 bug redirect create period

See merge request Chill-Projet/chill-bundles!249
2021-12-12 14:12:44 +00:00
8fb4efc16e Issue320 bug redirect create period 2021-12-12 14:12:44 +00:00
1823a1b031 Merge branch 'issue318_internal_addIssue_fromAction' into 'master'
Adding an unrelated to issue to an accompanyingCourseWork

See merge request Chill-Projet/chill-bundles!246
2021-12-12 13:55:23 +00:00
683d055088 Adding an unrelated to issue to an accompanyingCourseWork 2021-12-12 13:55:22 +00:00
839fb4a211 Squashed commit of the following:
commit 977863c2dd56d5c835f2a710cad7f7d3ba42da68
Merge: 5c37b419d 3eb7ffed1
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Sun Dec 12 14:45:21 2021 +0100

    Merge remote-tracking branch 'origin/master' into docgen/improve-normalizer

commit 5c37b419ddf0b32b9950c33042396bba1860da84
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Sun Dec 12 14:37:05 2021 +0100

    fix normalization for user and type in null value

commit 4469d46cdb19051fedec86bbb84e2351e6fcb72e
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Sun Dec 12 13:24:23 2021 +0100

    add civility to person

commit 6cf92fbbde8f4d9f2f4763ec4ee88216257040f7
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Sun Dec 12 13:19:36 2021 +0100

    fix person normalization: add a isNull on not null person

commit ed6087ff8fd47b80ea5e9526756fe5d032d478e3
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Sun Dec 12 13:08:46 2021 +0100

    fix stan and cs issues

commit 8429c334c33b3545835cbde034fccaa529c134a7
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Sun Dec 12 13:08:36 2021 +0100

    fix id type

commit 39ae00d172a9f29320a97abb8518b2ea48d89d9b
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Sun Dec 12 12:52:41 2021 +0100

    fix test and fix null or not-null value have same keys

commit 312fcc44c07affa7aa60f6c5fce58f9d1c564cc3
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Sat Dec 11 03:27:30 2021 +0100

    improve normalization wip

commit f91a29635827005fc58617dc1c9d210091372be5
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Sat Dec 11 01:15:32 2021 +0100

    improve normalization

commit 56060e5e6a2191ef441039fdc91a01fb4653a553
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Sat Dec 11 00:41:09 2021 +0100

    handle changelog with translatable string

commit 9004686a13
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Fri Dec 10 01:10:55 2021 +0100

    improve docgen wip

commit e266fa0e5d
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Thu Dec 9 21:50:56 2021 +0100

    show errors from relatorio driver

commit 75ba56fa09
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Thu Dec 9 21:14:12 2021 +0100

    add verification tool for admin

commit 12d6829b98
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Thu Dec 9 14:17:42 2021 +0100

    fix type with phonenumber helper

commit 7b5e96771f
Merge: 8a9024de1 8a4748dc2
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Thu Dec 9 14:11:14 2021 +0100

    Merge remote-tracking branch 'origin/master' into docgen/improve-normalizer

commit 8a9024de13
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Thu Dec 9 13:51:36 2021 +0100

    add docgen:normalization for relation

commit 24a404964b
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Thu Dec 9 12:44:41 2021 +0100

    docgen normalization for relation

commit 5d24bd4d11
Merge: 70ab23214 455b225f4
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 21:08:30 2021 +0100

    Merge branch 'master' into docgen/improve-normalizer

commit 70ab232149
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 13:58:49 2021 +0100

    improve docgen, trnslations, admin

commit 027c01fc58
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 12:23:24 2021 +0100

    fix css block

commit fdc5127c74
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 11:57:16 2021 +0100

    fix some error in test (wip)

commit b8d48f04ae
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 11:47:50 2021 +0100

    fix tests (wip)

commit f1b1771d6b
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 11:35:00 2021 +0100

    fix tests (wip)

commit 62dabbe1e7
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 11:14:46 2021 +0100

    fix code style

commit 4101392190
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 11:13:49 2021 +0100

    fix tests and type hinting

commit 3f1bed0b1c
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 11:05:41 2021 +0100

    fix tests (wip)

commit 79fbdcdee4
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 11:05:29 2021 +0100

    type hint User class

commit 3d8d79323e
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 10:56:30 2021 +0100

    remove error messages

commit 32178e22fe
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 10:51:30 2021 +0100

    fix tests (wip)

commit 60a8c20896
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 10:29:54 2021 +0100

    update app

commit 9d8011da61
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 10:06:35 2021 +0100

    fix loading origin

commit 789eeadb40
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 09:52:51 2021 +0100

    fix loading fixtures for doc generator template

commit f206fdb08c
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 09:52:35 2021 +0100

    fix code style

commit 9d5409d8d9
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 09:52:06 2021 +0100

    fix casting

commit e297d82533
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date:   Wed Dec 8 09:26:13 2021 +0100

    fixes on tests [WIP]
2021-12-12 14:46:37 +01:00
329026e36c restyling and deleting of console.logs 2021-12-10 17:47:16 +01:00
19a53ada88 stylefix 2021-12-10 17:24:38 +01:00
4c31100dc7 patchOnTheFly action added to store, bug in posting thirdparty though 2021-12-10 17:14:18 +01:00
536a1a46da social issue added to title 2021-12-10 17:01:06 +01:00
5ed7572f95 bugfix 2021-12-10 17:00:19 +01:00
f1067661d4 add modal to confirm delete action + delete button changed 2021-12-10 17:00:04 +01:00
3592434623 onthefly create thirdparty: use badge-entity for radio buttons label 2021-12-10 15:37:12 +01:00
94ec165c4c accompanyingCourse list: display badges as clickable onthefly modal 2021-12-10 14:30:16 +01:00
1c3c2be176 actions list: display badges as clickable onthefly modal 2021-12-10 14:10:23 +01:00
nobohan
3eb7ffed1a quick fix: use role as string in 2 functions arguments 2021-12-10 14:04:41 +01:00
d0c5d0423f update changelog 2021-12-10 12:58:07 +01:00
f2117ea1cd improve activity new/edit twig template 2021-12-10 12:51:18 +01:00
c7ee2cc600 add entity 'user' to pills badge-entity 2021-12-10 12:38:19 +01:00
57c4f2ee61 improve activity show twig template 2021-12-10 12:12:17 +01:00
95caa998e3 concernedGroups display badges as clickable onthefly modal 2021-12-10 12:09:50 +01:00
edaad844aa Merge branch 'docgen/improve-normalizer' into issue321_layout_improvements_actionForm 2021-12-10 11:47:30 +01:00
2edf36b6c5 change of masquer message, removal double import 2021-12-10 11:47:01 +01:00
95e45a8ad2 fix badge mixin 2021-12-10 10:46:47 +01:00
97165c8389 activity: set ACL (issue 292)
https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/292
2021-12-10 10:35:37 +01:00
1efdade382 thirdparty: no need to burst the code 2021-12-10 10:35:37 +01:00
cf219198ca update changelog 2021-12-10 10:32:50 +01:00
9004686a13 improve docgen wip 2021-12-10 01:10:55 +01:00
e266fa0e5d show errors from relatorio driver 2021-12-09 21:50:56 +01:00
75ba56fa09 add verification tool for admin 2021-12-09 21:14:12 +01:00
5a2e6c0969 AddPerson suggestions: all line make checkbox clickable 2021-12-09 17:18:06 +01:00
84f772b42b hop 2021-12-09 16:50:07 +01:00
62b8b3e6b7 add thirdparty comment in acccourse resources 2021-12-09 16:25:45 +01:00
5fdbba9ef5 thirdparty: improve render for children/parent dependencies in renderbox vue/twig 2021-12-09 16:17:04 +01:00
5b321dfb81 list-suggest: add classes to change list disposition 2021-12-09 14:34:34 +01:00
12d6829b98 fix type with phonenumber helper 2021-12-09 14:17:42 +01:00
7b5e96771f Merge remote-tracking branch 'origin/master' into docgen/improve-normalizer 2021-12-09 14:11:14 +01:00
8a9024de13 add docgen:normalization for relation 2021-12-09 13:51:36 +01:00
9387d37746 Resolve merge conflict 2021-12-09 13:49:22 +01:00
24a404964b docgen normalization for relation 2021-12-09 12:44:41 +01:00
534a8bb3af Using thirdparty renderbox to display intervening thirdparties 2021-12-09 12:35:52 +01:00
21e3da0266 minor adjustment to allow for action title banner with correct colors 2021-12-09 12:34:44 +01:00
85a1fcca18 fix after rebase 2021-12-09 11:49:37 +01:00
793f5116ab first commit 2021-12-09 11:39:15 +01:00
10f276e48c list-suggest add-items hover effect 2021-12-09 11:18:14 +01:00
8a4748dc2d position of toast changed to bottom-right 2021-12-09 10:38:04 +01:00
f5ae5443ab badge-entity: mask 'tiers' when displayLong (??) 2021-12-09 09:40:52 +01:00
5d24bd4d11 Merge branch 'master' into docgen/improve-normalizer 2021-12-08 21:08:30 +01:00
9272687ec4 adapt in twig thirdparty renderbox 2021-12-08 17:45:07 +01:00
6100176c9f try badgeEntity with displayLong option 2021-12-08 17:29:31 +01:00
56ab304af1 try badge with hover 2021-12-08 16:12:47 +01:00
70ab232149 improve docgen, trnslations, admin 2021-12-08 13:58:49 +01:00
027c01fc58 fix css block 2021-12-08 12:23:24 +01:00
b888211ef9 proposition for person/thirparty rounded-pill badge appearance 2021-12-08 12:19:03 +01:00
0617014e91 some small style improvements in thirdparty section 2021-12-08 12:19:03 +01:00
ce171ec747 household-members-editor: lightly improve ux (TO CHECK) 2021-12-08 12:19:02 +01:00
fdc5127c74 fix some error in test (wip) 2021-12-08 11:57:16 +01:00
455b225f49 Merge branch 'tests/fixes-2021-12-07' into 'master'
fixes on tests

See merge request Chill-Projet/chill-bundles!256
2021-12-08 10:56:39 +00:00
fa5001265f fixes on tests 2021-12-08 10:56:39 +00:00
b8d48f04ae fix tests (wip) 2021-12-08 11:47:50 +01:00
f1b1771d6b fix tests (wip) 2021-12-08 11:35:00 +01:00
62dabbe1e7 fix code style 2021-12-08 11:14:46 +01:00
4101392190 fix tests and type hinting 2021-12-08 11:13:49 +01:00
3f1bed0b1c fix tests (wip) 2021-12-08 11:05:41 +01:00
79fbdcdee4 type hint User class 2021-12-08 11:05:29 +01:00
3d8d79323e remove error messages 2021-12-08 10:56:30 +01:00
32178e22fe fix tests (wip) 2021-12-08 10:51:30 +01:00
60a8c20896 update app 2021-12-08 10:29:54 +01:00
9d8011da61 fix loading origin 2021-12-08 10:06:35 +01:00
789eeadb40 fix loading fixtures for doc generator template 2021-12-08 09:52:51 +01:00
f206fdb08c fix code style 2021-12-08 09:52:35 +01:00
9d5409d8d9 fix casting 2021-12-08 09:52:06 +01:00
e297d82533 fixes on tests [WIP] 2021-12-08 09:26:13 +01:00
56dd825f39 Merge remote-tracking branch 'origin/master' 2021-12-07 18:23:13 +01:00
4e4add3cc1 check for ancestors when validating the presence of accompanying
period's social issues
2021-12-07 18:17:22 +01:00
b684bdfa3b Merge branch 'issue279_accompanying_period_validation' into 'master'
accompanying period validation - on social issues suppression

See merge request Chill-Projet/chill-bundles!250
2021-12-07 17:16:14 +00:00
juminet
b683630136 accompanying period validation - on social issues suppression 2021-12-07 17:16:13 +00:00
e6c60e66fc fix validator for taking ancestors into account 2021-12-07 18:05:05 +01:00
b1b9acc686 Merge branch 'bugfix/activity-fix-location-visibility' into issue279_accompanying_period_validation 2021-12-07 17:57:02 +01:00
f6408af543 Merge branch 'master' into issue279_accompanying_period_validation 2021-12-07 17:55:00 +01:00
5b4388eae6 update changelog [ci-skip] 2021-12-07 16:42:34 +01:00
41ecb2351e Merge branch 'master' into bugfix/activity-fix-location-visibility 2021-12-07 16:41:59 +01:00
6cc0f1f98b update changelog [ci-skip] 2021-12-07 16:41:35 +01:00
aa68ae0b25 [ActivityType] remove placeLabel/visible, replace by
locationLabel/visible
2021-12-07 16:38:43 +01:00
ebd817f61e fix cs 2021-12-06 17:27:57 +01:00
25147704ad fix uppercase in person form with strict types 2021-12-06 17:24:58 +01:00
2788149db4 fix error when using twilio format 2021-12-06 17:24:35 +01:00
fabe32371f fix menu doc generator 2021-12-06 17:19:22 +01:00
b120e47786 add translations 2021-12-06 16:17:30 +01:00
5a61f05faa Merge remote-tracking branch 'origin/master' into features/docgen-widget-generate-template 2021-12-06 15:46:19 +01:00
7c2a283437 Merge branch 'page_accourse_lists' into 'master'
Cohérence graphique des listes d'activités et d'actions dans le contexte d'un parcours

See merge request Chill-Projet/chill-bundles!251
2021-12-06 14:45:44 +00:00
2d1e8b2acd Cohérence graphique des listes d'activités et d'actions dans le contexte d'un parcours 2021-12-06 14:45:44 +00:00
afb7d4a160 try to fix [wip] 2021-12-06 15:37:20 +01:00
96e5e4a7b2 Merge remote-tracking branch 'origin/master' into issue279_accompanying_period_validation 2021-12-06 15:08:56 +01:00
8e6e92ae89 Merge branch 'issue128_remove_titulaire_field' into 'master'
titulaire field removed from household edit form

See merge request Chill-Projet/chill-bundles!248
2021-12-06 14:07:21 +00:00
07f53e6758 titulaire field removed from household edit form 2021-12-06 14:07:21 +00:00
d2c61a26ea Merge branch '306_visgraph_corrections' into 'master'
306 fix visgraph issues

See merge request Chill-Projet/chill-bundles!245
2021-12-06 14:01:51 +00:00
bbc5e94033 306 fix visgraph issues 2021-12-06 14:01:50 +00:00
8e8a8c1e70 Merge branch 'issue280_actionToCourse' into 'master'
Eventlistener to create accompanyingPeriodWork

See merge request Chill-Projet/chill-bundles!244
2021-12-06 13:57:10 +00:00
f10d762e59 Eventlistener to create accompanyingPeriodWork 2021-12-06 13:57:10 +00:00
9924c3a3b7 Merge branch 'issue305_internal_fixbug_posting_dates' into 'master'
Fix bug posting birth- and deathdate

See merge request Chill-Projet/chill-bundles!243
2021-12-06 13:04:19 +00:00
cea7160d5a Fix bug posting birth- and deathdate 2021-12-06 13:04:19 +00:00
5669f62fdc Merge branch 'issue316-addresses-search-by-postal-code' into 'master'
Issue316 addresses search by postal code

See merge request Chill-Projet/chill-bundles!239
2021-12-06 12:56:57 +00:00
938720be52 Issue316 addresses search by postal code 2021-12-06 12:56:57 +00:00
c4998f4ac1 normalization for docgen:read: add groups and so on (wip) 2021-12-06 13:18:59 +01:00
nobohan
15c7c6ccde fix code syntax using php stan 2021-12-06 10:06:55 +01:00
nobohan
3c3d63e286 upd CHANGELOG 2021-12-06 10:04:25 +01:00
nobohan
74682549c8 person: fix accompanying period validation 2021-12-06 10:00:40 +01:00
51fd81c661 code style 2021-12-04 01:14:37 +01:00
063ceb2c53 various improvements 2021-12-04 01:13:55 +01:00
6c1a946608 generate context for evaluations 2021-12-03 23:31:19 +01:00
29134f0f11 continue context for evaluations 2021-12-03 20:24:31 +01:00
2d319fcc42 adapting vuejs form for accompanyingPeriodWork: include template for
specific evaluation
2021-12-03 20:09:31 +01:00
32a7734d30 first commit 2021-12-03 18:58:57 +01:00
nobohan
2e4356c3c9 person: add custom class validator for accompanying period 2021-12-03 18:10:52 +01:00
51bbcab878 Merge branch 'cherry-pick-a86ba6fa' into 'master'
fix code style

See merge request Chill-Projet/chill-bundles!253
2021-12-03 15:57:57 +00:00
5645cb0cdd Merge branch 'cherry-pick-43702ded' into 'master'
fix pagination problems

See merge request Chill-Projet/chill-bundles!252
2021-12-03 15:57:36 +00:00
02c93389d8 fix code style
(cherry picked from commit a86ba6faf5)
2021-12-03 14:20:01 +00:00
a86ba6faf5 fix code style 2021-12-03 15:18:45 +01:00
e1d4868f51 Merge remote-tracking branch 'origin/master' into features/docgen-widget-generate-template 2021-12-03 15:17:50 +01:00
9244bb2f8d fix pagination problems
(cherry picked from commit 43702ded77)
2021-12-03 14:10:07 +00:00
43702ded77 fix pagination problems 2021-12-03 15:06:06 +01:00
nobohan
611f0a9ca6 activity: fix type hinting in activity form - fix 2021-12-03 14:38:55 +01:00
nobohan
d2704ad7e6 activity: fix type hinting in activity form 2021-12-03 14:34:21 +01:00
ff751b7f30 remove validation about UserCircleConsistency 2021-12-03 13:25:39 +00:00
23eff9f6d4 add basic context for AccompanyingPeriodWorkEvalution WIP 2021-12-03 13:50:35 +01:00
e053529afb add docgen context for AccompanyingPeriodWork 2021-12-03 12:21:36 +01:00
nobohan
8affeb08d9 person: add altnames in the onthefly component 2021-12-03 12:10:02 +01:00
nobohan
047083812e person: add altNames in person form: v-model option but not working 2021-12-03 11:27:18 +01:00
be626079d0 move logic of context to different interfaces 2021-12-02 18:18:11 +01:00
af6efdd0ba generate document with relatorio: config and driver 2021-12-02 18:02:19 +01:00
2245f83631 generate document with relatorio: config and driver 2021-12-02 17:00:09 +01:00
nobohan
49da5fe060 person: fix altname denormalisation 2021-12-02 12:00:57 +01:00
nobohan
bcdddcde9b person: new person modal: add email field + re-order fields 2021-12-02 10:59:59 +01:00
nobohan
64d3edfc42 person: [technical debt]: hardcode altname array 2021-12-02 10:59:59 +01:00
nobohan
912f9bacdb person: document altname api endpoint in swagger 2021-12-02 10:59:59 +01:00
nobohan
55e94fbe2a person: retrieve altname config with ConfigPersonAltNamesHelper 2021-12-02 10:59:59 +01:00
nobohan
c5acfc9bbc person: deserialise altnames (WIP) 2021-12-02 10:59:59 +01:00
nobohan
780b7db8cb person: add altnames in the person creation modal 2021-12-02 10:59:59 +01:00
nobohan
d71d1beb42 person: remove api endpoint (was a mistake) 2021-12-02 10:59:59 +01:00
nobohan
3d3ce7814b person: add api endpoint for altname + implement getValidationGroups 2021-12-02 10:59:59 +01:00
nobohan
438cb7317a person: add api point for altname config 2021-12-02 10:59:59 +01:00
475b40e896 add form to doc generation and custom form to admin template configuration 2021-12-01 23:00:02 +01:00
7719d2b073 full generation for accompanying period 2021-12-01 15:43:34 +01:00
9d0e1a82e7 add deps to base64 2021-12-01 15:41:59 +01:00
9f43c99acc handle finding returnType on property type on parent classes 2021-12-01 15:39:44 +01:00
de4e83b3fb Generate a context for docgen, on accompanying period 2021-11-30 23:23:02 +01:00
3404d3669c create contextmanager and refactor docgeneratorTemplateType 2021-11-30 18:35:05 +01:00
0710d6572b Merge remote-tracking branch 'origin/docgenerator_oct_nov_21' into features/docgen-widget-generate-template 2021-11-30 18:31:33 +01:00
cf442461d6 Merge remote-tracking branch 'origin/master' into features/docgen-widget-generate-template 2021-11-30 16:38:36 +01:00
Pol Dellaiera
6e521642a4 fix: Typed property RedisConnectionFactory::$redis must not be accessed before initialization. 2021-11-30 15:22:32 +01:00
marcu
0e88d7c549 Using HttpClientInterface instead of file_get_contents 2021-11-30 14:53:50 +01:00
marcu
2993dab3f7 Debug using KernelInterface instead HttpKernelInterface 2021-11-30 14:53:50 +01:00
marcu
d026be3041 Create new layer + convert in good crs 2021-11-30 14:53:50 +01:00
marcu
59a0b692ac Fix load fixtures (LoadDocGeneratorTemplates) 2021-11-30 14:53:50 +01:00
marcu
9fa2e80d81 Debug : redeclaration of a varaible 2021-11-30 14:53:50 +01:00
Marc Ducobu
4e56075fdc Removing unused deps 2021-11-30 14:53:48 +01:00
Marc Ducobu
2b01179967 DocGeneratorTemplate use StoredObject for storign the template 2021-11-30 14:53:05 +01:00
Marc Ducobu
847e610362 Good values to point to a doc file 2021-11-30 14:53:05 +01:00
Marc Ducobu
a7af7e7874 php-decrypt data crypted using js 2021-11-30 14:53:01 +01:00
Marc Ducobu
1bf595334e Adding AccompanyingPeriodWorkEvaluation in the choices of DocGenerator config form (admin) 2021-11-30 14:51:43 +01:00
Marc Ducobu
a3333c3302 Fix LoadDocGeneratorTemplate (using docstore obj) 2021-11-30 14:51:43 +01:00
Marc Ducobu
7fe2172f05 DocGeneratorTemplate use StoredObject for storign the template 2021-11-30 14:51:43 +01:00
bbf6b1412f repair admin docgen WIP 2021-11-29 10:42:43 +01:00
9f868bff4f create module for generating document in twig pages 2021-11-28 21:24:18 +01:00
1c18ba20fc docgen: improve listing for templates 2021-11-27 01:23:34 +01:00
Pol Dellaiera
90b256daaf fix: Remove extra comma. 2021-11-03 10:14:10 +01:00
Pol Dellaiera
226c3eedef Update Social Work Metadata importer based on change request. 2021-11-02 13:27:51 +01:00
637 changed files with 14082 additions and 4581 deletions

View File

@@ -60,7 +60,7 @@ code_style:
- bin
- tests/app/vendor/
sa_tests:
phpstan_tests:
stage: Tests
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4
script:
@@ -71,6 +71,17 @@ sa_tests:
- bin
- tests/app/vendor/
psalm_tests:
stage: Tests
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4
script:
- bin/grumphp run --tasks=psalm
artifacts:
expire_in: 30 min
paths:
- bin
- tests/app/vendor/
unit_tests:
stage: Tests
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4
@@ -79,7 +90,7 @@ unit_tests:
- php -d memory_limit=2G tests/app/bin/console cache:clear --env=dev
- php -d memory_limit=3G tests/app/bin/console doctrine:fixtures:load -n
- php -d memory_limit=2G tests/app/bin/console cache:clear --env=test
- php -d memory_limit=3G bin/phpunit --colors=never
- php -d memory_limit=4G bin/phpunit --colors=never
artifacts:
expire_in: 30 min
paths:

View File

@@ -11,11 +11,87 @@ and this project adheres to
## Unreleased
<!-- write down unreleased development here -->
* [person search] fix bug when using birthdate after and birthdate before
* [person search] increase pertinence when lastname begins with search pattern
* [household] change translations (champs-libres/departement-de-la-vendee/accent-suivi-developpement#109)
* [household] add address i18n in household component (champs-libres/departement-de-la-vendee/accent-suivi-developpement#158)
* [household] add on the fly i18n in household component
* [household] redirect to the household page when a household is created from a person (champs-libres/departement-de-la-vendee/accent-suivi-developpement#175)
* [household] household member editor: display alert if some members have already an household (champs-libres/departement-de-la-vendee/accent-suivi-developpement#172)
* [household] household member editor: do not add in new members if the member is included in the members of household (champs-libres/departement-de-la-vendee/accent-suivi-developpement#123)
* [household] household member editor: remove markNoAddress button (champs-libres/departement-de-la-vendee/accent-suivi-developpement#109)
* [person]: ordering fields in add person (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/61)
* [person]: Add email and alt names in add person (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/61)
* AddAddress: optimize loading: wait for the user finish typing;
* UserPicker: fix bug with deprecated role
* docgen: add base context + tests
* docgen: add age for person
* [household menu] fix filiation order https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/265
* [AddAddress]: optimize loading: wait for the user finish typing;
* [UserPicker]: fix bug with deprecated role
* [docgen]: add base context + tests
* [docgen]: add age for person
* [task]: fix dropdown menu style + fix bug in singleTaskController (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/338)
* Household: fix bug when moving person on the same day (see https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/281)
* Household: show date validFrom and validTo when moving
* address reference: add index for refid
* [accompanyingCourse_work] fix styles conflicts + fix bug with remove goal (remove goals one at a time)
* [accompanyingCourse] improve masonry on resume page, add origin
## Test releases
### test release 2021-12-14
* [asideactivity] creation of aside activity category fixed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/262)
* [vendee/person] fix typo "situation professionelle" => "situation professionnelle"
* [main] add availableForUsers condition from locationType in the location API endpoint (champs-libres/departement-de-la-vendee/accent-suivi-developpement#248)
* [main] add the current location of the user as API point + add it in the activity location list (champs-libres/departement-de-la-vendee/accent-suivi-developpement#247)
* [activity] improve show/new/edit templates, fix SEE and SEE_DETAILS acl
* [badges] create specific badge for TMS, and make person/thirdparty badges clickable with on-the-fly modal in :
* concerned groups items (activity, calendar)
* accompanyingCourseWork lists
* accompanyingCourse lists
* [acompanyingCourse] add initial comment on Resume page
* [person] create button full width (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/330)
### test release 2021-12-11
* [main] add order field to civility
* [main] change address format in case the country is France, in Address render box and address normalizer
* [person] add validator for accompanying period with a test on social issues (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/76)
* [activity] fix visibility for location
* [origin] fix origin: use correctly the translatable strings
* /!\ everyone must update the origin table. As there is only one row, execute `update chill_person_accompanying_period_origin set label = jsonb_build_object('fr', 'appel téléphonique');`
* [person] redirect bug fixed.
* [action] add an unrelated issue within action creation.
* [origin] fix origin: use correctly the translatable strings
* /!\ everyone must update the origin table. As there is only one row, execute `update chill_person_accompanying_period_origin set label = jsonb_build_object('fr', 'appel téléphonique');`
* [main] change order of civilities in civility fixtures (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191)
* [person] set min attr in the minimum of children field (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191)
* [person] add marital status date in person view (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191)
* [person] show number of children + allow set number of children to null (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191)
* [person] show acceptSMS option (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191)
* [person] add death information in person render box in twig and vue render boxes (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191)
* [asideactivity] creation of aside activity category fixed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/262)
* [vendee/person] fix typo "situation professionelle" => "situation professionnelle"
* [accompanyingcourse_work] Changes in layout/behavior of edit form (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/321)
* [badge-entity] design coherency between pills badge-person and 3 kinds of badge-thirdparty
* [AddPersons] suggestions row are clickable, not only checkbox
### test release 2021-12-06
* [main] address: use search API end points for getting postal code and reference address (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/316)
* [main] address: in edit mode, select the encoded values in multiselect for address reference and city (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/316)
* [person search] fix bug when using birthdate after and birthdate before
* [person search] increase pertinence when lastname begins with search pattern
* [activity/actions] Améliore la cohérence du design entre
* la page résumé d'un parcours (liste d'actions récentes et liste d'activités récentes)
* la page liste des actions
* la page liste des activités (contexte personne / contexte parcours)
* [household] field to edit wheter person is titulaire of household or not removed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/322)
* [activity] create work if a work with same social action is not associated to the activity
* [visgraph] improve and fix bugs on vis-network relationship graph
* [bugfix] posting of birth- and deathdate through api fixed.
* [suggestions] improve suggestions lists
### Test release 2021-11-19 - bis
* [household] do not allow to create two addresses on the same date
@@ -23,6 +99,7 @@ and this project adheres to
* [activity] layout for issues / actions
* [activity][bugfix] in edit mode, the form will now load the social action list
### Test release 2021-11-29
* [person] suggest entities (person | thirdparty) when creating/editing the accompanying course (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/119)
@@ -50,6 +127,9 @@ and this project adheres to
* [activity] for a new activity: suggest and create on-the-fly locations based on the accompanying course location + location of the suggested parties
* [calendar] for a new rdv: suggest and create on-the-fly locations based on the accompanying course location + location of the suggested parties
## Test releases
### Test release 2021-11-22
* [activity] delete admin_user_show in twig template because this route is not defined and should be defined
@@ -164,7 +244,7 @@ and this project adheres to
* fast creation buttons
* add ordering for types
* [AccompanyingCourse Resume page] badge-title for AccompanyingCourseWork and for Activities;
* [AccompanyingCourse Resume page] dashboard for AccompanyingCourseWork and for Activities;
* Improve badges behaviour with small screens;
* [ThirdParty]:

View File

@@ -397,7 +397,6 @@ Créer une liste de suggestions à enlever (avec une croix rouge cliquable, l'an
<li>
<span>
item
<a></a>
</span>
</li>
</ul>
@@ -405,7 +404,8 @@ Créer une liste de suggestions à enlever (avec une croix rouge cliquable, l'an
Créer un titre enlevable (avec une croix rouge cliquable, l'ancre a est vide)
```html
<div class="item-title">
title
<a></a>
<span>title</span>
</div>
```
Les classes `cols` ou `inline` peuvent être ajoutées à côté de `list-suggest` pour modifier la disposition de la liste.
Dans le dernier exemple, on met une classe `removable` sur le span, si on veut pouvoir enlever l'élément.

View File

@@ -1,54 +1,53 @@
{
"name": "chill-project/chill-bundles",
"type": "library",
"description": "Most used bundles for chill-project",
"license": "AGPL-3.0-only",
"type": "library",
"keywords": [
"chill",
"social worker"
],
"license": "AGPL-3.0-only",
"require": {
"champs-libres/async-uploader-bundle": "dev-sf4",
"champs-libres/wopi-bundle": "dev-master",
"composer/package-versions-deprecated": "^1.10",
"php": "^7.4",
"champs-libres/async-uploader-bundle": "dev-sf4#d57134aee8e504a83c902ff0cf9f8d36ac418290",
"champs-libres/wopi-bundle": "dev-master#59b468503b9413f8d588ef9e626e7675560db3d8",
"champs-libres/wopi-lib": "dev-master#0e1da19bb6de820080b8651867a7e475be590060",
"doctrine/doctrine-bundle": "^2.1",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^2.7",
"erusev/parsedown": "^1.7",
"graylog2/gelf-php": "^1.5",
"knplabs/knp-menu": "^3.1",
"knplabs/knp-menu-bundle": "^3.0",
"knplabs/knp-time-bundle": "^1.12",
"league/csv": "^9.7.1",
"nyholm/psr7": "^1.4",
"ocramius/package-versions": "^1.10",
"phpoffice/phpspreadsheet": "^1.16",
"ramsey/uuid-doctrine": "^1.7",
"sensio/framework-extra-bundle": "^5.5",
"symfony/asset": "4.*",
"symfony/browser-kit": "^5.2",
"symfony/css-selector": "^5.2",
"symfony/expression-language": "4.*",
"symfony/form": "4.*",
"symfony/intl": "4.*",
"symfony/mime": "^4 || ^5",
"spomky-labs/base64url": "^2.0",
"symfony/asset": "^4.4",
"symfony/browser-kit": "^4.4",
"symfony/css-selector": "^4.4",
"symfony/expression-language": "^4.4",
"symfony/form": "^4.4",
"symfony/framework-bundle": "^4.4",
"symfony/intl": "^4.4",
"symfony/mime": "^4.4",
"symfony/monolog-bundle": "^3.5",
"symfony/security-bundle": "4.*",
"symfony/serializer": "^5.2",
"symfony/security-bundle": "^4.4",
"symfony/serializer": "^5.3",
"symfony/swiftmailer-bundle": "^3.5",
"symfony/templating": "4.*",
"symfony/translation": "4.*",
"symfony/templating": "^4.4",
"symfony/translation": "^4.4",
"symfony/twig-bundle": "^4.4",
"symfony/validator": "4.*",
"symfony/validator": "^4.4",
"symfony/webpack-encore-bundle": "^1.11",
"symfony/workflow": "4.*",
"symfony/yaml": "4.*",
"twig/extra-bundle": "^2.12 || ^3.0",
"symfony/workflow": "^4.4",
"symfony/yaml": "^4.4",
"twig/extra-bundle": "^3.0",
"twig/intl-extra": "^3.0",
"twig/markdown-extra": "^3.3",
"twig/twig": "^2.12 || ^3.0"
},
"conflict": {
"symfony/symfony": "*"
"twig/markdown-extra": "^3.3"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3",
@@ -56,18 +55,17 @@
"fakerphp/faker": "^1.13",
"nelmio/alice": "^3.8",
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": "^7.0",
"phpunit/phpunit": ">= 7.5",
"symfony/debug-bundle": "^5.1",
"symfony/dotenv": "^5.1",
"symfony/dotenv": "^4.4",
"symfony/maker-bundle": "^1.20",
"symfony/phpunit-bridge": "^5.2",
"symfony/stopwatch": "^5.1",
"symfony/var-dumper": "4.*",
"symfony/web-profiler-bundle": "^5.0"
"symfony/phpunit-bridge": "^4.4",
"symfony/stopwatch": "^4.4",
"symfony/var-dumper": "^4.4",
"symfony/web-profiler-bundle": "^4.4"
},
"config": {
"bin-dir": "bin",
"vendor-dir": "tests/app/vendor"
"conflict": {
"symfony/symfony": "*"
},
"autoload": {
"psr-4": {
@@ -94,8 +92,19 @@
"Chill\\DocGeneratorBundle\\Tests\\": "src/Bundle/ChillDocGeneratorBundle/tests"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"phpstan/extension-installer": true,
"ergebnis/composer-normalize": true,
"phpro/grumphp": true,
"ocramius/package-versions": true
},
"bin-dir": "bin",
"optimize-autoloader": true,
"sort-packages": true,
"vendor-dir": "tests/app/vendor"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",

View File

@@ -91,7 +91,9 @@ class CountPerson implements ExportInterface
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
// we gather all center the user choose.
$centers = array_map(static function ($el) { return $el['center']; }, $acl);
$centers = array_map(static function ($el) {
return $el['center'];
}, $acl);
$qb = $this->entityManager->createQueryBuilder();

View File

@@ -11,53 +11,53 @@ declare(strict_types=1);
namespace Chill\MainBundle\DependencyInjection;
use Chill\MainBundle\DependencyInjection\Widget\AddWidgetConfigurationTrait;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Chill\MainBundle\DependencyInjection\Widget\AddWidgetConfigurationTrait;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* Configure the main bundle.
*/
class ChillMainConfiguration implements ConfigurationInterface
{
use AddWidgetConfigurationTrait;
/**
* Configure the main bundle.
*/
class ChillMainConfiguration implements ConfigurationInterface
{
use AddWidgetConfigurationTrait;
/**
* @var ContainerBuilder
*/
private $containerBuilder;
/**
* @var ContainerBuilder
*/
private $containerBuilder;
public function __construct(
array $widgetFactories,
ContainerBuilder $containerBuilder
) {
// we register here widget factories (see below)
$this->setWidgetFactories($widgetFactories);
// we will need the container builder later...
$this->containerBuilder = $containerBuilder;
}
public function __construct(
array $widgetFactories,
ContainerBuilder $containerBuilder
) {
// we register here widget factories (see below)
$this->setWidgetFactories($widgetFactories);
// we will need the container builder later...
$this->containerBuilder = $containerBuilder;
}
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('chill_main');
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('chill_main');
$rootNode
->children()
$rootNode
->children()
// ...
->arrayNode('widgets')
->canBeDisabled()
->children()
// we declare here all configuration for homepage place
->append($this->addWidgetsConfiguration('homepage', $this->containerBuilder))
->end() // end of widgets/children
->end() // end of widgets
->end() // end of root/children
->end() // end of root
// ...
->arrayNode('widgets')
->canBeDisabled()
->children()
// we declare here all configuration for homepage place
->append($this->addWidgetsConfiguration('homepage', $this->containerBuilder))
->end() // end of widgets/children
->end() // end of widgets
->end() // end of root/children
->end() // end of root
;
return $treeBuilder;
}
}
return $treeBuilder;
}
}

View File

@@ -12,3 +12,28 @@ parameters:
tasks.phpcsfixer.allow_risky: true
tasks.phpcsfixer.diff: true
tasks.phpstan.level: 1
tasks.phpstan.blocking: true
tasks.phpstan.ignore_patterns:
- "/.github/"
- "/.idea/"
- "/build/"
- "/benchmarks/"
- "/docs/"
- "/node_modules/"
- "/resource/"
- "/spec/"
- "/var/"
- "/vendor/"
# Psalm
tasks.psalm.blocking: true
tasks.psalm.ignore_patterns:
- "/.github/"
- "/.idea/"
- "/build/"
- "/benchmarks/"
- "/node_modules/"
- "/resource/"
- "/spec/"
- "/var/"
- "/vendor/"

View File

@@ -10,16 +10,6 @@ parameters:
count: 1
path: src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php
-
message: "#^Instantiated class PhpOffice\\\\PhpWord\\\\TemplateProcessor not found\\.$#"
count: 1
path: src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorController.php
-
message: "#^Instantiated class PhpOffice\\\\PhpWord\\\\TemplateProcessor not found\\.$#"
count: 1
path: src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php
-
message: "#^Variable \\$participation might not be defined\\.$#"
count: 3

View File

@@ -417,15 +417,6 @@ parameters:
count: 1
path: src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
-
message:
"""
#^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\:
since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$#
"""
count: 3
path: src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
-
message:
"""
@@ -435,15 +426,6 @@ parameters:
count: 1
path: src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
-
message:
"""
#^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\:
since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$#
"""
count: 1
path: src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php
-
message:
"""
@@ -525,24 +507,6 @@ parameters:
count: 1
path: src/Bundle/ChillEventBundle/Search/EventSearch.php
-
message:
"""
#^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\:
since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$#
"""
count: 2
path: src/Bundle/ChillEventBundle/Search/EventSearch.php
-
message:
"""
#^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\:
since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$#
"""
count: 1
path: src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php
-
message:
"""
@@ -895,11 +859,6 @@ parameters:
count: 1
path: src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php
-
message: "#^Call to deprecated method setTimeout\\(\\) of class Redis\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverLocker.php
-
message:
"""
@@ -1311,16 +1270,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php
-
message:
"""
#^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\:
since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php
-
message:
"""

View File

@@ -2,10 +2,11 @@
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
xsi:noNamespaceSchemaLocation="tests/app/vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/app/tests/bootstrap.php"
stopOnFailure="true"
>
<php>
<ini name="error_reporting" value="-1" />

2006
psalm-baseline.xml Normal file

File diff suppressed because it is too large Load Diff

16
psalm.xml Normal file
View File

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<psalm
errorLevel="7"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config tests/app/vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="./tests/" />
</ignoreFiles>
</projectFiles>
</psalm>

View File

@@ -39,6 +39,7 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Serializer\SerializerInterface;
use function array_key_exists;
final class ActivityController extends AbstractController
@@ -307,8 +308,10 @@ final class ActivityController extends AbstractController
$activityData = $request->query->get('activityData');
}
if (!$activityType instanceof \Chill\ActivityBundle\Entity\ActivityType
|| !$activityType->isActive()) {
if (
!$activityType instanceof \Chill\ActivityBundle\Entity\ActivityType
|| !$activityType->isActive()
) {
$params = $this->buildParamsToUrl($person, $accompanyingPeriod);
if (null !== $activityData) {

View File

@@ -14,7 +14,6 @@ namespace Chill\ActivityBundle\Controller;
use Chill\ActivityBundle\Entity\ActivityReasonCategory;
use Chill\ActivityBundle\Form\ActivityReasonCategoryType;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request;

View File

@@ -14,7 +14,6 @@ namespace Chill\ActivityBundle\Controller;
use Chill\ActivityBundle\Entity\ActivityReason;
use Chill\ActivityBundle\Form\ActivityReasonType;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request;

View File

@@ -19,6 +19,7 @@ use Chill\MainBundle\Entity\RoleScope;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Persistence\ObjectManager;
use function in_array;
/**

View File

@@ -41,6 +41,7 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
$loader->load('services/form.yaml');
$loader->load('services/templating.yaml');
$loader->load('services/accompanyingPeriodConsistency.yaml');
$loader->load('services/doctrine.entitylistener.yaml');
}
public function prepend(ContainerBuilder $container)

View File

@@ -13,6 +13,7 @@ namespace Chill\ActivityBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use function is_int;
/**

View File

@@ -47,7 +47,8 @@ use Symfony\Component\Serializer\Annotation\SerializedName;
* })
* @ActivityValidator\ActivityValidity
*
* @UserCircleConsistency(
* TODO see if necessary
* UserCircleConsistency(
* "CHILL_ACTIVITY_SEE_DETAILS",
* getUserFunction="getUser",
* path="scope")

View File

@@ -163,16 +163,6 @@ class ActivityType
*/
private int $personVisible = self::FIELD_REQUIRED;
/**
* @ORM\Column(type="string", nullable=false, options={"default": ""})
*/
private string $placeLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
*/
private int $placeVisible = self::FIELD_OPTIONAL;
/**
* @ORM\Column(type="string", nullable=false, options={"default": ""})
*/
@@ -406,16 +396,6 @@ class ActivityType
return $this->personVisible;
}
public function getPlaceLabel(): string
{
return $this->placeLabel;
}
public function getPlaceVisible(): int
{
return $this->placeVisible;
}
public function getReasonsLabel(): string
{
return $this->reasonsLabel;
@@ -688,20 +668,6 @@ class ActivityType
return $this;
}
public function setPlaceLabel(string $placeLabel): self
{
$this->placeLabel = $placeLabel;
return $this;
}
public function setPlaceVisible(int $placeVisible): self
{
$this->placeVisible = $placeVisible;
return $this;
}
public function setReasonsLabel(string $reasonsLabel): self
{
$this->reasonsLabel = $reasonsLabel;

View File

@@ -0,0 +1,77 @@
<?php
/**
* 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.
*/
declare(strict_types=1);
namespace Chill\ActivityBundle\EntityListener;
use Chill\ActivityBundle\Entity\Activity;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkRepository;
use DateTimeImmutable;
use Doctrine\ORM\EntityManagerInterface;
use function in_array;
class ActivityEntityListener
{
private EntityManagerInterface $em;
private AccompanyingPeriodWorkRepository $workRepository;
public function __construct(EntityManagerInterface $em, AccompanyingPeriodWorkRepository $workRepository)
{
$this->em = $em;
$this->workRepository = $workRepository;
}
public function persistActionToCourse(Activity $activity)
{
if ($activity->getAccompanyingPeriod() instanceof AccompanyingPeriod) {
$period = $activity->getAccompanyingPeriod();
$accompanyingCourseWorks = $this->workRepository->findByAccompanyingPeriod($period);
$periodActions = [];
$now = new DateTimeImmutable();
foreach ($accompanyingCourseWorks as $key => $work) {
// take only the actions which are still opened
if ($work->getEndDate() === null || $work->getEndDate() > ($activity->getDate() ?? $now)) {
$periodActions[$key] = spl_object_hash($work->getSocialAction());
}
}
$associatedPersons = $activity->getPersonsAssociated();
$associatedThirdparties = $activity->getThirdParties();
foreach ($activity->getSocialActions() as $action) {
if (in_array(spl_object_hash($action), $periodActions, true)) {
continue;
}
$newAction = new AccompanyingPeriodWork();
$newAction->setSocialAction($action);
$period->addWork($newAction);
$date = DateTimeImmutable::createFromMutable($activity->getDate());
$newAction->setStartDate($date);
foreach ($associatedPersons as $person) {
$newAction->addPerson($person);
}
foreach ($associatedThirdparties as $thirdparty) {
$newAction->setHandlingThierparty($thirdparty);
}
$this->em->persist($newAction);
$this->em->flush();
}
}
}
}

View File

@@ -25,6 +25,7 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use function array_key_exists;
use function count;

View File

@@ -27,6 +27,7 @@ use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Constraints\Callback;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use function array_key_exists;
use function count;
use function in_array;
@@ -189,7 +190,9 @@ class ListActivity implements ListInterface
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static function ($el) { return $el['center']; }, $acl);
$centers = array_map(static function ($el) {
return $el['center'];
}, $acl);
// throw an error if any fields are present
if (!array_key_exists('fields', $data)) {

View File

@@ -25,6 +25,7 @@ use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use function array_key_exists;
use function count;

View File

@@ -24,6 +24,7 @@ use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use function count;
class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInterface

View File

@@ -31,6 +31,7 @@ use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use function count;
class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInterface, FilterInterface

View File

@@ -48,6 +48,7 @@ use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use function in_array;
class ActivityType extends AbstractType
@@ -260,6 +261,10 @@ class ActivityType extends AbstractType
return implode(',', $personIds);
},
function (?string $personsAsString): array {
if (null === $personsAsString) {
return [];
}
return array_map(
fn (string $id): ?Person => $this->om->getRepository(Person::class)->findOneBy(['id' => (int) $id]),
explode(',', $personsAsString)
@@ -282,6 +287,10 @@ class ActivityType extends AbstractType
return implode(',', $thirdpartyIds);
},
function (?string $thirdpartyAsString): array {
if (null === $thirdpartyAsString) {
return [];
}
return array_map(
fn (string $id): ?ThirdParty => $this->om->getRepository(ThirdParty::class)->findOneBy(['id' => (int) $id]),
explode(',', $thirdpartyAsString)
@@ -315,6 +324,10 @@ class ActivityType extends AbstractType
return implode(',', $userIds);
},
function (?string $usersAsString): array {
if (null === $usersAsString) {
return [];
}
return array_map(
fn (string $id): ?User => $this->om->getRepository(User::class)->findOneBy(['id' => (int) $id]),
explode(',', $usersAsString)
@@ -332,7 +345,7 @@ class ActivityType extends AbstractType
return '';
}
return $location->getId();
return (string) $location->getId();
},
function (?string $id): ?Location {
return $this->om->getRepository(Location::class)->findOneBy(['id' => (int) $id]);
@@ -379,7 +392,7 @@ class ActivityType extends AbstractType
$timezoneUTC = new DateTimeZone('GMT');
/** @var DateTime $data */
$data = $formEvent->getData() === null ?
DateTime::createFromFormat('U', 300) :
DateTime::createFromFormat('U', '300') :
$formEvent->getData();
$seconds = $data->getTimezone()->getOffset($data);
$data->setTimeZone($timezoneUTC);

View File

@@ -55,7 +55,7 @@ class ActivityTypeType extends AbstractType
]);
$fields = [
'persons', 'user', 'date', 'place', 'persons',
'persons', 'user', 'date', 'location', 'persons',
'thirdParties', 'durationTime', 'travelTime', 'attendee',
'reasons', 'comment', 'sentReceived', 'documents',
'emergency', 'socialIssues', 'socialActions', 'users',

View File

@@ -36,8 +36,10 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
{
$period = $parameters['accompanyingCourse'];
if (AccompanyingPeriod::STEP_DRAFT !== $period->getStep()
&& $this->security->isGranted(ActivityVoter::SEE, $period)) {
if (
AccompanyingPeriod::STEP_DRAFT !== $period->getStep()
&& $this->security->isGranted(ActivityVoter::SEE, $period)
) {
$menu->addChild($this->translator->trans('Activity'), [
'route' => 'chill_activity_activity_list',
'routeParameters' => [

View File

@@ -14,6 +14,7 @@ namespace Chill\ActivityBundle\Menu;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Security;
use function in_array;
final class AdminMenuBuilder implements LocalMenuBuilderInterface

View File

@@ -22,6 +22,7 @@ use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Security\Core\Security;
use function count;
use function in_array;
@@ -167,7 +168,9 @@ final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInte
$reachableScopes = $this->authorizationHelper->getReachableScopes($this->tokenStorage->getToken()->getUser(), $role, $center);
// we get the ids for those scopes
$reachablesScopesId = array_map(
static function (Scope $scope) { return $scope->getId(); },
static function (Scope $scope) {
return $scope->getId();
},
$reachableScopes
);

View File

@@ -31,6 +31,8 @@ class ActivityRepository extends ServiceEntityRepository
}
/**
* @deprecated use @see{ActivityACLAwareRepositoryInterface::findByAccompanyingPeriod}
*
* @return Activity[]
*/
public function findByAccompanyingPeriod(AccompanyingPeriod $period, array $scopes, ?bool $allowNullScope = false, ?int $limit = 100, ?int $offset = 0, array $orderBy = ['date' => 'desc']): array

View File

@@ -24,14 +24,16 @@ div.new-activity-select-type {
}
//// ACTIVITY LIST PAGE
// precise badge-title specific details
// precise dashboard specific details
p.date-label {
display: inline-block;
margin: 0 0.5em 0 0;
font-weight: 700;
font-size: 18pt;
}
div.dashboard,
h2.badge-title {
div.duration {
font-size: smaller;
padding-left: 1em;
margin-top: 1em;
}
ul.list-content {
font-size: 70%;
list-style-type: none;
@@ -39,16 +41,13 @@ h2.badge-title {
margin: 0;
li {
margin-bottom: 0.2em;
// exception: change bg color for action badges above badge-title
// exception: change bg color for action badges above dashboard
.bg-light {
background-color: $chill-light-gray !important;
}
}
}
}
div.main {
padding: 1em;
}
//// ACTIVITY SHOW AND FORM PAGES
// Exceptions for flex-bloc in concerned-groups

View File

@@ -17,6 +17,14 @@ const getLocations = () => fetchResults('/api/1.0/main/location.json');
const getLocationTypes = () => fetchResults('/api/1.0/main/location-type.json');
const getUserCurrentLocation =
() => fetch('/api/1.0/main/user-current-location.json')
.then(response => {
if (response.ok) { return response.json(); }
throw Error('Error with request resource response');
});
/*
* Load Location Type by defaultFor
* @param {string} entity - can be "person" or "thirdparty"
@@ -48,5 +56,6 @@ export {
getLocations,
getLocationTypes,
getLocationTypeByDefaultFor,
postLocation
postLocation,
getUserCurrentLocation
};

View File

@@ -11,7 +11,7 @@
</persons-bloc>
</div>
<div v-if="getContext === 'accompanyingCourse' && suggestedEntities.length > 0">
<ul class="list-suggest add-items">
<ul class="list-suggest add-items inline">
<li v-for="p in suggestedEntities" @click="addSuggestedEntity(p)">
<span>{{ p.text }}</span>
</li>

View File

@@ -1,8 +1,7 @@
<template>
<li>
<span :title="person.text">
<span class="chill_denomination">{{ textCutted }}</span>
<a @click.prevent="$emit('remove', person)"></a>
<span class="chill_denomination" @click.prevent="$emit('remove', person)">{{ textCutted }}</span>
</span>
</li>
</template>

View File

@@ -15,7 +15,7 @@
:searchable="true"
:placeholder="$t('activity.choose_location')"
:custom-label="customLabel"
:options="locations"
:options="availableLocations"
group-values="locations"
group-label="locationGroup"
v-model="location"
@@ -32,7 +32,7 @@
import { mapState, mapGetters } from "vuex";
import VueMultiselect from "vue-multiselect";
import NewLocation from "./Location/NewLocation.vue";
import { getLocations, getLocationTypeByDefaultFor } from "../api.js";
import { getLocations, getLocationTypeByDefaultFor, getUserCurrentLocation } from "../api.js";
export default {
name: "Location",
@@ -40,13 +40,8 @@ export default {
NewLocation,
VueMultiselect,
},
data() {
return {
locations: [],
};
},
computed: {
...mapState(["activity"]),
...mapState(["activity", "availableLocations"]),
...mapGetters(["suggestedEntities"]),
location: {
get() {
@@ -57,53 +52,6 @@ export default {
},
},
},
mounted() {
getLocations().then(
(results) => {
getLocationTypeByDefaultFor('person').then(
(personLocationType) => {
if (personLocationType) {
const personLocation = this.makeAccompanyingPeriodLocation(personLocationType);
const concernedPersonsLocation =
this.makeConcernedPersonsLocation(personLocationType);
getLocationTypeByDefaultFor('thirdparty').then(
thirdpartyLocationType => {
const concernedThirdPartiesLocation =
this.makeConcernedThirdPartiesLocation(thirdpartyLocationType);
this.locations = [
{
locationGroup: 'Localisation du parcours',
locations: [personLocation]
},
{
locationGroup: 'Parties concernées',
locations: [...concernedPersonsLocation, ...concernedThirdPartiesLocation]
},
{
locationGroup: 'Autres localisations',
locations: results
}
];
}
)
} else {
this.locations = [
{
locationGroup: 'Localisations',
locations: response.results
}
];
}
if (window.default_location_id) {
let location = this.locations.filter(
(l) => l.id === window.default_location_id
);
this.$store.dispatch("updateLocation", location);
}
}
)
})
},
methods: {
labelAccompanyingCourseLocation(value) {
return `${value.address.text} (${value.locationType.title.fr})`
@@ -117,58 +65,6 @@ export default {
: value.locationType.title.fr
: '';
},
makeConcernedPersonsLocation(locationType) {
let locations = [];
this.suggestedEntities.forEach(
(e) => {
if (e.type === 'person' && e.current_household_address !== null){
locations.push({
type: 'location',
id: -this.suggestedEntities.indexOf(e)*10,
onthefly: true,
name: e.text,
address: {
id: e.current_household_address.address_id,
},
locationType: locationType
});
}
}
)
return locations;
},
makeConcernedThirdPartiesLocation(locationType) {
let locations = [];
this.suggestedEntities.forEach(
(e) => {
if (e.type === 'thirdparty' && e.address !== null){
locations.push({
type: 'location',
id: -this.suggestedEntities.indexOf(e)*10,
onthefly: true,
name: e.text,
address: { id: e.address.address_id },
locationType: locationType
});
}
}
)
return locations;
},
makeAccompanyingPeriodLocation(locationType) {
const accPeriodLocation = this.activity.accompanyingPeriod.location;
return {
type: 'location',
id: -1,
onthefly: true,
name: '__AccompanyingCourseLocation__',
address: {
id: accPeriodLocation.address_id,
text: `${accPeriodLocation.text} - ${accPeriodLocation.postcode.code} ${accPeriodLocation.postcode.name}`
},
locationType: locationType
}
}
},
};
</script>

View File

@@ -1,22 +1,23 @@
import 'es6-promise/auto';
import { createStore } from 'vuex';
import { postLocation } from './api';
import prepareLocations from './store.locations.js';
const debug = process.env.NODE_ENV !== 'production';
//console.log('window.activity', window.activity);
const addIdToValue = (string, id) => {
let array = string ? string.split(',') : [];
array.push(id.toString());
let str = array.join();
return str;
let array = string ? string.split(',') : [];
array.push(id.toString());
let str = array.join();
return str;
};
const removeIdFromValue = (string, id) => {
let array = string.split(',');
array = array.filter(el => el !== id.toString());
let str = array.join();
return str;
let array = string.split(',');
array = array.filter(el => el !== id.toString());
let str = array.join();
return str;
};
const store = createStore({
@@ -25,6 +26,7 @@ const store = createStore({
activity: window.activity,
socialIssuesOther: [],
socialActionsList: [],
availableLocations: [],
},
getters: {
suggestedEntities(state) {
@@ -50,9 +52,9 @@ const store = createStore({
return state.activity.activityType.personsVisible === 0
? []
: state.activity.accompanyingPeriod.participations
.filter((p) => p.endDate === null)
.map((p) => p.person)
.filter((p) => !existingPersonIds.includes(p.id));
.filter((p) => p.endDate === null)
.map((p) => p.person)
.filter((p) => !existingPersonIds.includes(p.id));
},
suggestedRequestor(state) {
if (state.activity.accompanyingPeriod.requestor === null) {
@@ -78,8 +80,8 @@ const store = createStore({
return state.activity.activityType.usersVisible === 0
? []
: [state.activity.accompanyingPeriod.user].filter(
(u) => u !== null && !existingUserIds.includes(u.id)
);
(u) => u !== null && !existingUserIds.includes(u.id)
);
},
suggestedResources(state) {
const resources = state.activity.accompanyingPeriod.resources;
@@ -200,6 +202,9 @@ const store = createStore({
console.log("### mutation: updateLocation", value);
state.activity.location = value;
},
addAvailableLocationGroup(state, group) {
state.availableLocations.push(group);
}
},
actions: {
addIssueSelected({ commit }, issue) {
@@ -335,4 +340,6 @@ const store = createStore({
},
});
prepareLocations(store);
export default store;

View File

@@ -0,0 +1,123 @@
import {getLocations, getLocationTypeByDefaultFor, getUserCurrentLocation} from "./api";
const makeConcernedPersonsLocation = (locationType, store) => {
let locations = [];
store.getters.suggestedEntities.forEach(
(e) => {
if (e.type === 'person' && e.current_household_address !== null){
locations.push({
type: 'location',
id: -store.getters.suggestedEntities.indexOf(e)*10,
onthefly: true,
name: e.text,
address: {
id: e.current_household_address.address_id,
},
locationType: locationType
});
}
}
)
return locations;
};
const makeConcernedThirdPartiesLocation = (locationType, store) => {
let locations = [];
store.getters.suggestedEntities.forEach(
(e) => {
if (e.type === 'thirdparty' && e.address !== null){
locations.push({
type: 'location',
id: -store.getters.suggestedEntities.indexOf(e)*10,
onthefly: true,
name: e.text,
address: { id: e.address.address_id },
locationType: locationType
});
}
}
)
return locations;
};
const makeAccompanyingPeriodLocation = (locationType, store) => {
const accPeriodLocation = store.state.activity.accompanyingPeriod.location;
return {
type: 'location',
id: -1,
onthefly: true,
name: '__AccompanyingCourseLocation__',
address: {
id: accPeriodLocation.address_id,
text: `${accPeriodLocation.text} - ${accPeriodLocation.postcode.code} ${accPeriodLocation.postcode.name}`
},
locationType: locationType
}
};
export default function prepareLocations(store) {
// find the locations
let allLocations = getLocations().then(
(results) => {
store.commit('addAvailableLocationGroup', {
locationGroup: 'Autres localisations',
locations: results
});
}
);
let currentLocation = getUserCurrentLocation().then(
userCurrentLocation => {
if (null !== userCurrentLocation) {
store.commit('addAvailableLocationGroup', {
locationGroup: 'Ma localisation',
locations: [userCurrentLocation]
});
}
}
);
let partiesLocations = [], partyPromise;
['person', 'thirdparty'].forEach(kind => {
partyPromise = getLocationTypeByDefaultFor(kind).then(
(kindLocationType) => {
if (kindLocationType) {
let concernedKindLocations;
if (kind === 'person') {
concernedKindLocations = makeConcernedPersonsLocation(kindLocationType, store);
// add location for the parcours into suggestions
const personLocation = makeAccompanyingPeriodLocation(kindLocationType, store);
store.commit('addAvailableLocationGroup', {
locationGroup: 'Localisation du parcours',
locations: [personLocation]
});
} else {
concernedKindLocations = makeConcernedThirdPartiesLocation(kindLocationType, store);
}
store.commit('addAvailableLocationGroup', {
locationGroup: kind === 'person' ? 'Usagers concernés' : 'Tiers concernés',
locations: concernedKindLocations,
});
}
}
);
partiesLocations.push(partyPromise);
});
// when all location are loaded
Promise.all([allLocations, currentLocation, ...partiesLocations]).then(() => {
console.log('current location in activity', store.state.activity.location);
console.log('default loation id', window.default_location_id);
if (window.default_location_id) {
for (let group of store.state.availableLocations) {
console.log(group);
let location = group.locations.find((l) => l.id === window.default_location_id);
console.log(location);
if (location !== undefined) {
store.dispatch('updateLocation', location);
break;
}
}
}
});
}

View File

@@ -18,7 +18,8 @@ use Symfony\Component\HttpFoundation\Request;
// This check prevents access to debug front controllers that are deployed by accident to production servers.
// Feel free to remove this, extend it, or make something more sophisticated.
if (isset($_SERVER['HTTP_CLIENT_IP'])
if (
isset($_SERVER['HTTP_CLIENT_IP'])
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|| !(in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1'], true) || \PHP_SAPI === 'cli-server')
) {

View File

@@ -1,110 +0,0 @@
<h2 class="badge-title">
<span class="title_label">
{% if activity.date %}
<h3>{{ activity.date|format_date('short') }}</h3>
{% endif %}
<div class="duration">
{% if activity.durationTime and t.durationTimeVisible %}
<p>
<abbr class="fa fa-fw fa-hourglass-end" title="{{ 'Duration Time'|trans }}"></abbr>
{{ activity.durationTime|date('H:i') }}
</p>
{% endif %}
{% if activity.travelTime and t.travelTimeVisible %}
<p>
<abbr class="fa fa-fw fa-car" title="{{ 'Travel time'|trans }}"></abbr>
{{ activity.travelTime|date('H:i') }}
</p>
{% endif %}
</div>
</span>
<span class="title_action">
{{ activity.type.name | localize_translatable_string }}
{% if activity.emergency %}
<span class="badge bg-danger rounded-pill fs-6">{{ 'Emergency'|trans|upper }}</span>
{% endif %}
<ul class="small_in_title mt-3">
{% if activity.sentReceived is not empty and t.sentReceivedVisible %}
<li>
<span class="item-key">{{ 'Sent received'|trans ~ ' : ' }}</span>
<b>{{ activity.sentReceived|capitalize|trans }}</b>
</li>
{% endif %}
{% if activity.location and t.locationVisible %}
<li>
<span class="item-key">{{ 'location'|trans ~ ': ' }}</span>
<b>
<span>{{ activity.location.locationType.title|localize_translatable_string }}</span>
{{ activity.location.name }}
</b>
</li>
{% endif %}
{% if activity.user and t.userVisible %}
<li>
<span class="item-key">{{ 'Referrer'|trans ~ ': ' }}</span>
<b>{{ activity.user.usernameCanonical }}</b>
</li>
{% endif %}
<li class="associated-persons">
<span class="item-key">{{ 'Participants'|trans ~ ' : ' }}</span>
{% for p in activity.personsAssociated %}
<span class="badge-person">{{ p|chill_entity_render_box }}</span>
{% endfor %}
</li>
</ul>
<ul class="list-content my-3">
{%- if t.reasonsVisible -%}
{%- if activity.reasons is not empty -%}
<li class="reasons">
{% for r in activity.reasons %}
{{ r|chill_entity_render_box }}
{% endfor %}
</li>
{%- endif -%}
{% endif %}
{%- if t.socialIssuesVisible %}
{%- if activity.socialIssues is not empty -%}
<li class="social-issues">
{% for r in activity.socialIssues %}
{{ r|chill_entity_render_box }}
{% endfor %}
</li>
{%- endif -%}
{% endif %}
{%- if t.socialActionsVisible -%}
{%- if activity.socialActions is not empty -%}
<li class="social-actions">
{% for r in activity.socialActions %}
{{ r|chill_entity_render_box }}
{% endfor %}
</li>
{%- endif -%}
{% endif %}
</ul>
</span>
</h2>
{% if context == 'person' and activity.accompanyingPeriod is not empty %}
<div class="mt-3">
<a class="btn btn-sm btn-outline-primary"
title="{{ 'Period number %number%'|trans({'%number%': activity.accompanyingPeriod.id}) }}"
href="{{ chill_path_add_return_path(
"chill_person_accompanying_course_index",
{ 'accompanying_period_id': activity.accompanyingPeriod.id }
) }}"><i class="fa fa-random"></i>
</a>
</div>
{% endif %}

View File

@@ -3,6 +3,14 @@
{{ path(pathname, parms) }}
{% endmacro %}
{% macro insert_onthefly(type, entity) %}
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: type, id: entity.id },
buttonText: entity|chill_entity_render_string
} %}
{% endmacro %}
{% macro computeWidth(nbBlocks) %}
{{ 'flex-basis: ' ~ (100 / nbBlocks)|round(1) ~ '%;' }}
{% endmacro %}
@@ -13,6 +21,7 @@
{% set blocks = blocks|merge([{
'title': 'Others persons'|trans,
'items': entity.persons,
'type': 'person',
'path' : 'chill_person_view',
'key' : 'person_id'
}]) %}
@@ -20,11 +29,13 @@
{% set blocks = blocks|merge([{
'title': 'Persons in accompanying course'|trans,
'items': entity.personsAssociated,
'type': 'person',
'path' : 'chill_person_view',
'key' : 'person_id'
},{
'title': 'Third persons'|trans,
'items': entity.personsNotAssociated,
'type': 'person',
'path' : 'chill_person_view',
'key' : 'person_id',
}]) %}
@@ -34,6 +45,7 @@
{% set blocks = blocks|merge([{
'title': 'Third parties'|trans,
'items': entity.thirdParties,
'type': 'thirdparty',
'path' : 'chill_crud_3party_3party_view',
'key' : 'id',
}]) %}
@@ -42,6 +54,7 @@
{% set blocks = blocks|merge([{
'title': 'Users concerned'|trans,
'items': entity.users,
'type': 'user',
'key' : 'id',
}]) %}
{% endif %}
@@ -59,22 +72,12 @@
<ul class="list-content">
{% for item in bloc.items %}
<li>
{% if bloc.path is defined %}
<a href="{{ _self.href(bloc.path, bloc.key, item.id) }}">
<span class="{% if (badge_person is defined and badge_person == true) %}badge-person{% else %}badge bg-primary{% endif %}">
{{ item|chill_entity_render_box({
'render': 'raw',
'addAltNames': false
}) }}
{% if bloc.type == 'user' %}
<span class="badge-user">
{{ item|chill_entity_render_box({'render': 'raw', 'addAltNames': false }) }}
</span>
</a>
{% else %}
<span class="{% if (badge_person is defined and badge_person == true) %}badge-person{% else %}badge bg-primary{% endif %}">
{{ item|chill_entity_render_box({
'render': 'raw',
'addAltNames': false
}) }}
</span>
{{ _self.insert_onthefly(bloc.type, item) }}
{% endif %}
</li>
{% endfor %}
@@ -96,20 +99,12 @@
<ul class="list-content">
{% for item in bloc.items %}
<li>
{% if bloc.path is defined %}
<a href="{{ _self.href(bloc.path, bloc.key, item.id) }}">
<span class="{% if (badge_person is defined and badge_person == true) %}badge-person{% else %}badge bg-primary{% endif %}">
{{ item|chill_entity_render_box({
'render': 'raw',
'addAltNames': false
}) }}
{% if bloc.type == 'user' %}
<span class="badge-user">
{{ item|chill_entity_render_box({'render': 'raw', 'addAltNames': false }) }}
</span>
</a>
{% else %}
{{ item|chill_entity_render_box({
'render': 'raw',
'addAltNames': false
}) }}
{{ _self.insert_onthefly(bloc.type, item) }}
{% endif %}
</li>
{% endfor %}
@@ -126,24 +121,18 @@
<div class="wl-row">
{% if bloc.items|length > 0 %}
<div class="wl-col title">
<h4>{{ bloc.title }}</h4>
<h3>{{ bloc.title }}</h3>
</div>
<div class="wl-col list">
{% for item in bloc.items %}
<span class="wl-item {% if (badge_person is defined and badge_person == true) %}badge-person{% else %}badge bg-primary{% endif %}">
{% if bloc.path is defined %}
<a href="{{ _self.href(bloc.path, bloc.key, item.id) }}">
{{ item|chill_entity_render_box({
'render': 'raw',
'addAltNames': false
}) }}
</a>
<span class="wl-item">
{% if bloc.type == 'user' %}
<span class="badge-user">
{{ item|chill_entity_render_box({'render': 'raw', 'addAltNames': false }) }}
</span>
{% else %}
{{ item|chill_entity_render_box({
'render': 'raw',
'addAltNames': false
}) }}
{{ _self.insert_onthefly(bloc.type, item) }}
{% endif %}
</span>

View File

@@ -1,5 +1,12 @@
<h1>{{ "Update activity"|trans }}</h1>
<h2 class="chill-green mb-4">{{ entity.type.name|localize_translatable_string }}</h2>
<h1>
{{ "Update activity"|trans }}
</h1>
<h2 class="badge-title mb-5">
<span class="title_label"></span>
<span class="title_action">
{{ entity.type.name | localize_translatable_string }}
</span>
</h2>
{{ form_start(edit_form) }}
{{ form_errors(edit_form) }}
@@ -37,7 +44,7 @@
{% endif %}
{%- if edit_form.persons is defined or edit_form.thirdParties is defined or edit_form.users is defined -%}
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
<h2 class="chill-blue">{{ 'Concerned groups'|trans }}</h2>
{%- if edit_form.persons is defined -%}
{{ form_widget(edit_form.persons) }}
@@ -53,7 +60,7 @@
{% endif %}
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2>
<h2 class="chill-blue">{{ 'Activity data'|trans }}</h2>
{%- if edit_form.date is defined -%}
{{ form_row(edit_form.date) }}
@@ -73,7 +80,6 @@
{% endif %}
{%- if edit_form.comment is defined -%}
{# TODO .. public and private #}
{{ form_row(edit_form.comment) }}
{% endif %}
@@ -97,16 +103,16 @@
{% set accompanying_course_id = accompanyingCourse.id %}
{% endif %}
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('chill_activity_activity_show', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id } ) }}" class="btn btn-cancel">
{{ 'Cancel'|trans }}
</a>
</li>
<li>
<button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button>
</li>
</ul>
{{ form_end(edit_form) }}
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('chill_activity_activity_show', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id } ) }}" class="btn btn-cancel">
{{ 'Cancel'|trans }}
</a>
</li>
<li>
<button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button>
</li>
</ul>
{{ form_end(edit_form) }}
{# {{ form(delete_form) }} #}

View File

@@ -10,49 +10,196 @@
{% for activity in activities %}
{% set t = activity.type %}
<div class="item-bloc">
<div class="item-row">
{% include '@ChillActivity/Activity/activity-badge-title.html.twig' %}
<div class="wrap-list">
<div class="wl-row">
<div class="wl-col title">
{% if activity.date %}
<p class="date-label">
{{ activity.date|format_date('short') }}
</p>
{% endif %}
</div>
<div class="wl-col list">
<h2 class="badge-title">
<span class="title_label"></span>
<span class="title_action">
{{ activity.type.name | localize_translatable_string }}
{% if activity.emergency %}
<span class="badge bg-danger rounded-pill fs-6 float-end">{{ 'Emergency'|trans|upper }}</span>
{% endif %}
</span>
</h2>
</div>
</div>
</div>
</div>
{% if activity.comment.comment is not empty
or activity.persons|length > 0
or activity.thirdParties|length > 0
or activity.users|length > 0
%}
<div class="main">
{% if activity.comment.comment is not empty %}
{{ activity.comment|chill_entity_render_box({
'disable_markdown': false,
'limit_lines': 3,
'metadata': false,
}) }}
{% endif %}
<div class="item-row column separator">
<div class="wrap-list">
{% if activity.location and t.locationVisible %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'location'|trans }}</h3></div>
<div class="wl-col list">
<p class="wl-item">
<span>{{ activity.location.locationType.title|localize_translatable_string }}</span>
{{ activity.location.name }}
</p>
</div>
</div>
{% endif %}
{% if activity.sentReceived is not empty and t.sentReceivedVisible %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Sent received'|trans }}</h3></div>
<div class="wl-col list">
<p class="wl-item">
{{ activity.sentReceived|capitalize|trans }}
</p>
</div>
</div>
{% endif %}
{% if activity.user and t.userVisible %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Referrer'|trans }}</h3></div>
<div class="wl-col list">
<p class="wl-item">
{{ activity.user.usernameCanonical|chill_entity_render_string|capitalize }}
</p>
</div>
</div>
{% endif %}
</div>
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {
'context': context,
'with_display': 'row',
'with_display': 'wrap-list',
'entity': activity,
'badge_person': true
} %}
<div class="wrap-list">
{%- if activity.reasons is not empty and t.reasonsVisible -%}
<div class="wl-row">
<div class="wl-col title">
<h3>{{ 'Reasons'|trans }}</h3>
</div>
<div class="wl-col list">
{% for r in activity.reasons %}
<p class="wl-item reasons">
{{ r|chill_entity_render_box }}
</p>
{% endfor %}
</div>
</div>
{% endif %}
{%- if activity.socialIssues is not empty and t.socialIssuesVisible -%}
<div class="wl-row">
<div class="wl-col title">
<h3>{{ 'Social issues'|trans }}</h3>
</div>
<div class="wl-col list">
{% for r in activity.socialIssues %}
<p class="wl-item social-issues">
{{ r|chill_entity_render_box }}
</p>
{% endfor %}
</div>
</div>
{% endif %}
{%- if activity.socialActions is not empty and t.socialActionsVisible -%}
<div class="wl-row">
<div class="wl-col title">
<h3>{{ 'Social actions'|trans }}</h3>
</div>
<div class="wl-col list">
{% for r in activity.socialActions %}
<p class="wl-item social-actions">
{{ r|chill_entity_render_box }}
</p>
{% endfor %}
</div>
</div>
{% endif %}
{% if activity.comment.comment is not empty and is_granted('CHILL_ACTIVITY_SEE_DETAILS', activity) %}
<div class="wl-row">
<div class="wl-col title">
<h3>{{ 'Comment'|trans }}</h3>
</div>
<div class="wl-col list">
{{ activity.comment|chill_entity_render_box({
'disable_markdown': false,
'limit_lines': 3,
'metadata': false
}) }}
</div>
</div>
{% endif %}
{# Only if ACL SEE_DETAILS AND/OR only on template SHOW ??
durationTime
travelTime
comment
documents
attendee
#}
</div>
</div>
{% endif %}
<div class="item-row separator">
<div class="updatedBy"></div>
<ul class="record_actions">
{% if context == 'person' and activity.accompanyingPeriod is not empty %}
{#
Disable person_id in following links, for redirect to accompanyingCourse context
#}
{% set person_id = null %}
{% set accompanying_course_id = activity.accompanyingPeriod.id %}
<li>
<a href="{{ chill_path_add_return_path('chill_activity_activity_list',{
'accompanying_period_id': accompanying_course_id
}) }}"
class="btn btn-primary"
title="{{ 'See activity in accompanying course context'|trans }}">
<i class="fa fa-random fa-fw"></i>
{{ 'Period number %number%'|trans({'%number%': accompanying_course_id}) }}
</a>
</li>
{% endif %}
<li>
<a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"
class="btn btn-sm btn-show "></a>
<a href="{{ path('chill_activity_activity_show', {'id': activity.id,
'person_id': person_id,
'accompanying_period_id': accompanying_course_id
}) }}"
class="btn btn-show"
title="{{ 'Show'|trans }}"></a>
</li>
{% if no_action is not defined or no_action == false %}
<li>
<a href="{{ path('chill_activity_activity_edit', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"
class="btn btn-sm btn-update "></a>
</li>
<li>
<a href="{{ path('chill_activity_activity_delete', { 'id': activity.id, 'person_id' : person_id, 'accompanying_period_id': accompanying_course_id } ) }}"
class="btn btn-sm btn-delete "></a>
</li>
{% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
<li>
<a href="{{ path('chill_activity_activity_edit', {'id': activity.id,
'person_id': person_id,
'accompanying_period_id': accompanying_course_id
}) }}"
class="btn btn-update"
title="{{ 'Edit'|trans }}"></a>
</li>
{% endif %}
{% if is_granted('CHILL_ACTIVITY_DELETE', activity) %}
<li>
<a href="{{ path('chill_activity_activity_delete', {'id': activity.id,
'person_id': person_id,
'accompanying_period_id': accompanying_course_id
}) }}"
class="btn btn-delete"
title="{{ 'Delete'|trans }}"></a>
</li>
{% endif %}
{% endif %}
</ul>
</div>

View File

@@ -23,8 +23,8 @@
{% if is_granted('CHILL_ACTIVITY_CREATE', accompanyingCourse) %}
<ul class="record_actions sticky-form-buttons">
<li>
<a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}" class="btn btn-create">
{{ 'Create'|trans }}
<a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}"
class="btn btn-create">{{ 'Create'|trans }}
</a>
</li>
</ul>

View File

@@ -3,10 +3,88 @@
{% set t = activity.type %}
<a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"
class="badge-link" title="{{ 'Show the activity'|trans }}">
class="dashboard-link" title="{{ 'Show the activity'|trans }}">
{% include '@ChillActivity/Activity/activity-badge-title.html.twig' %}
<div class="dashboard">
<span class="title_label"></span>
<span class="title_action">
{%- if activity.date -%}
<p class="date-label">{{ activity.date|format_date('short') }}</p>
{%- endif -%}
<span class="like-h3">{{ activity.type.name | localize_translatable_string }}</span>
{% if activity.emergency %}
<span class="badge bg-danger rounded-pill fs-6">{{ 'Emergency'|trans|upper }}</span>
{% endif %}
<ul class="small_in_title mt-3">
{% if activity.sentReceived is not empty and t.sentReceivedVisible %}
<li>
<span class="item-key">{{ 'Sent received'|trans ~ ' : ' }}</span>
<b>{{ activity.sentReceived|capitalize|trans }}</b>
</li>
{% endif %}
{% if activity.location and t.locationVisible %}
<li>
<span class="item-key">{{ 'location'|trans ~ ': ' }}</span>
<b>
<span>{{ activity.location.locationType.title|localize_translatable_string }}</span>
{{ activity.location.name }}
</b>
</li>
{% endif %}
{% if activity.user and t.userVisible %}
<li>
<span class="item-key">{{ 'Referrer'|trans ~ ': ' }}</span>
<b>{{ activity.user.usernameCanonical }}</b>
</li>
{% endif %}
<li class="associated-persons">
<span class="item-key">{{ 'Participants'|trans ~ ' : ' }}</span>
{% for p in activity.personsAssociated %}
<span class="badge-person">{{ p|chill_entity_render_box }}</span>
{% endfor %}
</li>
</ul>
<ul class="list-content my-3">
{%- if t.reasonsVisible -%}
{%- if activity.reasons is not empty -%}
<li class="reasons">
{% for r in activity.reasons %}
{{ r|chill_entity_render_box }}
{% endfor %}
</li>
{%- endif -%}
{% endif %}
{%- if t.socialIssuesVisible %}
{%- if activity.socialIssues is not empty -%}
<li class="social-issues">
{% for r in activity.socialIssues %}
{{ r|chill_entity_render_box }}
{% endfor %}
</li>
{%- endif -%}
{% endif %}
{%- if t.socialActionsVisible -%}
{%- if activity.socialActions is not empty -%}
<li class="social-actions">
{% for r in activity.socialActions %}
{{ r|chill_entity_render_box }}
{% endfor %}
</li>
{%- endif -%}
{% endif %}
</ul>
</span>
</div>
</a>
{% endfor %}
</div>

View File

@@ -1,10 +1,16 @@
<h1>{{ "Activity creation"|trans ~ ' :' }}</h1>
<h2 class="chill-green mb-4">{{ entity.type.name|localize_translatable_string }}</h2>
<h1>
{{ "Activity creation"|trans }}
</h1>
<h2 class="badge-title mb-5">
<span class="title_label"></span>
<span class="title_action">
{{ entity.type.name | localize_translatable_string }}
</span>
</h2>
{{ form_start(form) }}
{{ form_errors(form) }}
{%- if form.emergency is defined -%}
{{ form_row(form.emergency) }}
{% endif %}
@@ -39,7 +45,7 @@
{%- if form.persons is defined or form.thirdParties is defined or form.users is defined -%}
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
<h2 class="chill-blue">{{ 'Concerned groups'|trans }}</h2>
{%- if form.persons is defined -%}
{{ form_widget(form.persons) }}
@@ -55,7 +61,7 @@
{% endif %}
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2>
<h2 class="chill-blue">{{ 'Activity data'|trans }}</h2>
{%- if form.date is defined -%}
{{ form_row(form.date) }}
@@ -103,7 +109,7 @@
</a>
</li>
<li>
<button class="btn btn-create" type="submit">
<button class="btn btn-save" type="submit">
{{ 'Create'|trans }}
</button>
</li>

View File

@@ -1,128 +1,185 @@
{%- set t = entity.type -%}
{%- import "@ChillDocStore/Macro/macro.html.twig" as m -%}
<h1>
{{ "Activity"|trans }}
{%- if t.emergencyVisible and entity.emergency -%}
<span class="badge bg-secondary">
{{- 'Emergency'|trans -}}
</span>
{%- endif -%}
</h1>
<h1>{{ "Activity"|trans }}</h1>
<dl class="chill_view_data">
<div class="flex-table">
<div class="item-bloc">
<dt class="inline">{{ 'by'|trans|capitalize }}</dt>
<dd>{{ entity.user }}</dd>
<div class="item-row">
<div class="wrap-list">
<div class="wl-row">
<div class="wl-col title">
{% if entity.date %}
<p class="date-label">
{{ entity.date|format_date('short') }}
</p>
{% endif %}
</div>
<div class="wl-col list">
<h2 class="badge-title">
<span class="title_label"></span>
<span class="title_action">
{{ entity.type.name | localize_translatable_string }}
{% if entity.emergency %}
<span class="badge bg-danger rounded-pill fs-6 float-end">{{ 'Emergency'|trans|upper }}</span>
{% endif %}
</span>
</h2>
</div>
</div>
</div>
</div>
<dt class="inline">{{ 'Type'|trans }}</dt>
<dd>{{ entity.type.name | localize_translatable_string }}</dd>
<div class="item-row separator">
<dl class="chill_view_data">
<dt class="inline">{{ 'Referrer'|trans|capitalize }}</dt>
<dd>{{ entity.user }}</dd>
{%- if entity.scope -%}
<dt class="inline">{{ 'Scope'|trans }}</dt>
<dd><span class="scope">{{ entity.scope.name|localize_translatable_string }}</span></dd>
{% endif %}
{%- if entity.scope -%}
<dt class="inline">{{ 'Scope'|trans }}</dt>
<dd>
<span class="scope">{{ entity.scope.name|localize_translatable_string }}</span>
</dd>
{% endif %}
{% if t.socialIssuesVisible %}
<dt class="inline">{{ 'Social issues'|trans }}</dt>
<dd>
{% if entity.socialIssues|length == 0 %}
<p class="chill-no-data-statement">{{ 'No social issues associated'|trans }}</p>
{% else %}
{% for si in entity.socialIssues %}{{ si|chill_entity_render_box }}{% endfor %}
{% endif %}
</dd>
{% endif %}
{% if t.socialIssuesVisible %}
<dt class="inline">{{ 'Social issues'|trans }}</dt>
<dd>
{% if entity.socialIssues|length == 0 %}
<p class="chill-no-data-statement">{{ 'No social issues associated'|trans }}</p>
{% else %}
{% for si in entity.socialIssues %}{{ si|chill_entity_render_box }}{% endfor %}
{% endif %}
</dd>
{% endif %}
{% if t.socialActionsVisible %}
<dt class="inline">{{ 'Social actions'|trans }}</dt>
<dd>
{% if entity.socialActions|length == 0 %}
<p class="chill-no-data-statement">{{ 'No social actions associated'|trans }}</p>
{% else %}
{% for sa in entity.socialActions %}{{ sa|chill_entity_render_box }}{% endfor %}
{% endif %}
</dd>
{% endif %}
{% if t.socialActionsVisible %}
<dt class="inline">{{ 'Social actions'|trans }}</dt>
<dd>
{% if entity.socialActions|length == 0 %}
<span class="chill-no-data-statement">{{ 'No social actions associated'|trans }}</span>
{% else %}
{% for sa in entity.socialActions %}{{ sa|chill_entity_render_box }}{% endfor %}
{% endif %}
</dd>
{% endif %}
{% if t.reasonsVisible %}
<dt class="inline">{{ 'Reasons'|trans }}</dt>
{%- if entity.reasons is empty -%}
<dd><span class="chill-no-data-statement">{{ 'No reason associated'|trans }}</span></dd>
{%- else -%}
<dd>{% for r in entity.reasons %}{{ r|chill_entity_render_box }} {% endfor %}</dd>
{%- endif -%}
{% endif %}
{% if t.reasonsVisible %}
<dt class="inline">{{ 'Reasons'|trans }}</dt>
<dd>
{%- if entity.reasons is empty -%}
<span class="chill-no-data-statement">{{ 'No reason associated'|trans }}</span>
{%- else -%}
{% for r in entity.reasons %}{{ r|chill_entity_render_box }}{% endfor %}
{%- endif -%}
</dd>
{% endif %}
</dl>
</div>
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'bloc', 'badge_person': 'true' } %}
</div>
</div>
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2>
<h2 class="chill-blue">{{ 'Concerned groups'|trans }}</h2>
<dt class="inline">{{ 'Date'|trans }}</dt>
<dd>{{ entity.date|format_date('long') }}</dd>
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {
'context': context,
'with_display': 'bloc',
'badge_person': 'true'
} %}
{% if t.locationVisible %}
<dt class="inline">{{ 'Activity location'|trans }}</dt>
<dd>
{% if entity.location is not null %}
<p>
{{ entity.location.name }}
<span> ({{ entity.location.locationType.title|localize_translatable_string }})</span>
</p>
{{ entity.location.address|chill_entity_render_box }}
{% else %}
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
<h2 class="chill-blue">{{ 'Activity data'|trans }}</h2>
<div class="flex-table">
<div class="item-bloc">
<dl class="chill_view_data">
<dt class="inline">{{ 'Date'|trans }}</dt>
<dd>{{ entity.date|format_date('long') }}</dd>
{% if t.locationVisible %}
<dt class="inline">{{ 'Activity location'|trans }}</dt>
<dd>
{% if entity.location is not null %}
<p>
<span>{{ entity.location.locationType.title|localize_translatable_string }}</span>
{{ entity.location.name }}
</p>
<div class="ms-3">{{ entity.location.address|chill_entity_render_box }}</div>
{% else %}
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
{% endif %}
</dd>
{% endif %}
</dd>
{% endif %}
{% if t.durationTimeVisible %}
<dt class="inline">{{ 'Duration Time'|trans }}</dt>
<dd>{% if entity.durationTime is not null %}
{{ entity.durationTime|date('H:i') }}
{% else %}
{{ 'None'|trans|capitalize }}
{% endif %}
</dd>
{% endif %}
{% if t.durationTimeVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
<dt class="inline">{{ 'Duration Time'|trans }}</dt>
<dd>
{% if entity.durationTime is not null %}
{{ entity.durationTime|date('H:i') }}
{% else %}
<span class="chill-no-data-statement">{{ 'None'|trans|capitalize }}</span>
{% endif %}
</dd>
{% endif %}
{% if t.travelTimeVisible %}
<dt class="inline">{{ 'Travel time'|trans }}</dt>
<dd>{% if entity.travelTime is not null %}
{{ entity.travelTime|date('H:i') }}
{% else %}
{{ 'None'|trans|capitalize }}
{% endif %}
</dd>
{% endif %}
{% if t.travelTimeVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
<dt class="inline">{{ 'Travel time'|trans }}</dt>
<dd>
{% if entity.travelTime is not null %}
{{ entity.travelTime|date('H:i') }}
{% else %}
<span class="chill-no-data-statement">{{ 'None'|trans|capitalize }}</span>
{% endif %}
</dd>
{% endif %}
{% if t.commentVisible %}
<dt class="inline">{{ 'activity.comment'|trans }}</dt>
{%- if entity.comment.empty -%}
<dd><span class="chill-no-data-statement">{{ 'No comment associated'|trans }}</span></dd>
{%- else -%}
<dd>{{ entity.comment|chill_entity_render_box }}</dd>
{%- endif -%}
{% endif %}
{% if t.commentVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
<dt class="inline">{{ 'activity.comment'|trans }}</dt>
<dd>
{%- if entity.comment.empty -%}
<span class="chill-no-data-statement">{{ 'No comment associated'|trans }}</span>
{%- else -%}
{{ entity.comment|chill_entity_render_box }}
{%- endif -%}
</dd>
{% endif %}
{% if t.documentsVisible and entity.documents|length > 0 %}
<dt>{{ 'Documents'|trans }}</dt>
<dd>
<ul>
{% for d in entity.documents %}
<li>{{ m.download_button(d) }}</li>
{% endfor %}
</ul>
</dd>
{% endif %}
{% if t.documentsVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
<dt class="inline">{{ 'Documents'|trans }}</dt>
<dd>
{% if entity.documents|length > 0 %}
<ul>
{% for d in entity.documents %}
<li>{{ m.download_button(d) }}</li>
{% endfor %}
</ul>
{% else %}
<span class="chill-no-data-statement">{{ 'Any document found'|trans }}</span>
{% endif %}
</dd>
{% endif %}
{% if t.attendeeVisible %}
<dt class="inline">{{ 'Attendee'|trans }}</dt>
<dd>{% if entity.attendee is not null %}{% if entity.attendee %}{{ 'present'|trans|capitalize }} {% else %} {{ 'not present'|trans|capitalize }}{% endif %}{% else %}{{ 'None'|trans|capitalize }}{% endif %}</dd>
{% endif %}
{% if t.attendeeVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
<dt class="inline">{{ 'Attendee'|trans }}</dt>
<dd>
{% if entity.attendee is not null %}
{% if entity.attendee %}
{{ 'present'|trans|capitalize }}
{% else %}
{{ 'not present'|trans|capitalize }}
{% endif %}
{% else %}
<span class="chill-no-data-statement">{{ 'None'|trans|capitalize }}</span>
{% endif %}
</dd>
{% endif %}
</dl>
</dl>
</div>
</div>
{% set person_id = null %}
{% if person %}
@@ -140,23 +197,24 @@
{{ 'Back to the list'|trans }}
</a>
</li>
{% if is_granted('CHILL_ACTIVITY_UPDATE', entity) %}
<li>
<a class="btn btn-update" href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}">
{{ 'Edit'|trans }}
</a>
</li>
{# TODO
{% endif %}
{% if is_granted('CHILL_ACTIVITY_DELETE', entity) %}
#}
<li>
<a href="{{ path('chill_activity_activity_delete', { 'id': entity.id, 'person_id' : person_id, 'accompanying_period_id': accompanying_course_id } ) }}" class="btn btn-delete">
{{ 'Delete'|trans }}
</a>
</li>
{#
{% endif %}
#}
</ul>
<script>
import ShowPane from "../../../../ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane";
export default {
components: {ShowPane}
}
</script>

View File

@@ -8,8 +8,6 @@
{% block content -%}
<div class="activity-show">
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'accompanyingCourse'} %}
</div>
{% endblock content %}

View File

@@ -8,8 +8,6 @@
{% block personcontent -%}
<div class="activity-show">
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'person'} %}
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'person'} %}
</div>
{% endblock personcontent %}

View File

@@ -15,6 +15,7 @@ use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Security\Authorization\AbstractChillVoter;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Chill\MainBundle\Security\ProvideRoleHierarchyInterface;
use function in_array;
class ActivityStatsVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface
@@ -64,8 +65,10 @@ class ActivityStatsVoter extends AbstractChillVoter implements ProvideRoleHierar
protected function supports($attribute, $subject)
{
if ($subject instanceof Center
&& in_array($attribute, $this->getAttributes(), true)) {
if (
$subject instanceof Center
&& in_array($attribute, $this->getAttributes(), true)
) {
return true;
}

View File

@@ -24,6 +24,7 @@ use Chill\PersonBundle\Security\Authorization\PersonVoter;
use RuntimeException;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Security;
use function in_array;
class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface
@@ -92,6 +93,8 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn
public function getRoles(): array
{
return [
self::SEE,
self::SEE_DETAILS,
self::CREATE_PERSON,
self::CREATE_ACCOMPANYING_COURSE,
self::UPDATE,

View File

@@ -66,7 +66,7 @@ final class ActivityReasonCategoryControllerTest extends WebTestCase
$crawler = $client->followRedirect();
// Check the entity has been delete on the list
$this->assertNotRegExp('/Foo/', $client->getResponse()->getContent());
$this->assertDoesNotMatchRegularExpression('/Foo/', $client->getResponse()->getContent());
}
*/

View File

@@ -66,7 +66,7 @@ final class ActivityReasonControllerTest extends WebTestCase
$crawler = $client->followRedirect();
// Check the entity has been delete on the list
$this->assertNotRegExp('/Foo/', $client->getResponse()->getContent());
$this->assertDoesNotMatchRegularExpression('/Foo/', $client->getResponse()->getContent());
}
*/

View File

@@ -66,7 +66,7 @@ final class ActivityTypeControllerTest extends WebTestCase
$crawler = $client->followRedirect();
// Check the entity has been delete on the list
$this->assertNotRegExp('/Foo/', $client->getResponse()->getContent());
$this->assertDoesNotMatchRegularExpression('/Foo/', $client->getResponse()->getContent());
}
*/

View File

@@ -26,7 +26,7 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest
*/
private $aggregator;
public function setUp()
protected function setUp(): void
{
self::bootKernel();

View File

@@ -26,7 +26,7 @@ final class ActivityTypeAggregatorTest extends AbstractAggregatorTest
*/
private $aggregator;
public function setUp()
protected function setUp(): void
{
self::bootKernel();

View File

@@ -26,7 +26,7 @@ final class ActivityUserAggregatorTest extends AbstractAggregatorTest
*/
private $aggregator;
public function setUp()
protected function setUp(): void
{
self::bootKernel();

View File

@@ -24,7 +24,7 @@ final class CountActivityTest extends AbstractExportTest
*/
private $export;
public function setUp()
protected function setUp(): void
{
self::bootKernel();

View File

@@ -24,7 +24,7 @@ final class ListActivityTest extends AbstractExportTest
*/
private $export;
public function setUp()
protected function setUp(): void
{
self::bootKernel();

View File

@@ -26,7 +26,7 @@ final class StatActivityDurationSumTest extends AbstractExportTest
*/
private $export;
public function setUp()
protected function setUp(): void
{
self::bootKernel();

View File

@@ -25,7 +25,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest
*/
private $filter;
public function setUp()
protected function setUp(): void
{
self::bootKernel();

View File

@@ -26,7 +26,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
*/
private $filter;
public function setUp()
protected function setUp(): void
{
self::bootKernel();

View File

@@ -45,7 +45,7 @@ final class ActivityTypeTest extends KernelTestCase
*/
protected $user;
public function setUp()
protected function setUp(): void
{
self::bootKernel();

View File

@@ -29,7 +29,7 @@ final class TranslatableActivityReasonTest extends TypeTestCase
*/
private static $prophet;
public function setUp()
protected function setUp(): void
{
parent::setUp();
}

View File

@@ -31,7 +31,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase
*/
protected $container;
public function setUp()
protected function setUp(): void
{
self::bootKernel();

View File

@@ -44,7 +44,7 @@ final class ActivityVoterTest extends KernelTestCase
*/
protected $voter;
public function setUp()
protected function setUp(): void
{
self::bootKernel();
$this->voter = self::$kernel->getContainer()

View File

@@ -24,6 +24,7 @@ use RuntimeException;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Security\Core\User\UserInterface;
use function implode;
use function in_array;
use function strtr;

View File

@@ -17,6 +17,7 @@ use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Exception\UnexpectedValueException;
use function array_merge;
use function count;

View File

@@ -0,0 +1,15 @@
services:
Chill\ActivityBundle\EntityListener\ActivityEntityListener:
autowire: true
autoconfigure: true
tags:
-
name: 'doctrine.orm.entity_listener'
event: 'postPersist'
entity: 'Chill\ActivityBundle\Entity\Activity'
method: 'persistActionToCourse'
-
name: 'doctrine.orm.entity_listener'
event: 'postUpdate'
entity: 'Chill\ActivityBundle\Entity\Activity'
method: 'persistActionToCourse'

View File

@@ -13,6 +13,7 @@ namespace Chill\Migrations\Activity;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
use function count;
/**

View File

@@ -0,0 +1,34 @@
<?php
/**
* 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.
*/
declare(strict_types=1);
namespace Chill\Migrations\Activity;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20211207152023 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->throwIrreversibleMigrationException('placevisible and placelabel could not be created');
}
public function getDescription(): string
{
return 'DROP place visible and place label, which are replaced by location';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE activitytype DROP placevisible');
$this->addSql('ALTER TABLE activitytype DROP placelabel');
}
}

View File

@@ -146,8 +146,8 @@ User visible: Visibilité du champ Utilisateur
User label: Libellé du champ Utilisateur
Date visible: Visibilité du champ Date
Date label: Libellé du champ Date
Place visible: Visibilité du champ Lieu
Place label: Libellé du champ Lieu
Location visible: Visibilité du champ Lieu
Location label: Libellé du champ Lieu
Third parties visible: Visibilité du champ Tiers
Third parties label: Libellé du champ Tiers
Duration time visible: Visibilité du champ Durée
@@ -222,3 +222,5 @@ Aggregate by activity type: Aggréger par type d'activité
Aggregate by activity reason: Aggréger par sujet de l'activité
Last activities: Les dernières activités
See activity in accompanying course context: Voir l'activité dans le contexte du parcours d'accompagnement

View File

@@ -19,6 +19,7 @@ use DateTimeImmutable;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Persistence\ObjectManager;
use function random_int;
class LoadAsideActivity extends Fixture implements DependentFixtureInterface

View File

@@ -18,10 +18,12 @@ class LoadAsideActivityCategory extends \Doctrine\Bundle\FixturesBundle\Fixture
{
public function load(ObjectManager $manager)
{
foreach ([
'Appel téléphonique',
'Formation',
] as $key => $label) {
foreach (
[
'Appel téléphonique',
'Formation',
] as $key => $label
) {
$category = new AsideActivityCategory();
$category->setTitle(['fr' => $label]);
$manager->persist($category);

View File

@@ -13,6 +13,7 @@ namespace Chill\AsideActivityBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use function is_int;
class Configuration implements ConfigurationInterface

View File

@@ -162,8 +162,12 @@ class AsideActivityCategory
public function setParent(?self $parent): self
{
// cache the old result for changing it during validaiton
$this->oldParent = $this->parent;
if ($this->parent) {
$this->oldParent = $this->parent;
}
$this->parent = $parent;
dump($this);
return $this;
}

View File

@@ -32,6 +32,7 @@ use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use function in_array;
final class AsideActivityFormType extends AbstractType
@@ -137,7 +138,7 @@ final class AsideActivityFormType extends AbstractType
$timezoneUTC = new DateTimeZone('GMT');
/** @var DateTimeImmutable $data */
$data = $formEvent->getData() === null ?
DateTime::createFromFormat('U', 300) :
DateTime::createFromFormat('U', '300') :
$formEvent->getData();
$seconds = $data->getTimezone()->getOffset($data);
$data->setTimeZone($timezoneUTC);

View File

@@ -13,6 +13,7 @@ namespace Chill\AsideActivityBundle\Menu;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Security;
use function in_array;
final class AdminMenuBuilder implements \Chill\MainBundle\Routing\LocalMenuBuilderInterface

View File

@@ -26,7 +26,7 @@ final class AsideActivityControllerTest extends WebTestCase
{
use PrepareClientTrait;
public function setUp()
protected function setUp(): void
{
parent::setUp();
self::bootKernel();

View File

@@ -13,6 +13,7 @@ namespace Chill\AMLI\BudgetBundle\Calculator;
use Chill\AMLI\BudgetBundle\Entity\AbstractElement;
use OutOfBoundsException;
use function array_key_exists;
use function array_keys;
use function implode;

View File

@@ -21,6 +21,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Translation\TranslatorInterface;
use function get_class;
abstract class AbstractElementController extends Controller

View File

@@ -22,6 +22,7 @@ use Psr\Log\LoggerInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Translation\TranslatorInterface;
use function array_merge;
use function count;

View File

@@ -21,6 +21,7 @@ use Symfony\Component\Form\Extension\Core\Type\MoneyType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use function array_flip;
use function asort;

View File

@@ -21,6 +21,7 @@ use Symfony\Component\Form\Extension\Core\Type\MoneyType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use function array_flip;
class ResourceType extends AbstractType

View File

@@ -18,6 +18,7 @@ use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Chill\MainBundle\Security\ProvideRoleHierarchyInterface;
use Chill\PersonBundle\Entity\Person;
use Symfony\Component\Security\Core\Role\Role;
use function in_array;
class BudgetElementVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface

View File

@@ -16,6 +16,7 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use function count;
class CalendarRangeAPIController extends ApiController

View File

@@ -28,6 +28,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Range;
use Symfony\Component\Validator\Mapping\ClassMetadata;
use function in_array;
/**

View File

@@ -14,6 +14,7 @@ namespace Chill\CalendarBundle\Event;
use Chill\ActivityBundle\Entity\Activity;
use Doctrine\Persistence\Event\LifecycleEventArgs;
use Symfony\Component\HttpFoundation\RequestStack;
use function array_key_exists;
class ListenToActivityCreate

View File

@@ -20,7 +20,6 @@ use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Form\Type\CommentType;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Chill\PersonBundle\Entity\Person;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use DateTimeImmutable;
use Doctrine\Persistence\ObjectManager;

View File

@@ -1,6 +1,10 @@
import 'es6-promise/auto';
import { createStore } from 'vuex';
import { postLocation } from 'ChillActivityAssets/vuejs/Activity/api';
import {
getLocations, getLocationTypeByDefaultFor,
getUserCurrentLocation
} from "../../../../../ChillActivityBundle/Resources/public/vuejs/Activity/api";
const debug = process.env.NODE_ENV !== 'production';
@@ -82,7 +86,7 @@ const store = createStore({
}
},
mutations: {
// ConcernedGroups
addPersonsInvolved(state, payload) {
//console.log('### mutation addPersonsInvolved', payload.result.type);
@@ -94,7 +98,7 @@ const store = createStore({
state.activity.thirdParties.push(payload.result);
break;
case 'user':
state.activity.users.push(payload.result);
state.activity.users.push(payload.result);
break;
};
},
@@ -108,7 +112,7 @@ const store = createStore({
state.activity.thirdParties = state.activity.thirdParties.filter(thirdparty => thirdparty !== payload);
break;
case 'user':
state.activity.users = state.activity.users.filter(user => user !== payload);
state.activity.users = state.activity.users.filter(user => user !== payload);
break;
};
},
@@ -217,9 +221,7 @@ const store = createStore({
hiddenLocation.value = value.id;
}
commit("updateLocation", value);
}
}
});

View File

@@ -92,8 +92,11 @@
%}
<div class="item-row details">
<div class="item-col">
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': accompanyingCourse, 'with_display': 'row', 'entity': calendar } %}
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {
'context': accompanyingCourse,
'with_display': 'row',
'entity': calendar
} %}
</div>
{% if calendar.comment.comment is not empty %}
@@ -123,4 +126,4 @@
</li>
</ul>
{% endblock %}
{% endblock %}

View File

@@ -26,7 +26,7 @@ final class CalendarControllerTest extends WebTestCase
/**
* Setup before each test method (see phpunit doc).
*/
public function setUp()
protected function setUp(): void
{
self::bootKernel();
$this->client = self::createClient([], [

View File

@@ -25,6 +25,7 @@ use Symfony\Component\Console\Question\Question;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Symfony\Component\Yaml\Exception\ParseException;
use Symfony\Component\Yaml\Parser;
use function count;
/**

View File

@@ -23,6 +23,7 @@ use Symfony\Bridge\Twig\TwigEngine;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_key_exists;
use function count;
use function in_array;

View File

@@ -135,7 +135,7 @@ class CustomFieldDate extends AbstractCustomField
return null;
}
return $date->format('Y-m-d');
return $date->format('Y-m-d');
default:
$template = 'ChillCustomFieldsBundle:CustomFieldsRendering:date.'

View File

@@ -21,6 +21,7 @@ use LogicException;
use Symfony\Bridge\Twig\TwigEngine;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use function get_class;
use function gettype;
use function is_object;

View File

@@ -18,7 +18,6 @@ use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints\GreaterThanOrEqual;
use Symfony\Component\Validator\Constraints\LessThanOrEqual;

View File

@@ -20,6 +20,7 @@ use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use function array_key_exists;
class CustomFieldText extends AbstractCustomField
@@ -65,8 +66,10 @@ class CustomFieldText extends AbstractCustomField
$attrArray = [];
if (array_key_exists(self::MULTIPLE_CF_INLINE, $options)
&& $options[self::MULTIPLE_CF_INLINE]) {
if (
array_key_exists(self::MULTIPLE_CF_INLINE, $options)
&& $options[self::MULTIPLE_CF_INLINE]
) {
$attrArray['class'] = 'multiple-cf-inline';
}

View File

@@ -20,6 +20,7 @@ use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Translation\TranslatorInterface;
use function count;
class CustomFieldsGroupType extends AbstractType

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