Compare commits

...

1483 Commits

Author SHA1 Message Date
nobohan
2d39fdb8ea update CHANGELOG 2021-10-18 11:22:29 +02:00
nobohan
cae3defedb address: zoom to postal code 2021-10-08 14:50:09 +02:00
nobohan
78f66d4f14 Address: Assign origin = 3 for postalCode created by users 2021-10-08 12:36:48 +02:00
ddbd6a9f23 Merge branch 'improvements_acitivite_annexe' into 'master'
Improvements acitivite annexe

See merge request Chill-Projet/chill-bundles!153
2021-10-04 14:48:37 +00:00
b5eaea0e88 Merge branch 'fixes/aside-activities-before-integration' into 'improvements_acitivite_annexe'
Fixes/aside activities before integration

See merge request Chill-Projet/chill-bundles!165
2021-10-04 14:35:14 +00:00
ed8a569fea remove obsolete test 2021-10-04 16:30:08 +02:00
c41bc7bef9 prevent recursion 2021-10-04 16:16:34 +02:00
27dea97bc6 fixes minor for admin aside activity 2021-10-04 15:55:35 +02:00
27125b838e various minor fixes in aside activities 2021-10-04 15:15:26 +02:00
4c55631297 Merge conflicts in translations.yaml resolved.
# Conflicts:
#   src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml
#   src/Bundle/ChillMainBundle/translations/messages.fr.yml
2021-10-04 11:22:03 +00:00
cd6dec5082 Display of aside activity title styling changed from badge to normal title display 2021-10-04 12:11:27 +02:00
152a7de1dc section menu entries de-activated for role_admin 2021-10-04 12:09:26 +02:00
da19f68440 Title display of aside activities adjusted to display full title (parent > child > ...) Styling to be discussed 2021-10-04 11:20:07 +02:00
e895125d12 view template replaced by CRUD view template 2021-10-04 10:47:09 +02:00
fe9b76a1fb Merge remote-tracking branch 'origin/master' 2021-10-04 10:17:32 +02:00
baf9251000 update changelog 2021-10-04 10:17:13 +02:00
665b38d166 fix details (translations, etc.) 2021-10-04 09:50:05 +02:00
9450d34af0 Merge branch 'fix/center-type-show-hidden-when-no-center-reachable' into 'master'
[CenterType] switch to hidden type with null value when no center is reachable

See merge request Chill-Projet/chill-bundles!162
2021-10-03 19:23:24 +00:00
42301c9df7 Merge branch 'master' into 'fix/center-type-show-hidden-when-no-center-reachable'
# Conflicts:
#   CHANGELOG.md
2021-10-03 19:19:04 +00:00
eb1a7b2374 Merge branch 'fix/household-summary-show-comment-when-no-address' into 'master'
[household summary] show comment form even if no address are registered

See merge request Chill-Projet/chill-bundles!163
2021-10-03 19:17:44 +00:00
7f661f9022 Merge branch 'master' into 'fix/household-summary-show-comment-when-no-address'
# Conflicts:
#   CHANGELOG.md
2021-10-03 19:17:35 +00:00
178ffdf6bf Merge branch 'feature/add-requestor-in-search-results' into 'master'
Feature/add requestor in search results

See merge request Chill-Projet/chill-bundles!161
2021-10-03 19:16:35 +00:00
5f0238f614 Merge branch 'master' into 'feature/add-requestor-in-search-results'
# Conflicts:
#   CHANGELOG.md
2021-10-03 19:16:17 +00:00
cfaa64884d Merge branch 'fix/accept-sms-not-required' into 'master'
[person form] accept sms is not required

See merge request Chill-Projet/chill-bundles!160
2021-10-03 19:14:34 +00:00
faba2b67eb updating changelog 2021-10-01 21:20:19 +02:00
a981661ea5 resume, list associated_persons : improve design, hover effects 2021-10-01 21:14:27 +02:00
3a3baa79c8 resume: list associated persons sorted by household. add method in entity 2021-10-01 20:48:45 +02:00
e35f002f2b improvements based on draft review of MR 153 2021-10-01 19:05:03 +02:00
fbd17a1de6 OnTheFly: adding displayBadge option to replace button by badge
When using displayBadge=true, you need to pass buttonText=string with badge content.

Limitation: onTheFly cannot use directly PersonRenderBox to display badge,
because it don't have person object in props !
2021-10-01 18:46:25 +02:00
77d86d3836 [household summary] show comment form even if no address are registered 2021-10-01 16:53:27 +02:00
eb11597f9c [CenterType] switch to hidden type with null value when no center is
reachable
2021-10-01 16:38:35 +02:00
daa8b03c8b Merge branch 'onTheFly' into resume_accourse 2021-10-01 14:11:32 +02:00
9ee679a3b3 fix vue syntax error 2021-10-01 14:11:03 +02:00
8791c78426 Merge branch 'onTheFly' into resume_accourse 2021-10-01 14:07:37 +02:00
abd60f7ddf resume: include _insert_vue_onthefly template 2021-10-01 14:06:15 +02:00
75348f6ba7 otf: add data attributes and pass them in vue component 2021-10-01 14:03:58 +02:00
75a06d6896 Merge branch 'onTheFly' into resume_accourse 2021-10-01 13:12:03 +02:00
65782d3a6b fix js syntax 2021-10-01 13:11:34 +02:00
1dc01fa8e2 create OnTheFly rootComponent structure, and twig include template to insert it 2021-10-01 13:08:12 +02:00
db9a203df0 otf: prepare to create vue root component: moving files 2021-10-01 12:18:40 +02:00
2a7e3c0334 resume: display associated persons from accourse 2021-10-01 11:55:32 +02:00
ad72904aa9 resume accourse: simplify alerts with simple link to edit page 2021-10-01 11:41:02 +02:00
0b57b3c74d Merge branch 'master' into onTheFly 2021-10-01 11:38:15 +02:00
8c0abbc5cd updating changelog 2021-10-01 11:37:06 +02:00
c42b7c014b udpate changelog [ci-skip] 2021-10-01 11:00:25 +02:00
0d5d4b3f05 add accompanying period where the person is requestor + badge in results 2021-10-01 09:50:13 +02:00
a3e43fcaaa [person form] accept sms is not required 2021-09-30 23:27:56 +02:00
4047399b76 otf: comments to remember things to improve 2021-09-30 21:22:28 +02:00
4c9d352c46 otf: post/patch thirdparty ok, with addAddress creation/edition 2021-09-30 21:11:51 +02:00
a316cb9568 otf: manage address in edit/create form (wip) 2021-09-30 15:46:34 +02:00
14539f6f88 Merge branch 'onTheFly' into thirdparty 2021-09-30 15:13:03 +02:00
92e6506ecb tp: adapt controller/entity/formtype to works with new ACL (TO BE CHECKED)
* rename type by types -> getTypes() getter
* adapt controller to fix centers errors
* remove voteOnAttribute return always true in voter
2021-09-30 15:03:47 +02:00
59fed905e9 AddAddress: in onlyButton case, button is not in ul.record_actions 2021-09-30 15:02:48 +02:00
577d665f09 batch replace hideAddress option by onlyButton 2021-09-30 14:36:01 +02:00
decc3c7463 otf: replace button by link in show modale 2021-09-30 13:44:04 +02:00
1eb8d04a32 fix property into json body with endpoint PATCH thirdparty 2021-09-30 13:23:11 +02:00
2f60ab4d17 fix chill_resolve_center in person banner when n centers > 1 2021-09-30 12:35:36 +02:00
3cf9920718 Merge branch 'master' into onTheFly 2021-09-30 12:08:24 +02:00
Pol Dellaiera
f1f13996f9 fix: Fix missing parameter. 2021-09-30 12:07:58 +02:00
29838a4d8e Merge branch 'onTheFly' of gitlab.com:Chill-Projet/chill-bundles into onTheFly 2021-09-30 12:04:59 +02:00
e9b1f442bc api docs adjusted to patch/post address on thirdparty 2021-09-30 12:02:54 +02:00
e2feea15f9 stash commit 2021-09-30 11:57:20 +02:00
14a13c7bd5 CourseLocation: improve warning alerts
manually cherrypick from 5b0b1441d3c7ef0717f21adac8566e1beb1af52c on local branch resume_accourse
2021-09-30 11:55:28 +02:00
5a37bfd1a0 Merge remote-tracking branch 'origin/master' 2021-09-30 11:51:35 +02:00
bd7f2d997e fix link to edit in wopi 2021-09-30 11:51:26 +02:00
309fe40564 Merge branch 'accourse_impr' into onTheFly 2021-09-30 11:43:49 +02:00
Pol Dellaiera
f8f019cfe6 fix: Fix bug in getSize() method. 2021-09-30 11:09:55 +02:00
460f0daf0a Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2021-09-29 23:53:19 +02:00
5de05c0ee9 Merge branch 'master' into accourse_impr 2021-09-29 23:51:56 +02:00
Pol Dellaiera
7f721da08a fix: Remove obsolete code. 2021-09-29 22:38:48 +02:00
Pol Dellaiera
9a34aa59bb fix: Add missing dependency. 2021-09-29 21:50:44 +02:00
Pol Dellaiera
00259dae20 fix: Update ChillDocumentManager::getSize(). 2021-09-29 21:46:47 +02:00
Pol Dellaiera
fb8b8b354f refactor: Update Wopi::checkFileInfo() so it can authenticate users from access token. 2021-09-29 20:25:32 +02:00
d8c34c3089 otf: thirdparty corrections 2021-09-29 19:53:28 +02:00
74b649fb2c no location button for requestor 2021-09-29 19:30:57 +02:00
bac8e8d0b8 cleaning 2021-09-29 19:27:22 +02:00
008a10dab8 otf: patch person and thirdparty from the store, emit parent method saveFormOnTheFly() 2021-09-29 17:47:21 +02:00
a2df3c8144 rdv avant échanges dans le menu 2021-09-29 16:04:05 +02:00
d8444455c0 Merge branch 'feature/form-move-household-with-checkboxes' 2021-09-29 15:43:40 +02:00
c793159593 quick fix stored boject 2021-09-29 15:27:11 +02:00
26140de7de Merge remote-tracking branch 'origin/master' 2021-09-29 15:15:17 +02:00
2c1d3d08c3 temporary stored object fixes 2021-09-29 15:15:10 +02:00
Pol Dellaiera
86c2a5c3e8 fix: Update ChillDocumentManager. Fix statuscode and return types. 2021-09-29 15:07:27 +02:00
9420c34f58 Merge branch 'onTheFly' of gitlab.com:Chill-Projet/chill-bundles into onTheFly 2021-09-29 15:05:12 +02:00
d94fec3352 Merge branch 'onTheFly' of gitlab.com:Chill-Projet/chill-bundles into onTheFly 2021-09-29 15:03:14 +02:00
ba98283348 fix specs.yaml indentation 2021-09-29 15:02:54 +02:00
bfd95bff39 otf: add patch api endpoint for person and thirdparty 2021-09-29 14:57:41 +02:00
Pol Dellaiera
664fcd07ef fix: Update StoredObject uuid property. 2021-09-29 14:52:22 +02:00
a8df0070e8 Merge branch 'onTheFly' of gitlab.com:Chill-Projet/chill-bundles into onTheFly 2021-09-29 14:47:37 +02:00
440e21a83b Merge branch 'onTheFly' of gitlab.com:Chill-Projet/chill-bundles into onTheFly 2021-09-29 14:40:23 +02:00
8c2d211661 Merge remote-tracking branch 'origin/master' 2021-09-29 14:29:27 +02:00
f2ebb1f33c PATCH added for person endpoint 2021-09-29 14:22:55 +02:00
c53636c40b Merge branch 'refactor/sync-wopi' into 'master'
Refactor and synchronize WOPI packages

See merge request Chill-Projet/chill-bundles!157
2021-09-29 12:05:31 +00:00
0ec095b59a allow to remove / update address in household member editor 2021-09-29 13:57:36 +02:00
86c5376cc2 bypass ACL restriction
fix response 500 when otf create new person
2021-09-29 13:35:33 +02:00
0e54b8cdf0 add a changelog 2021-09-29 13:26:54 +02:00
53e82f1b2a store created address into new household 2021-09-29 12:54:53 +02:00
f4999548ac handle suggestion in addAddress component 2021-09-29 12:48:18 +02:00
302f60e722 addAddress: remove commented old method 2021-09-29 12:14:58 +02:00
5b7484b1ce Merge branch 'onTheFly' of gitlab.com:Chill-Projet/chill-bundles into onTheFly 2021-09-29 11:42:40 +02:00
fc1dd499c4 POST, PUT, PATCH working for thirdparty and added to swagger. Assert for 'centers'(temporarily) removed from thirdparty entity 2021-09-29 11:41:08 +02:00
3824a380ff otf: prepare with debug (wip) 2021-09-29 11:37:53 +02:00
315253589e create api endpoint for duplciating address 2021-09-29 11:32:23 +02:00
af24637dc4 update return type for prepare client trait 2021-09-29 11:31:44 +02:00
0fe248320d OnTheFly (otf): fix clickable radio tab on create modal 2021-09-29 11:21:45 +02:00
a26d278510 comment console.log 2021-09-29 11:21:06 +02:00
9641fd3fcc WIP add address to new household 2021-09-28 23:06:59 +02:00
2b3c4b7af9 fix boundary in getCurrentMembers/getNonCurrentMembers 2021-09-28 23:06:40 +02:00
8853359405 remove dump
(cherry picked from commit e2230409b8)
2021-09-28 19:38:02 +00:00
704ec76ca4 rewrite the destination for household / leave household 2021-09-28 21:35:41 +02:00
Pol Dellaiera
6020ee2cb2 chore: Update .editorconfig file. 2021-09-28 20:35:19 +02:00
Pol Dellaiera
ba53ce40fa Add migration file. 2021-09-28 20:32:43 +02:00
Pol Dellaiera
ab845d4569 Synchronize ChillWopiBundle with latest upstream WOPI packages. 2021-09-28 17:50:53 +02:00
Pol Dellaiera
dcb92b1378 Update StoredObject entity. 2021-09-28 17:49:32 +02:00
Pol Dellaiera
59fcd1e96b Update local ChillDocStore composer.json. 2021-09-28 17:40:49 +02:00
Pol Dellaiera
0aec2fc1d1 Update local ChillWopiBundle composer.json. 2021-09-28 17:39:54 +02:00
Pol Dellaiera
e43ae56e73 Update root composer.json. 2021-09-28 17:39:23 +02:00
3040ed9483 tp onthefly: add add-address (wip) 2021-09-28 16:26:59 +02:00
adc94aaeea javascript syntax correction 2021-09-28 16:26:32 +02:00
c5fa1b883c onthefly: adding tp i18n file 2021-09-28 16:25:38 +02:00
644d0420ce creation of endpoints POST, PUT, PATCH, but still errors 2021-09-28 16:23:24 +02:00
e2230409b8 remove dump 2021-09-28 15:59:31 +02:00
472866ce91 fix search by birthdate 2021-09-28 15:54:09 +02:00
d5d12c4a17 fix tests for user controller 2021-09-28 15:54:08 +02:00
e72ba4c940 bypass ACL restriction 2021-09-28 15:34:15 +02:00
nobohan
ca7ba90717 hotfix: repair creation activity (was an error linked to ListenToActivityCreate) 2021-09-28 14:53:00 +02:00
f3ba3aeed9 Merge branch 'master' into thirdparty 2021-09-28 14:47:52 +02:00
c791c48248 tp: adapt to new ACL interface (wip) 2021-09-28 14:06:52 +02:00
5da332a06e fix error on previous commit, when creating new accourse 2021-09-27 13:14:42 +02:00
eb89fa2cd4 CourseLocation: replace in accourse vue component the old resume _warning_address.html.twig message 2021-09-27 13:03:17 +02:00
82db55cfec CourseLocation: change add-address key, cleaning add-address options 2021-09-27 11:18:11 +02:00
349a0e69f1 accourse: add warning alert box in each bloc with minimum confirm conditions 2021-09-27 10:56:43 +02:00
4de106ec30 accourse service: improve styles of checkboxes list 2021-09-27 10:21:11 +02:00
9851efa804 fix deathdate not inialized 2021-09-24 16:54:11 +02:00
327fcbef8b Merge branch 'review_documents_accourse' into 'master'
Review documents accourse

See merge request Chill-Projet/chill-bundles!154
2021-09-24 14:52:17 +00:00
d60b6aa3c4 fix phpunit 2021-09-24 16:45:24 +02:00
f0d0f16d3c fix namespace in migration files 2021-09-24 16:36:36 +02:00
832c7bab9f last migration deleted: duplicate 2021-09-24 16:20:58 +02:00
78b56dc32d attempt to fix migrations 2021-09-24 16:04:32 +02:00
6301c4c10b optimisation twig template 2021-09-24 14:42:37 +02:00
b87c995d22 fix UserMenuBuilder so that menu entry is not visible for admin menu 2021-09-24 14:42:07 +02:00
960db6aefc fast aside activity creation implemented 2021-09-24 14:41:37 +02:00
62f8d2c01d fixes quick for accompanying cours edocument voter 2021-09-24 13:51:43 +02:00
388db459bf Merge branch 'admin-for-users' into 'master'
improve admin for users

See merge request Chill-Projet/chill-bundles!150
2021-09-24 10:35:09 +00:00
d1e28b1afc Merge branch '107_documents_parcours' into 'master'
107 ajouter documents aux parcours

See merge request Chill-Projet/chill-bundles!151
2021-09-24 10:33:11 +00:00
d3bf64a00c Merge remote-tracking branch 'origin/master' into HEAD 2021-09-24 12:32:19 +02:00
84223316c4 Merge branch 'master' into improve_address 2021-09-24 11:31:23 +02:00
9f07e6a272 Address: fetch POST valid dates when applying changes from datePane 2021-09-24 11:22:48 +02:00
47d6270b7f Merge commit 'a9ce72034be03f5c84799f5982f97f515900504a' 2021-09-24 10:37:18 +02:00
1d4b1d852f improve layout for admin 2021-09-24 10:35:34 +02:00
430177f0c7 some finalisation for admin user 2021-09-24 10:35:34 +02:00
72b1916da8 continue CRUD user 2021-09-24 10:35:34 +02:00
b5c2dd7bd2 fix-admin and crudify user admin 2021-09-24 10:35:34 +02:00
a9ce72034b Merge branch 'fix-tests/rdv-2' into 'features/rdv'
Fix tests/rdv 2

See merge request Chill-Projet/chill-bundles!147
2021-09-24 08:33:42 +00:00
f93c2d8d32 Merge branch 'fix/use-autoconfigure-and-autowire' into 'master'
Update controller and the way they are autoloaded

See merge request Chill-Projet/chill-bundles!149
2021-09-24 08:33:03 +00:00
463b615595 Aside Activity: improve french translations 2021-09-24 09:13:05 +02:00
95e0198952 Address: twig insert, complete options for use cases 2021-09-23 16:22:10 +02:00
f93c13234a accourse stickyNav: insert a component, replace deprecated anchor name by id 2021-09-23 16:20:33 +02:00
ee3776288b vue_accourse, resources bloc: change for flex-bloc placement 2021-09-23 15:52:44 +02:00
694213e79a household banner: don't limit maximum number of members 2021-09-23 15:45:09 +02:00
a28c996164 stash commit 2 2021-09-23 14:55:54 +02:00
05c5eaa925 stash commit 2021-09-23 14:54:11 +02:00
d4116a4659 Merge branch 'master' into improvements_acitivite_annexe 2021-09-23 14:39:39 +02:00
6b91808987 fix error with doctrine:fixtures:load 2021-09-23 14:08:29 +02:00
d5f1de1fbc Merge branch 'master' into person_renderbox_thirdparty_onthefly 2021-09-23 13:56:28 +02:00
fa9b571d6b Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-23 13:46:54 +02:00
nobohan
d172ae9682 rdv -> activity: add comment 2021-09-23 13:43:12 +02:00
nobohan
1a6c37e5a6 rdv->activity: create event for storing the linked activity to a calendar 2021-09-23 13:43:12 +02:00
nobohan
99f2692684 activity: correction of displaying activity when durationTime or travelTime is null 2021-09-23 13:43:12 +02:00
nobohan
c6bbe46bae rdv: rdv -> activity: fix some bugs (duplicate person var name, case keys are missing) 2021-09-23 13:43:12 +02:00
nobohan
17036e83ba rdv: rdv-> activity: convert some fields 2021-09-23 13:43:12 +02:00
nobohan
e8d8a57b4b rdv: rdv -> activity: pass calendar data to new activity controller 2021-09-23 13:43:12 +02:00
nobohan
3385cb2dda rdv: rename twig view file 2021-09-23 13:43:12 +02:00
nobohan
5b81bffcf6 rdv: twig - headings change 2021-09-23 13:43:12 +02:00
nobohan
27674985bd rdv: add pagination in calendar item list + refactor list views 2021-09-23 13:43:12 +02:00
3c3baed1ce Merge branch 'features/allow-customize-acl' into 'master'
Features/allow customize acl

See merge request Chill-Projet/chill-bundles!140
2021-09-23 11:33:31 +00:00
efd9380d13 Address use next/previous button if datePane and if context new 2021-09-23 12:32:05 +02:00
0808f5a6f3 Address datePane: convert selectedAddress to pass and view it with addressRenderBox 2021-09-23 11:51:40 +02:00
1c568a75ec Address: pass useDatePane option in showPane addressRenderBox, display dates in showPane 2021-09-23 11:07:17 +02:00
e7676c5c2e display address renderbox on datePane (wip) 2021-09-23 10:34:06 +02:00
a8024ba38f Address datePane: validTo date display and format 2021-09-23 10:34:06 +02:00
d994612987 change buttons apparence for datePane back to editPane 2021-09-23 10:34:06 +02:00
3ee0f4bf20 datePane, back to previous editPane 2021-09-23 10:34:06 +02:00
15897b4f33 asideactivity category entity changed to have parent and children properties 2021-09-22 20:35:46 +02:00
ca86eb3c56 disable datePane with courseLocation 2021-09-22 20:34:17 +02:00
14fdeac4fd Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-22 20:32:28 +02:00
98f1f19e9a courseLocation: commit context addressId change when remove PersonLocation (fix bad address in editPane) 2021-09-22 20:27:08 +02:00
4630e2b80c remove unused and comment console log 2021-09-22 20:26:50 +02:00
5d99e261e1 CourseLocation: load initAddressContext() earlier allow AddAddress to getInitialAddress() (fix) 2021-09-22 19:41:17 +02:00
f7ec87e012 Address: hideAddress option mask too loading and alerts 2021-09-22 19:26:33 +02:00
0ed2dc8b13 Address: courseLocation, update addressId when commit context in store 2021-09-22 19:25:37 +02:00
d52ab2188c Address: fix callback function when called by another component (CourseLocation and HouseholdMembersEditor) 2021-09-22 18:48:15 +02:00
4768785bb5 Address: improve forceRedirect condition, if backUrl is null or undefined 2021-09-22 18:43:44 +02:00
47d0043462 disable suggestPane step 2021-09-22 16:28:35 +02:00
aa1f02ebd4 style of aside activity list adapted 2021-09-22 16:23:31 +02:00
1672e873a3 view page created for aside activity 2021-09-22 16:23:11 +02:00
f8d5dcf937 AddAddress: improve loading transition between step0/step1 and step2 2021-09-22 15:16:06 +02:00
544af59009 configuration of duration parametres for aside activity 2021-09-22 15:10:09 +02:00
851fa663ca Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-22 14:07:09 +02:00
019a66c915 tp: Address, twig options: check to remove forceRedirect, and disable backUrl 2021-09-22 14:04:26 +02:00
dfc6ed9bf3 Address: remove forceRedirect option: backUrl option not null is considerated as forceRedirect true 2021-09-22 14:00:40 +02:00
dbb9e6a663 Address: success message exception when redirection 2021-09-22 13:57:33 +02:00
d6f6f49090 address renderbox, improve how display address-more informations 2021-09-22 13:57:29 +02:00
7c2422743e Address: remove unused translations specific to household or person context 2021-09-22 13:55:24 +02:00
e336990b16 comment console.log 2021-09-22 13:55:24 +02:00
dee27ee01f Address: extend hideAddress option for twig cases 2021-09-22 13:55:24 +02:00
f1c29a8bd3 Household summary: improve Address display when there is no address 2021-09-22 13:55:24 +02:00
7df923c669 fix vendor dir in composer.json 2021-09-22 12:28:35 +02:00
b06e726ad1 fix required fields in user controller test 2021-09-22 12:28:14 +02:00
c62254caec add scope selection on accompanying course 2021-09-22 12:23:26 +02:00
c382008b4d fix tests (wip) 2021-09-22 12:23:15 +02:00
f5348daddf Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-22 11:41:41 +02:00
e13b7bf195 fix countrySelection multiselect with fetch async countries
edit context: display country for existing address
new context: repair editPane, load countries

note: adding id for country and postcode in address endpoint json
2021-09-22 11:39:03 +02:00
edc528ff92 Fixed migration 2021-09-22 10:06:58 +02:00
62e70c0c36 Fix layout of flash message in main template 2021-09-21 15:12:25 +02:00
f2e945dc0f UserMenu entry added for aside activities list 2021-09-21 11:52:45 +02:00
d2ce4865c0 display all aside activities created for and created by user with temporary badge 2021-09-21 11:42:18 +02:00
7fe0f08300 tp api endpoints: use default controller (fix) 2021-09-21 10:48:40 +02:00
7d2e82d69b Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-20 20:16:39 +02:00
3f3dd83132 fix error in afterLastPaneAction 2021-09-20 20:15:38 +02:00
f3b755e46e fix warning with getSuccessText 2021-09-20 20:15:38 +02:00
8ba74f8de8 editPane, change button if datePane after 2021-09-20 20:15:38 +02:00
690f649dd1 applyChanges, if DatePane or not 2021-09-20 20:15:38 +02:00
75a240a2d6 parent callback will cast afterLastPaneAction, that manage redirection or context changes 2021-09-20 20:15:38 +02:00
717cd03d95 Address: context id received from twig are integer 2021-09-20 20:15:38 +02:00
1e829707be tp: wip.. write postAddressToThirdparty api for AddAddress callback 2021-09-20 20:13:20 +02:00
e7928c222d creating endpoint for scopes 2021-09-20 14:11:33 +02:00
120f7d8026 upgrade voter and acl for activities and implement autoconfiguration for
ChillProvideRole interface
2021-09-20 13:56:44 +02:00
b6c58a5c31 Continue work on ACL rewritting
* fix center resolver dispatcher
* add scope resolver
* tests for authorization helper
2021-09-20 13:56:44 +02:00
74598ee926 apply new role on accompanying period 2021-09-20 13:56:43 +02:00
cf40f38463 rename voter helepers 2021-09-20 13:56:43 +02:00
ebb2f5d243 Add shortcut person <-> current address, and update api for
re-implements searching

* add geographic function ST_CONTAINS
* add a link between the current valid address and person, optimized on
database side;
* update PersonACLAwareRepository for re-using methods elsewhere.
2021-09-20 13:56:43 +02:00
50b7554aea optimize query for current address + documentation 2021-09-20 13:56:43 +02:00
f63d4fcfba optimize query for person 2021-09-20 13:56:43 +02:00
6bc83edfe9 Refactor PersonSearch and create PersonACLAwareRepository
The search api delegates the query to a person acl aware "repository"
(although this does not implements ObjectRepository interface).
2021-09-20 13:56:43 +02:00
f87f03b5c0 Move CenterResolverInterface auto-configuring to bundledefinition
It seems that the service encountered in bundle loaded before does not
works.
2021-09-20 13:56:43 +02:00
addcf72ae6 improve addresses 2021-09-20 13:56:43 +02:00
b4e78a948b remove NOT NULL for User::usernamecanonical 2021-09-20 13:56:43 +02:00
9b38e486df extends User entity + alter admin (WIP) 2021-09-20 13:56:43 +02:00
960bac8c37 create alias for RoleProvider for allowing autowiring 2021-09-20 13:56:43 +02:00
dc09c9424a refactor ACL for easy voter. Apply on TaskVoter 2021-09-20 13:56:43 +02:00
5b70fb2ee5 adapt UI and controller for Person without centers 2021-09-20 13:56:43 +02:00
2450655452 enable autoloading for form in person bundle 2021-09-20 13:56:43 +02:00
41d76542b4 move validation on person into annotations 2021-09-20 13:56:43 +02:00
7faddbe3fe move birthday validator to namespace person + rewrite tests 2021-09-20 13:56:43 +02:00
eec798cfd3 entity person: create a validator to check a person entity is linked
with a center

This validator take a parameter in configuration
2021-09-20 13:56:43 +02:00
03e8624528 entity person: allow center to be not null 2021-09-20 13:56:43 +02:00
501ffe7829 Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-18 21:48:42 +02:00
a842229d5e improve addAddress 2021-09-18 21:47:04 +02:00
4b87e16f6d Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-18 17:05:13 +02:00
2788170f03 slot buttons up from actionButtons to addAddress 2021-09-18 17:02:45 +02:00
1b4e5c4956 tp: adapt variables for _insert_vue_address 2021-09-18 16:58:49 +02:00
601c16ac27 first commit: rendez-vous menu entry deleted from task usermenubuilder. Start sous-types 2021-09-17 17:00:23 +02:00
bde9e44f87 Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-17 15:55:57 +02:00
4855ec2065 AddAddress: adding a forceRedirect option 2021-09-17 15:55:10 +02:00
c440d8a2bd tp: adapt variables for include _insert_vue_address 2021-09-17 15:32:36 +02:00
210d819125 tp: adapt variables for include _insert_vue_address 2021-09-17 13:26:57 +02:00
8204107ceb Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-17 13:26:28 +02:00
3f3b7af42b AddAddress: adjust Open and Close methods for each step 2021-09-17 13:25:18 +02:00
331dd286e7 AddAddress: adding a new stickyActions option 2021-09-17 13:25:18 +02:00
f048395a89 AddAddress: reorganize 4 steps Pane: show, suggest, edit, and date 2021-09-17 13:25:18 +02:00
6a60758c0d AddAddress: openPanesInModal, uniq option to enable/disable all step123 in Modal 2021-09-17 13:25:18 +02:00
782f0bc332 twig _insert_vue_address, rename mode create 2021-09-17 13:25:18 +02:00
4bafa83b65 Address: rename [Show|Edit]AddressPane files 2021-09-17 13:25:18 +02:00
6e42b08627 Address: remove unused file 2021-09-17 13:25:18 +02:00
3c5f0ce15e Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-16 22:25:55 +02:00
7ab57eba9a AddAddress: adding useDate.validFrom/validTo options 2021-09-16 22:21:47 +02:00
3279db85de Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-16 21:26:10 +02:00
6ab1391bd8 addAddress: allow other rootcomponent to not precise bindmodal options 2021-09-16 21:21:40 +02:00
ce40814aa9 Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-16 21:17:29 +02:00
c58d1eccc5 AddAddress: rename callback method 2021-09-16 20:49:46 +02:00
f66df3b77c fix include parameters missing comma 2021-09-16 20:36:11 +02:00
2aa0bbf371 tp: fix bindModalStep variable rename with _insert_vue_address 2021-09-16 20:34:10 +02:00
0bb0b24c21 Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-16 19:58:03 +02:00
aae2ee32f6 add-address sub-component key 2021-09-16 19:56:15 +02:00
8dbdc28df1 vue_accourse: AddAddress final submit, managed by callback and not an event 2021-09-16 19:56:15 +02:00
9ff58fe0c3 Address: replace variable entity.type by entity.name 2021-09-16 19:56:15 +02:00
da32afeb3f addAddress: improve boolean variables 2021-09-16 19:56:15 +02:00
a5ceb551eb twig pass arguments to vue_address with dataset attributes 2021-09-16 19:56:15 +02:00
17a3f45247 AddAddress final submit, managed by callback and not an event 2021-09-16 19:56:15 +02:00
9ef91eabfb table style adjusted 2021-09-16 09:42:46 +02:00
310e9f5a82 tp: adapt _insert_vue_address include parameters 2021-09-15 18:41:14 +02:00
9725970c56 tp: adapt _insert_vue_address include parameters 2021-09-15 18:31:58 +02:00
546a2e4fa1 Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly 2021-09-15 18:20:18 +02:00
c2f75654dd move _insert_vue_address include template in main, make it more generic
because it is used with person and household,
but prepare to extend for thirdparty
2021-09-15 18:17:06 +02:00
683eac91d8 thirdparty, manage case with only one type
in that case, type field is hidden, uniq type is automatically written in table
2021-09-15 16:25:55 +02:00
6e31e01e51 tp: rename field translation 2021-09-15 16:25:26 +02:00
e94790b8ab tp form: call vue_address to manage address, wip
show some limits with AddAddress:
* bug with option buttonText overriding default
* need to improve step1
2021-09-15 12:59:16 +02:00
92fae5cba2 tp list: table chill appearance, small action buttons 2021-09-15 12:54:46 +02:00
df28494f16 Merge branch 'household_integration' into person_renderbox_thirdparty_onthefly 2021-09-15 12:19:18 +02:00
4046a7ca9b before resume dashboards: disable accompanyingCourse resume persons, requestor, and resources 2021-09-15 12:14:03 +02:00
910016f722 tp: prepare address to be managed by vue (adapt formType) + add aliases methods isChild and isParent 2021-09-15 11:50:03 +02:00
a4f446c6b9 fix flashbag double col-8 2021-09-15 11:42:02 +02:00
d7a4e6c037 Banner context fixed parent() passed to template 2021-09-15 10:42:56 +02:00
e03f41ffbc user access rights put back in to place 2021-09-14 15:56:56 +02:00
2e5c2de363 Documents can be added/viewed/edited for an accompanyingCourse + menu entry added 2021-09-14 15:44:06 +02:00
Pol Dellaiera
951d686366 refactor: Update WOPI related stuff based on upstream changes. 2021-09-14 15:08:00 +02:00
Pol Dellaiera
fe533bc716 chore: Normalize composer.json file. 2021-09-14 15:07:23 +02:00
Pol Dellaiera
6c47ce53e7 chore: Remove duplicated entry from composer.json. 2021-09-14 15:06:22 +02:00
4448547fcd Merge branch 'master' into person_renderbox_thirdparty_onthefly 2021-09-14 14:11:33 +02:00
b80d109d8e fix vue_calendar encore_entry_link_tags 2021-09-14 11:51:36 +02:00
dd0e695ac2 Merge branch 'household_integration' 2021-09-14 11:30:46 +02:00
6a21bcc520 Merge branch 'rdv' 2021-09-14 11:30:05 +02:00
f7cb93fdac Update controller and the way they are autoloaded 2021-09-14 10:30:52 +02:00
7dc85b8474 vue_household_members_editor: address suggestions in bootstrap accordion style
+ store manage show/hide suggestions toggle (like householdSuggestions)
2021-09-13 19:15:04 +02:00
ee01020ae6 fix multiselect calendarUserSelector badge appearance 2021-09-13 16:38:43 +02:00
dcbac34b96 Merge branch 'aside-activity-merging' into 'master'
Various improvements for aside activity

See merge request Chill-Projet/chill-bundles!148
2021-09-13 14:17:06 +00:00
6fe78b7177 fix data provider 2021-09-13 16:12:25 +02:00
6fa0d229af enable test suite for aside activity 2021-09-13 15:25:10 +02:00
e4cfb4804b various improvements aside acdtivity 2021-09-13 15:20:01 +02:00
6c61b2da30 translations 2021-09-13 15:06:20 +02:00
dc2f094ca2 vue_household_members_editor: suggestions in bootstrap accordion style 2021-09-13 15:04:12 +02:00
4525f01d5f fix loading of paginator factory in CRUDCONtroller 2021-09-13 14:44:30 +02:00
3fe7e131a2 tests written and working 2021-09-13 13:55:17 +02:00
db92531257 dataFixtures fixed and executed + start of test script 2021-09-13 13:55:17 +02:00
5512e25cdf menu entries for admin section of aside activity categories changed but not yet complete 2021-09-13 13:55:17 +02:00
a0df8d8c61 create aside activity added to sections menu 2021-09-13 13:55:17 +02:00
a6826623bc query_builder added to form : only active users displayed in select list 2021-09-13 13:52:18 +02:00
267c3bae6e attempt to add aside activity to sections menu: not working yet 2021-09-13 13:52:17 +02:00
a131510ea8 dataFixtures made but not tested 2021-09-13 13:52:17 +02:00
eca00d155f aside activities query added to filter by current user 2021-09-13 13:52:14 +02:00
6680ba19ce final class changed for entity asideActivity + css fixed for record_action buttons 2021-09-13 13:50:49 +02:00
nobohan
813da1f9e0 rdv: reset calendar after all promises are done 2021-09-13 13:43:39 +02:00
337a6eb974 vue_household_members_editor: toggle suggestion button out of conditionnal record_actions 2021-09-13 13:29:37 +02:00
ed31dc3157 enable test for calendar 2021-09-13 13:13:17 +02:00
98729af065 vue_household_members_editor: fix store error with dispatch 2021-09-13 12:46:26 +02:00
75aa600a20 fix composer.json and upgrade base app 2021-09-13 12:41:55 +02:00
caca9ad71f Merge branch 'master' into person_renderbox_thirdparty_onthefly 2021-09-13 12:18:01 +02:00
5a4cb31ea5 Merge branch 'household_integration' into 'master'
household members integration

See merge request Chill-Projet/chill-bundles!143
2021-09-13 10:03:36 +00:00
nobohan
c82efc4fd5 rdv MR review: change name of routes + others modifications 2021-09-13 11:58:48 +02:00
6ab0007f02 fix: person-render-box need props options 2021-09-13 11:10:02 +02:00
672133fb5e repair banner in vue_household_members_editor component 2021-09-13 10:48:38 +02:00
nobohan
503c97d8c6 rdv: remove duplicate comment in rdv list 2021-09-13 10:01:52 +02:00
nobohan
5dc430ed31 rdv: various UI improvements on my calendar 2021-09-10 22:00:24 +02:00
nobohan
855686c0ba rdv: add content of calendar item in a modal 2021-09-10 17:31:19 +02:00
da9d81dc05 vue_accourse: GET form submit for no_household persons 2021-09-10 17:18:43 +02:00
fa938471aa vue_accourse: move no-household warning above table 2021-09-10 16:39:59 +02:00
c89e2662b1 household resume page, improve ux 2021-09-10 15:36:30 +02:00
nobohan
f6f24d0beb rdv: style my calendar 2021-09-10 14:11:48 +02:00
nobohan
29c148f924 rdv: can remove from delete calendar ranges 2021-09-10 14:11:48 +02:00
nobohan
0ab53f4659 rdv: add header 2021-09-10 14:11:48 +02:00
nobohan
c42ec1d493 rdv: plages de disponibilites: remove new events before it was saved 2021-09-10 14:11:48 +02:00
nobohan
82e76d7d5a rdv: plages de disponibilités: various UX/UI improvements 2021-09-10 14:11:47 +02:00
nobohan
0a274eb2a4 Enable DELETE in the ApiController 2021-09-10 14:11:47 +02:00
nobohan
6bfc180951 rdv: plages de disponibilites: copy the next day + refresh after save 2021-09-10 14:11:46 +02:00
nobohan
e1ccc8aba5 rdv: edition plage de disponibilités: copy events to next day (WIP) 2021-09-10 14:11:46 +02:00
nobohan
25b85fcc68 rdv: edit calendar ranges: add delete + doc swagger 2021-09-10 14:11:46 +02:00
nobohan
bcb36ddc11 rdv: edit calendar range: fix display of new calendar ranges 2021-09-10 14:11:45 +02:00
nobohan
6d607e3939 rdv: edit calendar ranges: create and update calendar ranges 2021-09-10 14:11:45 +02:00
nobohan
0fe6d7d00b rdv: add calendar range events in myCalendar 2021-09-10 14:11:44 +02:00
nobohan
329d3cc3d8 rdv: add API entry point for POSTing calendar range 2021-09-10 14:11:44 +02:00
nobohan
ee4d23ff82 rdv: init vue component for calendar range editing + refactor vue calendar code 2021-09-10 14:11:44 +02:00
nobohan
54ea954a5a rdv: init unit tests 2021-09-10 14:11:43 +02:00
nobohan
864f84fede rdv: change entrypoint for calendar css + correct calendar controls as a function of context 2021-09-10 14:11:43 +02:00
nobohan
68538f0e85 rdv: add user menu entry for my calendar list 2021-09-10 14:11:42 +02:00
nobohan
74957154b1 rdv: pages by User 2021-09-10 14:11:40 +02:00
ff7cb6ca79 adding unlink chill button 2021-09-10 11:40:59 +02:00
753e6c1105 adding a dev page with sass assets album 2021-09-10 11:34:08 +02:00
88c192c22e change namespace migration 2021-09-09 17:44:37 +02:00
05aaa32881 track all files added in other bundles 2021-09-09 16:46:26 +02:00
5211fb2fe9 Documents added to accompanying course menu 2021-09-09 16:42:53 +02:00
3a6a0da1dd accourse associated_persons: display alert warning if persons without household 2021-09-06 19:41:09 +02:00
e99a371f3a vue personRenderBox: adding an option to display householdLink 2021-09-06 19:39:52 +02:00
dba3ede9e1 when a person has a household without address: display no_data message, even if option addNoData is false 2021-09-06 18:46:37 +02:00
a94a757ae6 accourse: don't display old participations (fix counter) 2021-09-06 16:50:10 +02:00
cf78c59e76 vue personRenderBox when no returnPath 2021-09-06 16:37:30 +02:00
6e57d16ebf fix conflict with fa-ul and floatbutton (different with top or bottom) 2021-09-06 16:36:27 +02:00
f4ce634061 not used, see Entity/AddressRenderBox.vue in MainAssets 2021-09-06 16:18:08 +02:00
f9402ec981 adding confirmation modal when person leave accourse 2021-09-06 16:04:38 +02:00
98b0b3beeb applying floatbutton logic on person/thirdparty vue renderbox 2021-09-06 15:49:15 +02:00
1a95b44577 accourse: don't display old participations
(they will be still visible in history)
2021-09-06 15:12:53 +02:00
93c08f7e18 vue_accourse: adding current_household link on associated_persons 2021-09-06 15:05:08 +02:00
1262d8cc16 Merge branch 'improve_address' into household_integration 2021-09-06 12:52:25 +02:00
e5690b7575 Merge branch 'master' into household_integration 2021-09-06 12:32:09 +02:00
406426111a Merge branch 'post-prototypage' into 'master'
Post prototypage: vue household integration

See merge request Chill-Projet/chill-bundles!141
2021-09-06 08:00:29 +00:00
374ac652d4 AddAddress: submitNewAddress return callback payload, and parent patch date then postTo (TO BE MORE TESTED)
improve pattern for better reusability of AddAddress component
2021-09-04 14:26:03 +02:00
2208518ca0 AddAddress: add new address or update existing address: split fetch cascade and factorize reused functions 2021-09-04 12:47:47 +02:00
d51752fa41 Address, city/address selector: update writeNew flag when choose existing or create new 2021-09-04 12:40:42 +02:00
3ccc82147b Merge branch 'fix_address' into person_renderbox_thirdparty_onthefly 2021-09-03 18:57:33 +02:00
81f97980fc household members: fold/unfold accordion 2021-09-03 18:53:35 +02:00
8b945dc38b test a new chill help tooltip 2021-09-03 18:30:43 +02:00
b11592fb6d templates added and adapted, still problems with scope 2021-09-03 16:05:55 +02:00
d575b48e76 household banner: <a> tag inside <span> if we want flex order 2021-09-03 15:31:00 +02:00
3fefaf1e4d household summary: put member box in a reused include template 2021-09-03 13:59:31 +02:00
9b8b60ed75 twig person/thirdparty renderbox: add a customArea option
with 2 areas to begin:
* before the label
* after the label
2021-09-03 13:07:47 +02:00
f2f39d0922 household: improve ux in form to edit a member 2021-09-03 13:02:35 +02:00
eb067fe59b integration, test css class floatbutton 2021-09-03 13:01:24 +02:00
aad0d295ef services added to config files 2021-09-03 12:29:51 +02:00
46560da67d start of controller and formtype: adaptation from DocumentPersonController 2021-09-03 12:20:34 +02:00
3bb0e470bc entity recreated + repository + migration done 2021-09-03 11:26:04 +02:00
81b7e769e1 lightly increase heading 3-6 weight 2021-09-03 11:21:39 +02:00
7c37a5f583 a bunch of files that were deleted after doing composer.phar update 2021-09-03 11:04:34 +02:00
c51b129a5e AccompanyingCourseDocument created 2021-09-03 11:02:56 +02:00
21630a37af household banner: badge-member and holder mark in person theme 2021-09-03 10:59:44 +02:00
f2248a1e9c translation, wip 2021-09-03 09:59:54 +02:00
d8b2d3cd90 rename address-render-box component
(cfr b9602aa72 - file had been moved and renamed,
now we just rename component name into import and template
)
2021-09-02 22:28:32 +02:00
b14b27c110 Merge branch 'fix_address' into post-prototypage 2021-09-02 21:07:39 +02:00
f6e65dddbe vue Address: listen to citySelector to automatically fill city name and postcode fields 2021-09-02 21:06:11 +02:00
b940348452 Merge branch 'fix_address' into post-prototypage 2021-09-02 19:28:52 +02:00
90faa27461 vue Address: listen to adresssSelector to automatically fill street/number fields 2021-09-02 19:15:40 +02:00
a4118b1235 Merge branch 'person_renderbox_thirdparty_onthefly' into post-prototypage 2021-09-02 12:25:33 +02:00
903d57ea9d person_renderbox fix if there is no birthdate 2021-09-01 17:36:17 +02:00
820def6294 make onTheFly with API call 2021-09-01 17:35:11 +02:00
19a4542e2b creation of API endpoint thirdparty 2021-09-01 17:34:30 +02:00
9961c38b3c thirdparty onthefly, still with hardcoded data 2021-09-01 14:36:18 +02:00
f41997e6da creation api endpoint. Route found, but ajax call still needs to be tested 2021-09-01 14:33:31 +02:00
3927fd738c new choose button, improve household renderbox 2021-08-31 16:02:18 +02:00
b69fdd459a fix vue renderbox component name 2021-08-31 15:26:00 +02:00
1a2cb22b5b household, wip 2021-08-31 12:41:19 +02:00
3fa4f1b28b address multiline as option in householdrenderbox 2021-08-31 11:06:44 +02:00
c0d2454473 household render box flex table 2021-08-27 18:03:21 +02:00
2cffd61b86 Merge branch 'post-prototypage' of gitlab.com:Chill-Projet/chill-bundles into post-prototypage 2021-08-27 17:49:52 +02:00
b9602aa720 rename/move vue AddressRenderBox 2021-08-27 17:31:44 +02:00
219a41e034 rename/move vue AddressRenderBox 2021-08-27 16:12:26 +02:00
983bca97ac fix vue Address duplicate details 2021-08-27 15:55:39 +02:00
c1d19640a9 fix content position for household-members 2021-08-27 15:55:39 +02:00
5fd7d869bf Entity/PersonRenderBox.vue with render=badge 2021-08-27 15:55:39 +02:00
4f6011348d merge 2 subcomponent to use only Entity/PersonRenderBox.vue 2021-08-27 15:55:39 +02:00
d4430246f7 hop 2021-08-27 15:54:59 +02:00
8182e35c9c renderbox options changed to not display age for thirdparties, but yes in person modal 2021-08-27 15:13:21 +02:00
c258179017 move and rename vue HouseholdRenderBox 2021-08-27 11:02:35 +02:00
2333b5c6b4 rename some translations 2021-08-27 09:55:13 +02:00
a302f0fdbf invert firstname lastname when creating new person (TO BE CONFIRMED) 2021-08-27 09:35:28 +02:00
52a0c0e95b create new person: add an action and put action buttons in a dropdown 2021-08-27 09:30:15 +02:00
c5f40c53ea further adaptations to display deathdate. deathdate added to what API returns 2021-08-26 16:42:33 +02:00
5194cad354 Adaptations for display of age and deathdate (different scenarios not all finished) 2021-08-26 14:53:04 +02:00
34df295801 replace store by data() for OnTheFly creation in AddPersons component 2021-08-26 00:17:38 +02:00
ccb302ad28 move postPerson fetch method out of OnTheFly component for addPersons create person case
OnTheFly don't use store anymore, but addPerson still use it
2021-08-25 23:45:52 +02:00
a0fd3cd481 move postPerson fetch method from children to onthefly first level (to squash) 2021-08-25 22:47:00 +02:00
25f43bc758 move postPerson fetch method from grant-children to children (to squash) 2021-08-25 21:25:39 +02:00
e369e43b00 onthefly create new person: adding result in suggested/selected list 2021-08-25 18:46:06 +02:00
88362bd284 start of updating personrenderbox to display age. only one scenario done 2021-08-25 17:46:51 +02:00
5884fbaffc use operator in person search api 2021-08-24 00:02:37 +02:00
ddd1eb5d10 [person box] respect "demi-quadratin" in birthdate-deathdate separation 2021-08-24 00:01:56 +02:00
7d6def733c [person bloc] handle null values in date + improve layout on dead person
and age
2021-08-23 19:20:41 +02:00
bfed062910 Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2021-08-23 19:02:55 +02:00
d3e52e81f1 Merge branch 'fix/person-creation' 2021-08-23 18:43:31 +02:00
647bdb2749 fix tests 2021-08-23 18:19:47 +02:00
8fb4a7110e fix double person creation + button for creating accompanying course on creation + simplification person create
The controller now register data from a previous post on the form, and
register it in the session.

The next post compare the data with previous one and, if yes, show a
review page if there are "alternate persons.
2021-08-23 17:55:56 +02:00
cd6aeefb07 ac menu: rename some items
https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/32
2021-08-23 15:55:24 +02:00
668b3e182e fix title of page translations and coherency 2021-08-22 22:24:46 +02:00
a0b914380b make badge-thirdparty as badge person, with just different color 2021-08-22 20:55:11 +02:00
bbc3399e19 ac list: pill badge for flags 2021-08-22 20:45:23 +02:00
52fa4b5549 ac work list: add an option to mask button text 2021-08-22 20:34:51 +02:00
3894c7a56d ac work: better color 2021-08-22 20:20:27 +02:00
4933edaa94 share accompanying_course_work-list on resume page 2021-08-22 20:13:42 +02:00
9fd455b622 adding sticky-form-buttons to activity list 2021-08-22 17:06:36 +02:00
3451bcaab1 réglages 2021-08-22 16:49:16 +02:00
d1344d6d54 activity list: an option disable edit and delete button (for resume page) 2021-08-22 15:17:17 +02:00
73a1d42ee7 fix conflict with AccompanyingPeriod list button 2021-08-22 14:55:30 +02:00
3ceb3d4b2b Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2021-08-22 14:46:20 +02:00
10b1edda11 improve concernedGroups in Activity list
TODO refund concernedGroups for better flexibility
2021-08-22 14:43:04 +02:00
a0f0e4e9ad disable 'Add an accompanying period in the past' in dropdown 2021-08-22 13:13:15 +02:00
b79c1f02da Accourse Work list: improve design 2021-08-22 13:05:45 +02:00
c798b1290c [course list in person file] remove action on course list 2021-08-22 11:56:51 +02:00
af0905c6e0 [person details page] remove addresses
L'adresse est indiquée dans le bandeau.

Les adresses de résidence sont gérées dans une entrée de menu spécifique
2021-08-22 11:47:52 +02:00
bd528c9025 [person list with period] add current showed person to new accompanying period 2021-08-22 11:41:52 +02:00
4fed96f988 Merge branch 'features/suggest-acc-course-persons-in-activity' 2021-08-22 11:28:57 +02:00
3bffde6123 fix global responsive_debug if env != dev 2021-08-22 10:34:35 +02:00
9fa82fc44c Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2021-08-22 10:33:04 +02:00
4001bb0996 Merge branch 'features/remove-parent-social-issues' into 'master'
Features/remove parent social issues

See merge request Chill-Projet/chill-bundles!137
2021-08-21 22:55:12 +00:00
d6135641c5 add a list of suggested persons on activity 2021-08-22 00:50:37 +02:00
075f22e79c configure SocialIssue consistency on Activity and AccompanyingPeriod 2021-08-22 00:02:22 +02:00
09e5cc1545 create api for social issue consistency 2021-08-22 00:02:22 +02:00
37b73931c4 ac work, design 2021-08-21 20:29:42 +02:00
4ad6786bf2 AccourseWork list : design title 2021-08-21 19:45:33 +02:00
d11c493e2d detail on resume accourse page 2021-08-21 17:41:08 +02:00
9795704532 adding global responsive_debug (false) in env=dev 2021-08-21 16:20:34 +02:00
883cb858a9 use chill_entity_render_box/string and design a badge-person 2021-08-21 15:10:25 +02:00
b301c1d405 flex-table accompanyingcourse-list used in two contexts + wraplist title style 2021-08-21 14:54:04 +02:00
6959de4e39 reorganise styles sheets in person/chill/scss 2021-08-21 12:59:46 +02:00
9c25132216 socialissues badge style in multiselect 2021-08-21 12:38:26 +02:00
87a917d11c accompanyingPeriod button 2021-08-21 10:32:11 +02:00
026562c32f remove unused styles 2021-08-21 10:04:20 +02:00
b37de4cd4f activity list: badges for issues, actions and reasons 2021-08-20 23:59:37 +02:00
14cbb1dd28 AccompanyingCourse: improve design of CourseLocation block 2021-08-20 23:04:51 +02:00
4d65c54996 [design proposal] adding a mixin to style social issue badge 2021-08-20 20:40:05 +02:00
2a3f869882 Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2021-08-20 18:46:43 +02:00
d198c33f9c Merge branch 'improve_ux' into master 2021-08-20 18:43:35 +02:00
949a453b48 remove commented code + fix style 2021-08-20 18:41:57 +02:00
4f1a9c205f Merge branch 'ameliorations_composants_vue' into 'improve_ux'
Ameliorations composants vue

See merge request Chill-Projet/chill-bundles!134
2021-08-20 16:09:22 +00:00
638af4728f Merge remote-tracking branch 'origin/features/rdv' 2021-08-20 18:01:44 +02:00
742445e7b3 allow to close editor 2021-08-20 17:57:30 +02:00
4ee67869bd style fixes requestor + multiline option for thirdpartyrenderbox 2021-08-20 17:53:48 +02:00
nobohan
223efba655 rdv:add swagger config file for calendar bundle 2021-08-20 17:46:32 +02:00
nobohan
fec8fa50ed issue 190: fix flat and buildingName inversion in address normalizer 2021-08-20 17:15:08 +02:00
8bcd69c5ec requestor styling fixed + button added. problem with removing requestor though... 2021-08-20 16:55:41 +02:00
badf632a8a #134 fixes address multiline 2021-08-20 16:55:04 +02:00
7363092d51 #134 fixes show button for thirdparty 2021-08-20 16:52:35 +02:00
d2b0b9d7da reorganise flex-table assets, improve search results, and accompanyingPeriods list 2021-08-20 16:38:07 +02:00
nobohan
de8478f3e5 rdv: various UI improvements to the calendar 2021-08-20 16:14:51 +02:00
bf0a24b38e various fixes accompanying period 2021-08-20 15:07:36 +02:00
Marc Ducobu
026ac91e69 Injection firstPerson in doc 2021-08-20 15:01:59 +02:00
nobohan
6a6b1760f5 rdv: style properly the events when clicking 2021-08-20 14:56:18 +02:00
698514ef12 #192 custom-zone added + no_data message 2021-08-20 14:47:33 +02:00
38dcca7397 AccompanyingPeriod list: adding new wrapheader asset and improve wraplist structure
wrapheader manage header of flex-table first row. the 2 cascades are independant.
2021-08-20 13:35:15 +02:00
176b68417a Merge remote-tracking branch 'origin/master' 2021-08-20 13:01:03 +02:00
1d2299e143 Merge branch 'integrate_wopi_bundle' into 'master'
Integration of wopi bundle with controller

See merge request Chill-Projet/chill-bundles!133
2021-08-20 10:49:43 +00:00
20ef04683d Merge remote-tracking branch 'origin/features/rdv' 2021-08-20 12:48:37 +02:00
b9674d7d28 Merge branch 'master' into integrate_wopi_bundle 2021-08-20 12:45:11 +02:00
ffec80c5fd Merge remote-tracking branch 'origin/master' 2021-08-20 12:44:57 +02:00
7f28effc1e Associate generate document with evaluation and update UX to go back to
documents
2021-08-20 12:44:15 +02:00
28f69d8dec chill person assets: we need to use mixins and variables into sass sheets imported 2021-08-20 12:31:16 +02:00
55c34c2583 #134 fix dynamic URL to go to person or thirdparty file 2021-08-20 11:06:11 +02:00
80672a038c Merge remote-tracking branch 'origin/master' into integrate_wopi_bundle 2021-08-20 11:05:42 +02:00
3e27589cca #134 hLevel fixed 2021-08-20 10:37:46 +02:00
Marc Ducobu
9fc7ed0fb6 Merge branch 'docgen3' into 'master'
Docgen3

See merge request Chill-Projet/chill-bundles!135
2021-08-20 07:53:05 +00:00
Marc Ducobu
975f27f780 Good parameters for FOMULAIRE_AEB 2021-08-20 09:51:37 +02:00
Marc Ducobu
043e865eb0 Add column for DocGeneratorTemplate.index 2021-08-20 09:49:46 +02:00
Marc Ducobu
0479ddb42b Data injection in to file on openstack 2021-08-20 09:49:46 +02:00
f2b5cd7636 Accourse: toggle flags bg-danger in banner + misc 2021-08-20 01:35:01 +02:00
d100de4fcd In AccompanyingPeriod list, only show existing informations
That rule must be the same for each list,
we show empty datas messages in the complete show view
2021-08-20 00:46:28 +02:00
e711ac1feb Merge branch 'ameliorations_composants_vue' into improve_ux 2021-08-20 00:40:42 +02:00
5b8439e13c adding a new 'wraplist' sass element in flex-table collection: applied with AccompanyingPeriod lists 2021-08-20 00:38:40 +02:00
06abefd576 add redirection to wopi after doc generation 2021-08-19 23:30:45 +02:00
nobohan
3799627bf1 rdv: twig layout and field formatting 2021-08-19 21:50:52 +02:00
8295788d7f Merge branch 'feature/add-ChillWopiBundle' 2021-08-19 21:34:01 +02:00
52469d995a onTheFly modal, edit button changed to show person file 2021-08-19 21:07:37 +02:00
b4234ddc58 class made dynamic with correct hLevel option 2021-08-19 21:06:30 +02:00
71e6b356c3 Merge branch 'features/localize-accompanying-course-2' into 'master'
Improve UX for handling location in accompanying course

See merge request Chill-Projet/chill-bundles!125
2021-08-19 19:03:41 +00:00
bbcf9cc4ca handle creation of address 2021-08-19 20:59:17 +02:00
07030922e8 [household member editor] integrate with adresses and course
* redirection to a returnPath given into query search
* button for creating address
2021-08-19 20:00:20 +02:00
c16c517e97 [acc course location] allow to locate course from the index page 2021-08-19 20:00:20 +02:00
a0afaa568d [AccompanyingCourse location] Indicate course location on course index
page
2021-08-19 20:00:20 +02:00
75d3dfb830 Merge branch 'feature/link-evaluations-to-docgen' into 'master'
Feature/link evaluations to docgen

See merge request Chill-Projet/chill-bundles!130
2021-08-19 17:58:56 +00:00
a797143511 create document from evaluation 2021-08-19 19:47:27 +02:00
bb471fd4af AccompanyingCourse: fix errors with renderbox into Resources 2021-08-19 19:41:16 +02:00
fdd08905a8 init new twig block_post_menu 2021-08-19 19:40:32 +02:00
nobohan
4ae9b29924 rdv: correct redirections 2021-08-19 19:01:01 +02:00
Marc Ducobu
364346d0aa Merge branch 'docgen3' into 'master'
Docgen3

See merge request Chill-Projet/chill-bundles!132
2021-08-19 16:53:28 +00:00
nobohan
1a025ead1b rdv: twig layout + teleport calendar controls 2021-08-19 18:45:59 +02:00
Marc Ducobu
73c90f8c6a Debug docgen admin view error name 2021-08-19 18:42:07 +02:00
Marc Ducobu
772388298d Debug docgen view repository error name 2021-08-19 18:42:07 +02:00
Marc Ducobu
4184a74e7e Styling refactoring 2021-08-19 18:42:07 +02:00
Marc Ducobu
237476dc28 Save generated doc in openstack 2021-08-19 18:42:07 +02:00
Marc Ducobu
e6f5ef91ec Generation du doc àpd du template 2021-08-19 18:42:07 +02:00
755812ae3c fix buttonLocation deleted from last merge 2021-08-19 17:16:52 +02:00
Pol Dellaiera
c9cc0dd2a9 Update status code. 2021-08-19 17:03:22 +02:00
Pol Dellaiera
10c9526b49 Fix property name. 2021-08-19 16:58:41 +02:00
3602b0d097 requestor import fix alias 2021-08-19 16:50:08 +02:00
Pol Dellaiera
53cad32910 Update checkFileInfo 2021-08-19 16:49:55 +02:00
Pol Dellaiera
2a40645604 Pass the filename, not the id. 2021-08-19 16:33:04 +02:00
Pol Dellaiera
da505ed106 Add missing favicon url 2021-08-19 16:30:12 +02:00
Pol Dellaiera
fe4b9647b9 fix path to twig template. 2021-08-19 16:29:14 +02:00
Pol Dellaiera
1d7ef9300c Add missing router service. 2021-08-19 16:28:36 +02:00
Pol Dellaiera
bb9e175849 Add missing psr17 service. 2021-08-19 16:27:41 +02:00
Pol Dellaiera
5a3fd2712c refactor: Add test controller. 2021-08-19 16:25:53 +02:00
5dc92ed5bd Merge branch 'ameliorations_composants_vue' of gitlab.com:Chill-Projet/chill-bundles into ameliorations_composants_vue 2021-08-19 16:21:11 +02:00
nobohan
7e64ec0a45 rdv: fix conflict when merging features/rdv 2021-08-19 16:19:36 +02:00
Pol Dellaiera
0a183c8cfc Revert "fix: Fix services definitions."
This reverts commit 3599508a3b.
2021-08-19 16:11:33 +02:00
Pol Dellaiera
60328032d8 Revert "Remove obsolete controller."
This reverts commit 494573e5b4.
2021-08-19 16:11:32 +02:00
nobohan
cf4f25aaff rdv: update fixtures 2021-08-19 16:07:44 +02:00
Pol Dellaiera
71900010f6 fix: Fix property name. 2021-08-19 16:06:05 +02:00
Pol Dellaiera
3599508a3b fix: Fix services definitions. 2021-08-19 16:04:43 +02:00
Pol Dellaiera
b1c15ec8ce fix: Update checkFileInfo, getFile and putFile. Remove obsolete code in unsupported methods. 2021-08-19 16:03:19 +02:00
d61dbaed91 move vue thirdparty components in ChillThirdPartyBundle assets 2021-08-19 16:01:23 +02:00
nobohan
6a609eb1ab rdv: fix regression with multiple groups for property on calendar 2021-08-19 16:00:37 +02:00
9ac72a21d1 adding alias ChillThirdPartyAssets 2021-08-19 15:45:29 +02:00
fd8f4a98c0 vue Address: fix ShowAddress multiline option 2021-08-19 15:41:54 +02:00
Marc Ducobu
96ade5bd36 Merge branch 'fix-crud' into 'master'
fix crud paginator pbm

See merge request Chill-Projet/chill-bundles!131
2021-08-19 13:33:54 +00:00
Marc Ducobu
6383c1ca7b fix crud paginator pbm 2021-08-19 15:32:58 +02:00
Marc Ducobu
8be99bfe50 Merge branch 'docgen2' into 'master'
Api point for docgen templates

See merge request Chill-Projet/chill-bundles!129
2021-08-19 13:27:25 +00:00
13ff55c967 Desactivate tests which randomly fails with new fixtures 2021-08-19 15:25:11 +02:00
8c0d8692b0 Merge branch 'features/work-evaluation-save' into 'master'
[Social Work] Save evaluations

See merge request Chill-Projet/chill-bundles!126
2021-08-19 13:22:42 +00:00
nobohan
65bce1aacb rdv: available calendar ranges 2021-08-19 15:19:25 +02:00
2394895ccb Merge branch 'ameliorations_composants_vue' of gitlab.com:Chill-Projet/chill-bundles into ameliorations_composants_vue 2021-08-19 15:07:43 +02:00
60f7bdc926 serialization forr evaluations 2021-08-19 15:03:56 +02:00
6ca35d5a18 requestor adapted to use PersonRenderBox or ThirdPartyRenderBox 2021-08-19 14:47:41 +02:00
6253927e2e Merge branch 'ameliorations_composants_vue' into improve_ux 2021-08-19 14:31:20 +02:00
Pol Dellaiera
4f39676e97 Remove obsolete OpenStack and Configuration stuff. 2021-08-19 14:24:40 +02:00
Pol Dellaiera
84a460c4e7 Remove obsolete file. 2021-08-19 14:18:24 +02:00
Pol Dellaiera
494573e5b4 Remove obsolete controller. 2021-08-19 14:18:24 +02:00
Pol Dellaiera
c16fc77d01 fix: Fix service naming, remove the suffix. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
282539ae6b fix: Add wiring for UserProviderInterface. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
50f1d3cd10 fix: Add UserProviderInterface dependency. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
4e04714a42 fix: Add wiring for UserProviderInterface. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
8992b99d56 fix: Add user data. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
62536ab2ff fix: Format date properly. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
b189726380 fix: Fix mimeType detection/discovery. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
a63c26482e fix: Fix mimeType detection/discovery. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
c208797daf fix: Update StoredObject entity. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
0366d0cb17 fix: Add exceptions. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
2b7fa630fc refactor: Add nyholm/psr7. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
a41b959fbd refactor: Fix TempUrlGeneratorInterface wiring. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
e4d9129af2 refactor: Add TempUrlGeneratorInterface wiring. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
72fc6e05cc refactor: Add WopiInterface wiring. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
47a2af6f19 Update composer.json. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
1bd01aefae refactor: Update ChillWopiBundle - Work in progress. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
c6b6fa5bf6 refactor: Update ChillDocStoreBundle - Add StoredObject repository. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
36d582c8ab Update configuration. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
df544bdfa4 update 2021-08-19 14:17:54 +02:00
Pol Dellaiera
12e17fac82 debug 2021-08-19 14:17:54 +02:00
Pol Dellaiera
b2d84a7677 Update. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
ebb679dbbb Update services.php. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
61bb595bba Update Test controller. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
c7aafc6730 Update services.php 2021-08-19 14:17:54 +02:00
Pol Dellaiera
24b675ce97 Fix path to services.php. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
3c888238c5 Fix services file. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
1bd00535ce Update services for controllers. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
d616e00660 Add test routes and controller. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
5d5ad9e4f7 Fix OpenStack service. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
28af73db19 Fix typo. 2021-08-19 14:17:53 +02:00
0f87d77896 Merge branch 102_activites_annexes into 'improve_ux' 2021-08-19 14:08:23 +02:00
8b50e5bd62 comment TODO 2021-08-19 12:41:38 +02:00
f490fdd37c batch remove 'Bravo' 2021-08-19 12:41:38 +02:00
7ffdf4cb1f render_box person and thirdparty: fix bug customOptions with 'replace' 2021-08-19 12:41:38 +02:00
801e897a38 Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2021-08-19 12:40:05 +02:00
21db8674e7 thirdparty: replace macro address by render_box 2021-08-19 12:38:07 +02:00
de7322464b deathdate fix in personrenderbox, in case there is a deathdate 2021-08-19 12:32:26 +02:00
90cfcd0569 ThirdPartyRenderBox created and old view replaced 2021-08-19 12:31:38 +02:00
4a0ffd2cba flex-table taken out of for-loop 2021-08-19 12:29:08 +02:00
3e9d96368d style added to create space between streetname and city + margin of flex-table fixed 2021-08-19 12:26:00 +02:00
227d627ad5 Merge branch 110_extend_thirdparty into 'master' 2021-08-19 12:19:00 +02:00
c7a2bbfc1d remove dump debug 2021-08-19 12:17:16 +02:00
Marc Ducobu
d8ca9cf082 Api point for docgen templates 2021-08-19 11:15:20 +02:00
nobohan
0457ee2b8d rdv: add my calendar + checkbox 2021-08-19 10:52:47 +02:00
bab06796f1 improve editing of evaluation
- an evaluation type can be repeated multiple times on the same action;
- in vue, evaluation are listed by key, not id,
- adding an evaluation make appears directly in "edit" mode;
- ...
2021-08-19 10:14:10 +02:00
nobohan
7c4f976230 rdv: add user calendar endpoint + add this calendar in the calendar 2021-08-18 23:16:52 +02:00
1aa77bd1c4 AccompanyingCourse: uniformity of styles 2021-08-18 22:36:02 +02:00
39e8af48b4 #198 issue fixes: mostly template fixes and translations 2021-08-18 22:31:43 +02:00
9447516694 fix bug in saving evaluation dates 2021-08-18 22:30:32 +02:00
9a1f56a820 [Aside activity] Temporarily remove the link to aside activities 2021-08-18 21:23:04 +02:00
nobohan
dbf72774c2 rdv: add main user in fullcalendar form 2021-08-18 21:09:08 +02:00
nobohan
a70d5cc263 rdv: fullcalendar: save calendarRange id as an extended prop in the calendar entity 2021-08-18 21:09:08 +02:00
nobohan
07eb5c797a rdv: fullcalendar: manage event clicking 2021-08-18 21:09:08 +02:00
nobohan
a54434a677 rdv: add fr locale to fullcalendar + colorise users calendars 2021-08-18 21:09:08 +02:00
nobohan
ca9738b55a rdv: fullcalendar: add current user by default 2021-08-18 21:09:08 +02:00
nobohan
b40c25595a rdv: fullcalendar: select and unselect user calendars 2021-08-18 21:09:08 +02:00
nobohan
e6deb6bc7a rdv: fullcalendar: update events source dynamically 2021-08-18 21:09:08 +02:00
nobohan
e499ebdf8b rdv: add dynamic event sources in fullcalendar (WIP) 2021-08-18 21:09:08 +02:00
nobohan
07f086dd61 rdv: fix calendar users loading for multiselect 2021-08-18 21:09:08 +02:00
nobohan
f2d79919f0 rdv: add calendar user selector widget 2021-08-18 21:09:08 +02:00
nobohan
02a9e21f62 rdv: set the calendar ranges as an API point + fetch them into the calendar view 2021-08-18 21:09:08 +02:00
nobohan
323434f34e rdv: add fixture for calendar range 2021-08-18 21:09:08 +02:00
nobohan
afad23eb0f rdv: fix timezone issue for editing events 2021-08-18 21:09:08 +02:00
nobohan
981c819f56 rdv: add current event date when edit 2021-08-18 21:09:07 +02:00
nobohan
9907b59379 rdv: renaming of variable + enable to display selected event 2021-08-18 21:09:07 +02:00
nobohan
dc3c8a4032 rdv: translations + layout (twig) 2021-08-18 21:09:07 +02:00
nobohan
95b50f2b99 rdv: add calendar list in menu 2021-08-18 21:09:07 +02:00
nobohan
b106a03534 rdv: hook i18n translations into the App.vue 2021-08-18 21:09:07 +02:00
nobohan
b7c5a459f7 rdv: change type of date to datetime in calendarRange 2021-08-18 21:09:07 +02:00
nobohan
4a6914be22 rdv: use datetime instead of date fields 2021-08-18 21:09:07 +02:00
nobohan
5181098339 rdv: connect fullcalendar vue component to startDate and endDate fields 2021-08-18 21:09:07 +02:00
nobohan
cc3e7f54a7 rdv: minor corrections following MR review 2021-08-18 21:09:07 +02:00
df7e76a2e7 rdv: MR comment 2021-08-18 21:09:07 +02:00
ccd5ac74fd rdv: MR comment 2021-08-18 21:09:07 +02:00
29c2ed3ce8 rdv: MR comment 2021-08-18 21:09:07 +02:00
4c17ce7926 rdv: MR comment 2021-08-18 21:09:07 +02:00
d49fd9738b rdv: MR comment 2021-08-18 21:09:07 +02:00
892e43d195 rdv: MR comment 2021-08-18 21:09:07 +02:00
nobohan
fe3cbdadab rdv: fullcalendar: add 3 buttons 'month - week - day' 2021-08-18 21:09:07 +02:00
nobohan
c54290a265 rdv: adapt calendar entities: drop useless field and change field type 2021-08-18 21:09:07 +02:00
nobohan
de6df983a0 rdv: add translations 2021-08-18 21:09:07 +02:00
nobohan
0585455bbe rdv: fullcalendar vue: use store and add an event on date select 2021-08-18 21:09:07 +02:00
nobohan
f508971b6a rdv: add fullcalendar.js as a vuejs component (POC) 2021-08-18 21:09:07 +02:00
nobohan
5c8b247f40 rdv: correct edit page 2021-08-18 21:09:07 +02:00
nobohan
9c7c890943 rdv: delete a rdv 2021-08-18 21:09:07 +02:00
nobohan
7e02b284ca rdv: others pages: edit, list 2021-08-18 21:09:07 +02:00
nobohan
d4ec5d137e rdv: add validation 2021-08-18 21:09:07 +02:00
nobohan
d542f582e6 rdv: allow null concerned persons in form 2021-08-18 21:09:07 +02:00
nobohan
3c37802821 rdv: add show calendar 2021-08-18 21:09:07 +02:00
nobohan
227be0b482 rdv: add default status on rdv when creating a new rdv 2021-08-18 21:09:07 +02:00
nobohan
4b8736ae57 rdv: fix adding thirdparty when creating a rdv 2021-08-18 21:09:07 +02:00
nobohan
206347de91 rdv: add entity to serialize (WIP) 2021-08-18 21:09:07 +02:00
nobohan
516c286519 rdv: can add thirdparty to a rdv 2021-08-18 21:09:07 +02:00
nobohan
adc462b735 rdv: simplify the vuejs component (removed not used parts) 2021-08-18 21:09:07 +02:00
nobohan
43d6dc835f rdv: add thirdParty in concerned persons (WIP) 2021-08-18 21:09:07 +02:00
nobohan
1557b8f80a rdv: add the concernedGroup vuejs component in add a new rdv 2021-08-18 21:09:07 +02:00
nobohan
20d113b1db rdv: some fixes for the new rdv 2021-08-18 21:09:06 +02:00
nobohan
114df16e0f rdv: add new rdv form 2021-08-18 21:09:06 +02:00
nobohan
b01eba2533 rdv: add route, twig for listing and creating calendar items 2021-08-18 21:09:06 +02:00
nobohan
75caf3fa14 rdv: adapt entities + add fixtures 2021-08-18 21:09:06 +02:00
nobohan
fdccdfe7b1 rdv: add first migration 2021-08-18 21:09:06 +02:00
nobohan
38ec2b5de9 rdv: correct entities with FQCN 2021-08-18 21:09:06 +02:00
nobohan
3010df2016 calendar: add entities 2021-08-18 21:09:06 +02:00
nobohan
3e7a9522b6 init Calendar bundle 2021-08-18 21:09:06 +02:00
d652771af0 CourseLocation: fix errors 2021-08-18 20:10:43 +02:00
9d655d92f2 CourseLocation: add message if no address 2021-08-18 17:45:37 +02:00
9e51717984 Merge branch accourse_confirmation into 'master' 2021-08-18 17:23:27 +02:00
a6b360c193 setup of ThirdPartyRenderBox 2021-08-18 17:20:57 +02:00
42b9e25403 some todo's added in comment + most href's made dynamic 2021-08-18 17:20:17 +02:00
403922c631 AccompanyingCourse, change blocs order (location in second position) 2021-08-18 17:10:37 +02:00
53fe90adc3 AccompanyingCourse: check if conditions of confirmation are met, or display alert 2021-08-18 16:54:22 +02:00
41fe95c80f fix display styles bugs 2021-08-18 16:54:22 +02:00
28435940f1 AccompanyingCourse api errorMsg 2021-08-18 16:53:06 +02:00
34e1a9b748 address added to personrenderbox w/ ShowAddress. Adapted to include a multiline option 2021-08-18 16:22:38 +02:00
097ad3a364 fix return type of class 2021-08-18 09:56:48 +02:00
816d860f4a Merge branch 'fixtures/fix-loading-people' into 'master'
Fixtures/fix loading people

See merge request Chill-Projet/chill-bundles!124
2021-08-17 20:01:29 +00:00
c7cc2c7596 Fixtures/fix loading people 2021-08-17 20:01:29 +00:00
6ad8a73fc0 Merge branch 'master' into 110_extend_thirdparty 2021-08-17 20:47:58 +02:00
4cf676858e Merge branch add-location-period into 'master' 2021-08-17 18:37:07 +02:00
b87046dcd6 comment all console.log in AccompanyingCourse component 2021-08-17 18:32:43 +02:00
76eea2a4eb fix title that doesn't match to the page 2021-08-17 17:47:16 +02:00
7ba3e0287a Address: adding hideDateFrom option to hide field DateFrom on step1 2021-08-17 17:24:27 +02:00
54ac122863 Merge branch 'features/add-search-api-for-users' into 'master'
extend search api to users

See merge request Chill-Projet/chill-bundles!121
2021-08-17 15:20:30 +00:00
eac4c48d8f deathdate added if not null 2021-08-17 16:30:26 +02:00
160383e3a3 AccompanyingCourse: precise address person locator + minors stuffs 2021-08-17 16:23:16 +02:00
7af85bc401 AddressRenderBox created and added to PersonRenderBox, still some styling issue with address. Render options not done yet 2021-08-17 16:14:08 +02:00
cdc6cf211a AddAddress option buttonType: component manage button in edit or create context 2021-08-17 15:41:03 +02:00
Marc Ducobu
f12dc97d57 Merge branch 'fix-bug-empty-cb' into 'master'
Fix error when options['customButtons'] is empty

See merge request Chill-Projet/chill-bundles!123
2021-08-17 13:26:13 +00:00
Marc Ducobu
a58bdb466c Fix error when options['customButtons'] is empty 2021-08-17 15:23:57 +02:00
1a6c0529cc date formatting using dateToISO function, still fix with translations. + record-actions inserted via <slot> 2021-08-17 14:05:48 +02:00
Marc Ducobu
23366d5582 Merge branch 'docgen-fix' into 'master'
Fix error about not opened bracket

See merge request Chill-Projet/chill-bundles!122
2021-08-17 12:04:55 +00:00
Marc Ducobu
f58be46466 Fix error about not opened bracket 2021-08-17 14:03:18 +02:00
65e72b05c5 Merge branch 'master' into 102_activites_annexes 2021-08-17 13:16:01 +02:00
Marc Ducobu
069b3d1839 Merge branch 'docgen' into 'master'
Debut bundle DocGen

See merge request Chill-Projet/chill-bundles!119
2021-08-17 09:44:14 +00:00
Marc Ducobu
cbdf976885 Adding context 2021-08-17 11:42:30 +02:00
Marc Ducobu
8df4c93c97 Datafixtures for Doc Gen 2021-08-17 11:42:30 +02:00
Marc Ducobu
5ce6d37a69 Controller to generate a doc 2021-08-17 11:42:30 +02:00
Marc Ducobu
7dc501cbda Creation of DocGenTemplate entity 2021-08-17 11:42:30 +02:00
Marc Ducobu
8207db4b45 First Version DocGenerator 2021-08-17 11:42:30 +02:00
f5c5038fda v-for loop on add-evaluation subcomponent 2021-08-17 11:42:30 +02:00
436d583f65 getter/setter for form input date 2021-08-17 11:42:30 +02:00
533865c41a show evaluation details 2021-08-17 11:42:30 +02:00
14c0c9763f fix styles flashbag and action-row 2021-08-17 11:42:30 +02:00
a54e70f9e0 set small fields in form evaluation 2021-08-17 11:42:30 +02:00
63b820784f save/hide form evaluation 2021-08-17 11:42:30 +02:00
71b54622e2 simplify styles cascade 2021-08-17 11:42:30 +02:00
190549180b add FormEvaluation subcomponent 2021-08-17 11:42:30 +02:00
375326fc32 add/remove evaluation from evaluation list 2021-08-17 11:42:30 +02:00
a1435314a0 comment all console.log 2021-08-17 11:42:30 +02:00
8d98a144fd automatic rearrange code (indentation: 3) 2021-08-17 11:42:30 +02:00
d0fa28db2a display evaluations for action 2021-08-17 11:42:30 +02:00
9ac14ff5e3 prepare subcomponents for evaluation, share addResult styles 2021-08-17 11:42:30 +02:00
d67483fd9a add options on button for AddPersons component: size, type and display
* size: add bootstrap class : btn-sm, btn-lg..
* type: override chill button class : btn-update, btn-chill-beige
* display: override default : true
2021-08-17 11:42:30 +02:00
3156706c2b vue accompanyingcourse_work: prepare evaluations, + translations chains + styles border 2021-08-17 11:42:30 +02:00
44e85361e6 add endpoint for listing evaluation 2021-08-17 11:42:30 +02:00
320f16a121 [accompanyingPeriodWorkEvaluation] store comment in db 2021-08-17 11:42:30 +02:00
5635d19252 [accompanyingPeriodWork] add evaluation to normalizer 2021-08-17 11:42:30 +02:00
6544566c34 fix test PersonSearch by adding html node filtering 2021-08-17 11:42:30 +02:00
9f7c0dcd09 adding addresses to accompanying period 2021-08-17 11:42:30 +02:00
0e2e7155fb Load social work, and fix some repositories 2021-08-17 11:42:30 +02:00
8a962a4f1c refactor loading for social issues using real data 2021-08-17 11:42:30 +02:00
2f699d32b0 create entity and schema 2021-08-17 11:42:30 +02:00
72a1ac02eb add address suggestion by household 2021-08-17 11:42:30 +02:00
c420d2bfd7 Add address suggestion for a person 2021-08-17 11:42:30 +02:00
8d2b1fbe13 add test for accompanying period location validity 2021-08-17 11:42:30 +02:00
a3a5d5cfd0 [AccompanyingPeriod] create constraints for location 2021-08-17 11:42:30 +02:00
3302d69373 [AccompanyingPeriod] add flashbag message when located temporarily 2021-08-17 11:42:30 +02:00
f188cc2d27 [AccompanyingPeriod] add location to serialization 2021-08-17 11:34:39 +02:00
8f9c8bc1a6 update schema to store location on accompanying period 2021-08-17 11:34:39 +02:00
43f9e50100 Merge branch 'features/add-location-period' of gitlab.com:Chill-Projet/chill-bundles into add-location-period 2021-08-17 09:36:50 +02:00
aa0ff37479 Address: fix option regression 2021-08-17 09:04:58 +02:00
20cdec20d2 accompanyingCourse: ckeditor for comment bloc + sass color variables in app.vue 2021-08-16 20:25:09 +02:00
0abb4983f7 open confirmation modal when assigning person Location 2021-08-16 19:42:55 +02:00
5a716a3523 [Household members editor] add address suggestion on menage creation 2021-08-16 19:07:03 +02:00
29b5e700f6 rename key in payload 2021-08-16 18:38:08 +02:00
e8e2607076 rename method to avoid confusion 2021-08-16 16:27:15 +02:00
107699ec31 patch Address to accompanyingPeriod: build payload for differents cases
use uniq patch api endpoint, build payload body in action,
call updateAddress action when submitting, assigning or removing.
2021-08-16 16:26:45 +02:00
25465b1121 [AccompanyingCourse] re-introduce flashbag on temporarily locations
See 4e8dd3b189
2021-08-16 15:42:36 +02:00
Marc Ducobu
8834f200df Removing un-used code 2021-08-16 15:42:36 +02:00
Marc Ducobu
cc84c067c5 Other social entities became editable via admin 2021-08-16 15:42:36 +02:00
Marc Ducobu
d8ee42b0a5 SocialIssues became editable via admin 2021-08-16 15:42:36 +02:00
Marc Ducobu
a948d9e2da Add license text 2021-08-16 15:42:36 +02:00
Marc Ducobu
c9a5d0548c Removing spaces at the end of line 2021-08-16 15:42:36 +02:00
Marc Ducobu
c37ba5db6a Removing spaces at the end of line 2021-08-16 15:42:36 +02:00
54c4524b27 extend search api to users 2021-08-16 14:39:18 +02:00
966292cdd5 pass props to ButtonLocation 2021-08-16 12:18:08 +02:00
9d1166d8fc add removeAddress button; buttonType different with edit context 2021-08-16 10:56:24 +02:00
1b3904f8e3 rename variable displayText 2021-08-16 10:19:53 +02:00
77fe497994 altNames displayed dynamically 2021-08-14 12:01:44 +02:00
b89a66b20c dynamic properties displayed 2021-08-13 18:31:15 +02:00
2d2bb117ca condition on persons to see button location 2021-08-13 17:54:58 +02:00
17dd52c3dc import ShowAddress in CourseLocation, with alert if temporary address 2021-08-13 17:20:58 +02:00
d6e41e5ac7 Merge branch 'address_refactoring' into add-location-period 2021-08-13 16:59:37 +02:00
b0187d0594 add file ShowAdressPane that contains ShowAddress, because ShowAddress must be called in several files 2021-08-13 16:58:48 +02:00
ea691d9b32 Merge branch 'address_refactoring' into add-location-period 2021-08-13 16:13:09 +02:00
1d2cbc4f62 minor details 2021-08-13 16:11:49 +02:00
5e0c930087 CourseLocation: action and mutation for updateLocation, hide button if personLocation 2021-08-13 16:08:42 +02:00
f535e794a7 Merge branch 'address_refactoring' into add-location-period 2021-08-13 16:04:15 +02:00
2f28e02f65 prepare vue Address to be used too in accompanyingCourse context
i18n is managed by root component:
* ok for person and household implementation (=> they use Address root component)
* but must be imported in vue i18n file if called from another component

submitAddress is emit to parent, it allow to control final action:
* casting final submitNewAddress with POST requests (for person or household entity);
* or dispatching changes from store, casting only payload to be used.

remove and simplify some options: backurl is always used with person/household,
and never if called from another vue component.
2021-08-13 16:01:15 +02:00
438134690f styling fixed with proper class cascade 2021-08-13 14:57:56 +02:00
166144e57e first conditionalities added analog to twig template 2021-08-13 13:15:08 +02:00
1600d3d271 Merge branch 'address_refactoring' into add-location-period 2021-08-13 10:26:12 +02:00
4b69f97e2f vue AddAddress: merge api files in the person bundle 2021-08-13 10:23:46 +02:00
64433b420d CourseLocation: view current location 2021-08-12 17:05:43 +02:00
8f9d4a1765 Merge branch 'address_refactoring' into add-location-period 2021-08-12 16:46:25 +02:00
c302452e01 improve Address reusability: move i18n translations out of root component 2021-08-12 16:45:41 +02:00
6bb5440220 injecting person data into renderbox, no styling yet 2021-08-12 16:23:58 +02:00
c48586cd0e renaming of PersonItem into ParticipationItem 2021-08-12 15:55:35 +02:00
205c48f58a courseLocation: init Address context in the store 2021-08-12 15:55:10 +02:00
368bbcf9b2 Merge branch 'address_refactoring' into ggg 2021-08-12 15:53:42 +02:00
76a4b24aa1 improve vue Address options (to be checked in all context) 2021-08-12 15:50:27 +02:00
21fd69488f start of PersonRenderBox in vue 2021-08-12 15:21:33 +02:00
f6376118a0 commented out unneccesary lines for migration 2021-08-12 11:54:50 +02:00
a6001c195a templates added and adapted for delete, list en view of aside activity 2021-08-12 11:53:04 +02:00
8829d234ec adapt to show date of death. it adapts but does not show actual date of death yet 2021-08-12 11:50:11 +02:00
6ee0acfa0f vue_accourse: adapt stickynav numerotation with 2 new blocs
+ let IDE make corrections in theses files
2021-08-12 11:37:25 +02:00
7d97889cbf templates changed to use the standard CRUD templates + delete template added 2021-08-10 15:45:00 +02:00
Pol Dellaiera
364aff36a4 Add initial set of files. 2021-08-10 15:13:46 +02:00
Pol Dellaiera
3f1b5b2319 Add ChillWopiBundle. 2021-08-10 15:13:34 +02:00
fc6a9ad64f migration files moved into bundle 2021-08-10 14:23:07 +02:00
4c7129a3b2 aside activities added to user menu 2021-08-10 14:19:01 +02:00
bbb69bcfe0 list template adapted to display aside activities ordered by date (DESC) 2021-08-10 14:18:37 +02:00
a1ed0d3ce4 list.html.twig template added and adapted to display list of aside activities, still need to adapt to show only activities of logged in user 2021-08-10 11:32:27 +02:00
fb43980a2a everything changed to datetime 2021-08-10 10:56:45 +02:00
da98b42c8c Merge branch 'address_refactoring' into add-location-period 2021-08-08 22:34:51 +02:00
840ffe42a6 fix patchAddress with date validFrom 2021-08-08 22:27:39 +02:00
1f8c343a89 submitAddress doesn't take arguments 2021-08-08 22:01:27 +02:00
f6a02e157d manage validFrom date, wip (patchAddress return 500) 2021-08-08 22:01:27 +02:00
21957846b0 fix more precise condition 2021-08-08 12:30:31 +02:00
1c7e1b55f8 standard successText seems better 2021-08-08 12:30:31 +02:00
ea391d18e9 fix display alerts above 2021-08-08 12:30:31 +02:00
72cd9f452e fix 500: in edit context, we don't need to postAddressTo a second time ! 2021-08-08 12:30:31 +02:00
44313b507a twig include allow to pass mode:edit option when it's not detected 2021-08-08 11:14:31 +02:00
46bd70881e Address i18n: manage specific translations 2021-08-08 10:34:02 +02:00
fbf343dd19 keep this unused subcomponent file, wrote for Address with household 2021-08-08 09:59:31 +02:00
028af50dbc Vue HouseHoldAddress is now unused and can be dropped 2021-08-08 09:50:35 +02:00
0075fed9a5 submit methods: first promise is shared for person or household context 2021-08-08 09:48:42 +02:00
62dc94bb14 Twig: test address_id in url and substring 'edit' in route 2021-08-08 08:35:52 +02:00
c075ff199d fix and rename variables + remove comments 2021-08-07 19:21:34 +02:00
e178183cef corrections + details 2021-08-07 18:50:10 +02:00
63fbf4b249 make Address works with household context 2021-08-07 17:29:45 +02:00
9f77b84e48 prepare to merge HouseholdAddress in Address: split api.js files 2021-08-07 15:47:38 +02:00
fae196d3eb prepare AccompanyingCourse Location sub-component to use Address 2021-08-07 15:40:26 +02:00
ca4d542604 Merge branch 'address_refactoring' into add-location-period 2021-08-07 12:01:14 +02:00
75be8aa557 enable vue CourseLocation and mark place where it must connect to Address component 2021-08-07 12:00:08 +02:00
9e94cea9d5 mark potential place where template must include vue_address component 2021-08-07 11:51:15 +02:00
6d58bf152b Merge branch 'address_refactoring' into add-location-period 2021-08-06 21:50:04 +02:00
47d704b521 passing option backUrl from include template twig 2021-08-06 21:46:10 +02:00
cdbd97e595 passing option binModalStep from twig include template 2021-08-06 21:32:10 +02:00
24714227b8 transmit all options from a twig include template 2021-08-06 21:20:59 +02:00
da09e10fb1 adding options in root component to see result or redirect (not working) 2021-08-06 17:36:19 +02:00
b74f9cf5dc getting all the asideActivity form to work with all fields. Still bug with DateTimeImmutable value somehwere 2021-08-06 17:35:46 +02:00
b62597426c classes for address-valid 2021-08-06 16:41:29 +02:00
6c0ab6f25e when creating new address, start first with edit panel 2021-08-06 16:41:29 +02:00
9f3ceb94f0 adding options to custom button, and improve stepWithModal options 2021-08-06 16:39:21 +02:00
Marc Ducobu
6b4e27a531 Merge branch 'issue_43_admin_for_prob_soc' into 'master'
WIP : Issue 43 admin for prob soc

See merge request Chill-Projet/chill-bundles!56
2021-08-06 13:36:31 +00:00
Marc Ducobu
3be024bf6b Removing un-used code 2021-08-06 15:21:35 +02:00
Marc Ducobu
88847cb19c Other social entities became editable via admin 2021-08-06 15:21:35 +02:00
Marc Ducobu
ad5eed4c26 SocialIssues became editable via admin 2021-08-06 15:21:35 +02:00
Marc Ducobu
25eee88693 Add license text 2021-08-06 15:21:34 +02:00
Marc Ducobu
c32ca59c76 Removing spaces at the end of line 2021-08-06 15:21:20 +02:00
Marc Ducobu
94b0432bb9 Removing spaces at the end of line 2021-08-06 15:21:20 +02:00
9ee140a7d8 loading of asideactivityform service moved to form.yaml 2021-08-06 11:52:01 +02:00
5d598bf46b translations adjusted 2021-08-06 11:42:52 +02:00
8649d49d98 date field added and activity type field. Form listed as service in services.yaml
asideactivity form added as service to inject necessary arguments
2021-08-06 11:40:57 +02:00
d67b99b269 class changed into final class 2021-08-06 11:26:37 +02:00
01cc230136 Submitting address, and validFrom field 2021-08-05 22:04:41 +02:00
ac999a4f17 Merge branch 'master' into add-location-period 2021-08-05 15:34:28 +02:00
794c7d0c4a Merge branch 'master' into bootstrap5 2021-08-05 15:13:55 +02:00
07ffc86ced Merge branch '167-social-issue-recursive-list' into 'master'
[API] Social Issue recursive sort

See merge request Chill-Projet/chill-bundles!99
2021-08-05 09:49:13 +00:00
718933af75 Merge branch 'address_refactoring' into add-location-period 2021-08-04 23:38:04 +02:00
884de5c19e address refactoring: resolve lack of flexibility for many implementations (modal/not, overriding, options, etc. )
address creation/edition is unchanged
many variables are renamed to improve logic and readability
2021-08-04 23:24:52 +02:00
d948ba0cd5 form.yaml created in attempt to fix translatableasideactivitycategory form type 2021-08-04 17:46:20 +02:00
0072f4c676 start of two new fields to select category and duration, but not working... problem with construct method in form 2021-08-04 16:34:13 +02:00
72b43e9a99 form type created to handle selection of asideactivity categories, not yet operational 2021-08-04 16:32:06 +02:00
7a56ff7d29 translations yaml file created 2021-08-04 16:30:27 +02:00
51f4d2ab0e changed TextType to TranslatableStringFormType 2021-08-04 15:21:08 +02:00
4716ab3e3c twig template adapted to use with asideActivityCategory 2021-08-04 15:20:21 +02:00
3d630eeedf PaginatorFactory error fixed provisionary. This should probably be done with dependency injection throughout the whole file though, to be checked 2021-08-04 15:19:43 +02:00
61d8e06975 typehints fixed 2021-08-04 15:13:45 +02:00
eec913375e obsolete annotation deleted @packages 2021-08-04 15:12:44 +02:00
7f3b266209 new migration 2021-08-04 10:34:39 +02:00
85b7e4add8 use statement added 2021-08-03 16:50:07 +02:00
fadf2d62b0 use statements added and typehint updatedAt fixed 2021-08-03 16:49:51 +02:00
3e498c34e5 aside activity category commented out of form 2021-08-03 16:49:02 +02:00
81de17594d Merge branch 'master' into 102_activites_annexes 2021-08-03 15:56:56 +02:00
e42a5217be createdBy field deleted from form 2021-08-03 14:53:39 +02:00
a0154331de Apply 1 suggestion(s) to 1 file(s) 2021-08-03 12:51:40 +00:00
3d2cc340a6 merge with modif in gitlab 2021-08-03 14:48:15 +02:00
82841f47c8 aside activity changed into final class and implements trackUpdateInterface, TrackCreationInterface 2021-08-03 14:46:10 +02:00
b571620e6c aside activity category changed into final class 2021-08-03 14:45:21 +02:00
357b87dadb crud config added for aside activity 2021-08-03 14:43:23 +02:00
a5948259d9 templates added for aside activities 2021-08-03 14:41:01 +02:00
0bc894836f Apply 1 suggestion(s) to 1 file(s) 2021-08-03 12:39:50 +00:00
23bc71a38c Apply 1 suggestion(s) to 1 file(s) 2021-08-03 09:26:03 +00:00
3082634323 Merge branch '102_activites_annexes' of gitlab.com:Chill-Projet/chill-bundles into 102_activites_annexes 2021-08-03 11:22:02 +02:00
4cd2dc63c5 asideActivities property removed + corresponding methods 2021-08-03 11:21:20 +02:00
ff58816ee0 changed duration type into integer 2021-08-03 11:20:43 +02:00
7b8a067002 Apply 1 suggestion(s) to 1 file(s) 2021-08-03 09:15:15 +00:00
c13f63b3ba Apply 1 suggestion(s) to 1 file(s) 2021-08-03 09:15:04 +00:00
94d743c5b6 Apply 1 suggestion(s) to 1 file(s) 2021-08-03 09:14:50 +00:00
2290da6f3b Apply 1 suggestion(s) to 1 file(s) 2021-08-03 09:14:21 +00:00
f9195aa881 Apply 1 suggestion(s) to 1 file(s) 2021-08-03 09:13:02 +00:00
84dc5bd881 Merge branch '102_activites_annexes' of gitlab.com:Chill-Projet/chill-bundles into 102_activites_annexes 2021-08-03 11:00:16 +02:00
1edcb399c4 Apply 1 suggestion(s) to 1 file(s) 2021-08-03 08:54:55 +00:00
9ac31d2d8b Apply 1 suggestion(s) to 1 file(s) 2021-08-03 08:54:36 +00:00
ccf5b90951 filename changed to fix error 2021-08-03 10:40:29 +02:00
ee8e9f1ebc commented out lines deleted from migration 2021-08-03 10:39:27 +02:00
4fa1820d8d bootstrap classes added 2021-08-03 10:37:42 +02:00
e72a8fe5a0 bootstrap class added 2021-08-03 10:20:35 +02:00
Pol Dellaiera
9b756ffb2f Fix parameter type. 2021-08-03 09:24:53 +02:00
7ee91afae2 template extends person layout, fix syntax 2021-08-03 00:46:56 +02:00
7665181d44 Merge branch 'bootstrap5' into add-location-period 2021-08-02 16:20:58 +02:00
a8047fd89b make changes to avoid git conflict when we will merge bootstrap5 branch 2021-08-02 15:41:37 +02:00
61f6e95281 courselocation in pause. we have to make changes in AddAddress component. 2021-08-02 15:08:34 +02:00
ad55cc0477 automatic IDE clean code 2021-08-02 13:44:13 +02:00
714d8b841c vue_accourse: initialize new submodule courseLocation 2021-08-02 13:43:28 +02:00
e2e38a9ce8 vue_accourse: replace some buttons by small buttons 2021-08-02 13:31:41 +02:00
d916b575da AddAddress modal: make title dynamically passed by parent 2021-08-02 13:26:23 +02:00
982c704f6c improve activity list 2021-08-01 20:41:55 +02:00
9f5086e9c1 small buttons in lists, coherence of messages 2021-08-01 19:42:21 +02:00
ee819e7767 improve flex-table logic, with accompanying period list template 2021-08-01 18:38:31 +02:00
d34a00b2c0 missing stick-form-button 2021-08-01 16:20:09 +02:00
a096266ca5 household: if no addresses, misc stuffs 2021-08-01 16:18:37 +02:00
96e979f92d replace colors by variables in chillperson.scss 2021-08-01 16:09:43 +02:00
48873d15c9 ajust list_with_period search with person render_box (and add new options to it) 2021-08-01 15:24:48 +02:00
4be4cd7279 remove Altnames in accompanyingCourse resume 2021-08-01 13:50:59 +02:00
c4a8b85be5 template accompanying period list: buttons, flex-table (wip) 2021-08-01 13:47:08 +02:00
4c47105de1 flex-table column width auto; overwrite for specific use 2021-08-01 13:43:09 +02:00
1c404e5cb3 lib/entity/comment_embeddable styles have been moved 2021-08-01 13:23:06 +02:00
6dae4785e6 missing comment fields on person details page 2021-08-01 12:08:04 +02:00
360322bdbf missing comment fields on person details page 2021-07-31 14:49:01 +02:00
8c06014ea5 render_box comment embeddable, misc 2021-07-31 14:48:03 +02:00
98dd31dffc render_box person: possible to force disable AltNames; add space between span 2021-07-31 14:45:34 +02:00
1325355ca7 revert flashbag wrapper class 2021-07-31 13:14:31 +02:00
9764ee1794 styles, replace colors by variables, minor changes with colors 2021-07-31 11:00:37 +02:00
a48d7f5e94 move styles from bootstrap custom to chill entrypoint. split chillmain with imports sheets. clean styles 2021-07-31 10:34:20 +02:00
4eef8492b1 Merge branch 'master' into 110_extend_thirdparty 2021-07-30 22:56:41 +02:00
949366cf7b fix test failures 2021-07-30 22:32:29 +02:00
65fe9ab784 Merge branch 'master' into bootstrap5 2021-07-30 20:31:46 +02:00
532d4aa164 rename classes and add tags in vue Address component 2021-07-30 20:10:31 +02:00
02bea40cc4 fix class called 2x in vue component 2021-07-30 20:03:23 +02:00
51216b90c5 banner accompanyingcourse, new responsive design 2021-07-30 19:56:41 +02:00
f9735823c7 minor class renaming 2021-07-30 18:39:57 +02:00
b683e60cf7 address history: improve template, insert buttons with validFrom/validTo difference 2021-07-30 17:34:03 +02:00
e8e4dbef1f banner household, new responsive design 2021-07-30 15:39:22 +02:00
7e4afc826b banner person: new responsive design, with custom area 2021-07-30 15:06:47 +02:00
31c5c8b52a render_box address: new options and render modes 2021-07-30 14:17:16 +02:00
f734210db5 fix error after merge 2021-07-30 13:40:52 +02:00
014fe19b45 Merge branch '153-feat-new-importer-for-socialwork' 2021-07-30 13:24:26 +02:00
08cd6c81f2 render_box: adding addAge option 2021-07-30 11:13:54 +02:00
175d6892ec render_box, altnames style
(keep id-number for accompanying context)
2021-07-30 11:12:44 +02:00
4cac5f9a4a render_box: adding option addId + styles more generic, less specific 2021-07-30 10:46:16 +02:00
6dac130844 render box address, remove macro address, refactoring (wip) 2021-07-29 17:25:03 +02:00
886924a7e5 add address suggestion by household 2021-07-29 16:01:17 +02:00
55ac730c18 notification pill appearance 2021-07-29 15:23:28 +02:00
87a7e0de00 household alert dropdown style 2021-07-29 14:35:14 +02:00
39f6f14467 render box, custom buttons before, after or remplacing default 2021-07-29 14:34:53 +02:00
5ef5b65d90 Add address suggestion for a person 2021-07-29 12:24:22 +02:00
ad3fe7cf91 render box, mechanism to pass custom buttons 2021-07-29 11:34:13 +02:00
4e9916534f every chill sass sheets need to load bootstrap configuration files
but we don't want to load all bootstrap in chill entrypoint !
2021-07-29 10:48:27 +02:00
3637ae6aee renderbox person and thirdparty on resume accompanyingcourse, flex-bloc and flex-table 2021-07-28 23:41:10 +02:00
2893b9c726 re-indent file 2021-07-28 16:48:50 +02:00
42784cf584 split sass sheets, move style cascades 2021-07-28 16:34:18 +02:00
3169da20ad add test for accompanying period location validity 2021-07-28 16:16:57 +02:00
81752befcf render_box with 'bloc'
use bootstrap responsive breakpoints for columns,
mixed with flex-bloc cascade for growing and vertical align blocs.
2021-07-28 16:05:10 +02:00
3c7b67604c [AccompanyingPeriod] create constraints for location 2021-07-28 14:46:03 +02:00
4e8dd3b189 [AccompanyingPeriod] add flashbag message when located temporarily 2021-07-28 13:27:05 +02:00
50e9a06e49 adding a responsive breakpoints debug flag 2021-07-28 12:59:03 +02:00
57a8b49f49 entity render: options, html classes, corrections
note: span.chill-entity tag is replaced by section.chill-entity tag.
because some cases are not valid html :
* span.chill-entity > div
* span.badge > div.chill-entity
2021-07-28 12:01:56 +02:00
df3d32c653 wip render box person thirdparty display bloc 2021-07-27 23:15:52 +02:00
4cca148f69 [AccompanyingPeriod] add location to serialization 2021-07-27 21:25:38 +02:00
34f22d237e update schema to store location on accompanying period 2021-07-27 18:31:31 +02:00
Pol Dellaiera
d0b51f3573 Add minor typing. 2021-07-27 17:41:16 +02:00
Pol Dellaiera
53d3a0921b Fix minor bug. 2021-07-27 17:41:16 +02:00
Pol Dellaiera
cc824faf54 Improve performance. 2021-07-27 17:41:15 +02:00
Pol Dellaiera
b33cb4946c Improve/optimize list generation. 2021-07-27 17:41:15 +02:00
Pol Dellaiera
ef6c5870b5 Prevent multiples sub-queries. 2021-07-27 17:41:15 +02:00
Pol Dellaiera
e1f8aa5a5e Use custom Doctrine hydrator. 2021-07-27 17:41:15 +02:00
Pol Dellaiera
d208a79764 Add Doctrine extension. 2021-07-27 17:41:15 +02:00
Pol Dellaiera
b41b1346e5 Remove typing.
Request from https://gitlab.com/Chill-Projet/chill-bundles/-/merge_requests/99
2021-07-27 17:41:15 +02:00
Pol Dellaiera
d50d3e0e4b Revert "Add a bit more typing to help future development and customizations."
This reverts commit 32ce244de551c437d8eef08edeb1fd1906036827.
2021-07-27 17:41:15 +02:00
Pol Dellaiera
401659748c Default entities order: title ASC 2021-07-27 17:41:15 +02:00
Pol Dellaiera
c25c302466 Sort entities recursively. 2021-07-27 17:41:15 +02:00
Pol Dellaiera
c37b98cecd Add a bit more typing to help future development and customizations. 2021-07-27 17:41:15 +02:00
Marc Ducobu
979ea5841d Merge branch 'fix-crud' into 'master'
Replace chill_main.paginator_factory by PaginatorFactory::class

See merge request Chill-Projet/chill-bundles!114
2021-07-27 14:00:30 +00:00
Marc Ducobu
9e9a459a20 Replace chill_main.paginator_factory by PaginatorFactory::class 2021-07-27 15:59:03 +02:00
89dfea74b3 not used vue_accourse_work_list entrypoint (since 8384508c1a) 2021-07-27 15:26:47 +02:00
4b3f4edcc1 oups 2021-07-26 18:08:33 +02:00
376d8df55e fix bug with bootstrap form theme textarea (horizontal layout mode)
cfr issue https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/182
+ make chill fields theme more responsive
2021-07-26 17:56:44 +02:00
5d1d6c83a9 Merge branch 'bootstrap5' into 110_extend_thirdparty 2021-07-23 17:09:45 +02:00
a6266c5317 reorganize assets in others bundles 2021-07-23 17:06:37 +02:00
b0ef9b6612 complete previous commit (+dirty auto corrections from IDE) 2021-07-23 15:38:50 +02:00
8384508c1a reorganize assets: move files and adapt links, remove unused
* chill: chill theme entrypoint
* lib: local libs, called in several place but don't have entrypoint
* module: local libs with specific entrypoints
* page: pages with specific entrypoints
* vuejs: vue components with specific entrypoints

remove local libs jquery and select2, they already exists in node_modules
remove duplicate fonts
2021-07-23 14:58:37 +02:00
d20a3cf9d4 add suffix to assets entrypoints + replace link/script html tags by encore_entry twig tag 2021-07-23 12:27:30 +02:00
e0dbe9cf9d layout content position for fullwidth pages 2021-07-23 11:39:19 +02:00
Marc Ducobu
5c2c509805 Merge branch 'fix-tests-marc' into 'master'
Fix tests marc

See merge request Chill-Projet/chill-bundles!112
2021-07-23 09:25:42 +00:00
Marc Ducobu
9d478c0f01 Removing var_dump 2021-07-23 10:18:41 +02:00
Marc Ducobu
4646795c2c Automatic styling correction 2021-07-23 10:18:04 +02:00
d8d66aeeb6 remove old template members.html.twig
0add757230 (note_633038526)
2021-07-23 09:16:30 +02:00
7ac61002b0 layout content position for fullwidth pages 2021-07-22 22:19:27 +02:00
c9562ebdf7 improve layout classes 2021-07-22 22:09:31 +02:00
Marc Ducobu
18369a6c0a Merge branch 'notifications3' into 'master'
Notifications3

See merge request Chill-Projet/chill-bundles!89
2021-07-22 17:44:37 +00:00
Marc Ducobu
0fd9485de5 Avoid creation of services/notification.yaml 2021-07-22 18:15:57 +02:00
c8f139528a Merge branch 'behaviour/do-not-create-accompanying-course-on-person-creation' into 'master'
Remove creation of AccompanyingPeriod on person creation

See merge request Chill-Projet/chill-bundles!100
2021-07-22 15:36:37 +00:00
8030792eb6 Remove creation of AccompanyingPeriod on person creation 2021-07-22 15:36:36 +00:00
Marc Ducobu
50a4df3d0f Notification with paginitation 2021-07-22 17:32:20 +02:00
Marc Ducobu
0907ae1602 Rmq Julien & Pol 2021-07-22 17:32:20 +02:00
Marc Ducobu
673a4761e9 Adding feature for AccompanyingPeriodNotif 2021-07-22 17:32:20 +02:00
Marc Ducobu
282db51f06 Display notification using services (draft) 2021-07-22 17:32:20 +02:00
Marc Ducobu
bdf691a063 Add findAllForAttendee method in NotificationRepository 2021-07-22 17:32:20 +02:00
Marc Ducobu
18ab10dd45 Add center a_social to an activityNotif feature 2021-07-22 17:32:20 +02:00
0cd9dc6028 batch remove col-md-10 col-xxl, and add it in layout (level up) 2021-07-22 17:29:40 +02:00
65198937c0 Merge branch 'tests/fix-tests-after-bootstrap' into 'master'
Fix tests after introduction of bootstrap

See merge request Chill-Projet/chill-bundles!111
2021-07-22 15:20:45 +00:00
2699d48533 Fix tests after introduction of bootstrap 2021-07-22 15:20:45 +00:00
a559589883 add isLeaf condition on ThirdParty form Type 2021-07-22 16:34:07 +02:00
d81f5bafe3 adding content classes + divers 2021-07-22 13:19:25 +02:00
c6a3f59d87 household members editor: make buttons visibles 2021-07-22 12:19:35 +02:00
ff671ded9c move alert-with-actions sass, remove unused alert-first-child 2021-07-22 11:37:05 +02:00
678c7d18b4 fix data-toggle collapse mechanism
+ cleaning links in theses files
2021-07-22 11:34:37 +02:00
f73f515fb3 fix sass variable 2021-07-22 10:25:17 +02:00
afd4ac27ea search page, content position 2021-07-22 09:59:13 +02:00
ea734e2a9e fix menu context class 2021-07-20 15:46:20 +02:00
587da94645 adapt Thirdparty form and templates 2021-07-20 15:34:28 +02:00
3f9e215ea5 adding fixtures for new thirdparty fields (choice lists) 2021-07-19 17:18:36 +02:00
732390f704 add new fields in thirdparty entity 2021-07-19 16:11:25 +02:00
25b00296ca adapt thirdparty templates 2021-07-16 17:01:32 +02:00
1e626d573f Merge branch 'bootstrap5' into 110_extend_thirdparty 2021-07-16 13:29:01 +02:00
3ee676600e adding twig extensions to select how many items per page
* twig anchor: {{ chill_items_per_page(pagination) }}
* select field changed with javascript event listener
2021-07-16 13:23:10 +02:00
d2c631ae20 prepare thirdparty index template 2021-07-16 11:07:52 +02:00
8462538123 adapt pagination to bootstrap, add a short pagination variant 2021-07-16 09:51:15 +02:00
645252fd85 start CRUD controllers asideActivityBundle 2021-07-15 16:15:46 +02:00
08e396195c Merge branch 'vue_generale' into bootstrap5_replacing_scratch 2021-07-15 15:27:04 +02:00
ab0863a275 new setting margins and breakpoints for person banner 2021-07-15 15:21:33 +02:00
82c79a17dd many corrections in twig templates 2021-07-14 21:01:46 +02:00
d35553a1e2 content bloc: fix margins and breakpoints 2021-07-14 18:16:33 +02:00
030e71d276 activity, content position 2021-07-14 15:51:07 +02:00
4fc3d813c4 bootstrap adapt for activity vue socialIssues component 2021-07-14 15:24:17 +02:00
5f012165d1 fix spinner in addAddresss 2021-07-14 15:23:42 +02:00
61bd5d8ae8 fix spinner in addAddresss 2021-07-14 15:21:38 +02:00
07c464c112 rename vue subfolder _components in components 2021-07-14 14:50:39 +02:00
70a4c34865 move vue AddAddress inside Address component 2021-07-14 14:46:44 +02:00
5a47ebed42 Merge branch 'fix_addresses_issues' into bootstrap5_replacing_scratch 2021-07-14 14:01:08 +02:00
80eb5519bc adapt AddAddress modal to bootstrap: position, responsive, form 2021-07-14 13:36:49 +02:00
50f3ec9064 adapt vue modals styles to bootstrap 2021-07-13 15:35:48 +02:00
bdf0ec63d2 person templates responsive breakpoints in content 2021-07-13 14:07:23 +02:00
15f439b43d divers styles: colors var, table thead,... 2021-07-13 14:07:23 +02:00
30af99f4f0 fix chill theme colors behaviours: chill classes, special buttons variants 2021-07-13 14:07:23 +02:00
c413166866 batch replace .bt- in task scss 2021-07-13 14:07:23 +02:00
3c4c5e29a3 remove ChillMainSass webpack alias (scratch reference) 2021-07-13 14:07:23 +02:00
0224224744 bootstrap tables in vue_accourse 2021-07-13 14:07:23 +02:00
a9a59895b4 rename vue_ entrypoints in webpack 2021-07-13 14:07:23 +02:00
8a859f7885 add margin-top in content (uniformize contexts) 2021-07-13 14:07:23 +02:00
2244c58ec2 better logic: move person layout template in views/Person folder
like others contexts :
* accompanyingCourse
* household
2021-07-13 14:05:36 +02:00
c1ede921ff better twig extends path syntax 2021-07-12 10:32:48 +02:00
17ff80c39c accompanyingCourse, household and person use uniq menu template 2021-07-12 10:23:23 +02:00
f4f747d8d1 put person banner in included file 2021-07-12 10:21:08 +02:00
a740ad29ea replace sc-button + bt- in js and php files 2021-07-08 15:56:00 +02:00
ccee105efb batch replace grid- (scratch) by col- (bootstrap)
hand replace
* push- by offset-
* no-gutter by g-0

add breakpoints md- and sm-
2021-07-08 15:44:32 +02:00
b10012f4da minor swing 2021-07-08 15:03:59 +02:00
4937fd00fc fix form label display inline (with bootstrap5 theme) 2021-07-08 15:03:00 +02:00
0b329a9c9b modify lightly bootstrap5 form theme 2021-07-08 14:52:46 +02:00
4cfc43aaa6 rename collection html classes 2021-07-08 14:49:53 +02:00
1c45770929 wip 2021-07-08 12:27:50 +02:00
198c815052 add classes to person_addresses template 2021-07-08 12:00:59 +02:00
a995adcf0d remove debug discret class 2021-07-08 12:00:07 +02:00
bccda15307 cleaning record_actions scss 2021-07-08 11:59:27 +02:00
75c3df50e0 disable scratch webpack compilation 2021-07-08 11:58:22 +02:00
ce8207ea65 adapt person details page with bootstrap grid 2021-07-08 11:38:19 +02:00
0f6ad3670a add flashbag twig display condition + improve class consistency (main_search) 2021-07-08 11:12:31 +02:00
02a752f20b repair commit "load banner accompanying course everywhere" 2021-07-08 10:20:17 +02:00
1bbce2bb81 person details page: one edit button at bottom of page, fix regression 2021-07-07 19:38:29 +02:00
ca43933163 Merge branch 'fix-vue-warnings' into bootstrap5_replacing_scratch 2021-07-07 19:27:40 +02:00
1392365257 fix most of vue warnings for accompanyingCourse component 2021-07-07 19:27:22 +02:00
3653d7e0b8 fix missing dom selector in stickynav vue 2021-07-07 18:58:11 +02:00
3970bb2644 badge settings in banners 2021-07-07 18:31:05 +02:00
ea2d6eac7b AsideActivityType entity changed to AsideActivityCategory + building forms for both entities 2021-07-07 16:24:41 +02:00
9a1272d350 enabling symfony twig form_theme for bootstrap5
bootstrap5 templates are not supported in symfony 4
see twig.yaml comment and configuration while waiting to upgrade !!
2021-07-07 12:32:40 +02:00
e7c76734a6 start form 2021-07-06 15:56:55 +02:00
8389afb4a8 first migration: creation entities AsideActivity(Type) 2021-07-06 15:56:21 +02:00
36419cf5f0 fix button colors 2021-07-06 14:17:39 +02:00
fc074c2f1a changes to composer.json 2021-07-06 14:11:06 +02:00
eff1d6e797 start of AsideActivity entities 2021-07-06 14:10:36 +02:00
10de2d7966 start of AsideActivity entities 2021-07-06 14:08:44 +02:00
c96f407e6a Merge branch 'bootstrap5_replacing_scratch_mat' into bootstrap5_replacing_scratch 2021-07-06 13:50:17 +02:00
690688f5e1 fix buttons classes 2021-07-06 13:49:12 +02:00
4668f657ab button correction if only icon, not text 2021-07-06 13:34:47 +02:00
49253abfb8 custom _record_actions styles 2021-07-06 12:21:52 +02:00
c2122d62c6 button cancel, set icon with before 2021-07-06 12:10:37 +02:00
ca17ca4984 adding forkawesome ::before content unicode 2021-07-06 11:06:32 +02:00
a5d749b882 batch replace sc-button by btn btn-... 2021-07-05 21:55:24 +02:00
53c021b06e Merge branch 'quickfix' into bootstrap5_replacing_scratch_mat 2021-07-05 21:25:33 +02:00
b6e8c64211 fix bootstrap5 + vue modal content scrollable overflow 2021-07-05 21:23:55 +02:00
342fd3e297 batch rename sc-button cancel 2021-07-05 21:22:05 +02:00
05a1f7d041 batch rename class sc-button (scratch) by btn (bootstrap) 2021-07-05 19:02:09 +02:00
2e2eeae4f2 chill colors and buttons with bootstrap5 2021-07-05 18:53:03 +02:00
c27268443c start creation AsideActivity bundle 2021-07-05 17:40:21 +02:00
nobohan
842dfcc69f address: edit household addresses 2021-07-05 17:23:37 +02:00
nobohan
67c31e781d address: back to the page when the address is filled 2021-07-05 15:07:21 +02:00
f32ffc572d badge-pill classes changed to rounded-pill 2021-07-05 12:37:16 +02:00
a44b26da6c badge classes updated from badge-... to bg-... 2021-07-05 12:29:52 +02:00
d016f9be86 fix bootstrap5 + vue modal content scrollable overflow 2021-07-04 14:26:00 +02:00
c36aa22ab2 arrange collapsed header menu 2021-07-03 20:57:28 +02:00
e77c886e3f banner and vertical-menu integration 2021-07-03 17:56:07 +02:00
4ca1618480 bt5, main layout, responsive header 2021-07-03 14:03:30 +02:00
8e8cdfce0a bootstrap5, main layout settings 2021-07-02 18:42:26 +02:00
3694eb5bf2 fix bootstrap import duplicate 2021-07-01 18:49:15 +02:00
e44342ab87 bootstrap5: report variables v4+chill changes in variables v5
--- indigo, purple, teal, cyan
+++ green-dark, beige
2021-07-01 18:25:38 +02:00
a236873919 bootstrap5: swap variables v4+chill 2021-07-01 18:25:38 +02:00
a13766e7d7 wip.. 2021-07-01 18:25:38 +02:00
bc240a6754 bootstrap style in form fields, bootstrap integration for select2 2021-07-01 18:25:35 +02:00
50727fc4b0 bootstrap styles in forms fields 2021-07-01 18:24:48 +02:00
b327a3fbfa fix homepage content cols 2021-07-01 18:24:48 +02:00
2916babe1c bootstrap content with vertical right person menu 2021-07-01 18:24:46 +02:00
fe2f107ddc bootstrap content with vertical right person menu 2021-07-01 18:20:11 +02:00
3da8f89d3c bootstrap footer and homepage 2021-07-01 18:08:00 +02:00
19326ee750 wip.. navbar bootstrap 2021-07-01 18:07:57 +02:00
e0ae5d56f0 import chill colors in bootstrap custom theme 2021-07-01 18:05:25 +02:00
0878767c17 replace class container by container-fluid (full width in bootstrap) 2021-07-01 18:05:25 +02:00
f0232228a3 improve details row for household banner 2021-07-01 17:47:17 +02:00
fc63955205 improve banners render : context person, with common improvements on accompanyingcourse and household context 2021-07-01 16:13:07 +02:00
a78de0f96c improve accompanyingcourse work timeline design 2021-07-01 10:41:13 +02:00
270c0accc5 Merge branch 'parcours/origin-de-la-demande' into 'master'
parcours - origin de la demande

See merge request Chill-Projet/chill-bundles!107
2021-07-01 08:37:46 +00:00
fd94f27eee hide console log, remove unused api endpoint method 2021-07-01 10:30:39 +02:00
f7e3be38a7 Merge branch '51-referent-parcours' into 'master'
parcours référent

See merge request Chill-Projet/chill-bundles!106
2021-07-01 07:48:08 +00:00
5861a86289 cleaning dirty git trace 2021-06-30 19:22:26 +02:00
68c0f9b7d7 accompanyingcourse: lesser space between form fieldsets 2021-06-30 19:02:25 +02:00
52288f7260 fix typo + change component position 2021-06-30 18:44:38 +02:00
nobohan
0b5daa6c33 quick fix: address: add backurl after posting the address 2021-06-30 18:26:44 +02:00
2fe1605385 vue accompanyingCourse, adding an origin sub-component 2021-06-30 17:07:48 +02:00
d8256b0ac5 swagger person: adding origin routes 2021-06-30 14:59:27 +02:00
b5760e82ea swagger person: just sorting yaml tree items 2021-06-30 14:58:24 +02:00
d3ac8d8ceb vue accompanyingcourse: ending referrer subcomponent 2021-06-30 11:59:54 +02:00
196f709065 activity, revert detail, cfr. https://gitlab.com/Chill-Projet/chill-bundles/-/merge_requests/94#note_614231268 2021-06-30 10:18:57 +02:00
6a8c96cdae referrer get users: preparation 2021-06-30 09:52:15 +02:00
3e83891744 prepare new originDemand sub-component 2021-06-30 09:52:15 +02:00
662e5f967c Merge branch 'frontend/address-to-add-persons-widget' into 'master'
Add address to widget add persons

See merge request Chill-Projet/chill-bundles!105
2021-06-30 07:12:42 +00:00
802125edc6 Add address to widget add persons 2021-06-30 07:50:43 +02:00
028c3e0c31 widget addPersons: fix persons without birthdate 2021-06-29 22:40:23 +02:00
e4adafafc8 remove household search 2021-06-29 22:38:01 +02:00
54316d148c Merge branch 'features/improve-activity' into 'master'
Features/improve activity

See merge request Chill-Projet/chill-bundles!103
2021-06-29 19:18:51 +00:00
3c5a2a65df Merge branch 'features/improve-accompanying-course-summary' into 'master'
Improve accompanying course summary page

See merge request Chill-Projet/chill-bundles!102
2021-06-29 19:16:18 +00:00
741ef7b40d Merge branch 'features/add-suggestion-household-member-editor' into 'master'
Add suggestion household member editor

See merge request Chill-Projet/chill-bundles!97
2021-06-29 19:13:38 +00:00
e7384343b2 Merge remote-tracking branch 'origin/master' into features/improve-accompanying-course-summary 2021-06-29 21:12:21 +02:00
1e2a920200 clean menu builder for activity 2021-06-29 21:03:38 +02:00
b5a78fa341 Merge remote-tracking branch 'origin/master' into features/improve-activity 2021-06-29 20:52:06 +02:00
d9c1f52894 improve activity 2021-06-29 20:51:08 +02:00
nobohan
f05f7415bd household: add household accompanying periods 2021-06-29 19:41:00 +02:00
nobohan
5553c7314c household address: fix conflict on branch merge 2021-06-29 17:47:40 +02:00
7dc70baf57 permet de surcharger le label 'commentaire' des actviités 2021-06-29 17:39:19 +02:00
nobohan
34af401a98 accompanying period: add items in the summary page 2021-06-29 17:37:58 +02:00
5bae8dc5bf Import also scripts tags & css for launching banner 2021-06-29 17:13:57 +02:00
6e277e99ae fix in accompanying period list: thirdparty as requestor + link 2021-06-29 17:09:55 +02:00
2688c0f0ce fix missing div in accompanying course work list 2021-06-29 17:09:38 +02:00
nobohan
0135f5184e accompanying period: wording + minor changes in twig 2021-06-29 17:09:24 +02:00
fd698419e8 Merge branch 'fix-prototypage-details' into 'master'
Fix prototypage details

See merge request Chill-Projet/chill-bundles!94
2021-06-29 15:06:20 +00:00
4a864a0b14 Merge remote-tracking branch 'origin/master' into features/improve-accompanying-course-summary 2021-06-29 16:59:05 +02:00
55dc0d3f9f Ajout informations manquantes dans la page "summary" des
AccompanyingCourse
2021-06-29 16:57:28 +02:00
85835c8b0d Merge branch 'features/api-search' into 'master'
Features/api search

See merge request Chill-Projet/chill-bundles!98
2021-06-29 14:50:28 +00:00
nobohan
ab1edee9fb person menu: add style for submenus 2021-06-29 16:22:58 +02:00
6154e0912b fix in accompanying period list: thirdparty as requestor + link 2021-06-29 16:14:50 +02:00
0388428c6f fix missing div in accompanying course work list 2021-06-29 16:14:30 +02:00
7ac55275c2 Merge remote-tracking branch 'origin/fix_issues_juminet' into features/improve-accompanying-course-summary 2021-06-29 16:06:57 +02:00
1119e20a49 Add minor fixes to summary page:
* add messages when no resources
* add address to person
* replace household link label with household number
2021-06-29 16:03:59 +02:00
ea2870eef8 Merge branch 'features/create-user-endpoint' into 'master'
Feature: create user endpoint

See merge request Chill-Projet/chill-bundles!96
2021-06-29 14:02:16 +00:00
nobohan
93a44d8303 address: automatic return when saving address 2021-06-29 15:06:35 +02:00
nobohan
8109415e05 address: wording button 2021-06-29 14:39:43 +02:00
nobohan
514fe6163a address: format address as the French format 2021-06-29 14:33:51 +02:00
9d9be7f831 vue activity: fix backend when hidden return empty string 2021-06-29 14:31:56 +02:00
nobohan
4cf3cc8353 address: add focus on selectAddress field 2021-06-29 14:25:26 +02:00
2a974e1269 fix socialActions selected visibility if all issues unchecked + cleaning 2021-06-29 12:23:11 +02:00
beca41774e vue activity: fix duplicates and add condition in initial loading 2021-06-29 11:49:23 +02:00
dd991e3572 add test 2021-06-28 23:02:15 +02:00
0640631821 implementation on 3party + quote keys in SearchApiQuery 2021-06-28 22:44:42 +02:00
e845d9ba90 replace search api by a first workin implementation 2021-06-28 22:01:33 +02:00
nobohan
6f8231f6f6 accompanying course: clean controller 2021-06-28 22:01:05 +02:00
nobohan
048161e300 accompanying course summary (WIP) 2021-06-28 22:00:07 +02:00
b705c5910f dispatch action change value of hidden fields, persisted when submited 2021-06-28 20:46:30 +02:00
6f1209eaf5 rename methods, improve logic 2021-06-28 20:20:54 +02:00
020759180b prepare dispatch 2021-06-28 20:07:53 +02:00
3748b4fbf4 vue activity: manage datas in store, not with data() 2021-06-28 19:05:26 +02:00
nobohan
4f49292178 address: fix saving of isNoAddress 2021-06-28 17:18:57 +02:00
6eaffcae49 fix redirection after changing household member 2021-06-28 16:22:17 +02:00
nobohan
f92d710a26 accompanying course summary: add social actions 2021-06-28 16:16:55 +02:00
nobohan
bc6ba88acd menu: fix code indentation 2021-06-28 16:04:24 +02:00
61c2934d64 activity: get social Actions, improve reactivity 2021-06-28 15:31:41 +02:00
28b4d9562c add socialAction checkbox list 2021-06-28 15:21:41 +02:00
e06aded1ec remove from multiselect when adding social issues + disable accompanyingcourse issues loading 2021-06-28 15:21:32 +02:00
3a81124e04 activity vue: list socialIssues checkbox from accompanyingCourse 2021-06-28 15:21:17 +02:00
nobohan
b72d45d9db accompanying period: hide activity entries from the menu if accompanyin period is DRAFT 2021-06-28 13:50:31 +02:00
2a1f5cbad1 add test for suggestion household by accompanying period 2021-06-28 13:18:00 +02:00
e8566fd006 change label 2021-06-28 12:36:19 +02:00
cd6b5c9a39 Add context for household member editor form:
* add context for accompanying period, if indicated in a query
parameter;
* expand automatically household suggestion, if indicated in a query
parameter
2021-06-28 11:23:30 +02:00
9aa3974071 show household suggestion in household members editor 2021-06-28 00:35:40 +02:00
a8bf478ee8 add endpoint for getting suggestion on household by accompanying period 2021-06-27 11:10:17 +02:00
a35f3363b2 Merge branch 'features/edit-accompanying-period-social-work' into 'master'
Features/edit accompanying period social work

See merge request Chill-Projet/chill-bundles!91
2021-06-26 13:15:34 +00:00
0b117e5158 Merge remote-tracking branch 'origin/features/edit-accompanying-period-social-work' into _vue_echanges 2021-06-26 12:14:32 +02:00
7cae9e1769 wip 2021-06-26 12:09:18 +02:00
a43e6c12a0 add tests for UserApiController 2021-06-26 11:08:26 +02:00
abe012de60 add endpoint whoami 2021-06-26 11:08:10 +02:00
aaa9a1ec7b create user _index and _entity endpoint 2021-06-26 11:07:03 +02:00
25f2d17097 documentation for api social actions 2021-06-25 21:34:36 +02:00
4fd43310c0 Merge remote-tracking branch 'origin/master' into features/edit-accompanying-period-social-work 2021-06-25 21:26:21 +02:00
c85ca894b8 layout for list accompanying work 2021-06-25 21:25:27 +02:00
fe22e6c7dc activity: create new vue subcomponent socialIssuesAcc 2021-06-25 15:44:20 +02:00
cb67605bd2 list accompanying course work 2021-06-25 14:59:10 +02:00
d26e08324c load banner accompanying course everywhere 2021-06-25 14:09:47 +02:00
e55a2691b7 move vue activity component app in subcomponent concernedGroups 2021-06-25 14:09:32 +02:00
nobohan
aa5c7f333e fix conflict + error on CommentType 2021-06-25 13:57:49 +02:00
0afe277b04 form acc work edit: save action 2021-06-25 00:06:26 +02:00
981b9299ad layout form 2021-06-24 16:21:52 +02:00
nobohan
36eb247995 address: add maxlength, upd default map center and add loader messages in addresses form 2021-06-24 16:02:57 +02:00
Pol Dellaiera
d71c3f310e (to rebase/fixup later) Fix documentation. 2021-06-24 16:01:41 +02:00
Pol Dellaiera
4a2ada784a (to rebase/fixup later) Let Goal be associated to a Result. 2021-06-24 15:57:03 +02:00
Pol Dellaiera
3b5ef53b9b (to rebase/fixup later) Let Result be associated to a SocialAction. 2021-06-24 15:46:04 +02:00
2cda6ceebf improve history details 2021-06-24 15:43:02 +02:00
Pol Dellaiera
18d0ad67d6 (to rebase/fixup later) Update command based on feedback. 2021-06-24 15:25:27 +02:00
Pol Dellaiera
ea1c12da64 (to rebase/fixup later) Fields must be nullable for import to success. 2021-06-24 15:24:58 +02:00
1ceabec400 redesign timeline with css gridlayout 2021-06-24 15:17:34 +02:00
nobohan
91c5cd74f7 household address: remove group write on member collection 2021-06-24 14:01:15 +02:00
nobohan
b7f2e189dc small fix: use class name instead of string 2021-06-24 14:01:15 +02:00
nobohan
ab8deb036b accompanyingCourse: add activities in the accompanying course summary 2021-06-24 14:01:15 +02:00
nobohan
ac47a75a75 fix bug issue 163 Address JSON string not valid 2021-06-24 14:01:15 +02:00
nobohan
4e6454d7de translation Activity Envoyer/recevoir 2021-06-24 14:01:15 +02:00
92a95d4186 finish form behaviour 2021-06-24 12:44:24 +02:00
Pol Dellaiera
141aabcddc feat: Add new command. 2021-06-24 11:37:00 +02:00
nobohan
c23ada3533 person: add show/hide on marital status date 2021-06-24 08:25:55 +02:00
Pol Dellaiera
6e37e7feac Let repositories implements ObjectRepository. 2021-06-23 23:13:16 +02:00
Pol Dellaiera
df1f44d814 Let SocialAction::defaultNotificationDelay be nullable. 2021-06-23 23:11:53 +02:00
Pol Dellaiera
dc26ca7e77 Add missing getId() method. 2021-06-23 23:11:53 +02:00
Pol Dellaiera
2667867bd0 Update composer - Bump league/php. 2021-06-23 23:11:53 +02:00
Pol Dellaiera
5ddc0e7a53 Simplify loading of Symfony commands. 2021-06-23 23:11:53 +02:00
b72b1bd4c7 Merge remote-tracking branch 'origin/master' into features/edit-accompanying-period-social-work 2021-06-23 22:48:09 +02:00
ca9ae3874c Merge branch 'fix/api-crud-improve-loading-for-existing-controller' into 'master'
Fix/api crud improve loading for existing controller

See merge request Chill-Projet/chill-bundles!92
2021-06-23 20:44:25 +00:00
7fb4616aa6 Merge branch 'features/create-social-action' into 'master'
Create social work

See merge request Chill-Projet/chill-bundles!90
2021-06-23 20:43:32 +00:00
ac4cf43753 add goals to work, and add results for each goal 2021-06-23 22:40:11 +02:00
5a4a0a3617 add results for actions in course edit form 2021-06-23 21:26:36 +02:00
2cc1274ee0 fix js alert with dom event listener 2021-06-23 18:04:06 +02:00
154fa4719d add involved persons to accompanying period work 2021-06-23 17:46:51 +02:00
193e7b4c7e cleaning 2021-06-23 13:20:50 +02:00
80c2bd285f vue component html anchor place 2021-06-23 11:50:09 +02:00
133c0ac1ac TOFIX temporary disable js alert that return an error:
## in JS console:

Uncaught ReferenceError: chill is not defined
    <anonymous> http://localhost:8001/fr/activity/1808/edit?person_id=1453:317
2021-06-23 11:25:54 +02:00
c8d5c2c67b resume interlocutors 3 columns 2021-06-23 09:31:26 +02:00
0754d20622 fix form create + WIP form edit for Accompanying Period Work 2021-06-22 22:59:34 +02:00
99d6e030ca ergonomic buttons details 2021-06-22 16:15:05 +02:00
5d38d193e2 add type of activity in title 2021-06-22 16:14:29 +02:00
86f7b116a9 adapt buttons when choosing type of ativity 2021-06-22 16:12:30 +02:00
bcab5a1211 remove old webpack entrypoint definitions 2021-06-22 16:11:24 +02:00
65a6607112 fix translations 2021-06-22 16:10:17 +02:00
1cd376bf86 Merge remote-tracking branch 'origin/master' into features/edit-accompanying-period-social-work 2021-06-22 16:09:58 +02:00
84f6f9b44d fix bug with new activity in context person 2021-06-22 16:09:20 +02:00
b53f6af8d8 add api for getting goal and results by social action and goal 2021-06-22 16:08:53 +02:00
34d6452286 fix: household api 2021-06-22 15:31:56 +02:00
c04ccef4cd improve loading for existing crud cotnroller 2021-06-22 14:40:56 +02:00
nobohan
d8afbc4a40 fix bug on PostalCodeChoiceLoader (not understood) 2021-06-22 11:56:25 +02:00
95edbc673c improve loading for crud controller 2021-06-22 10:08:19 +02:00
07ffdfab86 household banner context colors 2021-06-21 15:58:27 +02:00
50be29308d Merge remote-tracking branch 'origin/master' into features/create-social-action 2021-06-21 14:38:09 +02:00
d1e0d997ac Merge branch 'features/household-edit-members-forms-improve-household' into 'master'
Corrections ménage

See merge request Chill-Projet/chill-bundles!88
2021-06-21 12:25:22 +00:00
nobohan
504b2efacf person: fix death date type as date immutable 2021-06-21 13:58:14 +02:00
4c3c67344a fix merge old css styles 2021-06-21 13:43:15 +02:00
40fcb09082 layout for form 2021-06-21 13:38:43 +02:00
aa4a9e874a add a spinner 2021-06-19 11:15:27 +02:00
3abfdbf6fd first impl for create form 2021-06-18 19:41:58 +02:00
07cc394abd [bugfix] fix font in element ::before
See https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/162

[ci skip]
2021-06-18 14:24:53 +02:00
99337c4aa6 add form edit metadata in summary page 2021-06-18 14:11:02 +02:00
04ccca092b remove links to route 'household members' 2021-06-18 13:53:19 +02:00
nobohan
b3792f6714 person: update person view/show twig 2021-06-18 13:46:46 +02:00
e1f01a47f8 Merge remote-tracking branch 'origin/master' into features/household-edit-members-forms-improve-household 2021-06-18 13:42:37 +02:00
dc79e1a02d remove test for members page 2021-06-18 13:31:19 +02:00
7a6117a264 fix test which randomly failed 2021-06-18 13:30:31 +02:00
nobohan
1a204312f3 person: re-enable the creation of a person 2021-06-18 13:12:27 +02:00
1b1a25edc4 Merge branch 'features/sql-vue-from-household-address-to-person' into 'master'
Features/sql vue from household address to person

See merge request Chill-Projet/chill-bundles!86
2021-06-18 11:01:40 +00:00
5ab7f7a37b Merge remote-tracking branch 'origin/master' into features/sql-vue-from-household-address-to-person 2021-06-18 12:08:13 +02:00
b174397823 Merge branch 'features/household-validation' into 'master'
Validation for household and household members & list for household for a person

See merge request Chill-Projet/chill-bundles!79
2021-06-18 10:07:10 +00:00
9d35e4efbb Merge remote-tracking branch 'origin/master' into features/household-validation 2021-06-18 12:02:34 +02:00
0e9933ca41 improve banner 2021-06-18 11:57:27 +02:00
nobohan
3d14f00cac person: add show hide on some fields + remove unknown genderType 2021-06-18 11:28:02 +02:00
0add757230 remove members page, move to summary 2021-06-18 11:27:25 +02:00
2bf65dfadb Merge branch 'fix-test-accompanying-period' into 'master'
fix data provider which randomly generate invalid data in test

See merge request Chill-Projet/chill-bundles!87
2021-06-18 09:19:29 +00:00
a7ecd08d78 fix data provider which randomly generate invalid data in test 2021-06-18 09:19:28 +00:00
nobohan
bccaf5ad6e person: add createdBY, updatedBy fields on Person + migration 2021-06-18 10:15:30 +02:00
585a19e803 Apply 7 suggestion(s) to 1 file(s) 2021-06-18 07:17:32 +00:00
b801b75eb9 Merge remote-tracking branch 'origin/master' into features/sql-vue-from-household-address-to-person 2021-06-17 23:16:57 +02:00
f1120af59e add 'holder' in list of persons 2021-06-17 23:10:18 +02:00
9d58356b90 remove drag-and-drop behaviour 2021-06-17 22:54:46 +02:00
a7131653c9 finish merge (oups) + layout of household in members editor app 2021-06-17 22:47:33 +02:00
9f3cd943cb Merge branch 'features/household-validation' into features/household-edit-members-forms-improve-household 2021-06-17 22:46:47 +02:00
nobohan
970635dfad Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles
merge...
2021-06-17 17:03:42 +02:00
nobohan
c8297b2230 fix conflict when merging _77_address_household into master 2021-06-17 16:59:55 +02:00
994cce41e5 Merge branch 'master' into features/household-edit-members-forms-improve-household 2021-06-17 15:41:00 +02:00
86e41fb877 Merge remote-tracking branch 'origin/_77_address_household' into features/household-edit-members-forms-improve-household 2021-06-17 15:05:46 +02:00
f8b97b96f4 do not use arrayAccess for Collection in validator 2021-06-17 14:57:16 +02:00
27907e7558 fix modification of key members in household normalization 2021-06-17 14:02:29 +02:00
Marc Ducobu
38712de462 Merge branch 'notifications_fixtures' into 'master'
LoadNotifications using DependentFixtureInterface

See merge request Chill-Projet/chill-bundles!83
2021-06-17 11:38:47 +00:00
fd7c7388d9 fix prepending configuration of doctrine 2021-06-17 13:31:04 +02:00
ef55d2cf7f create view for current address and apply on Person/Household normalizer 2021-06-17 13:21:55 +02:00
nobohan
8406c30c8e person: Person FormType + edit twig 2021-06-17 12:27:47 +02:00
nobohan
901ae47ce6 person: correct migration + entity 2021-06-17 11:12:40 +02:00
nobohan
951160982d person: add more fields on Person + migration 2021-06-17 10:43:57 +02:00
nobohan
e2633a2a79 addresses: filter out postal code introduced by user 2021-06-16 16:20:37 +02:00
Marc Ducobu
1cfc29caf7 LoadNotifications using DependentFixtureInterface 2021-06-16 15:32:59 +02:00
nobohan
5b72eeb147 addresses: edit address for household (WIP) 2021-06-16 15:05:32 +02:00
Marc Ducobu
1b9d8fab61 Merge branch 'notifications' into 'master'
Notifications

See merge request Chill-Projet/chill-bundles!81
2021-06-16 12:58:57 +00:00
Marc Ducobu
801af209a1 Revert "NotificationRepo as a service"
This reverts commit 84913553e8.
2021-06-16 14:54:33 +02:00
nobohan
06daf35e96 addresses: edit address for person 2021-06-16 14:39:02 +02:00
38bff2e42f add address to household in fixtures 2021-06-16 08:35:47 +02:00
e68a5405a1 Merge branch 'master' into features/sql-vue-from-household-address-to-person 2021-06-15 22:53:21 +02:00
8bd20c9c78 [WIP] add fixtures for household address 2021-06-15 22:52:48 +02:00
54997e5893 add test for household membership sequential validator 2021-06-15 21:31:02 +02:00
nobohan
35d35c9f40 addresses: edit address (WIP) 2021-06-15 21:03:50 +02:00
Marc Ducobu
49d022ef55 NotificationRepository as a service 2021-06-15 18:57:56 +02:00
78ca61c82e fix showing person without birthdate 2021-06-15 17:22:03 +02:00
b68de1f2e9 fix parameters in list 2021-06-15 17:16:35 +02:00
68ecff253a fix validation when leaving any household 2021-06-15 17:15:45 +02:00
Marc Ducobu
db545f9fe6 Adding typehinting for Entity/Notif 2021-06-15 17:14:11 +02:00
Marc Ducobu
86d764c097 Using JSONB for storage in db for attendees in Notifications 2021-06-15 17:14:11 +02:00
Marc Ducobu
cf8b9ec172 Migration for notifications 2021-06-15 17:14:11 +02:00
Marc Ducobu
23528e7a5c Adding some features to load for notifications) 2021-06-15 17:14:11 +02:00
Marc Ducobu
a258905c59 Add unique constraint (class, id) to notifications 2021-06-15 17:14:11 +02:00
Marc Ducobu
84913553e8 NotificationRepo as a service 2021-06-15 17:14:11 +02:00
Marc Ducobu
916209e402 Fix remarks MR - notif 2021-06-15 17:12:40 +02:00
Marc Ducobu
3ec212df93 Creation of Notification Entity 2021-06-15 17:12:40 +02:00
e95d8fbc7a Historique ménage pour une personne 2021-06-15 17:03:38 +02:00
Pol Dellaiera
ce88fe158f Merge branch 'chill-main-update-repositores-and-entities' into 'master'
Chill main update repositores and entities

See merge request Chill-Projet/chill-bundles!82
2021-06-15 14:24:04 +00:00
efdfd10e49 replace comment by commentEmbeddable 2021-06-15 10:17:53 +02:00
nobohan
000ae6c2cb address: style (css) 2021-06-15 08:04:38 +02:00
nobohan
7c26f0a56c address: add a new address to a person 2021-06-15 07:49:35 +02:00
f827e50431 ajout métadonnées membres 2021-06-14 22:30:52 +02:00
41617295c1 fix validation groups and sequential validator msg 2021-06-14 16:39:27 +02:00
b2c1d75fc5 fix parameters in test MaxHolder 2021-06-14 12:58:23 +02:00
17c3ecbabe validation on simultaneous household membership for a person 2021-06-14 12:56:01 +02:00
de024b405f Merge branch 'features/household-editor' into 'master'
[UI] Add page to move members of household

See merge request Chill-Projet/chill-bundles!73
2021-06-14 09:38:17 +00:00
51399b21b9 fix class for Person component 2021-06-14 11:37:20 +02:00
c40019da8f add alert for not-in-household and actions in page
accompanyingCourse/summary

* alert for people not in household for each accompanying course;
* style for action in alert
* form to members editor
2021-06-14 11:34:05 +02:00
1df759e970 fix JS error "chill is not defined"
This happens since js is loaded using "defer" tag
2021-06-14 10:19:18 +02:00
Pol Dellaiera
92b4adc113 Fix DI on other services depending on updated repositories. 2021-06-11 21:56:17 +02:00
807d3674fc implements max holder and validation on UI 2021-06-11 17:58:09 +02:00
af740fd87d Merge branch 'features/household-editor' into features/household-validation 2021-06-11 17:08:38 +02:00
45dc8ed661 apply maxHolder constraint on houehold 2021-06-11 17:08:35 +02:00
ecc8b929ca create max holder validator 2021-06-11 17:03:48 +02:00
nobohan
c378f59f5a addresses: person address history 2021-06-11 16:20:40 +02:00
4fd6d38187 create Util for computing intersection 2021-06-11 15:53:32 +02:00
nobohan
f3a7556bca household address: update twig for household address 2021-06-11 15:44:49 +02:00
nobohan
14db7265fe addresses: fix POST if isNoAddress 2021-06-11 15:06:56 +02:00
nobohan
f22461af1b address: better default zoom when choosing an address 2021-06-11 14:42:08 +02:00
nobohan
1b709d39a4 addresses: enable POSTing Postal Code entities (back + front) 2021-06-11 14:33:22 +02:00
Pol Dellaiera
81e8a4562b Remove obsolete repositories.yaml file. 2021-06-11 12:43:54 +02:00
Pol Dellaiera
1e72247546 Update existing repositories and their corresponding entities. 2021-06-11 12:43:44 +02:00
Pol Dellaiera
670ba1713a Add missing repositories and update corresponding entities. 2021-06-11 12:43:38 +02:00
nobohan
5daf5cbe84 address: write new address (separate street and streetNumber) 2021-06-11 11:12:44 +02:00
nobohan
331cdf13ca household address: add validation on household->getAddresses 2021-06-11 09:34:27 +02:00
f25365f651 Add LICENSE 2021-06-11 07:31:28 +00:00
cbadcb4980 Merge remote-tracking branch 'origin/master' into features/household-validation 2021-06-11 09:05:48 +02:00
b2ce5fca38 household editor: allow to move without any household 2021-06-10 16:17:59 +02:00
38c06977ca add link to household or household editor 2021-06-10 15:18:41 +02:00
nobohan
1551ea796d household address: UI of the adress move form 2021-06-10 14:34:14 +02:00
3e39dd9a1e remove route for testing move 2021-06-10 13:02:35 +02:00
89734c680c backend: allow to remove people from household, or move to a new household 2021-06-10 13:01:42 +02:00
nobohan
4c025184b4 household address: check if address are sequential (WIP) 2021-06-10 12:40:01 +02:00
6fed008ff2 fix creation of new household during move 2021-06-10 11:48:06 +02:00
057bdf6a6a add missing message 2021-06-10 11:47:52 +02:00
nobohan
6f2c219e3b household address: add validTo computation in Address 2021-06-10 11:43:13 +02:00
nobohan
550aaacaab household address: fix POST api chaining 2021-06-10 11:42:39 +02:00
f9758eff5b fix use of context into householdMember::move 2021-06-10 11:16:37 +02:00
abc79249a2 Merge remote-tracking branch 'origin/master' into features/household-editor 2021-06-10 11:01:59 +02:00
f7bb9ac327 Merge branch 'features/household-members-list' into 'master'
Features/household members list

See merge request Chill-Projet/chill-bundles!76
2021-06-10 08:59:51 +00:00
3c727d1c65 fix format for date, after use of html5 date widget 2021-06-10 10:52:37 +02:00
ac211337d6 fix denomination: bold only in list 2021-06-10 10:31:59 +02:00
30668ca67f Merge remote-tracking branch 'origin/master' into features/household-members-list 2021-06-10 10:29:57 +02:00
5da0be24ff change icon for household 2021-06-10 10:20:18 +02:00
nobohan
dd78e9759c household address: show js error messages 2021-06-10 10:11:00 +02:00
nobohan
1b36d9b1ab household address: chain API call 2021-06-10 10:06:23 +02:00
7fddf1d5e0 fix indentation 2021-06-09 22:18:47 +02:00
315fc7f63a set default for Position attributes 2021-06-09 22:12:55 +02:00
3c889db41a style editor when no household nor persons to move 2021-06-09 22:08:10 +02:00
71f794c4d9 add ckeditor for comment 2021-06-09 17:31:55 +02:00
e135b98072 Merge remote-tracking branch 'origin/master' into features/household-editor 2021-06-09 16:27:03 +02:00
e14205ae1d first layout for form edit 2021-06-09 16:13:39 +02:00
nobohan
e14a125bf3 household address: format js date for POSTing 2021-06-09 12:24:15 +02:00
8a5650a705 Merge branch 'features/activity-form' into 'master'
Activity

See merge request Chill-Projet/chill-bundles!58
2021-06-09 06:23:55 +00:00
18217f53e8 Merge branch 'features/household-members-list' into features/household-editor 2021-06-08 22:16:43 +02:00
79ec182ca3 Merge branch 'features/date-type-use-html5' into features/activity-form 2021-06-08 22:01:19 +02:00
1433af8e95 fix format for birthdate in test 2021-06-08 21:57:06 +02:00
e91596ae12 fix callback for comparing birthdate in test 2021-06-08 19:44:31 +00:00
nobohan
9375c2cf86 household address: patch address + add validFrom input 2021-06-08 21:14:09 +02:00
nobohan
db77224b9f address: add swagger documentation 2021-06-08 20:36:20 +02:00
1c42bf6400 Merge branch 'features/date-type-use-html5' into features/activity-form 2021-06-08 19:45:58 +02:00
c9da72fa0d fix test: use format for html5 date 2021-06-08 19:44:55 +02:00
3b3855089c fix social action render 2021-06-08 19:42:29 +02:00
265ace0b4c update dep to app 2021-06-08 19:27:46 +02:00
0e1bbbfee9 Merge remote-tracking branch 'origin/master' into features/household-validation 2021-06-08 19:19:30 +02:00
ebf896ac74 use encore functions to load assets 2021-06-08 19:17:07 +02:00
31befaa339 remove dump 2021-06-08 18:19:24 +02:00
780c14cfbe Merge branch 'features/date-type-use-html5' into features/activity-form 2021-06-08 18:08:23 +02:00
8183c028f8 remove ref to pikaday 2021-06-08 18:07:59 +02:00
97bba861c9 Merge branch 'features/date-type-use-html5' into features/activity-form 2021-06-08 18:03:34 +02:00
8d7d170f11 Use Html5 datetype and remove pikaday and moment.js 2021-06-08 17:58:23 +02:00
c126f680ae Merge remote-tracking branch 'origin/master' into features/activity-form 2021-06-08 17:24:47 +02:00
nobohan
6a42edd460 household address: remove address selection 2021-06-08 17:06:03 +02:00
0aa909f060 fix misc in activity (WIP) 2021-06-08 16:55:29 +02:00
f27957e91b improve banner 2021-06-08 12:36:27 +02:00
ed891b224f allow to distinguish stle for list-with-periods and list household
members in css
2021-06-08 12:36:01 +02:00
nobohan
76d945f2a7 household address: address history : add button 2021-06-08 11:51:30 +02:00
nobohan
7d13bc7cfe household address: address history (twig + css) 2021-06-08 11:35:33 +02:00
nobohan
66b54bad31 household address: add swagger documentation 2021-06-08 08:55:41 +02:00
nobohan
9d32ccbcad address: swagger config for documenting API points 2021-06-08 08:30:54 +02:00
4dc82bc207 add test for Member edition + fix path 2021-06-07 21:52:17 +02:00
2384281532 update test app to new version 2021-06-07 21:23:28 +02:00
7c94824c20 Merge branch 'features/household-members-list' into features/household-editor 2021-06-07 17:36:25 +02:00
a922e397f8 Merge remote-tracking branch 'origin/master' into features/household-editor 2021-06-07 17:32:29 +02:00
be13f8f65b fullfill summary page 2021-06-07 17:27:10 +02:00
12f83abccc add encore to composer.json 2021-06-07 17:26:38 +02:00
nobohan
63c3b5a970 address: add swagger doc on API point for address 2021-06-07 17:24:31 +02:00
5cb076495a finalize members lists 2021-06-07 17:03:45 +02:00
nobohan
03a7ec389b household address: fix POST household address 2021-06-07 16:54:16 +02:00
604e78f35e restore list with period 2021-06-07 15:31:30 +02:00
nobohan
f39fe05dd5 household address: rely on ROLE_USER for household address api point role 2021-06-07 15:26:24 +02:00
eeffa3191e page list members of an household: born date + collpse old members 2021-06-07 15:14:42 +02:00
nobohan
6c126b0581 household address: api POST on address for household (WIP) 2021-06-07 15:13:45 +02:00
84d5fb936e use encore entry tags to load css and js in layout 2021-06-07 14:48:36 +02:00
nobohan
5ee824d1c2 household address: define a custom household-address API point (WIP) 2021-06-07 14:47:22 +02:00
7933aaed1c use MessageFormatter for formatting message with gender 2021-06-07 14:25:15 +02:00
nobohan
6d20476b81 household address: household address history (WIP) 2021-06-07 14:24:03 +02:00
nobohan
2b5ed5e5a3 household address: choose among available address 2021-06-07 12:18:03 +02:00
e5905902cc add confirm button for move 2021-06-04 21:24:11 +02:00
48e5809008 add utility for date 2021-06-04 21:23:51 +02:00
a947634f30 remove dump 2021-06-04 19:52:03 +02:00
3e3c9dc894 Merge branch 'features/activity-form' of gitlab.com:Chill-Projet/chill-bundles into features/activity-form 2021-06-04 19:50:50 +02:00
574b5dcbd0 simplify concernedGroups template for bloc/row include 2021-06-04 19:50:00 +02:00
c1ba892811 list activity flex-table design 2021-06-04 18:59:34 +02:00
nobohan
6f68349f57 household address: post address to household (WIP) 2021-06-04 17:45:29 +02:00
nobohan
d513be2fce household address: post address to household (WIP) 2021-06-04 16:23:13 +02:00
Marc Ducobu
160c7f2c31 Adding fr translation for social issues 2021-06-04 15:47:52 +02:00
nobohan
aff140230c household address: add a button for posting to household 2021-06-04 15:38:28 +02:00
Marc Ducobu
31468aeae0 Using select2 for reason field inside activity form 2021-06-04 15:15:28 +02:00
Marc Ducobu
e52c94aabd Use SocialIssueRenderer->renderString for displaying socialIssues 2021-06-04 15:04:36 +02:00
nobohan
7e1b7b7e9f household address: init vue component for household address 2021-06-04 14:50:51 +02:00
Marc Ducobu
39dca2a9ca Form for socialIssues & Actions using expanded 2021-06-04 14:48:07 +02:00
nobohan
878ee5d9c7 household address: correct household api entry point 2021-06-04 12:34:44 +02:00
Marc Ducobu
541fe8f1ad Removing extra line 2021-06-04 12:22:17 +02:00
Marc Ducobu
bb71b9f908 Descendants for socialActions & Issues 2021-06-04 12:22:17 +02:00
nobohan
7b67ef5db2 household address: add household api entry point 2021-06-04 12:13:15 +02:00
330234981c Merge remote-tracking branch 'origin/features/activity-form--marc' into features/activity-form 2021-06-04 11:58:33 +02:00
a323e84357 concerned parties in vue component: display 3 or 4 bloc according to context 2021-06-04 11:53:50 +02:00
c33f577f5a activity show: concerned parties are clickable links 2021-06-04 10:52:07 +02:00
nobohan
d806a074a7 Merge branch 'master' into _77_address_household
merge master
2021-06-04 09:09:59 +02:00
nobohan
14a9d9c739 address-household: address move (WIP) 2021-06-04 08:48:08 +02:00
502a629dc8 add date for movement editor 2021-06-03 22:09:52 +02:00
4ace2fef99 concerned parties, split in activity model persons associated or not 2021-06-03 20:20:56 +02:00
Marc Ducobu
4a1ebc1c4c Removing dump 2021-06-03 20:18:47 +02:00
Marc Ducobu
4553051271 Review load fixtures for activityType & categories 2021-06-03 20:15:40 +02:00
Marc Ducobu
743d6cd0bf Method setX with return this (and not void) 2021-06-03 20:15:40 +02:00
Marc Ducobu
0f635ca51a SocialAction & Issues in Activity form 2021-06-03 20:15:40 +02:00
987815471c add concerned parties in show activity page (2 contexts) 2021-06-03 19:13:58 +02:00
d9a3e117b2 WIP continue editor 2021-06-03 18:11:05 +02:00
32b3d74a1b fix activity entity addPersons if person is null 2021-06-03 13:48:03 +02:00
Marc Ducobu
c4e226d0bd Ajout de SocialIsssue & SocialAction to ActivityType 2021-06-02 12:47:43 +02:00
c6949490a4 first impl for household editor 2021-06-02 00:32:55 +02:00
Marc Ducobu
7992f09aea Ajout SocialAction & SocialIssues to Activity 2021-06-01 17:18:00 +02:00
abede56d68 activity vue corrections 2021-06-01 16:18:01 +02:00
9ab032c943 resolve data Transformer in ActivityType (persons/thirdparties/users) 2021-06-01 15:13:21 +02:00
e95d756e71 fix socialIssues multiselect with searchable=true option 2021-05-31 09:59:44 +02:00
992734bb72 fix banner toggleFlags regular/occasionnal 'on' style -> stronger 2021-05-31 09:54:28 +02:00
741ed84918 formType transform string id in entities, wip 2021-05-28 22:59:56 +02:00
5822736f19 store action add/remove id values in hidden input fields 2021-05-28 22:29:34 +02:00
66776eed01 activity component split added persons between 'Usagers du parcours' and 'Tiers non pros.' 2021-05-28 19:27:27 +02:00
e123ee5d03 activity vue component add and remove persons (in store) 2021-05-28 17:30:11 +02:00
666c1e7ae7 replace border by box-shadox in flex-bloc and flex-table
We use box-shadow instead of border
to avoid to manage border double-width
when blocs are resized for small screen !

Then we can simulate border-collapse: collapse (table)
2021-05-28 12:46:04 +02:00
622c254cc4 Activity: vue DisplayPerson component logic 2021-05-28 12:14:46 +02:00
a19fd51600 serialize new activity when id's not yet defined 2021-05-28 12:13:28 +02:00
56242f9b5a adapt requestor to flex-table 2021-05-27 22:55:07 +02:00
549f3a4c78 AddPersons in activity
* modal button dont submit all form
* addNewPersons action mutation loop ready
2021-05-27 22:53:35 +02:00
9ec2a62fb6 controller return json to vue via twig, corrections 2021-05-27 18:41:22 +02:00
65ac9a47b4 add addPersons subcomponent 2021-05-27 17:53:14 +02:00
b1d7e543fc controller return json to vue via twig; init vue App 2021-05-27 17:36:33 +02:00
b89cffce68 add serializer to activityController 2021-05-27 16:13:22 +02:00
968e6914b2 add new webpack vue entrypoint for activity
+ rename existing activity.scss
+ rename webpack vue accompanyingCourse entrypoint
2021-05-27 13:29:01 +02:00
52ee8c5a9a activity: change fields order in form 2021-05-27 13:27:40 +02:00
0a5d20b16f Merge branch 'master' into features/activity-form 2021-05-27 11:43:37 +02:00
2c49afe549 Merge branch 'master' into features/activity-form 2021-05-27 10:44:21 +02:00
6631e853b4 Merge branch 'master' into features/activity-form 2021-05-27 10:08:40 +02:00
Jean-Francois Monfort
2bae684df9 Add list of activities in AccompanyingCourse Menu 2021-05-20 17:08:47 +02:00
Jean-Francois Monfort
8fe00b4c2b Add / Edit / Delete activity from Accompanying Course 2021-05-20 15:56:34 +02:00
Jean-Francois Monfort
c59cf3f0df Merge remote-tracking branch 'origin/139_demandeur' into features/activity-form 2021-05-20 08:57:32 +02:00
Jean-Francois Monfort
890b8db5dd Merge branch 'master' into features/activity-form 2021-05-20 08:20:10 +02:00
Jean-Francois Monfort
1f838d9c5a Fix Activity fixtures 2021-05-06 16:23:34 +02:00
Jean-Francois Monfort
c6cd785262 add Translations 2021-05-06 15:09:38 +02:00
Jean-Francois Monfort
e453e24203 Merge branch 'master' into features/activity-form 2021-05-06 14:01:03 +02:00
Jean-Francois Monfort
115a14fcba Merge branch 'master' into features/activity-form 2021-05-06 13:52:03 +02:00
Jean-Francois Monfort
fc172fdb1f Add documents to Activity Form 2021-05-06 13:40:25 +02:00
Jean-Francois Monfort
1f1b9c594f add ordoring field & Display Activity type by Category 2021-05-06 11:53:07 +02:00
Jean-Francois Monfort
f836114d84 Fix travelTime field 2021-05-06 10:51:17 +02:00
Jean-Francois Monfort
4fd13440c6 Modernize ActivityController 2021-05-06 10:03:49 +02:00
Jean-Francois Monfort
4d8afd53ad Form & save into DB 2021-05-06 09:36:03 +02:00
Jean-Francois Monfort
82d8556f24 Activity Form : display field according to the parameters 2021-04-29 16:35:39 +02:00
Jean-Francois Monfort
45671bda52 Merge branch 'features/activity-model' into features/activity-form 2021-04-22 16:26:59 +02:00
Jean-Francois Monfort
934eef4db4 Merge branch 'master' into features/activity-model 2021-04-22 16:13:05 +02:00
Jean-Francois Monfort
31e8dea965 Add missing fields & migrations 2021-04-22 15:33:13 +02:00
Jean-Francois Monfort
05ebdefd47 Add missing fields & migrations 2021-04-22 14:47:00 +02:00
Jean-Francois Monfort
c233c481b6 WIP Activity Model 2021-04-15 17:33:41 +02:00
Jean-Francois Monfort
68d9778c00 Merge branch 'features/activity-type' into features/activity-form 2021-04-15 14:46:08 +02:00
Jean-Francois Monfort
8acd852070 Fix uls 2021-04-15 14:45:52 +02:00
Jean-Francois Monfort
a9420f0339 Merge branch 'features/activity-type' into features/activity-form 2021-04-15 14:10:46 +02:00
Jean-Francois Monfort
207e5bf01d Merge branch 'master' into features/activity-type 2021-04-15 14:06:58 +02:00
Jean-Francois Monfort
cb5cf5763e ActivityType : rename some fields 2021-04-15 13:56:39 +02:00
Jean-Francois Monfort
ff450215c6 Add first step to select Activity Type 2021-04-15 13:08:30 +02:00
Jean-Francois Monfort
dad8fd5378 ActivityType add new fields : add translations 2021-04-08 16:19:54 +02:00
Jean-Francois Monfort
37b395ee52 ActivityType add new fields 2021-04-08 16:10:04 +02:00
Jean-Francois Monfort
580dc71218 ActivityType replace Admin Conroller with Crud system 2021-04-01 16:22:33 +02:00
Jean-Francois Monfort
24a7d7b34b new entity ActivityTypeCategory + CRUD 2021-04-01 15:44:05 +02:00
1322 changed files with 55730 additions and 31106 deletions

View File

@@ -7,6 +7,7 @@ charset = utf-8
end_of_line = LF
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 4
[*.{php,html,twig}]
indent_style = space

View File

@@ -5,11 +5,13 @@ image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4
cache:
paths:
- tests/app/vendor/
- .composer
before_script:
# add extensions to postgres
- PGPASSWORD=$POSTGRES_PASSWORD psql -U $POSTGRES_USER -h db -c "CREATE EXTENSION IF NOT EXISTS unaccent; CREATE EXTENSION IF NOT EXISTS pg_trgm;"
# Install and run Composer
- mkdir -p $COMPOSER_HOME
- curl -sS https://getcomposer.org/installer | php
- php -d memory_limit=2G composer.phar install
- php tests/app/bin/console doctrine:migrations:migrate -n
@@ -34,6 +36,10 @@ variables:
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_URL: redis://redis:6379
# change vendor dir to make the app install into tests/apps
COMPOSER_VENDOR_DIR: tests/app/vendor
# cache some composer data
COMPOSER_HOME: .composer
# Run our tests

45
CHANGELOG.md Normal file
View File

@@ -0,0 +1,45 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
* [Semantic Versioning](https://semver.org/spec/v2.0.0.html) for stable releases;
* date versioning for test releases
## Unreleased
* Address: zoom on postal code geometry + fix origin of manually entered postal code
* [Aside activity] Fixes for aside activity
* categories with child
* fast creation buttons
* add ordering for types
## Test releases
### test release 2021-10-04
* [Household editor][UI] Update how household suggestion and addresses are picked;
* [AddAddress] Handle address suggestion;
* [CenterType][Create a person] when overriding the ACL rules, allow to show a PickCenterType
when no centers are reachable by the default ACL.
* [Household] Show comment event if no address are associated with the household;
* [Person results] Add requestor into search results:
* a badge "requestor" is shown into search results;
* periods where the person is only requestor (without participating) are also shown;
Issues:
* https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/13
* https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/199
* [Person form] "accept sms" not required:
https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/37
https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/221
* On-The-Fly modale works for showing, editing and creating person and thirdparty ;
* AccompanyingCourse Resume page: list associated persons by household, see household when hover, and show on-the-fly modale when clicking on person ;

661
LICENSE Normal file
View File

@@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
chill-bundles
Copyright (C) 2021 Chill Project
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.

View File

@@ -1,9 +1,72 @@
{
"name": "chill-project/chill-bundles",
"license": "AGPL-3.0-only",
"type": "library",
"description": "Most used bundles for chill-project",
"keywords": ["chill", "social worker"],
"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",
"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",
"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",
"symfony/monolog-bundle": "^3.5",
"symfony/security-bundle": "4.*",
"symfony/serializer": "^5.2",
"symfony/swiftmailer-bundle": "^3.5",
"symfony/templating": "4.*",
"symfony/translation": "4.*",
"symfony/twig-bundle": "^4.4",
"symfony/validator": "4.*",
"symfony/webpack-encore-bundle": "^1.11",
"symfony/workflow": "4.*",
"symfony/yaml": "4.*",
"twig/extra-bundle": "^2.12 || ^3.0",
"twig/intl-extra": "^3.0",
"twig/markdown-extra": "^3.3",
"twig/twig": "^2.12 || ^3.0"
},
"conflict": {
"symfony/symfony": "*"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3",
"fakerphp/faker": "^1.13",
"nelmio/alice": "^3.8",
"phpunit/phpunit": "^7.0",
"symfony/debug-bundle": "^5.1",
"symfony/dotenv": "^5.1",
"symfony/maker-bundle": "^1.20",
"symfony/phpunit-bridge": "^5.2",
"symfony/stopwatch": "^5.1",
"symfony/var-dumper": "4.*",
"symfony/web-profiler-bundle": "^5.0"
},
"config": {
"bin-dir": "bin",
"vendor-dir": "tests/app/vendor"
},
"autoload": {
"psr-4": {
"Chill\\ActivityBundle\\": "src/Bundle/ChillActivityBundle",
@@ -16,74 +79,24 @@
"Chill\\PersonBundle\\": "src/Bundle/ChillPersonBundle",
"Chill\\ReportBundle\\": "src/Bundle/ChillReportBundle",
"Chill\\TaskBundle\\": "src/Bundle/ChillTaskBundle",
"Chill\\ThirdPartyBundle\\": "src/Bundle/ChillThirdPartyBundle"
"Chill\\ThirdPartyBundle\\": "src/Bundle/ChillThirdPartyBundle",
"Chill\\AsideActivityBundle\\": "src/Bundle/ChillAsideActivityBundle/src",
"Chill\\DocGeneratorBundle\\": "src/Bundle/ChillDocGeneratorBundle",
"Chill\\CalendarBundle\\": "src/Bundle/ChillCalendarBundle",
"Chill\\WopiBundle\\": "src/Bundle/ChillWopiBundle/src"
}
},
"autoload-dev": {
"psr-4": {
"App\\": "tests/app/src/"
"App\\": "tests/app/src/"
}
},
"require": {
"champs-libres/async-uploader-bundle": "dev-sf4",
"graylog2/gelf-php": "^1.5",
"symfony/form": "4.*",
"symfony/twig-bundle": "^4.4",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0",
"composer/package-versions-deprecated": "^1.10",
"doctrine/doctrine-bundle": "^2.1",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^2.7",
"symfony/asset": "4.*",
"symfony/monolog-bundle": "^3.5",
"symfony/security-bundle": "4.*",
"symfony/translation": "4.*",
"symfony/validator": "4.*",
"sensio/framework-extra-bundle": "^5.5",
"symfony/yaml": "4.*",
"symfony/webpack-encore-bundle": "^1.11",
"knplabs/knp-menu": "^3.1",
"knplabs/knp-menu-bundle": "^3.0",
"symfony/templating": "4.*",
"twig/intl-extra": "^3.0",
"symfony/workflow": "4.*",
"symfony/expression-language": "4.*",
"knplabs/knp-time-bundle": "^1.12",
"symfony/intl": "4.*",
"symfony/swiftmailer-bundle": "^3.5",
"league/csv": "^9.6",
"phpoffice/phpspreadsheet": "^1.16",
"symfony/browser-kit": "^5.2",
"symfony/css-selector": "^5.2",
"twig/markdown-extra": "^3.3",
"erusev/parsedown": "^1.7",
"symfony/serializer": "^5.2"
},
"conflict": {
"symfony/symfony": "*"
},
"require-dev": {
"fakerphp/faker": "^1.13",
"phpunit/phpunit": "^7.0",
"symfony/dotenv": "^5.1",
"symfony/maker-bundle": "^1.20",
"doctrine/doctrine-fixtures-bundle": "^3.3",
"symfony/stopwatch": "^5.1",
"symfony/web-profiler-bundle": "^5.0",
"symfony/var-dumper": "4.*",
"symfony/debug-bundle": "^5.1",
"symfony/phpunit-bridge": "^5.2",
"nelmio/alice": "^3.8"
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
}
},
"config": {
"vendor-dir": "tests/app/vendor",
"bin-dir": "bin"
}
}

View File

@@ -28,7 +28,7 @@ Then, render the pagination using the dedicated twig function.
.. code-block:: html+twig
{% extends "ChillPersonBundle::layout.html.twig" %}
{% extends "@ChillPerson/Person/layout.html.twig" %}
{% block title 'Item list'|trans %}

View File

@@ -149,7 +149,7 @@ It proposes a new block :
* where to display the admin content
ChillPersonBundle::layout.html.twig
@ChillPersonBundle/Person/layout.html.twig
-----------------------------------
This layout extend `ChillMainBundle::layoutWithVerticalMenu.html.twig` add the person details in the block `top_banner`, set the menu `person` as the vertical menu.

3
package.json.txt Normal file
View File

@@ -0,0 +1,3 @@
add npm/yarn dependency in package.json :
"select2-bootstrap-theme": "0.1.0-beta.10",

View File

@@ -10,7 +10,7 @@
<php>
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
<server name="SHELL_VERBOSITY" value="-1" />
</php>
@@ -31,6 +31,12 @@
<!-- temporarily removed, the time to find a fix -->
<exclude>src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php</exclude>
</testsuite>
<testsuite name="AsideActivityBundle">
<directory suffix="Test.php">src/Bundle/ChillAsideActivityBundle/src/Tests/</directory>
</testsuite>
<testsuite name="CalendarBundle">
<directory suffix="Test.php">src/Bundle/ChillCalendarBundle/Tests/</directory>
</testsuite>
</testsuites>
<listeners>

View File

@@ -22,17 +22,25 @@
namespace Chill\ActivityBundle\Controller;
use Chill\ActivityBundle\Repository\ActivityACLAwareRepository;
use Chill\ActivityBundle\Repository\ActivityACLAwareRepositoryInterface;
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Privacy\PrivacyEvent;
use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Form\Form;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Role\Role;
use Chill\ActivityBundle\Entity\Activity;
use Chill\PersonBundle\Entity\Person;
use Chill\ActivityBundle\Form\ActivityType;
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
use Symfony\Component\Serializer\SerializerInterface;
/**
* Class ActivityController
@@ -41,216 +49,288 @@ use Chill\ActivityBundle\Form\ActivityType;
*/
class ActivityController extends AbstractController
{
protected EventDispatcherInterface $eventDispatcher;
/**
* @var EventDispatcherInterface
*/
protected $eventDispatcher;
protected AuthorizationHelper $authorizationHelper;
/**
* @var AuthorizationHelper
*/
protected $authorizationHelper;
protected LoggerInterface $logger;
/**
* @var LoggerInterface
*/
protected $logger;
protected SerializerInterface $serializer;
protected ActivityACLAwareRepositoryInterface $activityACLAwareRepository;
/**
* ActivityController constructor.
*
* @param EventDispatcherInterface $eventDispatcher
* @param AuthorizationHelper $authorizationHelper
*/
public function __construct(
ActivityACLAwareRepositoryInterface $activityACLAwareRepository,
EventDispatcherInterface $eventDispatcher,
AuthorizationHelper $authorizationHelper,
LoggerInterface $logger
LoggerInterface $logger,
SerializerInterface $serializer
) {
$this->activityACLAwareRepository = $activityACLAwareRepository;
$this->eventDispatcher = $eventDispatcher;
$this->authorizationHelper = $authorizationHelper;
$this->logger = $logger;
$this->serializer = $serializer;
}
/**
* Lists all Activity entities.
*
*/
public function listAction($person_id, Request $request)
public function listAction(Request $request): Response
{
$em = $this->getDoctrine()->getManager();
$person = $em->getRepository('ChillPersonBundle:Person')->find($person_id);
$view = null;
// TODO: add pagination
if ($person === NULL) {
throw $this->createNotFoundException('Person not found');
[$person, $accompanyingPeriod] = $this->getEntity($request);
if ($person instanceof Person) {
$this->denyAccessUnlessGranted(ActivityVoter::SEE, $person);
$activities = $this->activityACLAwareRepository
->findByPerson($person, ActivityVoter::SEE, 0, null);
$event = new PrivacyEvent($person, array(
'element_class' => Activity::class,
'action' => 'list'
));
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
$view = 'ChillActivityBundle:Activity:listPerson.html.twig';
} elseif ($accompanyingPeriod instanceof AccompanyingPeriod) {
$this->denyAccessUnlessGranted(ActivityVoter::SEE, $accompanyingPeriod);
$activities = $this->activityACLAwareRepository
->findByAccompanyingPeriod($accompanyingPeriod, ActivityVoter::SEE);
$view = 'ChillActivityBundle:Activity:listAccompanyingCourse.html.twig';
}
$this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
$reachableScopes = $this->authorizationHelper
->getReachableScopes($this->getUser(), new Role('CHILL_ACTIVITY_SEE'),
$person->getCenter());
$activities = $em->getRepository('ChillActivityBundle:Activity')
->findBy(
array('person' => $person, 'scope' => $reachableScopes),
array('date' => 'DESC')
);
$event = new PrivacyEvent($person, array(
'element_class' => Activity::class,
'action' => 'list'
));
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
return $this->render('ChillActivityBundle:Activity:list.html.twig', array(
return $this->render($view, array(
'activities' => $activities,
'person' => $person
'person' => $person,
'accompanyingCourse' => $accompanyingPeriod,
));
}
/**
* Creates a new Activity entity.
*
*/
public function createAction($person_id, Request $request)
public function selectTypeAction(Request $request): Response
{
$em = $this->getDoctrine()->getManager();
$person = $em->getRepository('ChillPersonBundle:Person')->find($person_id);
$view = null;
if ($person === NULL) {
throw $this->createNotFoundException('person not found');
[$person, $accompanyingPeriod] = $this->getEntity($request);
if ($accompanyingPeriod instanceof AccompanyingPeriod) {
$view = 'ChillActivityBundle:Activity:selectTypeAccompanyingCourse.html.twig';
} elseif ($person instanceof Person) {
$view = 'ChillActivityBundle:Activity:selectTypePerson.html.twig';
}
$this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
$data = [];
$activityTypeCategories = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityTypeCategory::class)
->findBy(['active' => true], ['ordering' => 'ASC']);
foreach ($activityTypeCategories as $activityTypeCategory) {
$activityTypes = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityType::class)
->findBy(['active' => true, 'category' => $activityTypeCategory], ['ordering' => 'ASC']);
$data[] = [
'activityTypeCategory' => $activityTypeCategory,
'activityTypes' => $activityTypes,
];
}
if ($request->query->has('activityData')) {
$activityData = $request->query->get('activityData');
} else {
$activityData = [];
}
if ($view === null) {
throw $this->createNotFoundException('Template not found');
}
return $this->render($view, [
'person' => $person,
'accompanyingCourse' => $accompanyingPeriod,
'data' => $data,
'activityData' => $activityData
]);
}
public function newAction(Request $request): Response
{
$em = $this->getDoctrine()->getManager();
[$person, $accompanyingPeriod] = $this->getEntity($request);
if ($accompanyingPeriod instanceof AccompanyingPeriod) {
$view = 'ChillActivityBundle:Activity:newAccompanyingCourse.html.twig';
} elseif ($person instanceof Person) {
$view = 'ChillActivityBundle:Activity:newPerson.html.twig';
}
$activityType_id = $request->get('activityType_id', 0);
$activityType = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityType::class)
->find($activityType_id);
$activityData = null;
if ($request->query->has('activityData')) {
$activityData = $request->query->get('activityData');
}
if (!$activityType instanceof \Chill\ActivityBundle\Entity\ActivityType ||
!$activityType->isActive()) {
$params = $this->buildParamsToUrl($person, $accompanyingPeriod);
if (null !== $activityData) {
$params['activityData'] = $activityData;
}
return $this->redirectToRoute('chill_activity_activity_select_type', $params);
}
$entity = new Activity();
$entity->setPerson($person);
$form = $this->createCreateForm($entity, $person);
$form->handleRequest($request);
$entity->setUser($this->getUser());
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
if ($person instanceof Person) {
$entity->setPerson($person);
}
$this->denyAccessUnlessGranted('CHILL_ACTIVITY_CREATE', $entity,
'creation of this activity not allowed');
if ($accompanyingPeriod instanceof AccompanyingPeriod) {
$entity->setAccompanyingPeriod($accompanyingPeriod);
}
$entity->setType($activityType);
$entity->setDate(new \DateTime('now'));
if ($request->query->has('activityData')) {
$activityData = $request->query->get('activityData');
if (array_key_exists('durationTime', $activityData)) {
$durationTimeInMinutes = $activityData['durationTime'];
$hours = floor($durationTimeInMinutes / 60);
$minutes = $durationTimeInMinutes % 60;
$duration = \DateTime::createFromFormat("H:i", $hours.':'.$minutes);
if ($duration) {
$entity->setDurationTime($duration);
}
}
if (array_key_exists('date', $activityData)) {
$date = \DateTime::createFromFormat('Y-m-d', $activityData['date']);
if ($date) {
$entity->setDate($date);
}
}
if (array_key_exists('personsId', $activityData)) {
foreach($activityData['personsId'] as $personId){
$concernedPerson = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($personId);
$entity->addPerson($concernedPerson);
}
}
if (array_key_exists('professionalsId', $activityData)) {
foreach($activityData['professionalsId'] as $professionalsId){
$professional = $em->getRepository(\Chill\ThirdPartyBundle\Entity\ThirdParty::class)->find($professionalsId);
$entity->addThirdParty($professional);
}
}
if (array_key_exists('comment', $activityData)) {
$comment = new CommentEmbeddable();
$comment->setComment($activityData['comment']);
$comment->setUserId($this->getUser()->getid());
$comment->setDate(new \DateTime('now'));
$entity->setComment($comment);
}
}
// TODO revoir le Voter de Activity pour tenir compte qu'une activité peut appartenir a une période
// $this->denyAccessUnlessGranted('CHILL_ACTIVITY_CREATE', $entity);
$form = $this->createForm(ActivityType::class, $entity, [
'center' => $entity->getCenter(),
'role' => new Role('CHILL_ACTIVITY_CREATE'),
'activityType' => $entity->getType(),
'accompanyingPeriod' => $accompanyingPeriod,
])->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$em->persist($entity);
$em->flush();
$this->get('session')
->getFlashBag()
->add('success',
$this->get('translator')
->trans('Success : activity created!')
);
$this->addFlash('success', $this->get('translator')->trans('Success : activity created!'));
return $this->redirect(
$this->generateUrl('chill_activity_activity_show',
array('id' => $entity->getId(), 'person_id' => $person_id)));
$params = $this->buildParamsToUrl($person, $accompanyingPeriod);
$params['id'] = $entity->getId();
return $this->redirectToRoute('chill_activity_activity_show', $params);
}
$this->get('session')
->getFlashBag()->add('danger',
$this->get('translator')
->trans('The form is not valid. The activity has not been created !')
);
return $this->render('ChillActivityBundle:Activity:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
'person' => $person
));
}
/**
* Creates a form to create a Activity entity.
*
* @param Activity $entity The entity
*
* @return \Symfony\Component\Form\Form The form
*/
private function createCreateForm(Activity $entity)
{
$form = $this->createForm(ActivityType::class, $entity,
array(
'action' => $this->generateUrl('chill_activity_activity_create', [
'person_id' => $entity->getPerson()->getId(),
]),
'method' => 'POST',
'center' => $entity->getCenter(),
'role' => new Role('CHILL_ACTIVITY_CREATE')
)
);
return $form;
}
/**
* Displays a form to create a new Activity entity.
*
*/
public function newAction($person_id)
{
$em = $this->getDoctrine()->getManager();
$person = $em->getRepository('ChillPersonBundle:Person')->find($person_id);
if ($person === NULL){
throw $this->createNotFoundException('Person not found');
if ($view === null) {
throw $this->createNotFoundException('Template not found');
}
$this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
$activity_array = $this->serializer->normalize($entity, 'json', ['groups' => 'read']);
$entity = new Activity();
$entity->setUser($this->get('security.token_storage')->getToken()->getUser());
$entity->setPerson($person);
$entity->setDate(new \DateTime('now'));
$this->denyAccessUnlessGranted('CHILL_ACTIVITY_CREATE', $entity);
$form = $this->createCreateForm($entity, $person);
return $this->render('ChillActivityBundle:Activity:new.html.twig', array(
return $this->render($view, [
'person' => $person,
'accompanyingCourse' => $accompanyingPeriod,
'entity' => $entity,
'form' => $form->createView(),
));
'form' => $form->createView(),
'activity_json' => $activity_array
]);
}
/**
* Finds and displays a Activity entity.
*
*/
public function showAction($person_id, $id)
public function showAction(Request $request, $id): Response
{
$em = $this->getDoctrine()->getManager();
$person = $em->getRepository('ChillPersonBundle:Person')->find($person_id);
if (!$person) {
throw $this->createNotFoundException('person not found');
[$person, $accompanyingPeriod] = $this->getEntity($request);
if ($accompanyingPeriod instanceof AccompanyingPeriod) {
$view = 'ChillActivityBundle:Activity:showAccompanyingCourse.html.twig';
} elseif ($person instanceof Person) {
$view = 'ChillActivityBundle:Activity:showPerson.html.twig';
}
$this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
$entity = $em->getRepository('ChillActivityBundle:Activity')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find Activity entity.');
}
$this->denyAccessUnlessGranted('CHILL_ACTIVITY_SEE', $entity);
if (null !== $accompanyingPeriod) {
$entity->personsAssociated = $entity->getPersonsAssociated();
$entity->personsNotAssociated = $entity->getPersonsNotAssociated();
}
$deleteForm = $this->createDeleteForm($id, $person);
// TODO revoir le Voter de Activity pour tenir compte qu'une activité peut appartenir a une période
// $this->denyAccessUnlessGranted('CHILL_ACTIVITY_SEE', $entity);
$deleteForm = $this->createDeleteForm($id, $person, $accompanyingPeriod);
// TODO
/*
$event = new PrivacyEvent($person, array(
'element_class' => Activity::class,
'element_id' => $entity->getId(),
'action' => 'show'
));
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
*/
return $this->render('ChillActivityBundle:Activity:show.html.twig', array(
if ($view === null) {
throw $this->createNotFoundException('Template not found');
}
return $this->render($view, array(
'person' => $person,
'accompanyingCourse' => $accompanyingPeriod,
'entity' => $entity,
'delete_form' => $deleteForm->createView(),
));
@@ -260,118 +340,70 @@ class ActivityController extends AbstractController
* Displays a form to edit an existing Activity entity.
*
*/
public function editAction($person_id, $id)
public function editAction($id, Request $request): Response
{
$em = $this->getDoctrine()->getManager();
$person = $em->getRepository('ChillPersonBundle:Person')->find($person_id);
if (!$person) {
throw $this->createNotFoundException('person not found');
[$person, $accompanyingPeriod] = $this->getEntity($request);
if ($accompanyingPeriod instanceof AccompanyingPeriod) {
$view = 'ChillActivityBundle:Activity:editAccompanyingCourse.html.twig';
} elseif ($person instanceof Person) {
$view = 'ChillActivityBundle:Activity:editPerson.html.twig';
}
$this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
$entity = $em->getRepository('ChillActivityBundle:Activity')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find Activity entity.');
}
$this->denyAccessUnlessGranted('CHILL_ACTIVITY_UPDATE', $entity);
// TODO
// $this->denyAccessUnlessGranted('CHILL_ACTIVITY_UPDATE', $entity);
$editForm = $this->createEditForm($entity);
$deleteForm = $this->createDeleteForm($id, $person);
$form = $this->createForm(ActivityType::class, $entity, [
'center' => $entity->getCenter(),
'role' => new Role('CHILL_ACTIVITY_UPDATE'),
'activityType' => $entity->getType(),
'accompanyingPeriod' => $accompanyingPeriod,
])->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$em->persist($entity);
$em->flush();
$this->addFlash('success', $this->get('translator')->trans('Success : activity updated!'));
$params = $this->buildParamsToUrl($person, $accompanyingPeriod);
$params['id'] = $id;
return $this->redirectToRoute('chill_activity_activity_show', $params);
}
$deleteForm = $this->createDeleteForm($id, $person, $accompanyingPeriod);
/*
* TODO
$event = new PrivacyEvent($person, array(
'element_class' => Activity::class,
'element_id' => $entity->getId(),
'action' => 'edit'
));
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
*/
return $this->render('ChillActivityBundle:Activity:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
'delete_form' => $deleteForm->createView(),
'person' => $person
));
}
/**
* Creates a form to edit a Activity entity.
*
* @param Activity $entity The entity
*
* @return \Symfony\Component\Form\Form The form
*/
private function createEditForm(Activity $entity)
{
$form = $this->createForm(ActivityType::class, $entity, array(
'action' => $this->generateUrl('chill_activity_activity_update',
array(
'id' => $entity->getId(),
'person_id' => $entity->getPerson()->getId()
)),
'method' => 'PUT',
'center' => $entity->getCenter(),
'role' => new Role('CHILL_ACTIVITY_UPDATE')
));
return $form;
}
/**
* Edits an existing Activity entity.
*
*/
public function updateAction(Request $request, $person_id, $id)
{
$em = $this->getDoctrine()->getManager();
$person = $em->getRepository('ChillPersonBundle:Person')->find($person_id);
$entity = $em->getRepository('ChillActivityBundle:Activity')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find Activity entity.');
if ($view === null) {
throw $this->createNotFoundException('Template not found');
}
$this->denyAccessUnlessGranted('CHILL_ACTIVITY_UPDATE', $entity);
$activity_array = $this->serializer->normalize($entity, 'json', ['groups' => 'read']);
$deleteForm = $this->createDeleteForm($id, $person);
$editForm = $this->createEditForm($entity);
$editForm->handleRequest($request);
$event = new PrivacyEvent($person, array(
'element_class' => Activity::class,
'element_id' => $entity->getId(),
'action' => 'update'
));
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
if ($editForm->isValid()) {
$em->flush();
$this->get('session')
->getFlashBag()
->add('success',
$this->get('translator')
->trans('Success : activity updated!')
);
return $this->redirect($this->generateUrl('chill_activity_activity_show', array('id' => $id, 'person_id' => $person_id)));
}
$this->get('session')
->getFlashBag()
->add('error',
$this->get('translator')
->trans('This form contains errors')
);
return $this->render('ChillActivityBundle:Activity:edit.html.twig', array(
'person' => $entity->getPerson(),
return $this->render($view, array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
'edit_form' => $form->createView(),
'delete_form' => $deleteForm->createView(),
'person' => $person,
'accompanyingCourse' => $accompanyingPeriod,
'activity_json' => $activity_array
));
}
@@ -379,22 +411,29 @@ class ActivityController extends AbstractController
* Deletes a Activity entity.
*
*/
public function deleteAction(Request $request, $id, $person_id)
public function deleteAction(Request $request, $id)
{
$em = $this->getDoctrine()->getManager();
[$person, $accompanyingPeriod] = $this->getEntity($request);
if ($accompanyingPeriod instanceof AccompanyingPeriod) {
$view = 'ChillActivityBundle:Activity:confirm_deleteAccompanyingCourse.html.twig';
} elseif ($person instanceof Person) {
$view = 'ChillActivityBundle:Activity:confirm_deletePerson.html.twig';
}
/* @var $activity Activity */
$activity = $em->getRepository('ChillActivityBundle:Activity')
->find($id);
$person = $activity->getPerson();
$activity = $em->getRepository('ChillActivityBundle:Activity')->find($id);
if (!$activity) {
throw $this->createNotFoundException('Unable to find Activity entity.');
}
$this->denyAccessUnlessGranted('CHILL_ACTIVITY_DELETE', $activity);
// TODO
// $this->denyAccessUnlessGranted('CHILL_ACTIVITY_DELETE', $activity);
$form = $this->createDeleteForm($id, $person);
$form = $this->createDeleteForm($id, $person, $accompanyingPeriod);
if ($request->getMethod() === Request::METHOD_DELETE) {
$form->handleRequest($request);
@@ -404,14 +443,14 @@ class ActivityController extends AbstractController
$this->logger->notice("An activity has been removed", array(
'by_user' => $this->getUser()->getUsername(),
'activity_id' => $activity->getId(),
'person_id' => $activity->getPerson()->getId(),
'person_id' => $activity->getPerson() ? $activity->getPerson()->getId() : null,
'comment' => $activity->getComment()->getComment(),
'scope_id' => $activity->getScope()->getId(),
'scope_id' => $activity->getScope() ? $activity->getScope()->getId() : null,
'reasons_ids' => $activity->getReasons()
->map(function ($ar) { return $ar->getId(); })
->toArray(),
'type_id' => $activity->getType()->getId(),
'duration' => $activity->getDurationTime()->format('U'),
'duration' => $activity->getDurationTime() ? $activity->getDurationTime()->format('U') : null,
'date' => $activity->getDate()->format('Y-m-d'),
'attendee' => $activity->getAttendee()
));
@@ -422,37 +461,86 @@ class ActivityController extends AbstractController
$this->addFlash('success', $this->get('translator')
->trans("The activity has been successfully removed."));
return $this->redirect($this->generateUrl(
'chill_activity_activity_list', array(
'person_id' => $person_id
)));
$params = $this->buildParamsToUrl($person, $accompanyingPeriod);
return $this->redirectToRoute('chill_activity_activity_list', $params);
}
}
return $this->render('ChillActivityBundle:Activity:confirm_delete.html.twig', array(
if ($view === null) {
throw $this->createNotFoundException('Template not found');
}
return $this->render($view, array(
'activity' => $activity,
'delete_form' => $form->createView()
'delete_form' => $form->createView(),
'person' => $person,
'accompanyingCourse' => $accompanyingPeriod,
));
}
/**
* Creates a form to delete a Activity entity by id.
*
* @param mixed $id The entity id
*
* @return \Symfony\Component\Form\Form The form
*/
private function createDeleteForm($id, $person)
private function createDeleteForm(int $id, ?Person $person, ?AccompanyingPeriod $accompanyingPeriod): Form
{
$params = $this->buildParamsToUrl($person, $accompanyingPeriod);
$params['id'] = $id;
return $this->createFormBuilder()
->setAction($this->generateUrl(
'chill_activity_activity_delete',
array('id' => $id, 'person_id' => $person->getId())))
->setAction($this->generateUrl('chill_activity_activity_delete', $params))
->setMethod('DELETE')
->add('submit', SubmitType::class, array('label' => 'Delete'))
->getForm()
;
}
private function getEntity(Request $request): array
{
$em = $this->getDoctrine()->getManager();
$person = $accompanyingPeriod = null;
if ($request->query->has('person_id')) {
$person_id = $request->get('person_id');
$person = $em->getRepository(Person::class)->find($person_id);
if ($person === null) {
throw $this->createNotFoundException('Person not found');
}
$this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
} elseif ($request->query->has('accompanying_period_id')) {
$accompanying_period_id = $request->get('accompanying_period_id');
$accompanyingPeriod = $em->getRepository(AccompanyingPeriod::class)->find($accompanying_period_id);
if ($accompanyingPeriod === null) {
throw $this->createNotFoundException('Accompanying Period not found');
}
// TODO Add permission
// $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
} else {
throw $this->createNotFoundException("Person or Accompanying Period not found");
}
return [
$person, $accompanyingPeriod
];
}
private function buildParamsToUrl(
?Person $person,
?AccompanyingPeriod $accompanyingPeriod
): array {
$params = [];
if ($person) {
$params['person_id'] = $person->getId();
}
if ($accompanyingPeriod) {
$params['accompanying_period_id'] = $accompanyingPeriod->getId();
}
return $params;
}
}

View File

@@ -1,178 +0,0 @@
<?php
namespace Chill\ActivityBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Chill\ActivityBundle\Entity\ActivityType;
use Chill\ActivityBundle\Form\ActivityTypeType;
/**
* Class ActivityTypeController
*
* @package Chill\ActivityBundle\Controller
*/
class ActivityTypeController extends AbstractController
{
/**
* Lists all ActivityType entities.
*
*/
public function indexAction()
{
$em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('ChillActivityBundle:ActivityType')->findAll();
return $this->render('ChillActivityBundle:ActivityType:index.html.twig', array(
'entities' => $entities,
));
}
/**
* Creates a new ActivityType entity.
*
*/
public function createAction(Request $request)
{
$entity = new ActivityType();
$form = $this->createCreateForm($entity);
$form->handleRequest($request);
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($entity);
$em->flush();
return $this->redirect($this->generateUrl('chill_activity_activitytype_show', array('id' => $entity->getId())));
}
return $this->render('ChillActivityBundle:ActivityType:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
}
/**
* Creates a form to create a ActivityType entity.
*
* @param ActivityType $entity The entity
*
* @return \Symfony\Component\Form\Form The form
*/
private function createCreateForm(ActivityType $entity)
{
$form = $this->createForm(ActivityTypeType::class, $entity, array(
'action' => $this->generateUrl('chill_activity_activitytype_create'),
'method' => 'POST',
));
$form->add('submit', SubmitType::class, array('label' => 'Create'));
return $form;
}
/**
* Displays a form to create a new ActivityType entity.
*
*/
public function newAction()
{
$entity = new ActivityType();
$form = $this->createCreateForm($entity);
return $this->render('ChillActivityBundle:ActivityType:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
}
/**
* Finds and displays a ActivityType entity.
*
*/
public function showAction($id)
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillActivityBundle:ActivityType')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityType entity.');
}
return $this->render('ChillActivityBundle:ActivityType:show.html.twig', array(
'entity' => $entity,
));
}
/**
* Displays a form to edit an existing ActivityType entity.
*
*/
public function editAction($id)
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillActivityBundle:ActivityType')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityType entity.');
}
$editForm = $this->createEditForm($entity);
return $this->render('ChillActivityBundle:ActivityType:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView()
));
}
/**
* Creates a form to edit a ActivityType entity.
*
* @param ActivityType $entity The entity
*
* @return \Symfony\Component\Form\Form The form
*/
private function createEditForm(ActivityType $entity)
{
$form = $this->createForm(ActivityTypeType::class, $entity, array(
'action' => $this->generateUrl('chill_activity_activitytype_update', array('id' => $entity->getId())),
'method' => 'PUT',
));
$form->add('submit', SubmitType::class, array('label' => 'Update'));
return $form;
}
/**
* Edits an existing ActivityType entity.
*
*/
public function updateAction(Request $request, $id)
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillActivityBundle:ActivityType')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityType entity.');
}
$editForm = $this->createEditForm($entity);
$editForm->handleRequest($request);
if ($editForm->isValid()) {
$em->flush();
return $this->redirect($this->generateUrl('chill_activity_activitytype_edit', array('id' => $id)));
}
return $this->render('ChillActivityBundle:ActivityType:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
));
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Chill\ActivityBundle\Controller;
use Chill\MainBundle\CRUD\Controller\CRUDController;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request;
class AdminActivityPresenceController extends CRUDController
{
/**
* @param string $action
* @param \Doctrine\ORM\QueryBuilder|mixed $query
* @param Request $request
* @param PaginatorInterface $paginator
* @return \Doctrine\ORM\QueryBuilder|mixed
*/
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
{
/** @var \Doctrine\ORM\QueryBuilder $query */
return $query->orderBy('e.id', 'ASC');
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Chill\ActivityBundle\Controller;
use Chill\MainBundle\CRUD\Controller\CRUDController;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request;
class AdminActivityTypeCategoryController extends CRUDController
{
/**
* @param string $action
* @param \Doctrine\ORM\QueryBuilder|mixed $query
* @param Request $request
* @param PaginatorInterface $paginator
* @return \Doctrine\ORM\QueryBuilder|mixed
*/
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
{
/** @var \Doctrine\ORM\QueryBuilder $query */
return $query->orderBy('e.ordering', 'ASC');
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Chill\ActivityBundle\Controller;
use Chill\MainBundle\CRUD\Controller\CRUDController;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request;
class AdminActivityTypeController extends CRUDController
{
/**
* @param string $action
* @param \Doctrine\ORM\QueryBuilder|mixed $query
* @param Request $request
* @param PaginatorInterface $paginator
* @return \Doctrine\ORM\QueryBuilder|mixed
*/
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
{
/** @var \Doctrine\ORM\QueryBuilder $query */
return $query->orderBy('e.ordering', 'ASC');
}
}

View File

@@ -116,9 +116,10 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface, C
->setDurationTime($this->faker->dateTime(36000))
->setType($this->getRandomActivityType())
->setScope($this->getRandomScope())
->setAttendee($this->faker->boolean())
;
// ->setAttendee($this->faker->boolean())
$usedId = array();
for ($i = 0; $i < rand(0, 4); $i++) {
$reason = $this->getRandomActivityReason($usedId);
@@ -137,11 +138,15 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface, C
foreach($persons as $person) {
$activityNbr = rand(0,3);
$ref = 'activity_'.$person->getFullnameCanonical();
for($i = 0; $i < $activityNbr; $i ++) {
print "Creating an activity type for : ".$person."\n";
print "Creating an activity type for : ".$person." (ref: ".$ref.") \n";
$activity = $this->newRandomActivity($person);
$manager->persist($activity);
}
$this->setReference($ref, $activity);
}
$manager->flush();
}

View File

@@ -0,0 +1,39 @@
<?php
namespace Chill\ActivityBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Chill\ActivityBundle\Entity\Activity;
use Chill\MainBundle\DataFixtures\ORM\LoadAbstractNotificationsTrait;
use Chill\ActivityBundle\DataFixtures\ORM\LoadActivity;
/**
* Load notififications into database
*/
class LoadActivityNotifications extends AbstractFixture implements DependentFixtureInterface
{
use LoadAbstractNotificationsTrait;
public $notifs = [
[
'message' => 'Hello !',
'entityClass' => Activity::class,
'entityRef' => 'activity_gerard depardieu',
'sender' => 'center a_social',
'addressees' => [
'center a_social',
'center a_administrative',
'center a_direction',
'multi_center'
],
]
];
public function getDependencies()
{
return [
LoadActivity::class,
];
}
}

View File

@@ -2,27 +2,27 @@
/*
* Chill is a software for social workers
*
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
*
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
* <http://www.champs-libres.coop>, <info@champs-libres.coop>
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\ActivityBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Persistence\ObjectManager;
use Chill\ActivityBundle\Entity\ActivityType;
@@ -32,36 +32,59 @@ use Chill\ActivityBundle\Entity\ActivityType;
*
* @author Champs-Libres Coop
*/
class LoadActivityType extends AbstractFixture implements OrderedFixtureInterface
class LoadActivityType extends Fixture implements OrderedFixtureInterface
{
public function getOrder()
{
return 16100;
}
public static $references = array();
public function load(ObjectManager $manager)
{
$types = [
[ 'name' =>
['fr' => 'Appel téléphonique', 'en' => 'Telephone call', 'nl' => 'Telefoon appel']],
[ 'name' =>
['fr' => 'Entretien', 'en' => 'Interview', 'nl' => 'Vraaggesprek']],
[ 'name' =>
['fr' => 'Inspection', 'en' => 'Inspection', 'nl' => 'Inspectie']]
# Exange
[
'name' =>
['fr' => 'Entretien physique avec l\'usager'],
'category' => 'exchange' ],
[
'name' =>
['fr' => 'Appel téléphonique', 'en' => 'Telephone call', 'nl' => 'Telefoon appel'],
'category' => 'exchange' ],
[
'name' =>
['fr' => 'Courriel', 'en' => 'Email', 'nl' => 'Email'],
'category' => 'exchange' ],
# Meeting
[
'name' =>
['fr' => 'Point technique encadrant'],
'category' => 'meeting' ],
[
'name' =>
['fr' => 'Réunion avec des partenaires'],
'category' => 'meeting' ],
[
'name' =>
['fr' => 'Commission pluridisciplinaire et pluri-institutionnelle'],
'category' => 'meeting' ],
];
foreach ($types as $t) {
print "Creating activity type : " . $t['name']['en'] . "\n";
print "Creating activity type : " . $t['name']['fr'] . " (cat:". $t['category'] . " \n";
$activityType = (new ActivityType())
->setName(($t['name']));
->setName(($t['name']))
->setCategory($this->getReference('activity_type_cat_'.$t['category']))
->setSocialIssuesVisible(1)
->setSocialActionsVisible(1);
$manager->persist($activityType);
$reference = 'activity_type_'.$t['name']['en'];
$reference = 'activity_type_'.$t['name']['fr'];
$this->addReference($reference, $activityType);
static::$references[] = $reference;
}
$manager->flush();
}
}

View File

@@ -0,0 +1,72 @@
<?php
/*
* Chill is a software for social workers
*
* Copyright (C) 2014-2021, Champs Libres Cooperative SCRLFS,
* <http://www.champs-libres.coop>, <info@champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\ActivityBundle\DataFixtures\ORM;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Persistence\ObjectManager;
use Chill\ActivityBundle\Entity\ActivityTypeCategory;
/**
* Fixtures for ActivityTypeCategory
*
* @author Champs-Libres Coop
*/
class LoadActivityTypeCategory extends Fixture implements OrderedFixtureInterface
{
public static $references = array();
public function getOrder()
{
return 16050;
}
public function load(ObjectManager $manager)
{
$categories = [
[
'name' => ['fr' => 'Échange avec usager', 'en' => 'Exchange with user'],
'ref' => 'exchange',
],
[
'name' => ['fr' => 'Réunion', 'en' => 'Meeting'],
'ref' => 'meeting',
],
];
foreach ($categories as $cat) {
print "Creating activity type category : " . $cat['ref'] . "\n";
$newCat = (new ActivityTypeCategory())
->setName(($cat['name']));
$manager->persist($newCat);
$reference = 'activity_type_cat_'.$cat['ref'];
$this->addReference($reference, $newCat);
static::$references[] = $reference;
}
$manager->flush();
}
}

View File

@@ -3,7 +3,7 @@
/*
* Chill is a software for social workers
*
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
* <http://www.champs-libres.coop>, <info@champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
@@ -44,7 +44,7 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$container->setParameter('chill_activity.form.time_duration', $config['form']['time_duration']);
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../config'));
@@ -55,18 +55,20 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
$loader->load('services/controller.yaml');
$loader->load('services/form.yaml');
$loader->load('services/templating.yaml');
$loader->load('services/accompanyingPeriodConsistency.yaml');
}
public function prepend(ContainerBuilder $container)
{
$this->prependRoutes($container);
$this->prependAuthorization($container);
$this->prependCruds($container);
}
/* (non-PHPdoc)
* @see \Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface::prepend()
*/
public function prependRoutes(ContainerBuilder $container)
public function prependRoutes(ContainerBuilder $container)
{
//add routes for custom bundle
$container->prependExtensionConfig('chill_main', array(
@@ -77,7 +79,7 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
)
));
}
public function prependAuthorization(ContainerBuilder $container)
{
$container->prependExtensionConfig('security', array(
@@ -89,4 +91,75 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
)
));
}
protected function prependCruds(ContainerBuilder $container)
{
$container->prependExtensionConfig('chill_main', [
'cruds' => [
[
'class' => \Chill\ActivityBundle\Entity\ActivityType::class,
'name' => 'activity_type',
'base_path' => '/admin/activity/type',
'form_class' => \Chill\ActivityBundle\Form\ActivityTypeType::class,
'controller' => \Chill\ActivityBundle\Controller\AdminActivityTypeController::class,
'actions' => [
'index' => [
'template' => '@ChillActivity/ActivityType/index.html.twig',
'role' => 'ROLE_ADMIN'
],
'new' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillActivity/ActivityType/new.html.twig',
],
'edit' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillActivity/ActivityType/edit.html.twig',
]
]
],
[
'class' => \Chill\ActivityBundle\Entity\ActivityTypeCategory::class,
'name' => 'activity_type_category',
'base_path' => '/admin/activity/type_category',
'form_class' => \Chill\ActivityBundle\Form\ActivityTypeCategoryType::class,
'controller' => \Chill\ActivityBundle\Controller\AdminActivityTypeCategoryController::class,
'actions' => [
'index' => [
'template' => '@ChillActivity/ActivityTypeCategory/index.html.twig',
'role' => 'ROLE_ADMIN'
],
'new' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillActivity/ActivityTypeCategory/new.html.twig',
],
'edit' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillActivity/ActivityTypeCategory/edit.html.twig',
]
]
],
[
'class' => \Chill\ActivityBundle\Entity\ActivityPresence::class,
'name' => 'activity_presence',
'base_path' => '/admin/activity/presence',
'form_class' => \Chill\ActivityBundle\Form\ActivityPresenceType::class,
'controller' => \Chill\ActivityBundle\Controller\AdminActivityPresenceController::class,
'actions' => [
'index' => [
'template' => '@ChillActivity/ActivityPresence/index.html.twig',
'role' => 'ROLE_ADMIN'
],
'new' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillActivity/ActivityPresence/new.html.twig',
],
'edit' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillActivity/ActivityPresence/edit.html.twig',
]
]
],
]
]);
}
}

View File

@@ -20,19 +20,26 @@
namespace Chill\ActivityBundle\Entity;
use Chill\DocStoreBundle\Entity\Document;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
use Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodLinkedWithSocialIssuesEntityInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Doctrine\ORM\Mapping as ORM;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Entity\Center;
use Chill\ActivityBundle\Entity\ActivityReason;
use Chill\ActivityBundle\Entity\ActivityType;
use Chill\PersonBundle\Entity\Person;
use Chill\MainBundle\Entity\HasCenterInterface;
use Chill\MainBundle\Entity\HasScopeInterface;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
use Chill\MainBundle\Validator\Constraints\Entity\UserCircleConsistency;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
/**
* Class Activity
@@ -41,311 +48,511 @@ use Chill\MainBundle\Validator\Constraints\Entity\UserCircleConsistency;
* @ORM\Entity(repositoryClass="Chill\ActivityBundle\Repository\ActivityRepository")
* @ORM\Table(name="activity")
* @ORM\HasLifecycleCallbacks()
* @DiscriminatorMap(typeProperty="type", mapping={
* "activity"=Activity::class
* })
*/
/*
* TODO : revoir
* @UserCircleConsistency(
* "CHILL_ACTIVITY_SEE_DETAILS",
* getUserFunction="getUser",
* path="scope")
*/
class Activity implements HasCenterInterface, HasScopeInterface
class Activity implements HasCenterInterface, HasScopeInterface, AccompanyingPeriodLinkedWithSocialIssuesEntityInterface
{
const SENTRECEIVED_SENT = 'sent';
const SENTRECEIVED_RECEIVED = 'received';
/**
* @var integer
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
* @Groups({"read"})
*/
private $id;
private ?int $id = null;
/**
* @var User
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
*/
private $user;
private User $user;
/**
* @var \DateTime
* @ORM\Column(type="datetime")
*/
private $date;
private \DateTime $date;
/**
* @var \DateTime
* @ORM\Column(type="time")
* @ORM\Column(type="time", nullable=true)
*/
private $durationTime;
private ?\DateTime $durationTime = null;
/**
* @var boolean
* @ORM\Column(type="boolean")
* @ORM\Column(type="time", nullable=true)
*/
private $attendee;
private ?\DateTime $travelTime = null;
/**
* @ORM\ManyToOne(targetEntity="Chill\ActivityBundle\Entity\ActivityPresence")
*/
private ?ActivityPresence $attendee = null;
/**
* @var ActivityReason
* @ORM\ManyToMany(targetEntity="Chill\ActivityBundle\Entity\ActivityReason")
*/
private $reasons;
private Collection $reasons;
/**
* @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\SocialWork\SocialIssue")
* @ORM\JoinTable(name="chill_activity_activity_chill_person_socialissue")
* @Groups({"read"})
*/
private Collection $socialIssues;
/**
* @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\SocialWork\SocialAction")
* @ORM\JoinTable(name="chill_activity_activity_chill_person_socialaction")
* @Groups({"read"})
*/
private Collection $socialActions;
/**
* @var ActivityType
* @ORM\ManyToOne(targetEntity="Chill\ActivityBundle\Entity\ActivityType")
*/
private $type;
private ActivityType $type;
/**
* @var Scope
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope")
*/
private $scope;
private ?Scope $scope = null;
/**
* @var Person
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
*/
private $person;
private ?Person $person = null;
/**
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod")
* @Groups({"read"})
*/
private ?AccompanyingPeriod $accompanyingPeriod = null;
/**
* @ORM\Embedded(class="Chill\MainBundle\Entity\Embeddable\CommentEmbeddable", columnPrefix="comment_")
*/
private $comment;
private CommentEmbeddable $comment;
/**
* Activity constructor.
* @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\Person")
* @Groups({"read"})
*/
private ?Collection $persons = null;
/**
* @ORM\ManyToMany(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty")
* @Groups({"read"})
*/
private ?Collection $thirdParties = null;
/**
* @ORM\ManyToMany(targetEntity="Chill\DocStoreBundle\Entity\StoredObject")
*/
private Collection $documents;
/**
* @ORM\ManyToMany(targetEntity="Chill\MainBundle\Entity\User")
* @Groups({"read"})
*/
private ?Collection $users = null;
/**
* @ORM\Column(type="boolean", options={"default"=false})
*/
private bool $emergency = false;
/**
* @ORM\Column(type="string", options={"default"=""})
*/
private string $sentReceived = '';
public function __construct()
{
$this->reasons = new ArrayCollection();
$this->comment = new CommentEmbeddable();
$this->persons = new ArrayCollection();
$this->thirdParties = new ArrayCollection();
$this->documents = new ArrayCollection();
$this->users = new ArrayCollection();
$this->socialIssues = new ArrayCollection();
$this->socialActions = new ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
public function getId(): ?int
{
return $this->id;
}
/**
* Set user
*
* @param User $user
* @return Activity
*/
public function setUser(User $user)
public function setUser(User $user): self
{
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return User
*/
public function getUser()
public function getUser(): User
{
return $this->user;
}
/**
* Set date
*
* @param \DateTime $date
* @return Activity
*/
public function setDate($date)
public function setDate(\DateTime $date): self
{
$this->date = $date;
return $this;
}
/**
* Get date
*
* @return \DateTime
*/
public function getDate()
public function getDate(): \DateTime
{
return $this->date;
}
/**
* Set durationTime
*
* @param \DateTime $durationTime
* @return Activity
*/
public function setDurationTime($durationTime)
public function setDurationTime(?\DateTime $durationTime): self
{
$this->durationTime = $durationTime;
return $this;
}
/**
* Get durationTime
*
* @return \DateTime
*/
public function getDurationTime()
public function getDurationTime(): ?\DateTime
{
return $this->durationTime;
}
/**
* Set attendee
*
* @param boolean $attendee
* @return Activity
*/
public function setAttendee($attendee)
public function setTravelTime(\DateTime $travelTime): self
{
$this->travelTime = $travelTime;
return $this;
}
public function getTravelTime(): ?\DateTime
{
return $this->travelTime;
}
public function setAttendee(ActivityPresence $attendee): self
{
$this->attendee = $attendee;
return $this;
}
/**
* Get attendee
*
* @return boolean
*/
public function getAttendee()
public function getAttendee(): ?ActivityPresence
{
return $this->attendee;
}
/**
* Add a reason
*
* @param ActivityReason $reason
* @return Activity
*/
public function addReason(ActivityReason $reason)
public function addReason(ActivityReason $reason): self
{
$this->reasons[] = $reason;
$this->reasons->add($reason);
return $this;
}
/**
* @param ActivityReason $reason
*/
public function removeReason(ActivityReason $reason)
public function removeReason(ActivityReason $reason): void
{
$this->reasons->removeElement($reason);
}
/**
* Get reasons
*
* @return Collection
*/
public function getReasons()
public function getReasons(): Collection
{
return $this->reasons;
}
/**
* Set type
*
* @param ActivityType $type
* @return Activity
*/
public function setType(ActivityType $type)
public function setReasons(?ArrayCollection $reasons): self
{
$this->reasons = $reasons;
return $this;
}
public function getSocialIssues(): Collection
{
return $this->socialIssues;
}
public function addSocialIssue(SocialIssue $socialIssue): self
{
if (!$this->socialIssues->contains($socialIssue)) {
$this->socialIssues[] = $socialIssue;
}
return $this;
}
public function removeSocialIssue(SocialIssue $socialIssue): self
{
$this->socialIssues->removeElement($socialIssue);
return $this;
}
public function getSocialActions(): Collection
{
return $this->socialActions;
}
public function addSocialAction(SocialAction $socialAction): self
{
if (!$this->socialActions->contains($socialAction)) {
$this->socialActions[] = $socialAction;
}
return $this;
}
public function removeSocialAction(SocialAction $socialAction): self
{
$this->socialActions->removeElement($socialAction);
return $this;
}
public function setType(ActivityType $type): self
{
$this->type = $type;
return $this;
}
/**
* Get type
*
* @return ActivityType
*/
public function getType()
public function getType(): ActivityType
{
return $this->type;
}
/**
* Set scope
*
* @param Scope $scope
* @return Activity
*/
public function setScope(Scope $scope)
public function setScope(Scope $scope): self
{
$this->scope = $scope;
return $this;
}
/**
* Get scope
*
* @return Scope
*/
public function getScope()
public function getScope(): ?Scope
{
return $this->scope;
}
/**
* Set person
*
* @param Person $person
* @return Activity
*/
public function setPerson(Person $person)
public function setPerson(?Person $person): self
{
$this->person = $person;
return $this;
}
/**
* Get person
*
* @return Person
*/
public function getPerson()
public function getPerson(): ?Person
{
return $this->person;
}
public function getAccompanyingPeriod(): ?AccompanyingPeriod
{
return $this->accompanyingPeriod;
}
public function setAccompanyingPeriod(?AccompanyingPeriod $accompanyingPeriod): self
{
$this->accompanyingPeriod = $accompanyingPeriod;
return $this;
}
/**
* get the center
* center is extracted from person
*
* @return Center
*/
public function getCenter()
public function getCenter(): ?Center
{
return $this->person->getCenter();
if ($this->person instanceof Person) {
return $this->person->getCenter();
}
return null;
}
/**
* @return \Chill\MainBundle\Entity\Embeddalbe\CommentEmbeddable
*/
public function getComment()
public function getComment(): CommentEmbeddable
{
return $this->comment;
}
/**
* @param \Chill\MainBundle\Entity\Embeddalbe\CommentEmbeddable $comment
*/
public function setComment($comment)
public function setComment(CommentEmbeddable $comment): self
{
$this->comment = $comment;
return $this;
}
/**
* Add a person to the person list
*/
public function addPerson(?Person $person): self
{
if (null !== $person) {
$this->persons[] = $person;
}
return $this;
}
public function removePerson(Person $person): void
{
$this->persons->removeElement($person);
}
public function getPersons(): Collection
{
return $this->persons;
}
public function getPersonsAssociated(): array
{
if (null !== $this->accompanyingPeriod) {
$personsAssociated = [];
foreach ($this->accompanyingPeriod->getParticipations() as $participation) {
if ($this->persons->contains($participation->getPerson())) {
$personsAssociated[] = $participation->getPerson();
}
}
return $personsAssociated;
}
return [];
}
public function getPersonsNotAssociated(): array
{
if (null !== $this->accompanyingPeriod) {
$personsNotAssociated = [];
foreach ($this->persons as $person) {
if (!in_array($person, $this->getPersonsAssociated())) {
$personsNotAssociated[] = $person;
}
}
return $personsNotAssociated;
}
return [];
}
public function setPersons(?Collection $persons): self
{
$this->persons = $persons;
return $this;
}
public function addThirdParty(?ThirdParty $thirdParty): self
{
if (null !== $thirdParty) {
$this->thirdParties[] = $thirdParty;
}
return $this;
}
public function removeThirdParty(ThirdParty $thirdParty): void
{
$this->thirdParties->removeElement($thirdParty);
}
public function getThirdParties(): Collection
{
return $this->thirdParties;
}
public function setThirdParties(?Collection $thirdParties): self
{
$this->thirdParties = $thirdParties;
return $this;
}
public function addDocument(Document $document): self
{
$this->documents[] = $document;
return $this;
}
public function removeDocument(Document $document): void
{
$this->documents->removeElement($document);
}
public function getDocuments(): Collection
{
return $this->documents;
}
public function setDocuments(Collection $documents): self
{
$this->documents = $documents;
return $this;
}
public function addUser(?User $user): self
{
if (null !== $user) {
$this->users[] = $user;
}
return $this;
}
public function removeUser(User $user): void
{
$this->users->removeElement($user);
}
public function getUsers(): Collection
{
return $this->users;
}
public function setUsers(?Collection $users): self
{
$this->users = $users;
return $this;
}
public function isEmergency(): bool
{
return $this->getEmergency();
}
public function getEmergency(): bool
{
return $this->emergency;
}
public function setEmergency(bool $emergency): self
{
$this->emergency = $emergency;
return $this;
}
public function getSentReceived(): string
{
return $this->sentReceived;
}
public function setSentReceived(?string $sentReceived): self
{
$this->sentReceived = (string) $sentReceived;
return $this;
}
}

View File

@@ -0,0 +1,97 @@
<?php
/*
*
* Copyright (C) 2015, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\ActivityBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Class ActivityPresence
*
* @package Chill\ActivityBundle\Entity
* @ORM\Entity()
* @ORM\Table(name="activitytpresence")
* @ORM\HasLifecycleCallbacks()
*/
class ActivityPresence
{
/**
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private ?int $id;
/**
* @ORM\Column(type="json")
*/
private array $name = [];
/**
* @ORM\Column(type="boolean")
*/
private bool $active = true;
public function getId(): int
{
return $this->id;
}
public function setName(array $name): self
{
$this->name = $name;
return $this;
}
public function getName(): array
{
return $this->name;
}
/**
* Get active
* return true if the category type is active.
*/
public function getActive(): bool
{
return $this->active;
}
/**
* Is active
* return true if the category type is active
*/
public function isActive(): bool
{
return $this->getActive();
}
/**
* Set active
* set to true if the category type is active
*/
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
}

View File

@@ -1,19 +1,19 @@
<?php
/*
*
*
* Copyright (C) 2015, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -32,45 +32,239 @@ use Doctrine\ORM\Mapping as ORM;
*/
class ActivityType
{
const FIELD_INVISIBLE = 0;
const FIELD_OPTIONAL = 1;
const FIELD_REQUIRED = 2;
/**
* @var integer
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
private ?int $id;
/**
* @var array
* @ORM\Column(type="json_array")
*/
private $name;
private array $name = [];
/**
* @var bool
* @ORM\Column(type="boolean")
*/
private $active = true;
private bool $active = true;
/**
* @ORM\ManyToOne(targetEntity="Chill\ActivityBundle\Entity\ActivityTypeCategory")
*/
private ?ActivityTypeCategory $category = null;
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=2})
*/
private int $personVisible = self::FIELD_REQUIRED;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $personLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=2})
*/
private int $userVisible = self::FIELD_REQUIRED;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $userLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=2})
*/
private int $dateVisible = self::FIELD_REQUIRED;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $dateLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $placeVisible = self::FIELD_OPTIONAL;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $placeLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $personsVisible = self::FIELD_OPTIONAL;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $personsLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $thirdPartiesVisible = self::FIELD_INVISIBLE;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $thirdPartiesLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $durationTimeVisible = self::FIELD_OPTIONAL;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $durationTimeLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $travelTimeVisible = self::FIELD_OPTIONAL;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $travelTimeLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $attendeeVisible = self::FIELD_OPTIONAL;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $attendeeLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $reasonsVisible = self::FIELD_OPTIONAL;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $reasonsLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $commentVisible = self::FIELD_OPTIONAL;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $commentLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $sentReceivedVisible = self::FIELD_OPTIONAL;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $sentReceivedLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $documentsVisible = self::FIELD_OPTIONAL;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $documentsLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $usersVisible = self::FIELD_OPTIONAL;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $usersLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $emergencyVisible = self::FIELD_INVISIBLE;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $emergencyLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $accompanyingPeriodVisible = self::FIELD_INVISIBLE;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $accompanyingPeriodLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $socialDataVisible = self::FIELD_INVISIBLE;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $socialDataLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $socialIssuesVisible = self::FIELD_INVISIBLE;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $socialIssuesLabel = '';
/**
* @ORM\Column(type="smallint", nullable=false, options={"default"=1})
*/
private int $socialActionsVisible = self::FIELD_INVISIBLE;
/**
* @ORM\Column(type="string", nullable=false, options={"default"=""})
*/
private string $socialActionsLabel = '';
/**
* @ORM\Column(type="float", options={"default"="0.0"})
*/
private float $ordering = 0.0;
/**
* Get id
*
* @return integer
*/
public function getId()
public function getId(): int
{
return $this->id;
}
/**
* Set name
*
* @param array $name
* @return ActivityType
*/
public function setName($name)
public function setName(array $name): self
{
$this->name = $name;
@@ -79,58 +273,551 @@ class ActivityType
/**
* Get name
*
* @return array | string
*/
public function getName($locale = null)
public function getName(): array
{
if ($locale) {
if (isset($this->name[$locale])) {
return $this->name[$locale];
} else {
foreach ($this->name as $name) {
if (!empty($name)) {
return $name;
}
}
}
return '';
} else {
return $this->name;
}
return $this->name;
}
/**
* Get active
* return true if the type is active.
*
* @return boolean
*/
public function getActive() {
public function getActive(): bool
{
return $this->active;
}
/**
* Is active
* return true if the type is active
*
* @return boolean
*/
public function isActive() {
public function isActive(): bool
{
return $this->getActive();
}
/**
* Set active
* set to true if the type is active
*
* @param boolean $active
* @return ActivityType
*/
public function setActive($active) {
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
}
public function getCategory(): ?ActivityTypeCategory
{
return $this->category;
}
public function setCategory(?ActivityTypeCategory $category): self
{
$this->category = $category;
return $this;
}
public function getPersonVisible(): int
{
return $this->personVisible;
}
public function setPersonVisible(int $personVisible): self
{
$this->personVisible = $personVisible;
return $this;
}
public function getPersonLabel(): string
{
return $this->personLabel;
}
public function setPersonLabel(string $personLabel): self
{
$this->personLabel = $personLabel;
return $this;
}
public function getUserVisible(): int
{
return $this->userVisible;
}
public function setUserVisible(int $userVisible): self
{
$this->userVisible = $userVisible;
return $this;
}
public function getUserLabel(): string
{
return $this->userLabel;
}
public function setUserLabel(string $userLabel): self
{
$this->userLabel = $userLabel;
return $this;
}
public function getDateVisible(): int
{
return $this->dateVisible;
}
public function setDateVisible(int $dateVisible): self
{
$this->dateVisible = $dateVisible;
return $this;
}
public function getDateLabel(): string
{
return $this->dateLabel;
}
public function setDateLabel(string $dateLabel): self
{
$this->dateLabel = $dateLabel;
return $this;
}
public function getPlaceVisible(): int
{
return $this->placeVisible;
}
public function setPlaceVisible(int $placeVisible): self
{
$this->placeVisible = $placeVisible;
return $this;
}
public function getPlaceLabel(): string
{
return $this->placeLabel;
}
public function setPlaceLabel(string $placeLabel): self
{
$this->placeLabel = $placeLabel;
return $this;
}
public function getPersonsVisible(): int
{
return $this->personsVisible;
}
public function setPersonsVisible(int $personsVisible): self
{
$this->personsVisible = $personsVisible;
return $this;
}
public function getPersonsLabel(): string
{
return $this->personsLabel;
}
public function setPersonsLabel(string $personsLabel): self
{
$this->personsLabel = $personsLabel;
return $this;
}
public function getThirdPartiesVisible(): int
{
return $this->thirdPartiesVisible;
}
public function setThirdPartiesVisible(int $thirdPartiesVisible): self
{
$this->thirdPartiesVisible = $thirdPartiesVisible;
return $this;
}
public function getThirdPartiesLabel(): string
{
return $this->thirdPartiesLabel;
}
public function setThirdPartiesLabel(string $thirdPartiesLabel): self
{
$this->thirdPartiesLabel = $thirdPartiesLabel;
return $this;
}
public function getDurationTimeVisible(): int
{
return $this->durationTimeVisible;
}
public function setDurationTimeVisible(int $durationTimeVisible): self
{
$this->durationTimeVisible = $durationTimeVisible;
return $this;
}
public function getDurationTimeLabel(): string
{
return $this->durationTimeLabel;
}
public function setDurationTimeLabel(string $durationTimeLabel): self
{
$this->durationTimeLabel = $durationTimeLabel;
return $this;
}
public function getTravelTimeVisible(): int
{
return $this->travelTimeVisible;
}
public function setTravelTimeVisible(int $TravelTimeVisible): self
{
$this->travelTimeVisible = $TravelTimeVisible;
return $this;
}
public function getTravelTimeLabel(): string
{
return $this->travelTimeLabel;
}
public function setTravelTimeLabel(string $TravelTimeLabel): self
{
$this->travelTimeLabel = $TravelTimeLabel;
return $this;
}
public function getAttendeeVisible(): int
{
return $this->attendeeVisible;
}
public function setAttendeeVisible(int $attendeeVisible): self
{
$this->attendeeVisible = $attendeeVisible;
return $this;
}
public function getAttendeeLabel(): string
{
return $this->attendeeLabel;
}
public function setAttendeeLabel(string $attendeeLabel): self
{
$this->attendeeLabel = $attendeeLabel;
return $this;
}
public function getReasonsVisible(): int
{
return $this->reasonsVisible;
}
public function setReasonsVisible(int $reasonsVisible): self
{
$this->reasonsVisible = $reasonsVisible;
return $this;
}
public function getReasonsLabel(): string
{
return $this->reasonsLabel;
}
public function setReasonsLabel(string $reasonsLabel): self
{
$this->reasonsLabel = $reasonsLabel;
return $this;
}
public function getCommentVisible(): int
{
return $this->commentVisible;
}
public function setCommentVisible(int $commentVisible): self
{
$this->commentVisible = $commentVisible;
return $this;
}
public function getCommentLabel(): string
{
return $this->commentLabel;
}
public function setCommentLabel(string $commentLabel): self
{
$this->commentLabel = $commentLabel;
return $this;
}
public function getSentReceivedVisible(): int
{
return $this->sentReceivedVisible;
}
public function setSentReceivedVisible(int $sentReceivedVisible): self
{
$this->sentReceivedVisible = $sentReceivedVisible;
return $this;
}
public function getSentReceivedLabel(): string
{
return $this->sentReceivedLabel;
}
public function setSentReceivedLabel(string $sentReceivedLabel): self
{
$this->sentReceivedLabel = $sentReceivedLabel;
return $this;
}
public function getDocumentsVisible(): int
{
return $this->documentsVisible;
}
public function setDocumentsVisible(int $documentsVisible): self
{
$this->documentsVisible = $documentsVisible;
return $this;
}
public function getDocumentsLabel(): string
{
return $this->documentsLabel;
}
public function setDocumentsLabel(string $documentsLabel): self
{
$this->documentsLabel = $documentsLabel;
return $this;
}
public function getUsersVisible(): int
{
return $this->usersVisible;
}
public function setUsersVisible(int $usersVisible): self
{
$this->usersVisible = $usersVisible;
return $this;
}
public function getUsersLabel(): string
{
return $this->usersLabel;
}
public function setUsersLabel(string $usersLabel): self
{
$this->usersLabel = $usersLabel;
return $this;
}
public function getEmergencyVisible(): int
{
return $this->emergencyVisible;
}
public function setEmergencyVisible(int $emergencyVisible): self
{
$this->emergencyVisible = $emergencyVisible;
return $this;
}
public function getEmergencyLabel(): string
{
return $this->emergencyLabel;
}
public function setEmergencyLabel(string $emergencyLabel): self
{
$this->emergencyLabel = $emergencyLabel;
return $this;
}
public function getAccompanyingPeriodVisible(): int
{
return $this->accompanyingPeriodVisible;
}
public function setAccompanyingPeriodVisible(int $accompanyingPeriodVisible): self
{
$this->accompanyingPeriodVisible = $accompanyingPeriodVisible;
return $this;
}
public function getAccompanyingPeriodLabel(): string
{
return $this->accompanyingPeriodLabel;
}
public function setAccompanyingPeriodLabel(string $accompanyingPeriodLabel): self
{
$this->accompanyingPeriodLabel = $accompanyingPeriodLabel;
return $this;
}
public function getSocialDataVisible(): int
{
return $this->socialDataVisible;
}
public function setSocialDataVisible(int $socialDataVisible): self
{
$this->socialDataVisible = $socialDataVisible;
return $this;
}
public function getSocialDataLabel(): string
{
return $this->socialDataLabel;
}
public function setSocialDataLabel(string $socialDataLabel): self
{
$this->socialDataLabel = $socialDataLabel;
return $this;
}
public function isVisible(string $field): bool
{
$property = $field.'Visible';
if (!property_exists($this, $property)) {
throw new \InvalidArgumentException('Field "'.$field.'" not found');
}
return self::FIELD_INVISIBLE !== $this->$property;
}
public function isRequired(string $field): bool
{
$property = $field.'Visible';
if (!property_exists($this, $property)) {
throw new \InvalidArgumentException('Field "'.$field.'" not found');
}
return self::FIELD_REQUIRED === $this->$property;
}
public function getLabel(string $field): ?string
{
$property = $field.'Label';
if (!property_exists($this, $property)) {
throw new \InvalidArgumentException('Field "'.$field.'" not found');
}
return $this->$property;
}
public function getOrdering(): float
{
return $this->ordering;
}
public function setOrdering(float $ordering): self
{
$this->ordering = $ordering;
return $this;
}
public function getSocialIssuesVisible(): ?int
{
return $this->socialIssuesVisible;
}
public function setSocialIssuesVisible(int $socialIssuesVisible): self
{
$this->socialIssuesVisible = $socialIssuesVisible;
return $this;
}
public function getSocialIssuesLabel(): ?string
{
return $this->socialIssuesLabel;
}
public function setSocialIssuesLabel(string $socialIssuesLabel): self
{
$this->socialIssuesLabel = $socialIssuesLabel;
return $this;
}
public function getSocialActionsVisible(): ?int
{
return $this->socialActionsVisible;
}
public function setSocialActionsVisible(int $socialActionsVisible): self
{
$this->socialActionsVisible = $socialActionsVisible;
return $this;
}
public function getSocialActionsLabel(): ?string
{
return $this->socialActionsLabel;
}
public function setSocialActionsLabel(string $socialActionsLabel): self
{
$this->socialActionsLabel = $socialActionsLabel;
return $this;
}
}

View File

@@ -0,0 +1,123 @@
<?php
/*
*
* Copyright (C) 2015, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\ActivityBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Class ActivityTypeCateogry
*
* @package Chill\ActivityBundle\Entity
* @ORM\Entity()
* @ORM\Table(name="activitytypecategory")
* @ORM\HasLifecycleCallbacks()
*/
class ActivityTypeCategory
{
/**
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private ?int $id;
/**
* @ORM\Column(type="json_array")
*/
private array $name = [];
/**
* @ORM\Column(type="boolean")
*/
private bool $active = true;
/**
* @ORM\Column(type="float", options={"default"="0.0"})
*/
private float $ordering = 0.0;
/**
* Get id
*/
public function getId(): int
{
return $this->id;
}
/**
* Set name
*/
public function setName(array $name): self
{
$this->name = $name;
return $this;
}
/**
* Get name
*/
public function getName(): array
{
return $this->name;
}
/**
* Get active
* return true if the category type is active.
*/
public function getActive(): bool
{
return $this->active;
}
/**
* Is active
* return true if the category type is active
*/
public function isActive(): bool
{
return $this->getActive();
}
/**
* Set active
* set to true if the category type is active
*/
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getOrdering(): float
{
return $this->ordering;
}
public function setOrdering(float $ordering): self
{
$this->ordering = $ordering;
return $this;
}
}

View File

@@ -0,0 +1,33 @@
<?php
namespace Chill\ActivityBundle\Form;
use Chill\ActivityBundle\Entity\ActivityPresence;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Chill\MainBundle\Form\Type\TranslatableStringFormType;
class ActivityPresenceType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class)
->add('active', ChoiceType::class, array(
'choices' => array(
'Yes' => true,
'No' => false
),
'expanded' => true
));
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(array(
'data_class' => ActivityPresence::class
));
}
}

View File

@@ -2,8 +2,21 @@
namespace Chill\ActivityBundle\Form;
use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Entity\ActivityPresence;
use Chill\ActivityBundle\Entity\ActivityReason;
use Chill\DocStoreBundle\Form\StoredObjectType;
use Chill\MainBundle\Form\Type\ChillCollectionType;
use Chill\MainBundle\Form\Type\CommentType;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Doctrine\ORM\EntityRepository;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
@@ -15,178 +28,363 @@ use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTra
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Chill\ActivityBundle\Form\Type\TranslatableActivityType;
use Chill\ActivityBundle\Form\Type\TranslatableActivityReason;
use Chill\MainBundle\Form\Type\UserPickerType;
use Chill\MainBundle\Form\Type\ScopePickerType;
use Chill\MainBundle\Form\Type\ChillDateType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\CallbackTransformer;
use Chill\PersonBundle\Form\DataTransformer\PersonToIdTransformer;
use Chill\PersonBundle\Templating\Entity\SocialIssueRender;
use Chill\PersonBundle\Templating\Entity\SocialActionRender;
class ActivityType extends AbstractType
{
protected User $user;
/**
* the user running this form
*
* @var User
*/
protected $user;
protected AuthorizationHelper $authorizationHelper;
/**
*
* @var AuthorizationHelper
*/
protected $authorizationHelper;
protected ObjectManager $om;
/**
*
* @var ObjectManager
*/
protected $om;
protected TranslatableStringHelper $translatableStringHelper;
/**
*
* @var TranslatableStringHelper
*/
protected $translatableStringHelper;
protected SocialIssueRender $socialIssueRender;
protected $timeChoices;
protected SocialActionRender $socialActionRender;
public function __construct(
TokenStorageInterface $tokenStorage,
AuthorizationHelper $authorizationHelper, ObjectManager $om,
TranslatableStringHelper $translatableStringHelper,
array $timeChoices
)
{
protected array $timeChoices;
public function __construct (
TokenStorageInterface $tokenStorage,
AuthorizationHelper $authorizationHelper,
ObjectManager $om,
TranslatableStringHelper $translatableStringHelper,
array $timeChoices,
SocialIssueRender $socialIssueRender,
SocialActionRender $socialActionRender
) {
if (!$tokenStorage->getToken()->getUser() instanceof User) {
throw new \RuntimeException("you should have a valid user");
}
$this->user = $tokenStorage->getToken()->getUser();
$this->authorizationHelper = $authorizationHelper;
$this->om = $om;
$this->translatableStringHelper = $translatableStringHelper;
$this->timeChoices = $timeChoices;
$this->socialIssueRender = $socialIssueRender;
$this->socialActionRender = $socialActionRender;
}
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder, array $options): void
{
// handle times choices
$timeChoices = array();
$timeChoices = [];
foreach ($this->timeChoices as $e) {
$timeChoices[$e['label']] = $e['seconds'];
};
}
$durationTimeTransformer = new DateTimeToTimestampTransformer('GMT', 'GMT');
$durationTimeOptions = array(
'choices' => $timeChoices,
'placeholder' => 'Choose the duration',
);
$durationTimeOptions = [
'choices' => $timeChoices,
'placeholder' => 'Choose the duration',
];
$builder
->add('date', ChillDateType::class, array(
'required' => true
))
->add('durationTime', ChoiceType::class, $durationTimeOptions)
->add('attendee', ChoiceType::class, array(
'expanded' => true,
'required' => false,
'choices' => array(
'present' => true,
'not present' => false
)
))
->add('user', UserPickerType::class, [
/** @var \Chill\ActivityBundle\Entity\ActivityType $activityType */
$activityType = $options['activityType'];
if (!$activityType->isActive()) {
throw new \InvalidArgumentException('Activity type must be active');
}
// TODO revoir la gestion des center au niveau du form des activité.
if ($options['center']) {
$builder->add('scope', ScopePickerType::class, [
'center' => $options['center'],
'role' => $options['role']
]);
}
/** @var ? \Chill\PersonBundle\Entity\AccompanyingPeriod $accompanyingPeriod */
$accompanyingPeriod = NULL;
if ($options['accompanyingPeriod']) {
$accompanyingPeriod = $options['accompanyingPeriod'];
}
if ($activityType->isVisible('socialIssues') && $accompanyingPeriod) {
$builder->add('socialIssues', HiddenType::class);
$builder->get('socialIssues')
->addModelTransformer(new CallbackTransformer(
function (iterable $socialIssuesAsIterable): string {
$socialIssueIds = [];
foreach ($socialIssuesAsIterable as $value) {
$socialIssueIds[] = $value->getId();
}
return implode(',', $socialIssueIds);
},
function (?string $socialIssuesAsString): array {
if (null === $socialIssuesAsString) {
return [];
}
return array_map(
fn(string $id): ?SocialIssue => $this->om->getRepository(SocialIssue::class)->findOneBy(['id' => (int) $id]),
explode(',', $socialIssuesAsString)
);
}
))
;
}
if ($activityType->isVisible('socialActions') && $accompanyingPeriod) {
$builder->add('socialActions', HiddenType::class);
$builder->get('socialActions')
->addModelTransformer(new CallbackTransformer(
function (iterable $socialActionsAsIterable): string {
$socialActionIds = [];
foreach ($socialActionsAsIterable as $value) {
$socialActionIds[] = $value->getId();
}
return implode(',', $socialActionIds);
},
function (?string $socialActionsAsString): array {
if (null === $socialActionsAsString) {
return [];
}
return array_map(
fn(string $id): ?SocialAction => $this->om->getRepository(SocialAction::class)->findOneBy(['id' => (int) $id]),
explode(',', $socialActionsAsString)
);
}
))
;
}
if ($activityType->isVisible('date')) {
$builder->add('date', ChillDateType::class, [
'label' => $activityType->getLabel('date'),
'required' => $activityType->isRequired('date'),
]);
}
if ($activityType->isVisible('durationTime')) {
$durationTimeOptions['label'] = $activityType->getLabel('durationTime');
$durationTimeOptions['required'] = $activityType->isRequired('durationTime');
$builder->add('durationTime', ChoiceType::class, $durationTimeOptions);
}
if ($activityType->isVisible('travelTime')) {
$durationTimeOptions['label'] = $activityType->getLabel('travelTime');
$durationTimeOptions['required'] = $activityType->isRequired('travelTime');
$builder->add('travelTime', ChoiceType::class, $durationTimeOptions);
}
if ($activityType->isVisible('attendee')) {
$builder->add('attendee', EntityType::class, [
'label' => $activityType->getLabel('attendee'),
'required' => $activityType->isRequired('attendee'),
'expanded' => true,
'class' => ActivityPresence::class,
'choice_label' => function (ActivityPresence $activityPresence) {
return $this->translatableStringHelper->localize($activityPresence->getName());
},
'query_builder' => function (EntityRepository $er) {
return $er->createQueryBuilder('a')
->where('a.active = true');
},
]);
}
if ($activityType->isVisible('user') && $options['center']) {
$builder->add('user', UserPickerType::class, [
'label' => $activityType->getLabel('user'),
'required' => $activityType->isRequired('user'),
'center' => $options['center'],
'role' => $options['role']
])
->add('scope', ScopePickerType::class, [
'center' => $options['center'],
'role' => $options['role']
])
->add('reasons', TranslatableActivityReason::class, array(
]);
}
if ($activityType->isVisible('reasons')) {
$builder->add('reasons', EntityType::class, [
'label' => $activityType->getLabel('reasons'),
'required' => $activityType->isRequired('reasons'),
'class' => ActivityReason::class,
'multiple' => true,
'required' => false,
))
->add('type', TranslatableActivityType::class, array(
'placeholder' => 'Choose a type',
'active_only' => true
))
->add('comment', CommentType::class, [
'required' => false,
])
;
'choice_label' => function (ActivityReason $activityReason) {
return $this->translatableStringHelper->localize($activityReason->getName());
},
'attr' => array('class' => 'select2 '),
'query_builder' => function (EntityRepository $er) {
return $er->createQueryBuilder('a')
->where('a.active = true');
},
]);
}
$builder->get('durationTime')
if ($activityType->isVisible('comment')) {
$builder->add('comment', CommentType::class, [
'label' => empty($activityType->getLabel('comment'))
? 'activity.comment' : $activityType->getLabel('comment'),
'required' => $activityType->isRequired('comment'),
]);
}
if ($activityType->isVisible('persons')) {
$builder->add('persons', HiddenType::class);
$builder->get('persons')
->addModelTransformer(new CallbackTransformer(
function (iterable $personsAsIterable): string {
$personIds = [];
foreach ($personsAsIterable as $value) {
$personIds[] = $value->getId();
}
return implode(',', $personIds);
},
function (?string $personsAsString): array {
return array_map(
fn(string $id): ?Person => $this->om->getRepository(Person::class)->findOneBy(['id' => (int) $id]),
explode(',', $personsAsString)
);
}
))
;
}
if ($activityType->isVisible('thirdParties')) {
$builder->add('thirdParties', HiddenType::class);
$builder->get('thirdParties')
->addModelTransformer(new CallbackTransformer(
function (iterable $thirdpartyAsIterable): string {
$thirdpartyIds = [];
foreach ($thirdpartyAsIterable as $value) {
$thirdpartyIds[] = $value->getId();
}
return implode(',', $thirdpartyIds);
},
function (?string $thirdpartyAsString): array {
return array_map(
fn(string $id): ?ThirdParty => $this->om->getRepository(ThirdParty::class)->findOneBy(['id' => (int) $id]),
explode(',', $thirdpartyAsString)
);
}
))
;
}
if ($activityType->isVisible('documents')) {
$builder->add('documents', ChillCollectionType::class, [
'entry_type' => StoredObjectType::class,
'label' => $activityType->getLabel('documents'),
'required' => $activityType->isRequired('documents'),
'allow_add' => true,
'button_add_label' => 'activity.Insert a document',
'button_remove_label' => 'activity.Remove a document'
]);
}
if ($activityType->isVisible('users')) {
$builder->add('users', HiddenType::class);
$builder->get('users')
->addModelTransformer(new CallbackTransformer(
function (iterable $usersAsIterable): string {
$userIds = [];
foreach ($usersAsIterable as $value) {
$userIds[] = $value->getId();
}
return implode(',', $userIds);
},
function (?string $usersAsString): array {
return array_map(
fn(string $id): ?User => $this->om->getRepository(User::class)->findOneBy(['id' => (int) $id]),
explode(',', $usersAsString)
);
}
))
;
}
if ($activityType->isVisible('emergency')) {
$builder->add('emergency', CheckboxType::class, [
'label' => $activityType->getLabel('emergency'),
'required' => $activityType->isRequired('emergency'),
]);
}
if ($activityType->isVisible('sentReceived')) {
$builder->add('sentReceived', ChoiceType::class, [
'label' => $activityType->getLabel('sentReceived'),
'required' => $activityType->isRequired('sentReceived'),
'choices' => [
'Sent' => Activity::SENTRECEIVED_SENT,
'Received' => Activity::SENTRECEIVED_RECEIVED,
],
]);
}
foreach (['durationTime', 'travelTime'] as $fieldName) {
if (!$activityType->isVisible($fieldName)) {
continue;
}
$builder->get($fieldName)
->addModelTransformer($durationTimeTransformer);
$builder->get($fieldName)
->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $formEvent) use (
$timeChoices,
$builder,
$durationTimeTransformer,
$durationTimeOptions,
$fieldName
) {
// set the timezone to GMT, and fix the difference between current and GMT
// the datetimetransformer will then handle timezone as GMT
$timezoneUTC = new \DateTimeZone('GMT');
/* @var $data \DateTime */
$data = $formEvent->getData() === NULL ?
\DateTime::createFromFormat('U', 300) :
$formEvent->getData();
$seconds = $data->getTimezone()->getOffset($data);
$data->setTimeZone($timezoneUTC);
$data->add(new \DateInterval('PT'.$seconds.'S'));
$builder->get('durationTime')
->addEventListener(
FormEvents::PRE_SET_DATA,
function(FormEvent $formEvent) use (
$timeChoices,
$builder,
$durationTimeTransformer,
$durationTimeOptions
)
{
// set the timezone to GMT, and fix the difference between current and GMT
// the datetimetransformer will then handle timezone as GMT
$timezoneUTC = new \DateTimeZone('GMT');
/* @var $data \DateTime */
$data = $formEvent->getData() === NULL ?
\DateTime::createFromFormat('U', 300) :
$formEvent->getData();
$seconds = $data->getTimezone()->getOffset($data);
$data->setTimeZone($timezoneUTC);
$data->add(new \DateInterval('PT'.$seconds.'S'));
// test if the timestamp is in the choices.
// If not, recreate the field with the new timestamp
if (!in_array($data->getTimestamp(), $timeChoices)) {
// the data are not in the possible values. add them
$timeChoices[$data->format('H:i')] = $data->getTimestamp();
$form = $builder->create(
'durationTime',
ChoiceType::class,
array_merge(
$durationTimeOptions,
array(
'choices' => $timeChoices,
'auto_initialize' => false
)
));
$form->addModelTransformer($durationTimeTransformer);
$formEvent->getForm()->getParent()->add($form->getForm());
}
});
// test if the timestamp is in the choices.
// If not, recreate the field with the new timestamp
if (!in_array($data->getTimestamp(), $timeChoices)) {
// the data are not in the possible values. add them
$timeChoices[$data->format('H:i')] = $data->getTimestamp();
$form = $builder->create($fieldName, ChoiceType::class, array_merge(
$durationTimeOptions, [
'choices' => $timeChoices,
'auto_initialize' => false
]
));
$form->addModelTransformer($durationTimeTransformer);
$formEvent->getForm()->getParent()->add($form->getForm());
}
});
}
}
/**
* @param OptionsResolverInterface $resolver
*/
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(array(
'data_class' => 'Chill\ActivityBundle\Entity\Activity'
));
$resolver->setDefaults([
'data_class' => Activity::class
]);
$resolver
->setRequired(array('center', 'role'))
->setAllowedTypes('center', 'Chill\MainBundle\Entity\Center')
->setAllowedTypes('role', 'Symfony\Component\Security\Core\Role\Role')
;
->setRequired(['center', 'role', 'activityType', 'accompanyingPeriod'])
->setAllowedTypes('center', ['null', 'Chill\MainBundle\Entity\Center'])
->setAllowedTypes('role', 'Symfony\Component\Security\Core\Role\Role')
->setAllowedTypes('activityType', \Chill\ActivityBundle\Entity\ActivityType::class)
->setAllowedTypes('accompanyingPeriod', [\Chill\PersonBundle\Entity\AccompanyingPeriod::class, 'null'])
;
}
/**
* @return string
*/
public function getBlockPrefix()
public function getBlockPrefix(): string
{
return 'chill_activitybundle_activity';
}

View File

@@ -0,0 +1,39 @@
<?php
namespace Chill\ActivityBundle\Form;
use Chill\ActivityBundle\Entity\ActivityTypeCategory;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Chill\MainBundle\Form\Type\TranslatableStringFormType;
class ActivityTypeCategoryType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class)
->add('active', ChoiceType::class, array(
'choices' => array(
'Yes' => true,
'No' => false
),
'expanded' => true
))
->add('ordering', NumberType::class, [
'required' => true,
'scale' => 5
])
;
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(array(
'data_class' => ActivityTypeCategory::class
));
}
}

View File

@@ -2,7 +2,13 @@
namespace Chill\ActivityBundle\Form;
use Chill\ActivityBundle\Entity\ActivityTypeCategory;
use Chill\ActivityBundle\Form\Type\ActivityFieldPresence;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
@@ -10,38 +16,56 @@ use Chill\MainBundle\Form\Type\TranslatableStringFormType;
class ActivityTypeType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
private TranslatableStringHelper $translatableStringHelper;
public function __construct(TranslatableStringHelper $translatableStringHelper)
{
$this->translatableStringHelper = $translatableStringHelper;
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name', TranslatableStringFormType::class)
->add('active', ChoiceType::class, array(
'choices' => array(
->add('active', ChoiceType::class, [
'choices' => [
'Yes' => true,
'No' => false
),
],
'expanded' => true
));
])
->add('category', EntityType::class, [
'class' => ActivityTypeCategory::class,
'choice_label' => function (ActivityTypeCategory $activityTypeCategory) {
return $this->translatableStringHelper->localize($activityTypeCategory->getName());
},
])
->add('ordering', NumberType::class, [
'required' => true,
'scale' => 5
])
;
$fields = [
'persons', 'user', 'date', 'place', 'persons',
'thirdParties', 'durationTime', 'travelTime', 'attendee',
'reasons', 'comment', 'sentReceived', 'documents',
'emergency', 'accompanyingPeriod', 'socialData', 'users'
];
foreach ($fields as $field) {
$builder
->add($field.'Visible', ActivityFieldPresence::class)
->add($field.'Label', TextType::class, [
'required' => false,
'empty_data' => '',
]);
}
}
/**
* @param OptionsResolverInterface $resolver
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'Chill\ActivityBundle\Entity\ActivityType'
'data_class' => \Chill\ActivityBundle\Entity\ActivityType::class
));
}
/**
* @return string
*/
public function getBlockPrefix()
{
return 'chill_activitybundle_activitytype';
}
}

View File

@@ -0,0 +1,29 @@
<?php
namespace Chill\ActivityBundle\Form\Type;
use Chill\ActivityBundle\Entity\ActivityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\OptionsResolver\OptionsResolver;
class ActivityFieldPresence extends AbstractType
{
public function getParent()
{
return ChoiceType::class;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(
array(
'choices' => [
'Invisible' => ActivityType::FIELD_INVISIBLE,
'Optional' => ActivityType::FIELD_OPTIONAL,
'Required' => ActivityType::FIELD_REQUIRED,
],
)
);
}
}

View File

@@ -0,0 +1,47 @@
<?php
namespace Chill\ActivityBundle\Menu;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
{
protected TokenStorageInterface $tokenStorage;
protected AuthorizationHelper $authorizationHelper;
protected TranslatorInterface $translator;
public function __construct(
TokenStorageInterface $tokenStorage,
AuthorizationHelper $authorizationHelper,
TranslatorInterface $translator
) {
$this->translator = $translator;
$this->authorizationHelper = $authorizationHelper;
$this->tokenStorage = $tokenStorage;
}
public static function getMenuIds(): array
{
return ['accompanyingCourse'];
}
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{
$period = $parameters['accompanyingCourse'];
if (AccompanyingPeriod::STEP_DRAFT !== $period->getStep()) {
$menu->addChild($this->translator->trans('Activity'), [
'route' => 'chill_activity_activity_list',
'routeParameters' => [
'accompanying_period_id' => $period->getId(),
]])
->setExtras(['order' => 40]);
}
}
}

View File

@@ -1,88 +0,0 @@
<?php
/*
*
*/
namespace Chill\ActivityBundle\Menu;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Role\Role;
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
/**
*
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
*/
class MenuBuilder implements LocalMenuBuilderInterface
{
/**
*
* @var TokenStorageInterface
*/
protected $tokenStorage;
/**
*
* @var TranslatorInterface
*/
protected $translator;
/**
*
* @var AuthorizationHelper
*/
protected $authorizationHelper;
public function __construct(
TokenStorageInterface $tokenStorage,
TranslatorInterface $translator,
AuthorizationHelper $authorizationHelper
) {
$this->tokenStorage = $tokenStorage;
$this->translator = $translator;
$this->authorizationHelper = $authorizationHelper;
}
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{
/* @var $person \Chill\PersonBundle\Entity\Person */
$person = $parameters['person'];
$user = $this->tokenStorage->getToken()->getUser();
$roleSee = new Role(ActivityVoter::SEE);
$roleAdd = new Role(ActivityVoter::CREATE);
if ($this->authorizationHelper->userHasAccess($user, $person, $roleSee)) {
$menu->addChild($this->translator->trans('Activity list'), [
'route' => 'chill_activity_activity_list',
'routeParameters' => [
'person_id' => $person->getId()
]
])
->setExtras([
'order' => 201
]);
}
if ($this->authorizationHelper->userHasAccess($user, $person, $roleAdd)) {
$menu->addChild($this->translator->trans('Add a new activity'), [
'route' => 'chill_activity_activity_new',
'routeParameters' => [
'person_id' => $person->getId()
]
])
->setExtras([
'order' => 200
]);
}
}
public static function getMenuIds(): array
{
return [ 'person' ];
}
}

View File

@@ -15,8 +15,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\ActivityBundle\Menu;
namespace Chill\ActivityBundle\Menu;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
@@ -65,15 +64,6 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
->setExtra('order', 201)
;
}
if ($this->authorizationChecker->isGranted(ActivityVoter::CREATE, $person)) {
$menu->addChild(
$this->translator->trans('Add a new activity'), [
'route' => 'chill_activity_activity_new',
'routeParameters' => [ 'person_id' => $person->getId() ],
])
->setExtra('order', 200)
;
}
}
public static function getMenuIds(): array

View File

@@ -0,0 +1,24 @@
<?php
namespace Chill\ActivityBundle\Notification;
use Chill\MainBundle\Entity\Notification;
use Chill\ActivityBundle\Entity\Activity;
final class ActivityNotificationRenderer
{
public function supports(Notification $notification, array $options = []): bool
{
return $notification->getRelatedEntityClass() == Activity::class;
}
public function getTemplate()
{
return '@ChillActivity/Activity/showInNotification.html.twig';
}
public function getTemplateData(Notification $notification)
{
return ['notification' => $notification];
}
}

View File

@@ -23,6 +23,8 @@
namespace Chill\ActivityBundle\Repository;
use Chill\ActivityBundle\Entity\Activity;
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcher;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Chill\ActivityBundle\Repository\ActivityRepository;
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
@@ -33,9 +35,10 @@ use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Role\Role;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Security\Core\Security;
final class ActivityACLAwareRepository
final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInterface
{
private AuthorizationHelper $authorizationHelper;
@@ -45,16 +48,63 @@ final class ActivityACLAwareRepository
private EntityManagerInterface $em;
private Security $security;
private CenterResolverDispatcher $centerResolverDispatcher;
public function __construct(
AuthorizationHelper $authorizationHelper,
CenterResolverDispatcher $centerResolverDispatcher,
TokenStorageInterface $tokenStorage,
ActivityRepository $repository,
EntityManagerInterface $em
EntityManagerInterface $em,
Security $security
) {
$this->authorizationHelper = $authorizationHelper;
$this->centerResolverDispatcher = $centerResolverDispatcher;
$this->tokenStorage = $tokenStorage;
$this->repository = $repository;
$this->em = $em;
$this->security = $security;
}
/**
* @param Person $person
* @param string $role
* @param int|null $start
* @param int|null $limit
* @param array $orderBy
* @return array|Activity[]
*/
public function findByPerson(Person $person, string $role, ?int $start = 0, ?int $limit = 1000, ?array $orderBy = []): array
{
$user = $this->security->getUser();
$center = $this->centerResolverDispatcher->resolveCenter($person);
if (0 === count($orderBy)) {
$orderBy = ['date' => 'DESC'];
}
$reachableScopes = $this->authorizationHelper
->getReachableCircles($user, $role, $center);
return $this->em->getRepository(Activity::class)
->findByPersonImplied($person, $reachableScopes, $orderBy, $limit, $start);
;
}
public function findByAccompanyingPeriod(AccompanyingPeriod $period, string $role, ?int $start = 0, ?int $limit = 1000, ?array $orderBy = []): array
{
$user = $this->security->getUser();
$center = $this->centerResolverDispatcher->resolveCenter($period);
if (0 === count($orderBy)) {
$orderBy = ['date' => 'DESC'];
}
$scopes = $this->authorizationHelper
->getReachableCircles($user, $role, $center);
return $this->em->getRepository(Activity::class)
->findByAccompanyingPeriod($period, $scopes, true, $limit, $start, $orderBy);
}
public function queryTimelineIndexer(string $context, array $args = []): array
@@ -81,7 +131,7 @@ final class ActivityACLAwareRepository
$metadataActivity = $this->em->getClassMetadata(Activity::class);
$metadataPerson = $this->em->getClassMetadata(Person::class);
$associationMapping = $metadataActivity->getAssociationMapping('person');
return $metadataActivity->getTableName().' JOIN '
.$metadataPerson->getTableName().' ON '
.$metadataPerson->getTableName().'.'.
@@ -95,7 +145,7 @@ final class ActivityACLAwareRepository
{
$where = '';
$parameters = [];
$metadataActivity = $this->em->getClassMetadata(Activity::class);
$metadataPerson = $this->em->getClassMetadata(Person::class);
$activityToPerson = $metadataActivity->getAssociationMapping('person')['joinColumns'][0]['name'];
@@ -105,20 +155,20 @@ final class ActivityACLAwareRepository
// acls:
$role = new Role(ActivityVoter::SEE);
$reachableCenters = $this->authorizationHelper->getReachableCenters($this->tokenStorage->getToken()->getUser(),
$reachableCenters = $this->authorizationHelper->getReachableCenters($this->tokenStorage->getToken()->getUser(),
$role);
if (count($reachableCenters) === 0) {
// insert a dummy condition
return 'FALSE = TRUE';
}
if ($context === 'person') {
// we start with activities having the person_id linked to person
if ($context === 'person') {
// we start with activities having the person_id linked to person
$where .= sprintf('%s = ? AND ', $activityToPerson);
$parameters[] = $person->getId();
}
// we add acl (reachable center and scopes)
$where .= '('; // first loop for the for centers
$centersI = 0; // like centers#i
@@ -131,7 +181,7 @@ final class ActivityACLAwareRepository
$reachableScopes = $this->authorizationHelper->getReachableScopes($this->tokenStorage->getToken()->getUser(), $role, $center);
// we get the ids for those scopes
$reachablesScopesId = array_map(
function(Scope $scope) { return $scope->getId(); },
function(Scope $scope) { return $scope->getId(); },
$reachableScopes
);
@@ -162,7 +212,7 @@ final class ActivityACLAwareRepository
}
// close loop for centers
$where .= ')';
return [$where, $parameters];
}

View File

@@ -0,0 +1,19 @@
<?php
namespace Chill\ActivityBundle\Repository;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
interface ActivityACLAwareRepositoryInterface
{
/**
* @return array|Activity[]
*/
public function findByPerson(Person $person, string $role, ?int $start = 0, ?int $limit = 1000, ?array $orderBy = []): array;
/**
* @return array|Activity[]
*/
public function findByAccompanyingPeriod(AccompanyingPeriod $period, string $role, ?int $start = 0, ?int $limit = 1000, ?array $orderBy = []): array;
}

View File

@@ -23,6 +23,8 @@
namespace Chill\ActivityBundle\Repository;
use Chill\ActivityBundle\Entity\Activity;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
@@ -38,5 +40,86 @@ class ActivityRepository extends ServiceEntityRepository
{
parent::__construct($registry, Activity::class);
}
/**
* @param $person
* @param array $scopes
* @param string[] $orderBy
* @param int $limit
* @param int $offset
* @return array|Activity[]
*/
public function findByPersonImplied(Person $person, array $scopes, ?array $orderBy = [ 'date' => 'DESC'], ?int $limit = 100, ?int $offset = 0): array
{
$qb = $this->createQueryBuilder('a');
$qb->select('a');
$qb
->where($qb->expr()->in('a.scope', ':scopes'))
->setParameter('scopes', $scopes)
->andWhere(
$qb->expr()->orX(
$qb->expr()->eq('a.person', ':person'),
':person MEMBER OF a.persons'
)
)
->setParameter('person', $person)
;
foreach ($orderBy as $k => $dir) {
$qb->addOrderBy('a.'.$k, $dir);
}
$qb->setMaxResults($limit)->setFirstResult($offset);
return $qb->getQuery()
->getResult();
}
/**
* @param AccompanyingPeriod $period
* @param array $scopes
* @param int|null $limit
* @param int|null $offset
* @param array|string[] $orderBy
* @return array|Activity[]
*/
public function findByAccompanyingPeriod(AccompanyingPeriod $period, array $scopes, ?bool $allowNullScope = false, ?int $limit = 100, ?int $offset = 0, array $orderBy = ['date' => 'desc']): array
{
$qb = $this->createQueryBuilder('a');
$qb->select('a');
if (!$allowNullScope) {
$qb
->where($qb->expr()->in('a.scope', ':scopes'))
->setParameter('scopes', $scopes)
;
} else {
$qb
->where(
$qb->expr()->orX(
$qb->expr()->in('a.scope', ':scopes'),
$qb->expr()->isNull('a.scope')
)
)
->setParameter('scopes', $scopes)
;
}
$qb
->andWhere(
$qb->expr()->eq('a.accompanyingPeriod', ':period')
)
->setParameter('period', $period)
;
foreach ($orderBy as $k => $dir) {
$qb->addOrderBy('a.'.$k, $dir);
}
$qb->setMaxResults($limit)->setFirstResult($offset);
return $qb->getQuery()
->getResult();
}
}

View File

@@ -1,10 +0,0 @@
@import '~ChillMainSass/custom/config/colors';
@import '~ChillMainSass/custom/mixins/entity';
.chill-entity.chill-entity__activity-reason {
@include entity($chill-pink, white);
}
.activity {
color: $chill-green;
}

View File

@@ -0,0 +1,142 @@
// Access to Bootstrap variables and mixins
@import '~ChillMainAssets/module/bootstrap/shared';
// activity creation first step: select type page
div.new-activity-select-type {
div.activity-row {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
gap: 12px;
div.bloc {
width: 200px;
align-self: flex-end;
height: 140px;
display: flex;
justify-content: center;
align-items: center;
}
}
}
// exceptions for flex-table in list-records
div.activity-list {
div.flex-table {
div.item-bloc {
div.item-row.main {
div.item-col {
&:first-child {
flex-basis: 15%;
}
ul.list-content {
li.social-issues, li.social-actions {
.badge-primary {
font-variant: small-caps;
font-weight: bold;
font-size: 88%;
margin-bottom: 0.2em;
}
}
li.social-issues .badge-primary {
background-color: $orange;
}
li.social-actions .badge-primary {
background-color: $green;
}
}
}
}
div.item-row.comment {
margin-left: 15%;
blockquote.chill-user-quote {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
}
div.item-row.details {
margin-left: 15%;
// override flex-bloc to adapt in list
// TODO refund this
div.accompanyingCourse.flex-bloc.concerned-groups {
margin: 0;
width: 100%;
justify-content: space-around;
div.item-bloc {
box-shadow: unset;
padding: 0;
flex-basis: 25%;
div.item-row {
flex-direction: column;
div.item-col {
&:first-child {
width: unset;
}
&:last-child {
border-top: 0;
margin-top: 0;
padding-top: 0;
ul.list-content {
padding: 0;
}
}
}
}
}
}
}
ul.list-content {
list-style-type: none;
padding-left: 1em;
margin: 0 0;
li {
margin-bottom: 0.2em;
}
}
}
div.duration {
font-size: smaller;
padding-left: 1em;
margin-top: 1em;
}
}
}
// exceptions for flex-bloc in concerned-groups
div.flex-bloc.concerned-groups {
margin-top: 1em;
div.item-bloc {
flex-grow: 0; flex-shrink: 0; flex-basis: 25%; //4 blocs
ul.list-content {
list-style-type: none;
padding-left: 0;
li {
margin-bottom: 0.2em;
a {
color: $white;
cursor: pointer;
&:hover {
color: #ffffffab;
}
}
}
}
}
&.person div.item-bloc {
flex-basis: 33%; //3 blocs
}
}
/// CHILL ENTITY RENDER BOX
.chill-entity {
/// ACTIVITY-REASON
&.entity-activity-reason {
margin-right: 0.3em;
font-size: 120%;
}
}

View File

@@ -0,0 +1 @@
require('./chillactivity.scss');

View File

@@ -1 +0,0 @@
require('./activity/activity.scss');

View File

@@ -0,0 +1,17 @@
<template>
<concerned-groups></concerned-groups>
<social-issues-acc></social-issues-acc>
</template>
<script>
import ConcernedGroups from './components/ConcernedGroups.vue';
import SocialIssuesAcc from './components/SocialIssuesAcc.vue';
export default {
name: "App",
components: {
ConcernedGroups,
SocialIssuesAcc
}
}
</script>

View File

@@ -0,0 +1,18 @@
import { getSocialIssues } from 'ChillPersonAssets/vuejs/AccompanyingCourse/api.js';
/*
* Load socialActions by socialIssue (id)
*/
const getSocialActionByIssue = (id) => {
const url = `/api/1.0/person/social/social-action/by-social-issue/${id}.json`;
return fetch(url)
.then(response => {
if (response.ok) { return response.json(); }
throw Error('Error with request resource response');
});
};
export {
getSocialIssues,
getSocialActionByIssue
};

View File

@@ -0,0 +1,185 @@
<template>
<teleport to="#add-persons">
<div class="flex-bloc concerned-groups" :class="getContext">
<persons-bloc
v-for="bloc in contextPersonsBlocs"
v-bind:key="bloc.key"
v-bind:bloc="bloc"
v-bind:setPersonsInBloc="setPersonsInBloc">
</persons-bloc>
</div>
<div v-if="getContext === 'accompanyingCourse' && filterSuggestedPersons.length > 0">
<ul>
<li v-for="p in filterSuggestedPersons" @click="addNewPerson(p)">
{{ p.text }}
</li>
</ul>
</div>
<add-persons
buttonTitle="activity.add_persons"
modalTitle="activity.add_persons"
v-bind:key="addPersons.key"
v-bind:options="addPersons.options"
@addNewPersons="addNewPersons"
ref="addPersons">
</add-persons>
</teleport>
</template>
<script>
import { mapState, mapGetters } from 'vuex';
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue';
import PersonsBloc from './ConcernedGroups/PersonsBloc.vue';
export default {
name: "ConcernedGroups",
components: {
AddPersons,
PersonsBloc
},
data() {
return {
personsBlocs: [
{ key: 'persons',
title: 'activity.bloc_persons',
persons: [],
included: false
},
{ key: 'personsAssociated',
title: 'activity.bloc_persons_associated',
persons: [],
included: false
},
{ key: 'personsNotAssociated',
title: 'activity.bloc_persons_not_associated',
persons: [],
included: false
},
{ key: 'thirdparty',
title: 'activity.bloc_thirdparty',
persons: [],
included: true
},
{ key: 'users',
title: 'activity.bloc_users',
persons: [],
included: true
},
],
addPersons: {
key: 'activity',
options: {
type: ['person', 'thirdparty', 'user'], // TODO add 'user'
priority: null,
uniq: false,
}
}
}
},
computed: {
...mapState({
persons: state => state.activity.persons,
thirdParties: state => state.activity.thirdParties,
users: state => state.activity.users,
accompanyingCourse: state => state.activity.accompanyingPeriod
}),
...mapGetters([
'filterSuggestedPersons'
]),
getContext() {
return (this.accompanyingCourse) ? "accompanyingCourse" : "person";
},
contextPersonsBlocs() {
return this.personsBlocs.filter(bloc => bloc.included !== false);
}
},
mounted() {
this.setPersonsInBloc();
},
methods: {
setPersonsInBloc() {
let groups;
if (this.accompanyingCourse) {
groups = this.splitPersonsInGroups();
}
this.personsBlocs.forEach(bloc => {
if (this.accompanyingCourse) {
switch (bloc.key) {
case 'personsAssociated':
bloc.persons = groups.personsAssociated;
bloc.included = true;
break;
case 'personsNotAssociated':
bloc.persons = groups.personsNotAssociated;
bloc.included = true;
break;
}
} else {
switch (bloc.key) {
case 'persons':
bloc.persons = this.persons;
bloc.included = true;
break;
}
}
switch (bloc.key) {
case 'thirdparty':
bloc.persons = this.thirdParties;
break;
case 'users':
bloc.persons = this.users;
break;
}
}, groups);
},
splitPersonsInGroups() {
let personsAssociated = [];
let personsNotAssociated = this.persons;
let participations = this.getCourseParticipations();
this.persons.forEach(person => {
participations.forEach(participation => {
if (person.id === participation.id) {
//console.log(person.id);
personsAssociated.push(person);
personsNotAssociated = personsNotAssociated.filter(p => p !== person);
}
});
});
return {
'personsAssociated': personsAssociated,
'personsNotAssociated': personsNotAssociated
};
},
getCourseParticipations() {
let participations = [];
this.accompanyingCourse.participations.forEach(participation => {
if (!participation.endDate) {
participations.push(participation.person);
}
});
return participations;
},
addNewPersons({ selected, modal }) {
console.log('@@@ CLICK button addNewPersons', selected);
selected.forEach(function(item) {
this.$store.dispatch('addPersonsInvolved', item);
}, this
);
this.$refs.addPersons.resetSearch(); // to cast child method
modal.showModal = false;
this.setPersonsInBloc();
},
addNewPerson(person) {
this.$store.dispatch('addPersonsInvolved', { result: person, type: 'person' });
this.setPersonsInBloc();
},
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,29 @@
<template>
<li>
<span class="badge bg-primary" :title="person.text">
<span class="chill_denomination">
{{ textCutted }}
</span>
<a class="fa fa-fw fa-times"
@click.prevent="$emit('remove', person)">
</a>
</span>
</li>
</template>
<script>
export default {
name: "PersonBadge",
props: ['person'],
computed: {
textCutted() {
let more = (this.person.text.length > 15) ?'…' : '';
return this.person.text.slice(0,15) + more;
}
},
emits: ['remove'],
}
</script>
<style lang="css" scoped>
</style>

View File

@@ -0,0 +1,41 @@
<template>
<div class="item-bloc">
<div class="item-row">
<div class="item-col">
<h4>{{ $t(bloc.title) }}</h4>
</div>
<div class="item-col">
<ul class="list-content">
<person-badge
v-for="person in bloc.persons"
v-bind:key="person.id"
v-bind:person="person"
@remove="removePerson">
</person-badge>
</ul>
</div>
</div>
</div>
</template>
<script>
import PersonBadge from './PersonBadge.vue';
export default {
name:"PersonsBloc",
components: {
PersonBadge
},
props: ['bloc', 'setPersonsInBloc'],
methods: {
removePerson(item) {
console.log('@@ CLICK remove person: item', item);
this.$store.dispatch('removePersonInvolved', item);
this.setPersonsInBloc();
}
}
}
</script>
<style lang="scss">
</style>

View File

@@ -0,0 +1,214 @@
<template>
<teleport to="#social-issues-acc">
<div class="mb-3 row">
<div class="col-4">
<label class="col-form-label">{{ $t('activity.social_issues') }}</label>
</div>
<div class="col-8">
<check-social-issue
v-for="issue in socialIssuesList"
v-bind:key="issue.id"
v-bind:issue="issue"
v-bind:selection="socialIssuesSelected"
@updateSelected="updateIssuesSelected">
</check-social-issue>
<div class="my-3">
<VueMultiselect
name="otherIssues"
label="text"
track-by="id"
open-direction="bottom"
v-bind:close-on-select="true"
v-bind:preserve-search="false"
v-bind:reset-after="true"
v-bind:hide-selected="true"
v-bind:taggable="false"
v-bind:multiple="false"
v-bind:searchable="true"
v-bind:allow-empty="true"
v-bind:show-labels="false"
v-bind:loading="issueIsLoading"
v-bind:placeholder="$t('activity.choose_other_social_issue')"
v-bind:options="socialIssuesOther"
v-model="value"
@select="addIssueInList">
</VueMultiselect>
</div>
</div>
</div>
<div class="mb-3 row">
<div class="col-4">
<label class="col-form-label">{{ $t('activity.social_actions') }}</label>
</div>
<div class="col-8">
<div v-if="actionIsLoading === true">
<i class="chill-green fa fa-circle-o-notch fa-spin fa-lg"></i>
</div>
<check-social-action
v-if="socialIssuesSelected.length || socialActionsSelected.length"
v-for="action in socialActionsList"
v-bind:key="action.id"
v-bind:action="action"
v-bind:selection="socialActionsSelected"
@updateSelected="updateActionsSelected">
</check-social-action>
<span v-else class="inline-choice chill-no-data-statement mt-3">
{{ $t('activity.select_first_a_social_issue') }}
</span>
</div>
</div>
</teleport>
</template>
<script>
import { readonly } from 'vue';
import VueMultiselect from 'vue-multiselect';
import CheckSocialIssue from './SocialIssuesAcc/CheckSocialIssue.vue';
import CheckSocialAction from './SocialIssuesAcc/CheckSocialAction.vue';
import { getSocialIssues, getSocialActionByIssue } from '../api.js';
export default {
name: "SocialIssuesAcc",
components: {
CheckSocialIssue,
CheckSocialAction,
VueMultiselect
},
data() {
return {
issueIsLoading: false,
actionIsLoading: false
}
},
computed: {
socialIssuesList() {
return this.$store.state.activity.accompanyingPeriod.socialIssues;
},
socialIssuesSelected() {
return this.$store.state.activity.socialIssues;
},
socialIssuesOther() {
return this.$store.state.socialIssuesOther;
},
socialActionsList() {
return this.$store.state.socialActionsList;
},
socialActionsSelected() {
return this.$store.state.activity.socialActions;
}
},
mounted() {
/* Load others issues in multiselect
*/
this.issueIsLoading = true;
getSocialIssues().then(response => new Promise((resolve, reject) => {
this.$store.commit('updateIssuesOther', response.results);
/* Add in list the issues already associated (if not yet listed)
*/
this.socialIssuesSelected.forEach(issue => {
if (this.socialIssuesList.filter(i => i.id === issue.id).length !== 1) {
this.$store.commit('addIssueInList', issue);
}
}, this);
/* Remove from multiselect the issues that are not yet in checkbox list
*/
this.socialIssuesList.forEach(issue => {
this.$store.commit('removeIssueInOther', issue);
}, this);
/* Filter issues
*/
this.$store.commit('filterList', 'issues');
/* Add in list the actions already associated (if not yet listed)
*/
this.socialActionsSelected.forEach(action => {
this.$store.commit('addActionInList', action);
}, this);
/* Filter issues
*/
this.$store.commit('filterList', 'actions');
this.issueIsLoading = false;
resolve();
}));
},
methods: {
/* When choosing an issue in multiselect, add it in checkboxes (as selected),
remove it from multiselect, and add socialActions concerned
*/
addIssueInList(value) {
//console.log('addIssueInList', value);
this.$store.commit('addIssueInList', value);
this.$store.commit('removeIssueInOther', value);
this.$store.dispatch('addIssueSelected', value);
this.updateActionsList();
},
/* Update value for selected issues checkboxes
*/
updateIssuesSelected(issues) {
//console.log('updateIssuesSelected', issues);
this.$store.dispatch('updateIssuesSelected', issues);
this.updateActionsList();
},
/* Update value for selected actions checkboxes
*/
updateActionsSelected(actions) {
//console.log('updateActionsSelected', actions);
this.$store.dispatch('updateActionsSelected', actions);
},
/* Add socialActions concerned: after reset, loop on each issue selected
to get social actions concerned
*/
updateActionsList() {
//console.log('updateActionsList');
this.resetActionsList();
this.socialIssuesSelected.forEach(item => {
this.actionIsLoading = true;
getSocialActionByIssue(item.id)
.then(actions => new Promise((resolve, reject) => {
actions.results.forEach(action => {
this.$store.commit('addActionInList', action);
}, this);
this.$store.commit('filterList', 'actions');
this.actionIsLoading = false;
resolve();
}));
}, this);
},
/* Reset socialActions List: flush list and restore selected actions
*/
resetActionsList() {
this.$store.commit('resetActionsList');
this.socialActionsSelected.forEach(item => {
this.$store.commit('addActionInList', item);
}, this);
}
}
}
</script>
<style src="vue-multiselect/dist/vue-multiselect.css"></style>
<style lang="scss">
span.multiselect__single {
display: none !important;
}
</style>

View File

@@ -0,0 +1,36 @@
<template>
<span class="inline-choice">
<div class="form-check">
<input class="form-check-input"
type="checkbox"
v-model="selected"
name="action"
v-bind:id="action.id"
v-bind:value="action"
/>
<label class="form-check-label" v-bind:for="action.id">
{{ action.text }}
</label>
</div>
</span>
</template>
<script>
export default {
name: "CheckSocialAction",
props: [ 'action', 'selection' ],
emits: [ 'updateSelected' ],
computed: {
selected: {
set(value) {
this.$emit('updateSelected', value);
},
get() {
return this.selection;
}
}
}
}
</script>

View File

@@ -0,0 +1,36 @@
<template>
<span class="inline-choice">
<div class="form-check">
<input class="form-check-input"
type="checkbox"
v-model="selected"
name="issue"
v-bind:id="issue.id"
v-bind:value="issue"
/>
<label class="form-check-label" v-bind:for="issue.id">
{{ issue.text }}
</label>
</div>
</span>
</template>
<script>
export default {
name: "CheckSocialIssue",
props: [ 'issue', 'selection' ],
emits: [ 'updateSelected' ],
computed: {
selected: {
set(value) {
this.$emit('updateSelected', value);
},
get() {
return this.selection;
}
}
}
}
</script>

View File

@@ -0,0 +1,27 @@
import { personMessages } from 'ChillPersonAssets/vuejs/_js/i18n'
const appMessages = {
fr: {
activity: {
//
social_issues: "Problématiques sociales",
choose_other_social_issue: "Ajouter une autre problématique sociale...",
social_actions: "Actions d'accompagnement",
select_first_a_social_issue: "Sélectionnez d'abord une problématique sociale",
//
add_persons: "Ajouter des personnes concernées",
bloc_persons: "Usagers",
bloc_persons_associated: "Usagers du parcours",
bloc_persons_not_associated: "Tiers non-pro.",
bloc_thirdparty: "Tiers professionnels",
bloc_users: "T(M)S",
}
}
}
Object.assign(appMessages.fr, personMessages.fr);
export {
appMessages
};

View File

@@ -0,0 +1,16 @@
import { createApp } from 'vue';
import { _createI18n } from 'ChillMainAssets/vuejs/_js/i18n'
import { appMessages } from './i18n'
import store from './store'
import App from './App.vue';
const i18n = _createI18n(appMessages);
const app = createApp({
template: `<app></app>`,
})
.use(store)
.use(i18n)
.component('app', App)
.mount('#activity');

View File

@@ -0,0 +1,180 @@
import 'es6-promise/auto';
import { createStore } from 'vuex';
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;
};
const removeIdFromValue = (string, id) => {
let array = string.split(',');
array = array.filter(el => el !== id.toString());
let str = array.join();
return str;
};
const store = createStore({
strict: debug,
state: {
activity: window.activity,
socialIssuesOther: [],
socialActionsList: [],
},
getters: {
filterSuggestedPersons(state) {
if (typeof(state.activity.accompanyingPeriod) === 'undefined') {
return [];
}
let existingPersonIds = state.activity.persons.map(p => p.id);
return state.activity.accompanyingPeriod.participations.filter(p => p.endDate === null)
.map(p => p.person)
.filter(p => !existingPersonIds.includes(p.id))
}
},
mutations: {
// SocialIssueAcc
addIssueInList(state, issue) {
//console.log('add issue list', issue.id);
state.activity.accompanyingPeriod.socialIssues.push(issue);
},
addIssueSelected(state, issue) {
//console.log('add issue selected', issue.id);
state.activity.socialIssues.push(issue);
},
updateIssuesSelected(state, issues) {
//console.log('update issues selected', issues);
state.activity.socialIssues = issues;
},
updateIssuesOther(state, payload) {
//console.log('update issues other');
state.socialIssuesOther = payload;
},
removeIssueInOther(state, issue) {
//console.log('remove issue other', issue.id);
state.socialIssuesOther = state.socialIssuesOther.filter(i => i.id !== issue.id);
},
resetActionsList(state) {
//console.log('reset list actions');
state.socialActionsList = [];
},
addActionInList(state, action) {
//console.log('add action list', action.id);
state.socialActionsList.push(action);
},
updateActionsSelected(state, actions) {
//console.log('update actions selected', actions);
state.activity.socialActions = actions;
},
filterList(state, list) {
const filterList = (list) => {
// remove duplicates entries
list = list.filter((value, index) => list.findIndex(array => array.id === value.id) === index);
// alpha sort
list.sort((a,b) => (a.text > b.text) ? 1 : ((b.text > a.text) ? -1 : 0));
return list;
};
if (list === 'issues') {
state.activity.accompanyingPeriod.socialIssues = filterList(state.activity.accompanyingPeriod.socialIssues);
}
if (list === 'actions') {
state.socialActionsList = filterList(state.socialActionsList);
}
},
// ConcernedGroups
addPersonsInvolved(state, payload) {
//console.log('### mutation addPersonsInvolved', payload.result.type);
switch (payload.result.type) {
case 'person':
state.activity.persons.push(payload.result);
break;
case 'thirdparty':
state.activity.thirdParties.push(payload.result);
break;
case 'user':
state.activity.users.push(payload.result);
break;
};
},
removePersonInvolved(state, payload) {
//console.log('### mutation removePersonInvolved', payload.type);
switch (payload.type) {
case 'person':
state.activity.persons = state.activity.persons.filter(person => person !== payload);
break;
case 'thirdparty':
state.activity.thirdParties = state.activity.thirdParties.filter(thirdparty => thirdparty !== payload);
break;
case 'user':
state.activity.users = state.activity.users.filter(user => user !== payload);
break;
};
}
},
actions: {
addIssueSelected({ commit }, issue) {
let aSocialIssues = document.getElementById("chill_activitybundle_activity_socialIssues");
aSocialIssues.value = addIdToValue(aSocialIssues.value, issue.id);
commit('addIssueSelected', issue);
},
updateIssuesSelected({ commit }, payload) {
let aSocialIssues = document.getElementById("chill_activitybundle_activity_socialIssues");
aSocialIssues.value = '';
payload.forEach(item => {
aSocialIssues.value = addIdToValue(aSocialIssues.value, item.id);
});
commit('updateIssuesSelected', payload);
},
updateActionsSelected({ commit }, payload) {
let aSocialActions = document.getElementById("chill_activitybundle_activity_socialActions");
aSocialActions.value = '';
payload.forEach(item => {
aSocialActions.value = addIdToValue(aSocialActions.value, item.id);
});
commit('updateActionsSelected', payload);
},
addPersonsInvolved({ commit }, payload) {
//console.log('### action addPersonsInvolved', payload.result.type);
switch (payload.result.type) {
case 'person':
let aPersons = document.getElementById("chill_activitybundle_activity_persons");
aPersons.value = addIdToValue(aPersons.value, payload.result.id);
break;
case 'thirdparty':
let aThirdParties = document.getElementById("chill_activitybundle_activity_thirdParties");
aThirdParties.value = addIdToValue(aThirdParties.value, payload.result.id);
break;
case 'user':
let aUsers = document.getElementById("chill_activitybundle_activity_users");
aUsers.value = addIdToValue(aUsers.value, payload.result.id);
break;
};
commit('addPersonsInvolved', payload);
},
removePersonInvolved({ commit }, payload) {
//console.log('### action removePersonInvolved', payload);
switch (payload.type) {
case 'person':
let aPersons = document.getElementById("chill_activitybundle_activity_persons");
aPersons.value = removeIdFromValue(aPersons.value, payload.id);
break;
case 'thirdparty':
let aThirdParties = document.getElementById("chill_activitybundle_activity_thirdParties");
aThirdParties.value = removeIdFromValue(aThirdParties.value, payload.id);
break;
case 'user':
let aUsers = document.getElementById("chill_activitybundle_activity_users");
aUsers.value = removeIdFromValue(aUsers.value, payload.id);
break;
};
commit('removePersonInvolved', payload);
}
}
});
export default store;

View File

@@ -0,0 +1,103 @@
{% macro href(pathname, key, value) %}
{% set parms = { (key): value } %}
{{ path(pathname, parms) }}
{% endmacro %}
{% if context == 'person' %}
{% set blocs = [
{ 'title': 'Others persons'|trans,
'items': entity.persons,
'path' : 'chill_person_view',
'key' : 'person_id'
},
{ 'title': 'Third parties'|trans,
'items': entity.thirdParties,
'path' : 'chill_3party_3party_show',
'key' : 'thirdparty_id'
},
{ 'title': 'Users concerned'|trans,
'items': entity.users,
'path' : 'admin_user_show',
'key' : 'id'
},
] %}
{% else %}
{% set blocs = [
{ 'title': 'Persons in accompanying course'|trans,
'items': entity.personsAssociated,
'path' : 'chill_person_view',
'key' : 'person_id'
},
{ 'title': 'Third persons'|trans,
'items': entity.personsNotAssociated,
'path' : 'chill_person_view',
'key' : 'person_id'
},
{ 'title': 'Third parties'|trans,
'items': entity.thirdParties,
'path' : 'chill_3party_3party_show',
'key' : 'thirdparty_id'
},
{ 'title': 'Users concerned'|trans,
'items': entity.users,
'path' : 'admin_user_show',
'key' : 'id'
},
] %}
{% endif %}
{% if (with_display == 'bloc') %}
<div class="{{ context }} flex-bloc concerned-groups">
{% for bloc in blocs %}
<div class="item-bloc">
<div class="item-row">
<div class="item-col">
<h4>{{ bloc.title }}</h4>
</div>
<div class="item-col">
<ul class="list-content">
{% for item in bloc.items %}
<li>
<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
}) }}
</span>
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% if (with_display == 'row') %}
<div class="concerned-groups">
{% for bloc in blocs %}
<div class="group">
{% if bloc.items|length > 0 %}
<h4>{{ bloc.title }}</h4>
<ul class="list-content">
{% for item in bloc.items %}
<li>
<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
}) }}
</span>
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}

View File

@@ -0,0 +1,16 @@
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %}
{% block title 'Remove activity'|trans %}
{% block content %}
{{ include('@ChillMain/Util/confirmation_template.html.twig',
{
'title' : 'Remove activity'|trans,
'confirm_question' : 'Are you sure you want to remove the activity about "%name%" ?'|trans({ '%name%' : accompanyingCourse.id } ),
'cancel_route' : 'chill_activity_activity_list',
'cancel_parameters' : { 'accompanying_course_id' : accompanyingCourse.id, 'id' : activity.id },
'form' : delete_form
} ) }}
{% endblock %}

View File

@@ -1,4 +1,4 @@
{% extends "@ChillPerson/layout.html.twig" %}
{% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %}
{% set person = activity.person %}
@@ -6,7 +6,6 @@
{% block title 'Remove activity'|trans %}
{% block personcontent %}
{{ include('@ChillMain/Util/confirmation_template.html.twig',
{
'title' : 'Remove activity'|trans,
@@ -15,5 +14,4 @@
'cancel_parameters' : { 'person_id' : activity.person.id, 'id' : activity.id },
'form' : delete_form
} ) }}
{% endblock %}

View File

@@ -1,59 +1,104 @@
{#
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillPerson/layout.html.twig" %}
<h1>{{ "Update activity"|trans }}</h1>
<h2 class="chill-green mb-4">{{ entity.type.name|localize_translatable_string }}</h2>
{% set activeRouteKey = 'chill_activity_activity_list' %}
{{ form_start(edit_form) }}
{{ form_errors(edit_form) }}
{% block title 'Update activity'|trans %}
{%- if edit_form.emergency is defined -%}
{{ form_row(edit_form.emergency) }}
{% endif %}
{% block personcontent %}
<h1>{{ "Update activity"|trans }}</h1>
{{ form_start(edit_form) }}
{%- if edit_form.sentReceived is defined -%}
{{ form_row(edit_form.sentReceived) }}
{% endif %}
{%- if edit_form.user is defined -%}
{{ form_row(edit_form.user) }}
{% endif %}
{%- if edit_form.scope is defined -%}
{{ form_row(edit_form.scope) }}
{% endif %}
<h2>{{ 'Activity data'|trans }}</h2>
{{ form_row(edit_form.date) }}
{{ form_row(edit_form.durationTime) }}
{{ form_row(edit_form.type) }}
{{ form_row(edit_form.attendee) }}
{%- if edit_form.socialIssues is defined -%}
{{ form_row(edit_form.socialIssues) }}
{% endif %}
{%- if edit_form.socialActions is defined -%}
{{ form_row(edit_form.socialActions) }}
{% endif %}
<div id="social-issues-acc"></div>
{%- if edit_form.reasons is defined -%}
{{ form_row(edit_form.reasons) }}
{% endif %}
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
{%- if edit_form.persons is defined -%}
{{ form_widget(edit_form.persons) }}
{% endif %}
{%- if edit_form.thirdParties is defined -%}
{{ form_widget(edit_form.thirdParties) }}
{% endif %}
{%- if edit_form.users is defined -%}
{{ form_widget(edit_form.users) }}
{% endif %}
<div id="add-persons"></div>
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2>
{%- if edit_form.date is defined -%}
{{ form_row(edit_form.date) }}
{% endif %}
{# TODO .. location #}
{%- if edit_form.durationTime is defined -%}
{{ form_row(edit_form.durationTime) }}
{% endif %}
{%- if edit_form.travelTime is defined -%}
{{ form_row(edit_form.travelTime) }}
{% endif %}
{%- if edit_form.comment is defined -%}
{# TODO .. public and private #}
{{ form_row(edit_form.comment) }}
{% endif %}
{{ form_widget(edit_form) }}
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('chill_activity_activity_show', { 'id': entity.id, 'person_id': entity.person.id } ) }}" class="sc-button bt-cancel">
{{ 'Cancel'|trans }}
</a>
</li>
<li>
<button class="sc-button bt-update" type="submit">{{ 'Save activity'|trans }}</button>
</li>
</ul>
{{ form_end(edit_form) }}
{%- if edit_form.documents is defined -%}
{{ form_row(edit_form.documents) }}
{% endif %}
{# {{ form(delete_form) }} #}
{% endblock %}
{%- if edit_form.attendee is defined -%}
{{ form_row(edit_form.attendee) }}
{% endif %}
{% block js %}
<script type="text/javascript">
chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]', '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
</script>
{% endblock %}
{# TODO .. status #}
{% set person_id = null %}
{% if entity.person %}
{% set person_id = entity.person.id %}
{% endif %}
{% set accompanying_course_id = null %}
{% if accompanyingCourse %}
{% 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) }}
{# {{ form(delete_form) }} #}

View File

@@ -0,0 +1,33 @@
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %}
{% block title 'Update activity'|trans %}
{% block content %}
<div class="activity-edit">
<div id="activity"></div> {# <=== vue component #}
{% include 'ChillActivityBundle:Activity:edit.html.twig' %}
</div>
{% endblock %}
{% block js %}
{{ parent() }}
{{ encore_entry_link_tags('mod_async_upload') }}
<script type="text/javascript">
window.addEventListener('DOMContentLoaded', function (e) {
chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]',
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
});
window.activity = {{ activity_json|json_encode|raw }};
</script>
{{ encore_entry_script_tags('vue_activity') }}
{% endblock %}
{% block css %}
{{ parent() }}
{{ encore_entry_link_tags('mod_async_upload') }}
{{ encore_entry_link_tags('vue_activity') }}
{% endblock %}

View File

@@ -0,0 +1,47 @@
{#
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %}
{% block title 'Update activity'|trans %}
{% block personcontent %}
<div class="activity-edit">
<div id="activity"></div> {# <=== vue component #}
{% include 'ChillActivityBundle:Activity:edit.html.twig' %}
</div>
{% endblock %}
{% block js %}
{{ encore_entry_link_tags('mod_async_upload') }}
<script type="text/javascript">
window.addEventListener('DOMContentLoaded', function (e) {
chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]',
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
});
window.activity = {{ activity_json|json_encode|raw }};
</script>
{{ encore_entry_script_tags('vue_activity') }}
{% endblock %}
{% block css %}
{{ encore_entry_link_tags('mod_async_upload') }}
{{ encore_entry_link_tags('vue_activity') }}
{% endblock %}

View File

@@ -1,87 +1,186 @@
{#
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %}
{% block title %}{{ 'Activity list' |trans }}{% endblock title %}
{% block personcontent %}
<h2>{{ 'Activity list' |trans }}</h2>
<div class="activity-list context-{{ context }}">
{% if activities|length == 0 %}
<p class="chill-no-data-statement">
{{ "There isn't any activities."|trans }}
<a href="{{ path('chill_activity_activity_new', {'person_id': person.id}) }}" class="sc-button bt-create button-small"></a>
<a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}" class="btn btn-sm btn-create"></a>
</p>
{% else %}
<table class="records_list">
<thead>
<tr>
<th class="chill-red">{{'Date' | trans }}</th>
<th class="chill-green">{{'Duration Time' | trans }}</th>
<th class="chill-orange">{{'Reasons' | trans}}</th>
<th>{{'Type' | trans}}</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for activity in activities %}
<tr>
<td>{% if activity.date %}{{ activity.date|format_date('long') }}{% endif %}</td>
<td>{{ activity.durationTime|date('H:i') }}</td>
<td>
{% if activity.comment.comment is not empty %}
{{ activity.comment|chill_entity_render_box( { 'limit_lines': 3, 'metadata': false } ) }}
<div class="flex-table">
{% for activity in activities %}
{% set t = activity.type %}
<div class="item-bloc">
<div class="item-row main">
<div class="item-col">
{% if activity.date %}
<h3>{{ activity.date|format_date('long') }}</h3>
{% endif %}
<div class="duration">
{% if activity.durationTime and t.durationTimeVisible %}
<p>
<i class="fa fa-fw fa-hourglass-end"></i>
{{ activity.durationTime|date('H:i') }}
</p>
{% endif %}
{% if activity.travelTime and t.travelTimeVisible %}
<p>
<i class="fa fa-fw fa-car"></i>
{{ activity.travelTime|date('H:i') }}
</p>
{% endif %}
</div>
{% 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 %}
</div>
<div class="item-col">
<div class="float-button top">
<div class="box">
<div class="action">
<ul class="record_actions">
<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>
</li>
{% if no_action is not defined or no_action == false %}
{# TODO
{% 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-sm btn-update "></a>
</li>
{# TODO
{% 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-sm btn-delete "></a>
</li>
{# TODO
{% endif %}
#}
{% endif %}
</ul>
</div>
<ul class="list-content">
{% if activity.user and t.userVisible %}
<li>
<abbr class="referrer" title="{{ 'Referrer'|trans }}">ref:</abbr>
<b>{{ activity.user.usernameCanonical }}</b>
</li>
{% endif %}
<li>
<b>{{ activity.type.name | localize_translatable_string }}</b>
{% if activity.attendee is not null and t.attendeeVisible %}
{% if activity.attendee %}
{{ '→ ' ~ 'present'|trans|capitalize }}
{% else %}
{{ '→ ' ~ 'not present'|trans|capitalize }}
{% endif %}
{% endif %}
</li>
<li>
<b>{{ 'location'|trans ~ ': ' }}</b>
Domicile de l'usager
{# TODO {% if activity.location %}{{ activity.location }}{% endif %}
#}
</li>
{%- if t.reasonsVisible -%}
<li>
{%- if activity.reasons is not empty -%}
{% for r in activity.reasons %}
{{ r|chill_entity_render_box }}
{% endfor %}
{%- endif -%}
</li>
{% endif %}
{%- if t.socialIssuesVisible %}
<li class="social-issues">
{%- if activity.socialIssues is not empty -%}
{% for r in activity.socialIssues %}
{{ r|chill_entity_render_box }}
{% endfor %}
{%- endif -%}
</li>
{% endif %}
{%- if t.socialActionsVisible -%}
<li class="social-actions">
{%- if activity.socialActions is not empty -%}
{% for r in activity.socialActions %}
{{ r|chill_entity_render_box }}
{% endfor %}
{%- endif -%}
</li>
{% endif %}
</ul>
</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="item-row comment separator">
{% if activity.comment.comment is not empty %}
{{ activity.comment|chill_entity_render_box({
'disable_markdown': false,
'limit_lines': 3,
'metadata': false,
}) }}
{% endif %}
</div>
<div class="item-row details">
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {
'context': context,
'with_display': 'bloc',
'entity': activity,
'badge_person': true
} %}
</div>
{% endif %}
{%- if activity.reasons is empty -%}
{{ 'No reason associated'|trans }}
{%- else -%}
{% for r in activity.reasons %}{{ r|chill_entity_render_box }} {% endfor %}
{%- endif -%}
</td>
<td>{{ activity.type.name | localize_translatable_string }}</td>
<td>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person.id }) }}" class="sc-button bt-show "></a>
</li>
{% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
<li>
<a href="{{ path('chill_activity_activity_edit', { 'id': activity.id, 'person_id': person.id }) }}" class="sc-button bt-update "></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 } ) }}" class="sc-button bt-delete "></a>
</li>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endfor %}
</div>
{% endif %}
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activity_new', {'person_id': person.id}) }}" class="sc-button bt-create">
{{ 'Add a new activity' | trans }}
</a>
</li>
</ul>
{% endblock %}
</div>

View File

@@ -0,0 +1,31 @@
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %}
{% block title %}{{ 'Activity list' |trans }}{% endblock title %}
{% block content %}
{% set person_id = null %}
{% if person %}
{% set person_id = person.id %}
{% endif %}
{% set accompanying_course_id = null %}
{% if accompanyingCourse %}
{% set accompanying_course_id = accompanyingCourse.id %}
{% endif %}
<h1>{{ 'Activity list' |trans }}</h1>
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': '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">
{{ 'Add a new activity' | trans }}
</a>
</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,47 @@
{#
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %}
{% block title %}{{ 'Activity list' |trans }}{% endblock title %}
{% block personcontent %}
{% set person_id = null %}
{% if person %}
{% set person_id = person.id %}
{% endif %}
{% set accompanying_course_id = null %}
{% if accompanyingCourse %}
{% set accompanying_course_id = accompanyingCourse.id %}
{% endif %}
<h1>{{ 'Activity list' |trans }}</h1>
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'person'} %}
<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 disabled" tabindex="-1" role="button" aria-disabled="true">{{ 'Add a new activity' | trans }}
</a>
</li>
</ul>
{% endblock %}

View File

@@ -1,50 +1,102 @@
{#
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillPerson/layout.html.twig" %}
<h1>{{ "Activity creation"|trans ~ ' :' }}</h1>
<h2 class="chill-green mb-4">{{ entity.type.name|localize_translatable_string }}</h2>
{% set activeRouteKey = 'chill_activity_activity_new' %}
{{ form_start(form) }}
{{ form_errors(form) }}
{% block title 'Activity creation' |trans %}
{% block personcontent %}
<h2 class="chill-red">{{ "Activity creation"|trans }}</h1>
{%- if form.emergency is defined -%}
{{ form_row(form.emergency) }}
{% endif %}
{{ form_start(form) }}
{%- if form.sentReceived is defined -%}
{{ form_row(form.sentReceived) }}
{% endif %}
{%- if form.user is defined -%}
{{ form_row(form.user) }}
{% endif %}
{%- if form.scope is defined -%}
{{ form_row(form.scope) }}
{% endif %}
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2>
{%- if form.socialIssues is defined -%}
{{ form_row(form.socialIssues) }}
{% endif %}
{{ form_row(form.date) }}
{{ form_row(form.durationTime) }}
{{ form_row(form.type) }}
{{ form_row(form.attendee) }}
{%- if form.socialActions is defined -%}
{{ form_row(form.socialActions) }}
{% endif %}
<div id="social-issues-acc"></div>
{%- if form.reasons is defined -%}
{{ form_row(form.reasons) }}
{% endif %}
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
{%- if form.persons is defined -%}
{{ form_widget(form.persons) }}
{% endif %}
{%- if form.thirdParties is defined -%}
{{ form_widget(form.thirdParties) }}
{% endif %}
{%- if form.users is defined -%}
{{ form_widget(form.users) }}
{% endif %}
<div id="add-persons"></div>
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2>
{%- if form.date is defined -%}
{{ form_row(form.date) }}
{% endif %}
{# TODO .. location #}
{%- if form.durationTime is defined -%}
{{ form_row(form.durationTime) }}
{% endif %}
{%- if form.travelTime is defined -%}
{{ form_row(form.travelTime) }}
{% endif %}
{%- if form.comment is defined -%}
{# TODO .. public and private #}
{{ form_row(form.comment) }}
{% endif %}
<div class="grid-12 centered sticky-form-buttons">
<button class="sc-button green margin-10" type="submit"><i class="fa fa-save"></i> {{ 'Add a new activity'|trans }}</button>
</div>
{{ form_end(form) }}
{% endblock %}
{%- if form.documents is defined -%}
{{ form_row(form.documents) }}
{% endif %}
{% block js %}
<script type="text/javascript">
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]', '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
</script>
{% endblock %}
{%- if form.attendee is defined -%}
{{ form_row(form.attendee) }}
{% endif %}
{# TODO .. status #}
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a
class="btn btn-cancel"
{%- if context == 'person' -%}
href="{{ chill_return_path_or('chill_activity_activity_list', { 'person_id': person.id } )}}"
{%- else -%}
href="{{ chill_return_path_or('chill_activity_activity_list', { 'accompanying_period_id': accompanyingCourse.id } )}}"
{%- endif -%}
>
{{ 'Cancel'|trans|chill_return_path_label }}
</a>
</li>
<li>
<button class="btn btn-create" type="submit">
{{ 'Create'|trans }}
</button>
</li>
</ul>
{{ form_end(form) }}

View File

@@ -0,0 +1,33 @@
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_new' %}
{% block title 'Activity creation' |trans %}
{% block content %}
<div class="activity-new">
<div id="activity"></div> {# <=== vue component #}
{% include 'ChillActivityBundle:Activity:new.html.twig' with {'context': 'accompanyingCourse'} %}
</div>
{% endblock %}
{% block js %}
{{ parent() }}
{{ encore_entry_script_tags('mod_async_upload') }}
<script type="text/javascript">
window.addEventListener('DOMContentLoaded', function (e) {
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]',
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
});
window.activity = {{ activity_json|json_encode|raw }};
</script>
{{ encore_entry_script_tags('vue_activity') }}
{% endblock %}
{% block css %}
{{ parent() }}
{{ encore_entry_link_tags('mod_async_upload') }}
{{ encore_entry_link_tags('vue_activity') }}
{% endblock %}

View File

@@ -0,0 +1,31 @@
{% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_new' %}
{% block title 'Activity creation' |trans %}
{% block personcontent %}
<div class="activity-new">
<div id="activity"></div> {# <=== vue component #}
{% include 'ChillActivityBundle:Activity:new.html.twig' with {'context': 'person'} %}
</div>
{% endblock %}
{% block js %}
{{ encore_entry_link_tags('mod_async_upload') }}
<script type="text/javascript">
window.addEventListener('DOMContentLoaded', function (e) {
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]',
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
});
window.activity = {{ activity_json|json_encode|raw }};
</script>
{{ encore_entry_script_tags('vue_activity') }}
{% endblock %}
{% block css %}
{{ encore_entry_link_tags('mod_async_upload') }}
{{ encore_entry_link_tags('vue_activity') }}
{% endblock %}

View File

@@ -0,0 +1,35 @@
<div class="new-activity-select-type">
<h2 class="chill-red">{{ "Activity creation"|trans }}</h2>
{# TODO: refaire l'html css des tuilles #}
{% for row in data %}
<h3>{{ row.activityTypeCategory.name|localize_translatable_string }}</h3>
<div class="activity-row">
{% for activityType in row.activityTypes %}
{% set person_id = null %}
{% if person %}
{% set person_id = person.id %}
{% endif %}
{% set accompanying_course_id = null %}
{% if accompanyingCourse %}
{% set accompanying_course_id = accompanyingCourse.id %}
{% endif %}
<a href="{{ path('chill_activity_activity_new', {
'person_id': person_id,
'activityType_id': activityType.id,
'accompanying_period_id': accompanying_course_id,
'activityData': activityData
}) }}">
<div class="bloc btn btn-primary btn-lg btn-block">
{{ activityType.name|localize_translatable_string }}
</div>
</a>
{% endfor %}
</div>
{% endfor %}
</div>

View File

@@ -0,0 +1,9 @@
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_new' %}
{% block title 'Activity creation'|trans %}
{% block content %}
{% include 'ChillActivityBundle:Activity:selectType.html.twig' %}
{% endblock %}

View File

@@ -0,0 +1,9 @@
{% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_new' %}
{% block title 'Activity creation'|trans %}
{% block personcontent %}
{% include 'ChillActivityBundle:Activity:selectType.html.twig' %}
{% endblock %}

View File

@@ -1,68 +1,147 @@
{% extends "@ChillPerson/layout.html.twig" %}
{%- set t = entity.type -%}
{%- import "@ChillDocStore/Macro/macro.html.twig" as m -%}
{% set activeRouteKey = 'chill_activity_activity_list' %}
<h1>
{{ "Activity"|trans }}
{%- if t.emergencyVisible and entity.emergency -%}
<span class="badge bg-secondary">
{{- 'Emergency'|trans -}}
</span>
{%- endif -%}
</h1>
{% block title 'Activity'|trans %}
<dl class="chill_view_data">
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
<dt class="inline">{{ 'by'|trans|capitalize }}</dt>
<dd>{{ entity.user }}</dd>
{% block personcontent -%}
<h1 >{{ "Activity"|trans }}</h1>
<dt class="inline">{{ 'Type'|trans }}</dt>
<dd>{{ entity.type.name | localize_translatable_string }}</dd>
<dl class="chill_view_data">
<dt class="inline">{{ 'User'|trans }}</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 %}
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2>
<dt class="inline">{{ 'Person'|trans }}</dt>
<dd>{{ entity.person }}</dd>
<dt class="inline">{{ 'Date'|trans }}</dt>
<dd>{{ entity.date|format_date('long') }}</dd>
<dt class="inline">{{ 'Duration Time'|trans }}</dt>
<dd>{{ entity.durationTime|date('H:i') }}</dd>
<dt class="inline">{{ 'Type'|trans }}</dt>
<dd>{{ entity.type.name | localize_translatable_string }}</dd>
<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>
<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 -%}
<dt class="inline">{{ 'Comment'|trans }}</dt>
{%- if entity.comment is empty -%}
<dd><span class="chill-no-data-statement">{{ 'No comment associated'|trans }}</span></dd>
{%- else -%}
<dd>{{ entity.comment|chill_entity_render_box }}</dd>
{%- endif -%}
</dl>
<ul class="record_actions">
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ path('chill_activity_activity_list', { 'person_id': person.id } ) }}">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a class="sc-button bt-update" href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person.id }) }}">
{{ 'Edit the activity'|trans }}
</a>
</li>
{% if is_granted('CHILL_ACTIVITY_DELETE', entity) %}
<li>
<a href="{{ path('chill_activity_activity_delete', { 'id': entity.id, 'person_id' : person.id } ) }}" class="sc-button bt-delete">
{{ 'Delete'|trans }}
</a>
</li>
{% if t.socialIssuesVisible %}
<dt class="inline">{{ 'Social issues'|trans }}</dt>
<dd>
{% if entity.socialIssues|length == 0 %}
<p class="chill-no-data-statement">{{ 'Any social issues'|trans }}</p>
{% else %}
{% for si in entity.socialIssues %}{{ si|chill_entity_render_box }}{% endfor %}
{% endif %}
</ul>
</dd>
{% endif %}
{% endblock personcontent %}
{% if t.socialActionsVisible %}
<dt class="inline">{{ 'Social actions'|trans }}</dt>
<dd>
{% if entity.socialActions|length == 0 %}
<p class="chill-no-data-statement">{{ 'Any social actions'|trans }}</p>
{% 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 %}
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'bloc' } %}
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2>
<dt class="inline">{{ 'Date'|trans }}</dt>
<dd>{{ entity.date|format_date('long') }}</dd>
{% 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.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.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.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.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 %}
</dl>
{% set person_id = null %}
{% if person %}
{% set person_id = person.id %}
{% endif %}
{% set accompanying_course_id = null %}
{% if accompanyingCourse %}
{% set accompanying_course_id = accompanyingCourse.id %}
{% endif %}
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a class="btn btn-cancel" href="{{ path('chill_activity_activity_list', { 'person_id': person_id, 'accompanying_period_id': accompanying_course_id } ) }}">
{{ 'Back to the list'|trans }}
</a>
</li>
<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
{% 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>

View File

@@ -0,0 +1,15 @@
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %}
{% block title 'Show the activity'|trans %}
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
{% block content -%}
<div class="activity-show">
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'accompanyingCourse'} %}
</div>
{% endblock content %}

View File

@@ -0,0 +1,4 @@
{{ dump(notification) }}
<a href="{{ path('chill_activity_activity_show', {'id': notification.relatedEntityId }) }}">Go to Activity</a>

View File

@@ -0,0 +1,15 @@
{% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %}
{% block title 'Show the activity'|trans %}
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
{% block personcontent -%}
<div class="activity-show">
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'person'} %}
</div>
{% endblock personcontent %}

View File

@@ -0,0 +1,12 @@
{% extends "@ChillActivity/Admin/layout_activity.html.twig" %}
{% block title %}
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
{% endblock %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
{% block content_form_actions_view %}{% endblock %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% endblock %}

View File

@@ -0,0 +1,44 @@
{% extends "@ChillActivity/Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>{{ 'ActivityPresence list'|trans }}</h1>
<table class="records_list">
<thead>
<tr>
<th>{{ 'Name'|trans }}</th>
<th>{{ 'Active'|trans }}</th>
<th>{{ 'Actions'|trans }}</th>
</tr>
</thead>
<tbody>
{% for entity in entities %}
<tr>
<td>{{ entity.name|localize_translatable_string }}</td>
<td style="text-align:center;">
{%- if entity.active -%}
<i class="fa fa-check-square-o"></i>
{%- else -%}
<i class="fa fa-square-o"></i>
{%- endif -%}
</td>
<td>
<ul class="record_actions">
<li>
<a href="{{ path('chill_crud_activity_presence_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
</li>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<ul class="record_actions">
<li>
<a href="{{ path('chill_crud_activity_presence_new') }}" class="btn btn-create">
{{ 'Create a new activity presence'|trans }}
</a>
</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,11 @@
{% extends "@ChillActivity/Admin/layout_activity.html.twig" %}
{% block title %}
{% include('@ChillMain/CRUD/_new_title.html.twig') %}
{% endblock %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% endblock %}

View File

@@ -26,10 +26,10 @@
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activityreason') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
<a href="{{ path('chill_activity_activityreason') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li>
<li>
{{ form_row(edit_form.submit, { 'attr': { 'class' : 'sc-button orange' } } ) }}
{{ form_row(edit_form.submit, { 'attr': { 'class' : 'btn btn-chill-orange' } } ) }}
</li>
</ul>

View File

@@ -33,10 +33,10 @@
<td>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreason_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a>
<a href="{{ path('chill_activity_activityreason_show', { 'id': entity.id }) }}" class="btn btn-show" title="{{ 'show'|trans }}"></a>
</li>
<li>
<a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a>
<a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
</li>
</ul>
</td>
@@ -47,7 +47,7 @@
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreason_new') }}" class="sc-button bt-new">
<a href="{{ path('chill_activity_activityreason_new') }}" class="btn btn-new">
{{ 'Create a new activity reason'|trans }}
</a>
</li>

View File

@@ -26,10 +26,10 @@
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activityreason') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
<a href="{{ path('chill_activity_activityreason') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li>
<li>
{{ form_row(form.submit, { 'attr': { 'class' : 'sc-button bt-new' } } ) }}
{{ form_row(form.submit, { 'attr': { 'class' : 'btn btn-new' } } ) }}
</li>
</ul>

View File

@@ -40,12 +40,12 @@
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activityreason') }}" class="sc-button bt-cancel">
<a href="{{ path('chill_activity_activityreason') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">
<a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}" class="btn btn-edit">
{{ 'Edit'|trans }}
</a>
</li>

View File

@@ -25,12 +25,12 @@
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activityreasoncategory') }}" class="sc-button bt-cancel">
<a href="{{ path('chill_activity_activityreasoncategory') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
{{ form_row(edit_form.submit, { 'attr': { 'class': 'sc-button bt-edit' } } ) }}
{{ form_row(edit_form.submit, { 'attr': { 'class': 'btn btn-edit' } } ) }}
</li>
</ul>

View File

@@ -34,10 +34,10 @@
<td>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreasoncategory_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a>
<a href="{{ path('chill_activity_activityreasoncategory_show', { 'id': entity.id }) }}" class="btn btn-show" title="{{ 'show'|trans }}"></a>
</li>
<li>
<a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a>
<a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
</li>
</ul>
</td>
@@ -48,7 +48,7 @@
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreasoncategory_new') }}" class="sc-button bt-new">
<a href="{{ path('chill_activity_activityreasoncategory_new') }}" class="btn btn-new">
{{ 'Create a new activity category reason'|trans }}
</a>
</li>

View File

@@ -25,10 +25,10 @@
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activityreasoncategory') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
<a href="{{ path('chill_activity_activityreasoncategory') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li>
<li>
{{ form_widget(form.submit, { 'attr': { 'class' : 'sc-button bt-new' } } ) }}
{{ form_widget(form.submit, { 'attr': { 'class' : 'btn btn-new' } } ) }}
</li>
</ul>
{{ form_end(form) }}

View File

@@ -39,12 +39,12 @@
</table>
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activityreasoncategory') }}" class="sc-button bt-cancel">
<a href="{{ path('chill_activity_activityreasoncategory') }}" class="btn btn-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">
<a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}" class="btn btn-edit">
{{ 'Edit'|trans }}
</a>
</li>

View File

@@ -1,40 +1,12 @@
{#
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillActivity/Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>{{ 'ActivityType edit'|trans }}</h1>
{{ form_start(edit_form) }}
{{ form_row(edit_form.active) }}
{{ form_row(edit_form.name) }}
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activitytype') }}" class="sc-button bt-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
{{ form_widget(edit_form.submit, { 'attr' : { 'class' : 'sc-button bt-update' } } ) }}
</li>
</ul>
{{ form_end(edit_form) }}
{% block title %}
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
{% endblock %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
{% block content_form_actions_view %}{% endblock %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% endblock %}

View File

@@ -30,7 +30,7 @@
<tbody>
{% for entity in entities %}
<tr>
<td><a href="{{ path('chill_activity_activitytype_show', { 'id': entity.id }) }}">{{ entity.name|localize_translatable_string }}</a></td>
<td>{{ entity.name|localize_translatable_string }}</td>
<td style="text-align:center;">
{%- if entity.active -%}
<i class="fa fa-check-square-o"></i>
@@ -41,10 +41,7 @@
<td>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activitytype_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a>
</li>
<li>
<a href="{{ path('chill_activity_activitytype_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a>
<a href="{{ path('chill_crud_activity_type_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
</li>
</ul>
</td>
@@ -55,7 +52,7 @@
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activitytype_new') }}" class="sc-button bt-create">
<a href="{{ path('chill_crud_activity_type_new') }}" class="btn btn-create">
{{ 'Create a new activity type'|trans }}
</a>
</li>

View File

@@ -1,38 +1,11 @@
{#
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillActivity/Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>{{ 'ActivityType creation'|trans }}</h1>
{{ form_start(form) }}
{{ form_row(form.active) }}
{{ form_row(form.name) }}
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activitytype') }}" class="sc-button bt-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button bt-new' } } ) }}
</li>
</ul>
{{ form_end(form) }}
{% block title %}
{% include('@ChillMain/CRUD/_new_title.html.twig') %}
{% endblock %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% endblock %}

View File

@@ -1,42 +0,0 @@
{#
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillActivity/Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>{{ 'ActivityType'|trans }}</h1>
<table class="record_properties">
<tbody>
<tr>
<th>{{ 'Name'|trans }}</th>
<td>{{ entity.name|localize_translatable_string }}</td>
</tr>
</tbody>
</table>
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activitytype') }}" class="sc-button bt-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_activity_activitytype_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">
{{ 'Edit'|trans }}
</a>
</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,12 @@
{% extends "@ChillActivity/Admin/layout_activity.html.twig" %}
{% block title %}
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
{% endblock %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
{% block content_form_actions_view %}{% endblock %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% endblock %}

View File

@@ -0,0 +1,44 @@
{% extends "@ChillActivity/Admin/layout_activity.html.twig" %}
{% block admin_content %}
<h1>{{ 'ActivityTypeCategory list'|trans }}</h1>
<table class="records_list">
<thead>
<tr>
<th>{{ 'Name'|trans }}</th>
<th>{{ 'Active'|trans }}</th>
<th>{{ 'Actions'|trans }}</th>
</tr>
</thead>
<tbody>
{% for entity in entities %}
<tr>
<td>{{ entity.name|localize_translatable_string }}</td>
<td style="text-align:center;">
{%- if entity.active -%}
<i class="fa fa-check-square-o"></i>
{%- else -%}
<i class="fa fa-square-o"></i>
{%- endif -%}
</td>
<td>
<ul class="record_actions">
<li>
<a href="{{ path('chill_crud_activity_type_category_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
</li>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<ul class="record_actions">
<li>
<a href="{{ path('chill_crud_activity_type_category_new') }}" class="btn btn-create">
{{ 'Create a new activity type category'|trans }}
</a>
</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,11 @@
{% extends "@ChillActivity/Admin/layout_activity.html.twig" %}
{% block title %}
{% include('@ChillMain/CRUD/_new_title.html.twig') %}
{% endblock %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% endblock %}

View File

@@ -29,13 +29,13 @@
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activity_show', { 'person_id': activity.person.id, 'id': activity.id} ) }}" class="sc-button bt-view">
<a href="{{ path('chill_activity_activity_show', { 'person_id': activity.person.id, 'id': activity.id} ) }}" class="btn btn-view">
{{ 'Show the activity'|trans }}
</a>
</li>
{% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
<li>
<a href="{{ path('chill_activity_activity_edit', { 'person_id': activity.person.id, 'id': activity.id} ) }}" class="sc-button bt-edit">
<a href="{{ path('chill_activity_activity_edit', { 'person_id': activity.person.id, 'id': activity.id} ) }}" class="btn btn-edit">
{{ 'Edit the activity'|trans }}
</a>
</li>

View File

@@ -19,6 +19,11 @@
namespace Chill\ActivityBundle\Security\Authorization;
use Chill\MainBundle\Security\Authorization\VoterHelperFactoryInterface;
use Chill\MainBundle\Security\Authorization\VoterHelperInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
use Chill\PersonBundle\Security\Authorization\PersonVoter;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Chill\MainBundle\Security\Authorization\AbstractChillVoter;
@@ -28,11 +33,10 @@ use Chill\MainBundle\Entity\User;
use Chill\ActivityBundle\Entity\Activity;
use Chill\PersonBundle\Entity\Person;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Security\Core\Security;
/**
*
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
* Voter for Activity class
*/
class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface
{
@@ -41,30 +45,37 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn
const SEE_DETAILS = 'CHILL_ACTIVITY_SEE_DETAILS';
const UPDATE = 'CHILL_ACTIVITY_UPDATE';
const DELETE = 'CHILL_ACTIVITY_DELETE';
const FULL = 'CHILL_ACTIVITY_FULL';
/**
*
* @var AuthorizationHelper
*/
protected $helper;
private const ALL = [
self::CREATE,
self::SEE,
self::UPDATE,
self::DELETE,
self::SEE_DETAILS,
self::FULL
];
public function __construct(AuthorizationHelper $helper)
{
$this->helper = $helper;
protected VoterHelperInterface $voterHelper;
protected Security $security;
public function __construct(
Security $security,
VoterHelperFactoryInterface $voterHelperFactory
) {
$this->security = $security;
$this->voterHelper = $voterHelperFactory->generate(self::class)
->addCheckFor(Person::class, [self::SEE, self::CREATE])
->addCheckFor(AccompanyingPeriod::class, [self::SEE, self::CREATE])
->addCheckFor(Activity::class, self::ALL)
->build();
}
protected function supports($attribute, $subject)
{
if ($subject instanceof Activity) {
return \in_array($attribute, $this->getAttributes());
} elseif ($subject instanceof Person) {
return $attribute === self::SEE
||
$attribute === self::CREATE;
} else {
return false;
}
return $this->voterHelper->supports($attribute, $subject);
}
protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
@@ -72,32 +83,34 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn
if (!$token->getUser() instanceof User) {
return false;
}
if ($subject instanceof Person) {
$centers = $this->helper->getReachableCenters($token->getUser(), new Role($attribute));
return \in_array($subject->getCenter(), $centers);
if ($subject instanceof Activity) {
if ($subject->getPerson() instanceof Person) {
// the context is person: we must have the right to see the person
if (!$this->security->isGranted(PersonVoter::SEE, $subject->getPerson())) {
return false;
}
} elseif ($subject->getAccompanyingPeriod() instanceof AccompanyingPeriod) {
if (!$this->security->isGranted(AccompanyingPeriodVoter::SEE, $subject->getAccompanyingPeriod())) {
return false;
}
} else {
throw new \RuntimeException("could not determine context of activity");
}
}
/* @var $subject Activity */
return $this->helper->userHasAccess($token->getUser(), $subject, $attribute);
}
private function getAttributes()
{
return [ self::CREATE, self::SEE, self::UPDATE, self::DELETE,
self::SEE_DETAILS ];
return $this->voterHelper->voteOnAttribute($attribute, $subject, $token);
}
public function getRoles()
{
return $this->getAttributes();
return self::ALL;
}
public function getRolesWithoutScope()
{
return array();
return [];
}

View File

@@ -35,35 +35,37 @@ class ActivityReasonRender extends AbstractChillEntityRender
* @var TranslatableStringHelper
*/
protected $translatableStringHelper;
public function __construct(TranslatableStringHelper $translatableStringHelper)
{
$this->translatableStringHelper = $translatableStringHelper;
}
public function renderBox($entity, array $options): string
{
return
$this->getDefaultOpeningBox('activity-reason').
'<span class="badge bg-chill-pink">'.
'<i class="fa fa-question-circle"></i>&nbsp;'.
'<span class="activity-reason__category">'.
'<span class="category">'.
$this->translatableStringHelper->localize(
$entity->getCategory()->getName()
).
'</span>'.
'<span class="activity-reason__separator">&nbsp;>&nbsp;</span>'.
'<span class="activity-reason__reason">'.
'<span class="separator">&nbsp;>&nbsp;</span>'.
'<span class="reason">'.
$this->translatableStringHelper->localize(
$entity->getName()
).
'</span>'.
'</span>'.
$this->getDefaultClosingBox()
;
}
/**
*
*
* @param ActivityReason $entity
* @param array $options
* @return string
@@ -71,12 +73,12 @@ class ActivityReasonRender extends AbstractChillEntityRender
public function renderString($entity, array $options): string
{
$category = '';
if (null !== $entity->getCategory()) {
$category = $this->translatableStringHelper->localize(
$entity->getCategory()->getName()). ' > ';
}
return $category .
$this->translatableStringHelper->localize(
$entity->getName()

View File

@@ -1,4 +1,11 @@
// this file loads all assets from the Chill person bundle
module.exports = function(encore, entries) {
entries.push(__dirname + '/Resources/public/index.js');
module.exports = function(encore, entries)
{
entries.push(__dirname + '/Resources/public/chill/index.js');
encore.addAliases({
ChillActivityAssets: __dirname + '/Resources/public'
});
encore.addEntry('vue_activity', __dirname + '/Resources/public/vuejs/Activity/index.js');
};

View File

@@ -10,10 +10,6 @@ chill_activity_activityreasoncategory:
resource: "@ChillActivityBundle/config/routes/activityreasoncategory.yaml"
prefix: /
chill_activity_activitytype:
resource: "@ChillActivityBundle/config/routes/activitytype.yaml"
prefix: /
chill_admin_activity_index:
path: /{_locale}/admin/activity
controller: Chill\ActivityBundle\Controller\AdminController::indexActivityAction
@@ -32,3 +28,30 @@ chill_admin_activity_redirect_to_admin_index:
admin_activity:
order: 0
label: Main admin menu
chill_activity_type_admin:
path: /{_locale}/admin/activity/type
controller: cscrud_activity_type_controller:index
options:
menus:
admin_activity:
order: 2020
label: 'Activity Types'
chill_activity_type_category_admin:
path: /{_locale}/admin/activity/type_category
controller: cscrud_activity_type_category_controller:index
options:
menus:
admin_activity:
order: 2999
label: 'Activity Types Categories'
chill_activity_presence_admin:
path: /{_locale}/admin/activity/presence
controller: cscrud_activity_presence_controller:index
options:
menus:
admin_activity:
order: 2021
label: 'Activity Presences'

View File

@@ -1,30 +1,26 @@
chill_activity_activity_list:
path: /{_locale}/person/{person_id}/activity/
path: /{_locale}/activity/
controller: Chill\ActivityBundle\Controller\ActivityController::listAction
chill_activity_activity_show:
path: /{_locale}/person/{person_id}/activity/{id}/show
path: /{_locale}/activity/{id}/show
controller: Chill\ActivityBundle\Controller\ActivityController::showAction
chill_activity_activity_new:
path: /{_locale}/person/{person_id}/activity/new
controller: Chill\ActivityBundle\Controller\ActivityController::newAction
chill_activity_activity_select_type:
path: /{_locale}/activity/select-type
controller: Chill\ActivityBundle\Controller\ActivityController::selectTypeAction
chill_activity_activity_create:
path: /{_locale}/person/{person_id}/activity/create
controller: Chill\ActivityBundle\Controller\ActivityController::createAction
methods: POST
chill_activity_activity_new:
path: /{_locale}/activity/new
controller: Chill\ActivityBundle\Controller\ActivityController::newAction
methods: [POST, GET]
chill_activity_activity_edit:
path: /{_locale}/person/{person_id}/activity/{id}/edit
path: /{_locale}/activity/{id}/edit
controller: Chill\ActivityBundle\Controller\ActivityController::editAction
chill_activity_activity_update:
path: /{_locale}/person/{person_id}/activity/{id}/update
controller: Chill\ActivityBundle\Controller\ActivityController::updateAction
methods: [POST, PUT]
methods: [GET, POST, PUT]
chill_activity_activity_delete:
path: /{_locale}/person/{person_id}/activity/{id}/delete
path: /{_locale}/activity/{id}/delete
controller: Chill\ActivityBundle\Controller\ActivityController::deleteAction
methods: [GET, POST, DELETE]

View File

@@ -1,35 +0,0 @@
chill_activity_activitytype:
path: /{_locale}/admin/activitytype/
controller: Chill\ActivityBundle\Controller\ActivityTypeController::indexAction
options:
menus:
admin_activity:
order: 2020
label: "Activity Types"
chill_activity_activitytype_show:
path: /{_locale}/admin/activitytype/{id}/show
controller: Chill\ActivityBundle\Controller\ActivityTypeController::showAction
chill_activity_activitytype_new:
path: /{_locale}/admin/activitytype/new
controller: Chill\ActivityBundle\Controller\ActivityTypeController::newAction
chill_activity_activitytype_create:
path: /{_locale}/admin/activitytype/create
controller: Chill\ActivityBundle\Controller\ActivityTypeController::createAction
methods: POST
chill_activity_activitytype_edit:
path: /{_locale}/admin/activitytype/{id}/edit
controller: Chill\ActivityBundle\Controller\ActivityTypeController::editAction
chill_activity_activitytype_update:
path: /{_locale}/admin/activitytype/{id}/update
controller: Chill\ActivityBundle\Controller\ActivityTypeController::updateAction
methods: [POST, PUT]
chill_activity_activitytype_delete:
path: /{_locale}/admin/activitytype/{id}/delete
controller: Chill\ActivityBundle\Controller\ActivityTypeController::deleteAction
methods: [POST, DELETE]

View File

@@ -1,21 +1,5 @@
services:
chill.activity.security.authorization.activity_voter:
class: Chill\ActivityBundle\Security\Authorization\ActivityVoter
arguments:
- "@chill.main.security.authorization.helper"
tags:
- { name: security.voter }
- { name: chill.role }
chill.activity.security.authorization.activity_stats_voter:
class: Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter
arguments:
- "@chill.main.security.authorization.helper"
tags:
- { name: security.voter }
- { name: chill.role }
services:
chill.activity.timeline:
class: Chill\ActivityBundle\Timeline\TimelineActivityProvider
arguments:
@@ -33,3 +17,13 @@ services:
autoconfigure: true
resource: '../Menu/'
tags: ['chill.menu_builder']
Chill\ActivityBundle\Notification\:
autowire: true
autoconfigure: true
resource: '../Notification'
Chill\ActivityBundle\Security\Authorization\:
resource: '../Security/Authorization/'
autowire: true
autoconfigure: true

View File

@@ -0,0 +1,14 @@
services:
accompanying_period_social_issue_consistency_for_activity:
class: 'Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodSocialIssueConsistencyEntityListener'
tags:
-
name: 'doctrine.orm.entity_listener'
event: 'prePersist'
entity: 'Chill\ActivityBundle\Entity\Activity'
lazy: true
-
name: 'doctrine.orm.entity_listener'
event: 'preUpdate'
entity: 'Chill\ActivityBundle\Entity\Activity'
lazy: true

View File

@@ -1,7 +1,4 @@
services:
Chill\ActivityBundle\Controller\ActivityController:
arguments:
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
$logger: '@chill.main.logger'
autowire: true
tags: ['controller.service_arguments']

View File

@@ -6,7 +6,7 @@ services:
- "@request_stack"
tags:
- { name: form.type, alias: translatable_activity_reason_category }
chill.activity.form.type.translatableactivityreason:
class: Chill\ActivityBundle\Form\Type\TranslatableActivityReason
arguments:
@@ -14,7 +14,7 @@ services:
$reasonRender: '@Chill\ActivityBundle\Templating\Entity\ActivityReasonRender'
tags:
- { name: form.type, alias: translatable_activity_reason }
chill.activity.form.type.translatableactivitytype:
class: Chill\ActivityBundle\Form\Type\TranslatableActivityType
arguments:
@@ -22,7 +22,7 @@ services:
- "@chill_activity.repository.activity_type"
tags:
- { name: form.type, alias: translatable_activity_type }
chill.activity.form.type.activity:
class: Chill\ActivityBundle\Form\ActivityType
arguments:
@@ -31,5 +31,14 @@ services:
- "@doctrine.orm.entity_manager"
- "@chill.main.helper.translatable_string"
- "%chill_activity.form.time_duration%"
- '@Chill\PersonBundle\Templating\Entity\SocialIssueRender'
- '@Chill\PersonBundle\Templating\Entity\SocialActionRender'
tags:
- { name: form.type, alias: chill_activitybundle_activity }
chill.activity.form.type.activityTypeType:
class: Chill\ActivityBundle\Form\ActivityTypeType
arguments:
- "@chill.main.helper.translatable_string"
tags:
- { name: form.type, alias: translatable_activity_type }

View File

@@ -24,9 +24,7 @@ services:
- '@Doctrine\Persistence\ManagerRegistry'
Chill\ActivityBundle\Repository\ActivityACLAwareRepository:
arguments:
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
$repository: '@Chill\ActivityBundle\Repository\ActivityRepository'
$em: '@Doctrine\ORM\EntityManagerInterface'
autowire: true
autoconfigure: true
Chill\ActivityBundle\Repository\ActivityACLAwareRepositoryInterface: '@Chill\ActivityBundle\Repository\ActivityACLAwareRepository'

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