Compare commits

...

512 Commits

Author SHA1 Message Date
ad5eae039c fix syntax error 2022-02-18 15:01:33 +01:00
5ff47050ff replace deprecated TranslatorInterface by new one 2022-02-17 17:20:47 +01:00
aebb21935b fix page "my accompanying period" and do not show drafts periods in
homepage (+ ordering)
2022-02-16 19:57:35 +01:00
f2221565c5 update changelog [ci-skip] 2022-02-14 16:39:04 +01:00
9ead38ee22 Merge branch 'issue_vendee_456_document_field_not_required' into 'master'
doc generation: add age and obele in the mainPerson, person1 and person2 list...

See merge request Chill-Projet/chill-bundles!336
2022-02-14 13:43:52 +00:00
6402962990 customize the 'none' into something more user-frieldly 2022-02-14 14:36:37 +01:00
9e9fa5039f fix cs 2022-02-14 14:26:12 +01:00
e6d503a1e2 Merge remote-tracking branch 'origin/master' into issue_vendee_456_document_field_not_required 2022-02-14 14:25:10 +01:00
4920142540 changelog updated 2022-02-14 14:14:05 +01:00
61cf838458 if condition to check if a sender is assigned or if notification was assigned automatically by the system 2022-02-14 14:05:59 +01:00
e028c1ca2b thirdparty contact address blurred in view page if confidential 2022-02-14 11:44:12 +01:00
7dd6cd04ba Merge branch 'issue419_AddPersons_clear_ul' into 'master'
Issue419  remove ul-li in AddPersons

See merge request Chill-Projet/chill-bundles!328
2022-02-11 16:31:55 +00:00
1072f539dc Merge branch 'issue440_mesparcours_brouillon' into 'master'
Mes parcours brouillon

See merge request Chill-Projet/chill-bundles!330
2022-02-11 16:23:05 +00:00
9bcf4cce9f Merge branch 'master' into 'issue440_mesparcours_brouillon'
# Conflicts:
#   CHANGELOG.md
2022-02-11 16:22:51 +00:00
9223beac47 Merge branch 'issue416_chill_document_edit_button' into 'master'
Issue416 chill document edit button

See merge request Chill-Projet/chill-bundles!326
2022-02-11 16:21:15 +00:00
62c78e650f fix access denied when updating a work 2022-02-11 17:20:26 +01:00
e7d0c1cac6 fix cs 2022-02-11 17:14:14 +01:00
b859283766 fix error on creating an accompanying period work 2022-02-11 17:09:56 +01:00
e595500cb8 apply changes on person document 2022-02-11 17:01:36 +01:00
f34847f9f6 Merge remote-tracking branch 'origin/master' into issue416_chill_document_edit_button 2022-02-11 16:09:00 +01:00
0fa119c984 Merge branch 'issue_414_documents_list' into 'master'
created and updated traits added + template property added to Document entity

See merge request Chill-Projet/chill-bundles!316
2022-02-11 15:05:21 +00:00
270d00c1e8 fix phpstan and cs 2022-02-11 16:04:27 +01:00
983c5f3c6a fix probably missing variables in PersonDocumentType 2022-02-11 16:04:27 +01:00
c6141e473f fix test in twig template 2022-02-11 16:04:26 +01:00
c30cb5879d changelog updated 2022-02-11 16:04:24 +01:00
29e384ada5 scope placed within condition in edit form personDocument 2022-02-11 16:04:01 +01:00
c8e5ba4738 phpcsfixes 2022-02-11 16:04:01 +01:00
bf0b7f1bb2 Create AccompanyingCourseDocumentRepository and use to add pagination 2022-02-11 16:04:01 +01:00
d6cc69b919 Add pagination in the findBy() 2022-02-11 16:04:01 +01:00
ac33c6aad8 Add sticky buttons for create 2022-02-11 16:04:01 +01:00
89383a5ec4 deprecated service replaced and error removed from phpstan file 2022-02-11 16:04:00 +01:00
0fd26da299 comments in migration removed 2022-02-11 16:04:00 +01:00
6fa99655b2 delegates the acl for fetching person documents to an ACLAwareREpository 2022-02-11 16:04:00 +01:00
a387305ef8 remove scope in PersonDocumentType when disabled 2022-02-11 16:04:00 +01:00
e0c7daf3fd Pagination added 2022-02-11 16:04:00 +01:00
4304baeca5 scope put in condition in personDocument form - temporarily commented out 2022-02-11 16:04:00 +01:00
d2a567c79e condition added in show template for scope 2022-02-11 16:04:00 +01:00
3c04ced1a3 templates adjusted 2022-02-11 16:04:00 +01:00
a28d8a7287 only add scope field conditionally in personDocumentType analogue to SingleTaskType 2022-02-11 16:04:00 +01:00
1c055e842e created and updated traits added + template property added to Document entity 2022-02-11 16:04:00 +01:00
dea283d655 fix phpstan and cs 2022-02-11 16:03:22 +01:00
58c8373c81 Merge branch 'issue378_normalize_requestor' into 'master'
accompanying course: normalize the requestor entity

See merge request Chill-Projet/chill-bundles!329
2022-02-11 14:45:32 +00:00
a1ccfadac1 fix probably missing variables in PersonDocumentType 2022-02-11 15:42:40 +01:00
632b1262f9 Merge remote-tracking branch 'origin/master' into issue_414_documents_list 2022-02-11 15:34:31 +01:00
e157624479 Merge branch 'master' into 'issue378_normalize_requestor'
# Conflicts:
#   CHANGELOG.md
2022-02-11 14:31:53 +00:00
3a2370d536 fix missing cases for accompanying period draft list
fix when:

* if there isn't any information into course => better render box
* if there isn't any course into list => display warning
2022-02-11 15:26:17 +01:00
nobohan
eee38e9577 remove isDead from insert vue on the fly as dead sign (obele) is included in personRender->renderString 2022-02-11 15:18:54 +01:00
981c94906d Merge remote-tracking branch 'origin/master' into issue440_mesparcours_brouillon 2022-02-11 15:11:20 +01:00
adce90c151 Merge remote-tracking branch 'origin/master' into issue440_mesparcours_brouillon 2022-02-11 15:11:08 +01:00
83f8402081 Merge branch 'issue415_household_address' into 'master'
Display address of current household in history page

See merge request Chill-Projet/chill-bundles!334
2022-02-11 14:10:52 +00:00
22417ee9f9 fix tests for address render 2022-02-11 15:03:54 +01:00
3c5d269ece template fixes residential address 2022-02-11 14:58:11 +01:00
42579b5752 fix translation and how holder is shown 2022-02-11 14:49:59 +01:00
15023d348a Merge remote-tracking branch 'origin/master' into issue415_household_address 2022-02-11 14:39:27 +01:00
fbf777e134 fix cs 2022-02-11 14:35:10 +01:00
450277f32a fix test in twig template 2022-02-11 14:34:35 +01:00
nobohan
1f5d529d33 php code fix 2022-02-11 14:30:31 +01:00
93128cb61b if conditions joined 2022-02-11 14:28:42 +01:00
nobohan
c19099e76c upd CHANGELOG 2022-02-11 14:28:37 +01:00
d3d655293e Merge remote-tracking branch 'origin/master' into issue_414_documents_list 2022-02-11 14:24:36 +01:00
nobohan
692343aae4 doc generation: add age and obele in the mainPerson, person1 and person2 list + add obele in person renderString if addAge 2022-02-11 14:24:12 +01:00
0592601aa6 Merge branch 'household-editor/show-full-address' 2022-02-11 14:22:41 +01:00
a17f5948fb Merge remote-tracking branch 'origin/master' 2022-02-11 14:22:27 +01:00
nobohan
4dd9bc1123 doc generation: do not set required fields for mainPerson, person1, person2 2022-02-11 14:22:20 +01:00
6578f66fec update changelog 2022-02-11 14:22:10 +01:00
3f2a19a6f0 Merge remote-tracking branch 'origin/master' into household-editor/show-full-address 2022-02-11 14:21:06 +01:00
d5160ead4c Apply 1 suggestion(s) to 1 file(s) 2022-02-11 13:18:51 +00:00
a6e9cbdece Merge branch 'fix-tests-2022-02-11' into 'master'
fix ci

See merge request Chill-Projet/chill-bundles!335
2022-02-11 13:18:32 +00:00
657bf7075b fix ci 2022-02-11 13:18:32 +00:00
f1c3e8dc1b Merge remote-tracking branch 'origin/master' 2022-02-11 14:18:20 +01:00
a9624b36f7 create person and household option added to dropdown 2022-02-11 14:17:59 +01:00
db4aec9a18 Merge branch 'issue427_returnPath' into 'master'
on the fly component: add returnPath when viewing

See merge request Chill-Projet/chill-bundles!324
2022-02-11 13:16:51 +00:00
c34ce48a53 Merge branch 'master' into 'issue427_returnPath'
# Conflicts:
#   CHANGELOG.md
2022-02-11 13:16:40 +00:00
93345c09a1 fix cs 2022-02-11 13:45:21 +01:00
b5a1985fa1 test "find household by reference": add exception in data provider
The data provider cannot generate data if no address reference in
database. Throw an exception in this case.
2022-02-11 13:43:29 +01:00
9b4c350213 fix tests for accompanying period comments 2022-02-11 13:36:35 +01:00
199a441593 fix tests for EntityWorkflow 2022-02-11 13:24:29 +01:00
f42d106e3c Merge branch 'accent440' 2022-02-11 13:17:19 +01:00
13eddbfc5b changelog 2022-02-11 13:16:48 +01:00
7c30126fed Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2022-02-11 13:14:45 +01:00
e3c5f6f95f fix phpcs, psalm and phpstan 2022-02-11 13:07:38 +01:00
a86f1a05ac Merge branch 'accent440' 2022-02-11 13:04:35 +01:00
9ba0cb0c2a homepage_widget: fix translation for emergency badge 2022-02-11 12:56:15 +01:00
add8588767 changelog updated 2022-02-11 12:36:05 +01:00
a083a320ae display address of current household 2022-02-11 12:34:18 +01:00
64fa7f2e00 Merge branch 'issue433_email_addPerson' into 'master'
AddPerson: email and altNames corrections and validation

See merge request Chill-Projet/chill-bundles!327
2022-02-11 11:33:23 +00:00
c7a830ee28 Merge branch 'master' into 'issue433_email_addPerson'
# Conflicts:
#   CHANGELOG.md
2022-02-11 11:33:09 +00:00
9aa51406fa Merge branch 'accent419' 2022-02-11 12:26:27 +01:00
344981cf99 Merge branch 'master' into issue433_email_addPerson 2022-02-11 12:16:49 +01:00
28c4d6b92f vue pick entity: fix i18n translations in create thirdparty modal 2022-02-11 12:16:01 +01:00
ef2ab5faf6 vue pick entity: improve picked condition when value is empty string 2022-02-11 12:12:12 +01:00
54dbf711f9 fix cs 2022-02-11 12:10:44 +01:00
60951231c4 Merge branch 'issue415_household_address' of gitlab.com:Chill-Projet/chill-bundles into issue415_household_address 2022-02-11 11:57:49 +01:00
ece30b63c3 in process... need to be sure which address to display exactly 2022-02-11 11:45:23 +01:00
94503505f7 changelog updated 2022-02-11 11:40:56 +01:00
48589f3368 scope placed within condition in edit form personDocument 2022-02-11 11:33:07 +01:00
1e04c178dc phpcsfixes 2022-02-11 11:28:32 +01:00
37ed703abe Create AccompanyingCourseDocumentRepository and use to add pagination 2022-02-11 11:26:21 +01:00
7ed20d2fc5 Add pagination in the findBy() 2022-02-11 11:25:53 +01:00
5fe2a8e737 Add sticky buttons for create 2022-02-11 11:25:27 +01:00
nobohan
861abe708b upd CHANGELOG 2022-02-11 10:55:37 +01:00
nobohan
f43e216e13 fix normalisation of AccompanyingCourse requestor api 2022-02-11 10:53:05 +01:00
5210e7985f deprecated service replaced and error removed from phpstan file 2022-02-11 10:46:46 +01:00
ddabdff206 comments in migration removed 2022-02-11 10:45:30 +01:00
5a692db30f Fix review remarks 2022-02-10 17:51:45 +01:00
659983fef1 delegates the acl for fetching person documents to an ACLAwareREpository 2022-02-10 00:37:24 +01:00
aca5a3c731 remove scope in PersonDocumentType when disabled 2022-02-10 00:12:55 +01:00
406cfc86cd add order in localisation entity list (api) 2022-02-09 23:44:38 +01:00
90da067fbd address: show full address in address text and adapt Vue 2022-02-09 22:21:48 +01:00
e7a6742964 OpenWopiLink, option title is maintened (replace button by options) 2022-02-09 18:04:56 +01:00
3ffeaf419a mimetype document mapping (temporary) 2022-02-09 17:39:43 +01:00
ce2f64acd0 wopi edit extension: button call collabora not in a modal, but in a page (twig way) 2022-02-09 17:10:12 +01:00
08f544f6ea add btn-wopilink button ; fix OpenWopiLink when options is null 2022-02-09 16:29:57 +01:00
4e862cc585 Changelog updated 2022-02-09 16:20:59 +01:00
05d2c3b2e8 Minor style adjustment within template
The content of the div aligned center
2022-02-09 16:19:42 +01:00
513207e510 PHP csfixes 2022-02-09 16:08:27 +01:00
dee6ed6707 Listing of mes parcours changed to only display confirmed or closed
draft parcours are displayed in mes parcours brouillon
2022-02-09 16:02:21 +01:00
d60095987c Changelog updated 2022-02-09 15:59:19 +01:00
b4f9be0d92 openingDate only displayed on parcours that are not in draft state 2022-02-09 15:59:10 +01:00
a2a0f6af44 mes parcours brouillon added to usermenu 2022-02-09 15:58:54 +01:00
7fa0353d8c Pagination added 2022-02-09 15:10:04 +01:00
9256c71715 scope put in condition in personDocument form - temporarily commented out 2022-02-09 14:38:20 +01:00
5520f3df50 condition added in show template for scope 2022-02-09 14:37:48 +01:00
a6c0d8b219 templates adjusted 2022-02-09 14:37:06 +01:00
f6e667700e move twig function in runtime 2022-02-09 13:19:58 +01:00
f94ef0798a Merge branch 'issue_414_documents_list' of gitlab.com:Chill-Projet/chill-bundles into issue_414_documents_list 2022-02-09 10:15:18 +01:00
7bd7476200 only add scope field conditionally in personDocumentType analogue to SingleTaskType 2022-02-09 10:15:09 +01:00
a2752765af created and updated traits added + template property added to Document entity 2022-02-09 09:54:21 +01:00
1e81256404 fix cs 2022-02-08 19:37:59 +01:00
6b571e87b4 fix typos 2022-02-08 19:37:11 +01:00
4314823a70 change order for accompanying period work list 2022-02-08 19:36:45 +01:00
dc08ced6c9 fix notification subject 2022-02-07 21:49:34 +01:00
9d660311f0 improve translation on working about houshold members 2022-02-07 20:54:06 +01:00
b3e65f0733 fix validation when comment content is empty 2022-02-07 20:53:44 +01:00
03007370bc fix "impossible to confirm a course"
In some case, the "confirm" button for the form AccompanyingCourse was
disable, due to wrong condition.

This commit also fixes the filtering for users, and allow to remove a
user associated with an accompanyingCourse.
2022-02-07 17:44:03 +01:00
f9b514c869 fix assertion of type.
https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/266
2022-02-07 11:22:35 +01:00
nobohan
91ba08dfa1 accompanying course: normalize the requestor entity 2022-02-04 10:34:32 +01:00
nobohan
06142797c3 AddPersons: add missing css class + upd CHANGELOG 2022-02-03 16:25:59 +01:00
nobohan
4185b660cc AddPersons: remove ul-li html tags from AddPersons 2022-02-03 16:17:05 +01:00
ad46776164 hide save and close button in modal header 2022-02-03 15:58:57 +01:00
2343a4a334 add links between document in workflow and course 2022-02-03 13:49:52 +01:00
3f83c323be fix creating workflow from document in accompanying course 2022-02-03 13:16:13 +01:00
9a9ed64298 fix on test after creating an activity without generating a document 2022-02-03 12:54:44 +01:00
nobohan
a0cadb46db upd CHANGELOG 2022-02-03 11:32:11 +01:00
nobohan
f139af8b6f accompanying course work: fix on-the-fly update of thirdParty 2022-02-03 11:26:31 +01:00
nobohan
1f0ef6e187 on-the-fly: close modal only after validation 2022-02-03 11:07:32 +01:00
nobohan
4afea55465 addperson: repair altname: add altname if known 2022-02-03 09:17:45 +01:00
nobohan
3d5723facb AddPerson: correct thirdparty PATCH url + add email and altnames in AddPerson and serializer 2022-02-03 08:59:56 +01:00
211ecf1c3e add cache to workflow counter 2022-02-02 23:19:59 +01:00
796b4ff76b Merge branch 'master' into issue431_worklow_notifications 2022-02-02 22:40:37 +01:00
9553e18d83 do not uppercase/lowercase ref in activity list 2022-02-02 22:17:24 +01:00
02d9a713de set requestor before acdtions 2022-02-02 22:16:15 +01:00
6cc4fa582e fix validation error with startDate 2022-02-02 22:15:53 +01:00
b8d43f36eb document: add macro mapping forkawesome icon from mime type 2022-02-02 19:39:17 +01:00
06b3d63133 pass options in twig extension filter 2022-02-02 18:28:59 +01:00
232e71f46c uniformize ui with sticky-form-button 2022-02-02 18:25:44 +01:00
0b5a0e65a8 ckeck document mime (TO BE CHECKED) 2022-02-02 16:53:13 +01:00
ef42227e6c data-doc-title is a not required props 2022-02-02 15:13:48 +01:00
2af3de4f61 chill_document_edit_button: create new twig extension 2022-02-02 14:57:25 +01:00
8bafa37fe1 dump removed 2022-02-02 10:32:46 +01:00
nobohan
a83b0326d7 upd CHANGELOG 2022-02-02 07:04:14 +01:00
53e03395f2 renaming date de fermeture en date de cloture in accompanying course 2022-02-01 22:36:51 +01:00
5fef4048a4 use renderbox in activity list recent 2022-02-01 22:36:26 +01:00
d8929a6222 Merge branch 'master' into homepage/rewrite 2022-02-01 21:26:27 +01:00
33af7f36a0 remove dump 2022-02-01 21:23:50 +01:00
3f2454cead disable multiselect search in City and Street search 2022-02-01 21:23:15 +01:00
0ac9f2df8c fix loading of file template 2022-02-01 21:20:11 +01:00
333224a9d5 update changelog 2022-02-01 19:19:50 +01:00
496e5f0259 homepage: fix counter appareance on MyCustoms vue tab 2022-02-01 19:13:25 +01:00
f2a62822a4 Merge remote-tracking branch 'origin/master' 2022-02-01 18:43:39 +01:00
7879a99197 Merge branch 'master' into issue425_errorMessage_closeParcours 2022-02-01 18:42:59 +01:00
72d8cc297f Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2022-02-01 18:41:07 +01:00
1a0674a20b using badges instead of eye for person resource list 2022-02-01 18:40:57 +01:00
572aa2c14e Merge remote-tracking branch 'origin/master' into issue426_household_composition 2022-02-01 18:29:02 +01:00
bc4b2c4e86 Merge branch 'master' into issue428_person_resource_ameliorations 2022-02-01 18:08:48 +01:00
a227e88e79 Merge branch 'master' into small_issues_421_424 2022-02-01 18:05:33 +01:00
d9e9f472fb Merge remote-tracking branch 'origin/small_issues_421_424' into small_issues_421_424 2022-02-01 18:02:25 +01:00
fcff4bf863 fix phpcs 2022-02-01 18:01:34 +01:00
79b82e09e1 add document from activity 2022-02-01 17:58:20 +01:00
nobohan
a78f29cffc on the fly component: add returnPath when viewing 2022-02-01 17:44:55 +01:00
e98b1b049b add context to MyEvaluations (action and course containers) 2022-02-01 17:28:30 +01:00
99efa51794 csfixes 2022-02-01 17:23:45 +01:00
76932e6e8c bugfix in notificationhandler. Not sure about the fix in the template 2022-02-01 17:23:12 +01:00
97d2e3d5b5 counter created for workflows for which user is a destuser and that are not finalized 2022-02-01 17:22:45 +01:00
a2063ab13b Merge branch 'master' into homepage/rewrite 2022-02-01 16:54:49 +01:00
2bb718f3ea fix popover header on vue ListWorkflow breadcrumb 2022-02-01 15:51:42 +01:00
c6373a075d refactor pickTemplate and adapt existing usage 2022-02-01 15:49:23 +01:00
46337ef25d in process... need to be sure which address to display exactly 2022-02-01 15:09:42 +01:00
2f5fecf414 notifications: fix comments counter 2022-02-01 14:56:50 +01:00
5d2cb8c712 homepage: add social action in evaluation serialisation 2022-02-01 14:14:55 +01:00
460502a1f2 mask unready comments counter 2022-02-01 14:13:08 +01:00
cdd7a16d18 homepage_widget counters pluralization 2022-02-01 14:10:19 +01:00
ec29758547 detect span.counter and allow to put styles on the number 2022-02-01 14:09:29 +01:00
c5cbdd97ff csfixes 2022-02-01 13:52:42 +01:00
05fc5a1829 changelog updated 2022-02-01 13:52:13 +01:00
c3de3c6c39 validation adjusted to greaterThanOrEqual and different message passed 2022-02-01 13:51:21 +01:00
1530e9d13a changelog updated 2022-02-01 12:37:09 +01:00
a986b4ae98 csfixes 2022-02-01 12:33:09 +01:00
0854b7fc6a delete action created in controller and template 2022-02-01 12:32:34 +01:00
730199cca4 Merge branch 'foldlist_in_entity' into homepage/rewrite 2022-02-01 12:23:19 +01:00
de1dddbb85 validation: no more workflow without dest 2022-02-01 12:19:51 +01:00
a612d7dd9f improve workflow decision form 2022-02-01 12:19:51 +01:00
50e722e637 fix workflow redirection in accompanying period work edit 2022-02-01 12:19:51 +01:00
e4d5e40a8b improve homepage_widget tables with datas 2022-02-01 12:07:16 +01:00
479ec25d99 Merge branch 'issue428_person_resource_ameliorations' of gitlab.com:Chill-Projet/chill-bundles into issue428_person_resource_ameliorations 2022-02-01 10:18:21 +01:00
930b6ff77e minor style changes 2022-02-01 10:17:08 +01:00
7d8bd089a2 double edit button removed 2022-02-01 10:09:48 +01:00
Pol Dellaiera
ebdcc5a07d fix: Update namespace to prevent having issues with PSR4 autoloading. 2022-02-01 09:11:14 +01:00
Pol Dellaiera
0f31a49890 fix: Update namespace to prevent having issues with PSR4 autoloading. 2022-02-01 09:10:32 +01:00
2c566bb21c Merge branch 'master' into 'issue428_person_resource_ameliorations'
# Conflicts:
#   CHANGELOG.md
2022-01-31 17:50:08 +00:00
a0bc6c7604 csfixes 2022-01-31 18:47:06 +01:00
a4457664d4 bugfix addPersons 2022-01-31 18:33:29 +01:00
b42ae76bdf Merge branch 'small_issues_421_424' of gitlab.com:Chill-Projet/chill-bundles into small_issues_421_424 2022-01-31 17:46:18 +01:00
2eb1ebd263 changelog updated with bugfix 2022-01-31 17:45:22 +01:00
b79885cd21 bugfix creation of person or thirdparty through onTheFly 2022-01-31 17:45:04 +01:00
69dd920fd6 php csfixes 2022-01-31 17:45:04 +01:00
0689ca366d changelog updated 2022-01-31 17:44:04 +01:00
af1c268784 commentfield for marital status is always visible 2022-01-31 17:43:50 +01:00
1162c436c1 demandeur not displayed in search list if anonymous 2022-01-31 17:43:50 +01:00
170ce2d51c minor fix and renaming 2022-01-31 16:55:19 +01:00
571a8a0edc Merge branch 'foldlist_in_entity' of gitlab.com:Chill-Projet/chill-bundles into foldlist_in_entity 2022-01-31 15:55:52 +01:00
bdbb83ab85 wip count comments 2022-01-31 15:53:57 +01:00
971789d5cf Merge remote-tracking branch 'origin/master' into foldlist_in_entity 2022-01-31 15:51:21 +01:00
72815e4b70 Merge branch 'homepage/rewrite' 2022-01-31 15:40:40 +01:00
44183957b8 Merge remote-tracking branch 'origin/master' into homepage/rewrite 2022-01-31 15:36:53 +01:00
434d672d8a Merge branch 'master' into small_issues_421_424 2022-01-31 14:49:38 +01:00
5f6cffa08a fix regression in serach results appareance in addpersons 2022-01-31 14:49:23 +01:00
e21ff588ae csfixes 2022-01-31 14:42:54 +01:00
0383571a9e changelog updated 2022-01-31 14:42:17 +01:00
f358e78734 onthefly button added to view person or thirdparty + badge changed if thirdparty is a contact 2022-01-31 14:39:40 +01:00
43ef31b93f Merge remote-tracking branch 'origin/master' into small_issues_421_424 2022-01-31 14:28:30 +01:00
222dae3c32 Merge remote-tracking branch 'origin/master' into issue420_closeModalAddPerson 2022-01-31 14:24:45 +01:00
08c13b8c98 Merge remote-tracking branch 'origin/master' into issue412_413_activity 2022-01-31 14:22:34 +01:00
1bc2500b28 update changelog [ci-skip] 2022-01-31 14:18:10 +01:00
f648a9351b workflow: fix some stuffs 2022-01-31 14:17:10 +01:00
ffe466a334 fix icon for searching 2022-01-31 14:16:33 +01:00
nobohan
3978e7c959 upd CHANGELOG 2022-01-31 13:48:21 +01:00
nobohan
2eb5c45a4d accompanying course: fetch scopes only for app (not for banner) 2022-01-31 13:46:43 +01:00
15393d9da9 changelog updated with bugfix 2022-01-31 13:45:41 +01:00
695d22adba bugfix creation of person or thirdparty through onTheFly 2022-01-31 13:39:52 +01:00
nobohan
fefe208260 accompanying course: fetch users and suggested referrers only for app, not for banner 2022-01-31 13:32:34 +01:00
bc1a63354c php csfixes 2022-01-31 13:11:25 +01:00
c14101714c update changelog 2022-01-31 13:09:13 +01:00
faebb0fe30 changelog updated 2022-01-31 13:08:55 +01:00
8ec5636c57 Merge remote-tracking branch 'origin/master' into household-editor/push-to-household 2022-01-31 13:07:26 +01:00
68d99050bc commentfield for marital status is always visible 2022-01-31 13:06:59 +01:00
fba7060a91 update changelog 2022-01-31 13:05:41 +01:00
6894fa7101 Merge branch 'issue389_add_age' into 'master'
add age/ person text component

See merge request Chill-Projet/chill-bundles!308
2022-01-31 12:04:48 +00:00
41fa1d9ca6 fix cs 2022-01-31 13:02:43 +01:00
f4bca2f410 add person text in accompanying period work 2022-01-31 13:00:48 +01:00
6198891202 add anchor to retrieve evaluations section in accompanyingCourseWorkEdit page 2022-01-31 12:47:31 +01:00
c806c06279 homepage_widget: basically build tables for evaluations, tasks and courses 2022-01-31 12:46:44 +01:00
e04c02055c add age in some place and re-organize some usage of the component 2022-01-31 12:45:50 +01:00
4fa1bb4341 demandeur not displayed in search list if anonymous 2022-01-31 12:45:02 +01:00
ac5675933d Merge branch 'issue411_openingDate_parcours' into 'master'
Opening date of parcour

See merge request Chill-Projet/chill-bundles!313
2022-01-31 11:07:07 +00:00
e7db71b0f3 fast actions are custom overrided buttons 2022-01-31 12:03:42 +01:00
nobohan
1967fc4bed upd CHANGELOG 2022-01-31 12:01:52 +01:00
nobohan
befd5dac42 person: accompanying course: treat validation error when editing on-the-fly entities 2022-01-31 12:00:40 +01:00
186b8847d9 Merge remote-tracking branch 'origin/issue389_add_age' into issue389_add_age 2022-01-31 11:46:07 +01:00
90d0cbc3b1 Merge remote-tracking branch 'origin/master' into issue389_add_age 2022-01-31 11:44:55 +01:00
ac3d39b151 Merge branch 'master' into 'issue389_add_age'
# Conflicts:
#   CHANGELOG.md
2022-01-31 10:25:32 +00:00
efb5bd64b4 notification-list: todo add a comment counter 2022-01-31 11:25:23 +01:00
76a7b019eb Merge branch 'master' into 'issue411_openingDate_parcours'
# Conflicts:
#   CHANGELOG.md
2022-01-31 10:19:54 +00:00
739540af64 created and updated traits added + template property added to Document entity 2022-01-31 11:13:22 +01:00
230d73498e workflow list: mask title 2022-01-31 11:02:01 +01:00
nobohan
a68a43adc0 upd CHANGELOG 2022-01-31 10:55:11 +01:00
nobohan
5a75e38f33 accompanying course: close modal when edit participation 2022-01-31 10:48:04 +01:00
1c02eb23fd fix user search 2022-01-31 10:41:08 +01:00
1ba5df1280 hop 2022-01-31 09:45:37 +01:00
73c4a5d39d better color coherency with buttons 2022-01-30 19:45:09 +01:00
0a58c43952 fix date format on popover 2022-01-30 19:43:17 +01:00
a3b823d33f improve workflow button 2022-01-30 16:43:09 +01:00
de45555c5a add popover html content 2022-01-30 16:35:47 +01:00
0add020e57 workflows in entity: other vue component call workflow modal 2022-01-30 13:53:51 +01:00
84a76d2c76 ListWorkflow: styles for list (like in twig) 2022-01-30 13:36:37 +01:00
d88207132b workflows in entity: twig call once vue component that list in modal with add button, or just display add button if none 2022-01-30 11:26:04 +01:00
932d0e86d9 Merge branch 'foldlist_in_entity' of gitlab.com:Chill-Projet/chill-bundles into foldlist_in_entity 2022-01-29 12:37:48 +01:00
671f1223b5 Merge branch 'issue_mes_parcours' into 'master'
Mes parcours

See merge request Chill-Projet/chill-bundles!307
2022-01-29 02:09:04 +00:00
1a04d903fc fixes for page 'mes parcours' 2022-01-29 03:08:34 +01:00
125dd4d980 Merge remote-tracking branch 'origin/master' into issue_mes_parcours 2022-01-29 02:58:32 +01:00
2ddab027ed Merge remote-tracking branch 'origin/master' into issue410_restyle_parcourslist_personSearch 2022-01-29 02:57:05 +01:00
1724400d7c button requestor on the right 2022-01-29 02:56:06 +01:00
d1a0934bb1 search household in household mmebers editor 2022-01-29 02:38:47 +01:00
bc90664480 api endpoint for search household 2022-01-29 01:14:30 +01:00
99dc7490cb missing translation 2022-01-29 00:33:09 +01:00
5ac485e06e example of workflow + finalize normalization 2022-01-29 00:20:35 +01:00
dc184762d6 workflow history 2022-01-29 00:20:35 +01:00
86e7b0f007 rewrite workflow and handle finalize differently 2022-01-29 00:20:35 +01:00
fdafe7c82b normalizer for entityworkflow 2022-01-29 00:20:35 +01:00
d285d84068 wip 2022-01-28 22:30:18 +01:00
da22532587 cancel comments in entity notifications 2022-01-28 22:27:30 +01:00
b83ad77fd8 homepage_widget: details + courses table 2022-01-28 18:22:33 +01:00
00ac6aa1b9 homepage_widget: init counters on load, arrange MyCustoms tab 2022-01-28 18:10:48 +01:00
318c001904 changelog updated 2022-01-28 18:07:20 +01:00
e2d406b97b php validation added 2022-01-28 18:06:13 +01:00
nobohan
efff496f7a hot fix: pick-entity: set input.value to null if multiple=false 2022-01-28 18:01:29 +01:00
fe4eaa92be fix bug display current openingDate in datepicker 2022-01-28 17:36:59 +01:00
cb17a7e8a5 Visual improvements of date input fields in social action create form 2022-01-28 17:06:09 +01:00
ad4153a07e New component for parcours startDate 2022-01-28 17:05:41 +01:00
e95093f144 Merge branch 'homepage/rewrite' of gitlab.com:Chill-Projet/chill-bundles into homepage/rewrite 2022-01-28 16:36:01 +01:00
59cdf07c7e add form in notification thread inside entities show 2022-01-28 16:23:41 +01:00
292c9380ad endpoint for recent accompanying period attributions 2022-01-28 15:39:37 +01:00
701ad17299 Merge branch 'homepage/rewrite' of gitlab.com:Chill-Projet/chill-bundles into homepage/rewrite 2022-01-28 15:24:05 +01:00
7f41f14959 resume page: move notify button in masonry bloc and notification list below in content 2022-01-28 15:21:44 +01:00
fcd5fba13e add history for user in accompanying period (+ counter) 2022-01-28 14:42:18 +01:00
2c57eab4d2 workflows list: rename tabs translations 2022-01-28 14:18:11 +01:00
2cd51eed2e Merge remote-tracking branch 'origin/master' into homepage/rewrite 2022-01-28 14:13:28 +01:00
72e306b583 change add notification button color 2022-01-28 12:46:58 +01:00
917dd49d07 workflows: add freeze mechanism on breadcrumbs, edit document button, and history 2022-01-28 12:41:44 +01:00
71ca912749 Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2022-01-28 12:25:06 +01:00
4620e32b82 changelog updated 2022-01-28 12:20:29 +01:00
0cda5d637d styling of parcours list in person search changed 2022-01-28 12:16:32 +01:00
646f39b9ed Merge conflicts fixed 2022-01-28 12:15:51 +01:00
nobohan
105fe16122 upd CHANGELOG 2022-01-28 11:40:30 +01:00
nobohan
4d1a553474 show activity attendee (présence) in the activity list 2022-01-28 11:40:08 +01:00
5bfdee0c28 corrections review 2022-01-28 11:09:14 +01:00
ae33392ad0 update changelog 2022-01-28 10:58:24 +01:00
0e0fe90277 Merge branch 'issue399_dynamicPicker_asideActivity' into 'master'
dynamic picker aside activity

See merge request Chill-Projet/chill-bundles!305
2022-01-28 09:55:27 +00:00
792eafce72 dynamic picker aside activity 2022-01-28 09:55:26 +00:00
616d01a6c9 Merge branch 'issue403_residential_address' into 'master'
residentialAddress

See merge request Chill-Projet/chill-bundles!302
2022-01-28 09:48:00 +00:00
juminet
21edc74ada residentialAddress 2022-01-28 09:48:00 +00:00
ab23290599 refund extension_list_notification template: change place and content 2022-01-28 10:22:48 +01:00
1a2e1eaf2a put notification comments in a separate include 2022-01-28 10:22:17 +01:00
feaee8a0b1 a few more implementations in twig templates 2022-01-28 10:07:34 +01:00
0a26e7f326 using serialized age instead of function + translation fix 2022-01-28 09:57:14 +01:00
ebf85d4e4d Merge branch 'homepage/rewrite' of gitlab.com:Chill-Projet/chill-bundles into homepage/rewrite 2022-01-28 09:56:52 +01:00
72cffd7a3d minor changes 2022-01-28 09:56:20 +01:00
65418b17ce Merge branch 'issues_362_filiations' into 'master'
filiations: small adjustments (colors, labels, ...)

See merge request Chill-Projet/chill-bundles!309
2022-01-28 08:49:59 +00:00
juminet
8432c215a3 filiations: small adjustments (colors, labels, ...) 2022-01-28 08:49:59 +00:00
nobohan
87e1f8f077 hot fix: initialize typed comment in CommentEmbeddable 2022-01-28 09:47:36 +01:00
nobohan
33f393203e activity admin: change validation rule for social action visible field 2022-01-27 19:43:08 +01:00
6aa1e136b4 fix bug when suggested person is thirdparty 2022-01-27 18:14:32 +01:00
10a9b6c909 using normalizer for age and added obele 2022-01-27 18:13:46 +01:00
ce912e4405 ajout compteurs 2022-01-27 17:28:59 +01:00
ab11d3e8b3 Merge branch 'issue400_sort_activity' into 'master'
activity: order activities by date and by id

See merge request Chill-Projet/chill-bundles!301
2022-01-27 16:12:08 +00:00
juminet
445fe0cee4 activity: order activities by date and by id 2022-01-27 16:12:07 +00:00
7c6c8de456 Merge branch 'issue394_address_confidential' into 'master'
confidential address

See merge request Chill-Projet/chill-bundles!299
2022-01-27 16:08:58 +00:00
0378df42b6 fix cs 2022-01-27 17:08:00 +01:00
ad8d40cb1c work on confidential / blur module 2022-01-27 16:52:46 +01:00
f4516f8369 Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2022-01-27 16:31:41 +01:00
5b25f82963 changelog updated 2022-01-27 16:24:35 +01:00
8720cc730e implementation of person-text 2022-01-27 16:19:19 +01:00
44d1535bfb style fixes 2022-01-27 16:18:54 +01:00
8d663cdee6 creation of vue component person-text 2022-01-27 16:18:35 +01:00
7c8b08c3a7 Merge branch 'master' into issue394_address_confidential 2022-01-27 15:39:10 +01:00
6df570d96c set referrer app 2022-01-27 15:22:15 +01:00
3ce650eea6 Merge branch 'issue389_add_age' of gitlab.com:Chill-Projet/chill-bundles into issue389_add_age 2022-01-27 13:03:02 +01:00
6ef7d9b47b adding age in renderbox and renderstring, implementation of renderbox option in household summary 2022-01-27 12:59:14 +01:00
af3847366b adding age in renderbox and renderstring, implementation of renderbox option in household summary 2022-01-27 12:33:50 +01:00
d70f8aa712 phpstan fixes 2022-01-27 11:50:26 +01:00
14463dcd38 changelog updated 2022-01-27 11:45:03 +01:00
b9c2d63a53 mes parcours page created 2022-01-27 11:42:14 +01:00
3fd4c6339a Merge conflicts resolved 2022-01-27 11:34:57 +01:00
4d76de5f9f fix normalization for person in docgen 2022-01-26 23:52:27 +01:00
0a92ad905b variables for docgen 2022-01-26 23:49:24 +01:00
7af7135971 use trait to implement TrackCreationInterface and TrackUpdateInterface 2022-01-26 21:51:13 +01:00
c70a4dc664 fix loading of evaluations 2022-01-26 21:46:07 +01:00
dc0fae7549 fixes person resources 2022-01-26 17:53:09 +01:00
b38924cc3d Revert "Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles"
This reverts commit 58c4e37116.
2022-01-26 16:38:58 +01:00
58c4e37116 Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles 2022-01-26 16:04:09 +01:00
3656825d20 bug fix in form and controller 2022-01-26 15:56:10 +01:00
39a7cecd24 homepage_widget: improve notifications rows 2022-01-26 15:44:17 +01:00
6d382f93e8 use pickDynamicUserType 2022-01-26 15:08:47 +01:00
6e554e74ab Merge branch 'issue382_person_resource' 2022-01-26 14:43:50 +01:00
4c125865cf fix of twig if condition for person resources 2022-01-26 14:21:39 +01:00
12c68a4c9f Merge branch 'issue406_truncate_comment' into 'master'
Truncate comment

See merge request Chill-Projet/chill-bundles!304
2022-01-26 13:06:04 +00:00
66ac5c7435 Merge remote-tracking branch 'origin/master' into issue406_truncate_comment 2022-01-26 14:03:49 +01:00
e4b46a188c Merge branch 'master' into issue406_truncate_comment 2022-01-26 14:01:42 +01:00
7a78e8a6a7 fixes for pesonnes ressources 2022-01-26 14:00:45 +01:00
4496836cb2 Merge branch 'issue382_person_resource' into 'master'
Creation of PersonResource

See merge request Chill-Projet/chill-bundles!291
2022-01-26 12:52:15 +00:00
88d1fe24b4 Creation of PersonResource 2022-01-26 12:52:15 +00:00
0ea1708fe9 Merge branch 'master' into issue382_person_resource 2022-01-26 13:50:58 +01:00
a9b7cf93e9 adaptation for list for regulation 2022-01-26 13:50:19 +01:00
5d36e56641 changelog updated 2022-01-26 12:57:14 +01:00
f00dfad98e csfixes 2022-01-26 12:56:02 +01:00
7943c22ae7 comments truncated and link added to comment page 2022-01-26 12:55:48 +01:00
d365fcea39 merge conflict in changelog resolved 2022-01-26 12:13:37 +01:00
9f9f9d7881 csfixes 2022-01-26 12:10:51 +01:00
20f814766c merge fixes 2022-01-26 12:10:18 +01:00
ed00a882af cs-fixes 2022-01-26 12:08:18 +01:00
5d7501d36e violation added if all three association entities are null 2022-01-26 12:08:18 +01:00
ab5f9923a6 CSfixer changes 2022-01-26 12:08:18 +01:00
1a5e8b9d7b Fix user/thirdparty/freetext field in edit form 2022-01-26 12:08:18 +01:00
f7f2bb0caa reorganize templates to fix edit form 2022-01-26 12:08:18 +01:00
bf7fcfa41a bugfixes in display of dynamicPicker 2022-01-26 12:08:18 +01:00
9056ea8449 styling changes collapse form 2022-01-26 12:08:18 +01:00
f0e349a2b0 show-hide files combined into one js file 2022-01-26 12:08:18 +01:00
2ccc6f1976 fix backend error of data transformer 2022-01-26 12:08:18 +01:00
cf041cf49e merge dynamic types 2022-01-26 12:08:18 +01:00
72d593e416 improve migration 2022-01-26 12:08:18 +01:00
287dca07aa php cs-fixes 2022-01-26 12:08:18 +01:00
910f9a7e8e update changelog 2022-01-26 12:08:18 +01:00
9457483a6b different dynamic entity picker types created 2022-01-26 12:08:18 +01:00
6d07168529 type variable added and file renamed in transformer 2022-01-26 12:08:18 +01:00
420f81ea24 fix phpstan error 2022-01-26 12:08:18 +01:00
416b62fc60 show hide functional 2022-01-26 12:08:18 +01:00
ecae7dab44 add placeholders for inputs 2022-01-26 12:07:39 +01:00
126bd1a4eb fix for comment embeddable null + template adjustments 2022-01-26 12:07:39 +01:00
450792e446 fix embeddableComment field, but still cannot be null and date+user_id are not set...? 2022-01-26 12:07:39 +01:00
ec155b1d67 bug fixed in entity 2022-01-26 12:07:39 +01:00
02b2af7d51 attempt to make show hide work 2022-01-26 12:07:39 +01:00
0a6a2c968c all views created for person resource 2022-01-26 12:07:39 +01:00
4b188e2df6 adjustments to form + rendering of resource kinds 2022-01-26 12:07:39 +01:00
d6bf1988f6 migration adjusted 2022-01-26 12:07:39 +01:00
94c9505c05 js files put in place + select menus added for selecting person/thirdparty/... show-hide not working yet 2022-01-26 12:07:39 +01:00
4a5a1440ff form created + general layout of templates 2022-01-26 12:06:44 +01:00
b31cc460fa route and menu entry added in person menu + start of templates/controller 2022-01-26 12:06:44 +01:00
48c3432191 changelog entry added 2022-01-26 12:06:44 +01:00
7b4405f6fe entities + migration created 2022-01-26 12:04:16 +01:00
ce3a74326d cs-fixes 2022-01-26 12:01:14 +01:00
51ab013bd7 violation added if all three association entities are null 2022-01-26 11:20:47 +01:00
41a6366efe vue homepage_widget: improve translations, titles, tabs order, add no data statement 2022-01-26 10:13:58 +01:00
c3c2fd30f0 better title proportions 2022-01-25 21:42:04 +01:00
1952e4aa5a render table results for works tab 2022-01-25 21:39:20 +01:00
1e1311b7c8 add counter pills in tabs 2022-01-25 21:09:11 +01:00
fc1ed8b71e display table with notifications datas, prepare others tabs to render datas 2022-01-25 20:08:39 +01:00
2144b247b3 store all makeFetch, with isLoaded check 2022-01-25 18:36:54 +01:00
e4629ed599 store first makeFetch, with loading spinner 2022-01-25 17:40:08 +01:00
f27dca6fb5 CSfixer changes 2022-01-25 16:41:44 +01:00
8c27ec0720 Fix user/thirdparty/freetext field in edit form 2022-01-25 16:38:37 +01:00
8392e2e6bd reorganize templates to fix edit form 2022-01-25 16:09:11 +01:00
963b0b1ed2 bugfixes in display of dynamicPicker 2022-01-25 16:08:40 +01:00
Pol Dellaiera
7513187a6d Revert "fix cs"
This reverts commit 7b3e9cb490.
2022-01-25 15:54:20 +01:00
Pol Dellaiera
990fc0e484 Remove obsolete file. 2022-01-25 15:50:07 +01:00
8fce27a128 move styles in better place 2022-01-25 15:43:45 +01:00
55c2c41cea styling changes collapse form 2022-01-25 14:46:09 +01:00
0bd10b6dfa show-hide files combined into one js file 2022-01-25 14:45:38 +01:00
8cd01d4317 fix backend error of data transformer 2022-01-25 14:43:51 +01:00
71293e3378 Merge branch '397_homepage' into homepage/rewrite 2022-01-25 14:41:53 +01:00
cb58afa44a Merge branch 'master' into homepage/rewrite 2022-01-25 14:40:38 +01:00
7b3e9cb490 fix cs 2022-01-25 14:40:28 +01:00
fb720a382f sticky buttons smaller 2022-01-25 14:32:57 +01:00
a4bfa1cb16 Merge remote-tracking branch 'origin/master' into homepage/rewrite 2022-01-25 14:28:29 +01:00
502f2aceed init sub-components and active tab mechanism 2022-01-25 13:02:24 +01:00
Pol Dellaiera
eb9cc0b63f Update minor things. 2022-01-25 12:19:14 +01:00
Pol Dellaiera
7ee554b48d Update minor things. 2022-01-25 11:56:30 +01:00
Pol Dellaiera
2e6d281bfc cs: Autofix coding standard based on updated rules. 2022-01-25 11:46:29 +01:00
Pol Dellaiera
4b1bf7ce23 Remove obsolete file. 2022-01-25 11:33:14 +01:00
Pol Dellaiera
2d574fea2e chore: Remove duplicate entries from composer.json and normalize it. 2022-01-25 11:29:59 +01:00
0e2772336f create new app vue homepage_widget, with store 2022-01-25 11:27:31 +01:00
320d11671a prepare homepage_widget template 2022-01-25 10:54:08 +01:00
6ef5390a26 update change log with release 2022-01-24 20:00:14 +01:00
dec26e2ba4 merge dynamic types 2022-01-24 19:42:06 +01:00
514d75fa5f improve migration 2022-01-24 19:26:16 +01:00
0ac51da31a Merge remote-tracking branch 'origin/issue386_dynamic_type_picker' into issue382_person_resource 2022-01-24 19:23:24 +01:00
90d43b0bd3 Merge remote-tracking branch 'origin/master' into issue382_person_resource 2022-01-24 19:21:06 +01:00
5fe0790912 fix error when creating evaluation 2022-01-24 19:17:04 +01:00
ff66aa5590 fix debug message 2022-01-24 15:14:45 +01:00
8e2d3616b5 Merge remote-tracking branch 'origin/master' into issue383_referent_in_acc_course 2022-01-24 15:04:55 +01:00
c046824ea3 Merge branch 'issue385_comments_accourse' into 'master'
Bug fix pinned comments parcours

See merge request Chill-Projet/chill-bundles!297
2022-01-24 13:55:50 +00:00
a9b216b16b Merge remote-tracking branch 'origin/master' into issue385_comments_accourse 2022-01-24 14:54:00 +01:00
f866eae581 Merge branch 'issue347_document_gen_activity' into 'master'
activity: doc gen

See merge request Chill-Projet/chill-bundles!295
2022-01-24 13:51:14 +00:00
juminet
21d4e49fce activity: doc gen 2022-01-24 13:51:14 +00:00
17b887160a Merge branch '105_worflow' into 'master'
105 worflow

See merge request Chill-Projet/chill-bundles!275
2022-01-24 13:17:46 +00:00
c7dbaae8d6 105 worflow 2022-01-24 13:17:46 +00:00
nobohan
25ee11e4ff upd CHANGELOG 2022-01-24 13:48:47 +01:00
nobohan
df661fc7c4 address: render blur address if confidential in address render box (twig) 2022-01-24 12:13:34 +01:00
nobohan
6b78c06dfb address: use address.confidential in AddressRenderBox.vue 2022-01-24 12:04:23 +01:00
daff4e4200 Merge branch 'household/composition-add' into 'master'
Household/composition add + fixes household composition editor

See merge request Chill-Projet/chill-bundles!290
2022-01-24 10:59:00 +00:00
53b3f98bba Household/composition add + fixes household composition editor 2022-01-24 10:59:00 +00:00
2b47868d88 Merge branch 'notification/improve' into 'master'
Improve notifications

See merge request Chill-Projet/chill-bundles!294
2022-01-24 10:09:57 +00:00
54c2b92962 Improve notifications 2022-01-24 10:09:57 +00:00
nobohan
d087f051f0 address: remove maxlenght constraint in vuejs form for corridor, flat, steps, floor 2022-01-24 11:08:25 +01:00
nobohan
b3edba3abe address: add confidential in vuejs edit form 2022-01-24 11:04:17 +01:00
nobohan
02d8ceba25 address: add confidential in normalizer + code style fix 2022-01-24 10:42:05 +01:00
nobohan
741043c177 address: alter some address field to TEXT + add confidential field 2022-01-24 10:05:47 +01:00
c42f62de4c fix phpstan errors: undefined variable or type invalid 2022-01-24 00:32:47 +01:00
e23ef35b75 list of unread notificaiton api endpoint 2022-01-24 00:24:20 +01:00
eccc75aecf fix cs 2022-01-23 23:22:04 +01:00
7e2fbf93f9 task: api endpoint for my tasks 2022-01-23 23:13:25 +01:00
6ab8f95f7d list of "my evaluation near end" 2022-01-23 22:40:17 +01:00
ad05b3bf05 fix variable name in work list page 2022-01-23 22:25:52 +01:00
1faa9812db fix variable name in work list page 2022-01-23 22:24:48 +01:00
a786578cbe fix cs 2022-01-23 21:52:27 +01:00
c08bd76e4b adding parameter until and since on 'work near end' 2022-01-23 21:52:16 +01:00
20a4950c60 accompanying period work list for my, near end date 2022-01-23 13:23:50 +01:00
cdbae1eade bugfix in parcours display if deathdate of associated person is not defined (ex. for thirdparty) 2022-01-21 17:00:04 +01:00
92788ccdc0 php cs-fixes 2022-01-21 15:58:55 +01:00
84993ca05b update changelog 2022-01-21 15:55:22 +01:00
972657b38e different dynamic entity picker types created 2022-01-21 15:53:52 +01:00
b26d0905a3 type variable added and file renamed in transformer 2022-01-21 15:01:12 +01:00
4ab0a28f7d fix phpstan error 2022-01-21 13:05:38 +01:00
52009bd7c6 show hide functional 2022-01-21 12:35:33 +01:00
7acd6c7fc3 add placeholders for inputs 2022-01-21 12:34:14 +01:00
f26cba415b fix for comment embeddable null + template adjustments 2022-01-21 12:08:41 +01:00
8a2e588190 fix embeddableComment field, but still cannot be null and date+user_id are not set...? 2022-01-20 17:14:14 +01:00
d63d9c2f4e bug fixed in entity 2022-01-20 17:13:28 +01:00
dcdee1d6e3 attempt to make show hide work 2022-01-20 17:12:18 +01:00
dd589af1be all views created for person resource 2022-01-20 17:11:51 +01:00
nobohan
ce594692b3 accompanying course: confirm DRAFT acc. period when suggestedReferrers is unique or null 2022-01-20 16:59:01 +01:00
nobohan
17076024f7 accompanying course: fix filtering of suggested referrers 2022-01-20 14:27:36 +01:00
nobohan
61607fee3d accompanying course: code fix 2022-01-20 14:14:30 +01:00
nobohan
25ebeebdfb accompanying course: display closed acc. period in list 2022-01-20 08:32:48 +01:00
nobohan
343b2a6f2f accompanying course: re-open: translations + fine-tuning 2022-01-20 08:21:09 +01:00
nobohan
d4efe81dbb person: can reopen an accompanying course 2022-01-19 21:46:40 +01:00
nobohan
9d6afc4bb2 accompanying course: close social issues selector on select 2022-01-19 21:04:35 +01:00
2bdf116698 adjustments to form + rendering of resource kinds 2022-01-19 19:46:01 +01:00
96dc711b4f migration adjusted 2022-01-19 19:38:57 +01:00
nobohan
d1918e4be0 accompanying course: filter referrer by job 2022-01-19 17:48:00 +01:00
nobohan
040c5f8847 accompanying course: change wording for scopes 2022-01-19 16:18:04 +01:00
nobohan
9b5990916f job in accompanying course: fix error in setting job property 2022-01-19 15:40:38 +01:00
nobohan
74e94637b9 job in accompanying course: validation 2022-01-19 15:40:38 +01:00
nobohan
216c035bac vuejs: add missing translations for multiselect 2022-01-19 15:40:38 +01:00
nobohan
16c86daafb accompanying course: add selector for accompanying course job 2022-01-19 15:40:38 +01:00
nobohan
175fa7bf2f php code fix 2022-01-19 15:40:38 +01:00
nobohan
9f7f6e33e8 user-job: make an endpoint for userJob + doc swagger 2022-01-19 15:40:38 +01:00
nobohan
3471bdec0d accompanyingPeriod: add job 2022-01-19 15:40:38 +01:00
001e2f9622 js files put in place + select menus added for selecting person/thirdparty/... show-hide not working yet 2022-01-19 09:48:39 +01:00
58ac4b01ef form created + general layout of templates 2022-01-18 14:54:03 +01:00
6e4bfd45c6 route and menu entry added in person menu + start of templates/controller 2022-01-18 13:55:09 +01:00
ff0b0678a5 changelog entry added 2022-01-18 11:11:29 +01:00
3b56cc818b entities + migration created 2022-01-18 11:08:24 +01:00
474 changed files with 16179 additions and 3767 deletions

64
.env
View File

@@ -1,64 +0,0 @@
##
## Manually dump .env files in .env.local.php with
## `$ composer symfony:dump-env prod`
##
## Project environment
APP_ENV=dev
## Enable debug
APP_DEBUG=true
## Locale
LOCALE=fr
## Framework secret
APP_SECRET=ThisTokenIsNotSoSecretChangeIt
## Symfony/swiftmailer
MAILER_TRANSPORT=smtp
MAILER_HOST=smtp
MAILER_PORT=1025
MAILER_CRYPT=
MAILER_AUTH=
MAILER_USER=
MAILER_PASSWORD=
MAILER_URL=${MAILER_TRANSPORT}://${MAILER_HOST}:${MAILER_PORT}?encryption=${MAILER_CRYPT}&auth_mode=${MAILER_AUTH}&username=${MAILER_USER}&password=${MAILER_PASSWORD}
## Notifications
NOTIFICATION_HOST=localhost:8001
NOTIFICATION_FROM_EMAIL=admin@chill.social
NOTIFICATION_FROM_NAME=Chill
## Gelf
GELF_HOST=gelf
GELF_PORT=12201
## OVH OpenStack Storage User/Role
OS_USERNAME=
OS_PASSWORD=
OS_TENANT_ID=
OS_REGION_NAME=GRA
OS_AUTH_URL=https://auth.cloud.ovh.net/v2.0/
## OVH OpenStack Storage Container
ASYNC_UPLOAD_TEMP_URL_KEY=
ASYNC_UPLOAD_TEMP_URL_BASE_PATH=
ASYNC_UPLOAD_TEMP_URL_CONTAINER=
## Redis Cache
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
## Twilio
TWILIO_SID=~
TWILIO_SECRET=~
## DOCKER IMAGES REGISTRY
#IMAGE_PHP=
#IMAGE_NGINX=
## DOCKER IMAGES VERSION
#VERSION=test
VERSION=prod

View File

@@ -11,17 +11,114 @@ and this project adheres to
## Unreleased
<!-- write down unreleased development here -->
* [person] name suggestions within create person form when person is created departing from a search input (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/377)
## Test releases
### test release 2022-02-14
* AddPersons: remove ul-li html tags from AddPersons (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/419)
* [doc-generator] do not set required fields for mainPerson, person1, person2 (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement#456)
* [doc-generation] add age and obele in the mainPerson, person1 and person2 list + add obele in person renderString if addAge (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/370)
* [person] accompanying course work: fix on-the-fly update of thirdParty
* fix normalisation of accompanying course requestor api (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/378)
* [person] add a returnPath when clicking on some Person or ThirdParty badge (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/427)
* [person] accompanying course work: fix on-the-fly update of thirdParty
* [on-the-fly] close modal only after validation
* [person] correct thirdparty PATCH url + add email and altnames in AddPerson and serializer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/433)
* change order for accompanying course work list
* [parcours]: Mes parcours brouillon added to user menu (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/440)
* [Documents]: List view adapted to display more information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/414)
* [person]: style fix in parcours listing per person. (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/432)
* [household]: display address of current household (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/415)
* ajoute un ordre dans les localisation (api)
* [pick entity]: fix translations in modal (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/419)
* [homepage_widget]: fix translation on emergency badge (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/440)
* [person]: create person and household added to button dropdown (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/454)
* display full address in address.text in normalization. Adapt AddressRenderBox
* [address]: Correction residential address 'depuis le' (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/459)
* [Documents]: List view adapted to display more information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/414)
* [Thirdparty_contact]: address blurred if confidential in view page (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/450)
* [homepage_widget]: If no sender then display as 'notification automatique' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/435)
### test release 2021-02-01
* renommer "dossier numéro" en "parcours numéro" dans les résultats de recherche
* renomme date de début en date d'ouverture dans le formulaire parcours
* [homepage widget] improve content tables, improve counter pluralization with style on number
* [notification lists] add comments counter information
* [workflows] fix popover header with previous transition
* [parcours]: validation + message for closing parcours adjusted.
* [household]: household composition double edit button replaced by a delete action (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/426)
[fast_actions] improve fast-actions buttons override mechanism, fix https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/413
[homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc.
* [person]: Comment on marital status is possible even if marital status is not defined (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/421)
* [parcours]: In the list of person results the requestor is not displayed if defined as anonymous (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/424)
* [bugfix]: modal closes and newly created person/thirdparty is selected when multiple persons/thirdparties are created through the modal (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/429)
* [person_resource]: Onthefly button added to view person/thirdparty and badge differentiation for a contact-thirdparty (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/428)
* [workflow][notification] improve how notifications and workflows are 'attached' to entities: contextual list, counter, buttons and vue modal
* [AddAddress] disable multiselect search, and rely only on most pertinent Cities and Street computed backend
* [fast_actions] improve fast-actions buttons override mechanism, fix https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/413
* [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc.
### test release 2021-01-31
* [person] accompanying course: optimisation: do not fetch some resources for the banner (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/409)
* [person] accompanying course: close modal when edit participation (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/420)
* [person] accompanying course: treat validation error when editing on-the-fly entities (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/420)
* [activity] show activity attendee (présence) in the activity list (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/412)
* [activity] admin: change validation rule for social action visible field (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/413)
* [parcours]: component added to change the opening date of a parcours (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/411)
* [search]: listing of parcours display changed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/410)
* [user]: page with accompanying periods to which is user is referent (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/408)
* [person] age added to renderstring + renderbox/ vue component created to display person text (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/389)
* [household member editor] allow to push to existing household
### test release 2021-01-28
* [person] improve filiations vis graph: disable physics, use chill colors for persons-households-course, increase label of relations, remove labels on household arrows and other improvements (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/286, https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/362)
* [activity] Order activity by date and by id (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/364)
* [main] increase length of 4 Address fields (change to TEXT, no size limits) (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/277)
* [main] Add confidential option for address, in edit and view (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/165)
* [person] name suggestions within create person form when person is created departing from a search input (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/377)
* [person] Add residential address entity, form and list for each person
* [aside_activity]: dynamicUserPickerType used (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/399)
* dispatching list
### test release 2021-01-26
* [parcours] comments truncated if too long + link added (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/406)
* [person]: possibility to add person resources (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/382)
* [person ressources]: module added
### test release 2022-01-24
* [person] name suggestions within create person form when person is created departing from a search input (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/377)
* [notification: formulaire création] descend la box avec la description dans le bas du formulaire
* [notification for activity]: fix link to activity
* [notification] add "URGENT" before accompanying course with emergency = true
* [notification] add a "read more" button on system notification
* [notification] add `[Chill]` in the subject of each notification, automatically
* [notification] add a counter for notification in activity list and accompanying period list, and search results
* [parcours] bugfix if deathdate is not defined (eg. for a thirdparty) parcours is still displayed. Gave error before.
* [workflow] add breadcrumb to show steps
* [popover] add popover html popup mechanism (used by workflow breadcrumb)
* [templates] improve updatedBy macro in item metadatas
* [parcours]: bug fix when comment is pinned all other comments remain in the collection (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/385)
* [workflow]
* add My workflow section with my opened subscriptions
* apply workflow on documents, accompanyingCourseWork and Evaluations
* [wopi-link] a new vue component allow to open wopi link in a fullscreen chill-themed modal
### test release 2022-01-19
* vuejs: add dead information on all on-the-fly person render boxes, in vis graph and other templates (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/271)
* [thirdparty] fix bug in 3rd party view: types was replaced by thirdPartyTypes
* [main] location form type: fix unmapped address field (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/246)
* [activity] fix wrong import of js assets for adding and viewing documents in activity (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/83 & https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/176)
* [person]: space added between deathdate and age in twig renderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/380)
* [parcours]: bug fix when comment is pinned all other comments remain in the collection (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/385)
* [forms] dynamic picker types for user/person/thirdparty types created (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/386)
### test release 2022-01-17
@@ -31,10 +128,14 @@ and this project adheres to
* [main] Add mainLocation field to User entity and add it in user form type
* [course list in person context] show full username/label for ref
* [accompanying period work] remove the possibility to generate document from an accompanying period work
* vuejs: add validation on required fields for AddPerson, Address and Location components
* vuejs: treat 422 validation errors in locations and AddPerson components
* [person]: space added between deathdate and age in twig renderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/380)
## Test releases
* vuejs: add validation on required fields for AddPerson, Address and Location components
* vuejs: treat 422 validation errors in locations and AddPerson components
* [person]: space added between deathdate and age in twig renderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/380)
### test release 2022-01-12

View File

@@ -52,9 +52,6 @@
"twig/string-extra": "^3.3",
"twig/twig": "^3.0"
},
"conflict": {
"symfony/symfony": "*"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3",
"drupol/php-conventions": "^5",
@@ -71,23 +68,17 @@
"symfony/var-dumper": "^4.4",
"symfony/web-profiler-bundle": "^4.4"
},
"config": {
"bin-dir": "bin",
"optimize-autoloader": true,
"sort-packages": true,
"vendor-dir": "tests/app/vendor",
"allow-plugins": {
"composer/package-versions-deprecated": true,
"phpstan/extension-installer": true,
"ergebnis/composer-normalize": true,
"phpro/grumphp": true
}
"conflict": {
"symfony/symfony": "*"
},
"autoload": {
"psr-4": {
"Chill\\ActivityBundle\\": "src/Bundle/ChillActivityBundle",
"Chill\\AsideActivityBundle\\": "src/Bundle/ChillAsideActivityBundle/src",
"Chill\\BudgetBundle\\": "src/Bundle/ChillBudgetBundle",
"Chill\\CalendarBundle\\": "src/Bundle/ChillCalendarBundle",
"Chill\\CustomFieldsBundle\\": "src/Bundle/ChillCustomFieldsBundle",
"Chill\\DocGeneratorBundle\\": "src/Bundle/ChillDocGeneratorBundle",
"Chill\\DocStoreBundle\\": "src/Bundle/ChillDocStoreBundle",
"Chill\\EventBundle\\": "src/Bundle/ChillEventBundle",
"Chill\\FamilyMemberBundle\\": "src/Bundle/ChillFamilyMemberBundle",
@@ -96,9 +87,6 @@
"Chill\\ReportBundle\\": "src/Bundle/ChillReportBundle",
"Chill\\TaskBundle\\": "src/Bundle/ChillTaskBundle",
"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"
}
},
@@ -111,10 +99,10 @@
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"phpstan/extension-installer": true,
"ergebnis/composer-normalize": true,
"ocramius/package-versions": true,
"phpro/grumphp": true,
"ocramius/package-versions": true
"phpstan/extension-installer": true
},
"bin-dir": "bin",
"optimize-autoloader": true,
@@ -123,8 +111,8 @@
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
"assets:install %PUBLIC_DIR%": "symfony-cmd",
"cache:clear": "symfony-cmd"
}
}
}

View File

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

View File

@@ -80,11 +80,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php
-
message: "#^Foreach overwrites \\$action with its value variable\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php
-
message: "#^Foreach overwrites \\$action with its value variable\\.$#"
count: 1

View File

@@ -30,36 +30,6 @@ parameters:
count: 2
path: src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php
-
message: "#^Parameter \\$action of method Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkRepository\\:\\:buildQueryBySocialActionWithDescendants\\(\\) has invalid type Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriod\\\\SocialAction\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php
-
message: "#^Parameter \\$action of method Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkRepository\\:\\:countBySocialActionWithDescendants\\(\\) has invalid type Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriod\\\\SocialAction\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php
-
message: "#^Undefined variable\\: \\$action$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php
-
message: "#^Undefined variable\\: \\$limit$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php
-
message: "#^Undefined variable\\: \\$offset$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php
-
message: "#^Undefined variable\\: \\$orderBy$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php
-
message: "#^Variable variables are not allowed\\.$#"
count: 4

View File

@@ -105,15 +105,6 @@ parameters:
count: 1
path: src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\ListActivity\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php
-
message:
"""
@@ -141,15 +132,6 @@ parameters:
count: 1
path: src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\ActivityDateFilter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php
-
message:
"""
@@ -195,15 +177,6 @@ parameters:
count: 1
path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\PersonHavingActivityBetweenDateFilter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php
-
message:
"""
@@ -213,15 +186,6 @@ parameters:
count: 1
path: src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\ActivityBundle\\\\Menu\\\\PersonMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php
-
message:
"""
@@ -258,15 +222,6 @@ parameters:
count: 1
path: src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\AsideActivityBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillAsideActivityBundle/src/Menu/UserMenuBuilder.php
-
message:
"""
@@ -276,15 +231,6 @@ parameters:
count: 1
path: src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\AMLI\\\\BudgetBundle\\\\Controller\\\\AbstractElementController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php
-
message:
"""
@@ -294,24 +240,6 @@ parameters:
count: 1
path: src/Bundle/ChillBudgetBundle/Controller/ElementController.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\AMLI\\\\BudgetBundle\\\\Controller\\\\ElementController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillBudgetBundle/Controller/ElementController.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\AMLI\\\\BudgetBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillBudgetBundle/Menu/UserMenuBuilder.php
-
message:
"""
@@ -321,15 +249,6 @@ parameters:
count: 1
path: src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\CalendarBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php
-
message:
"""
@@ -399,33 +318,6 @@ parameters:
count: 1
path: src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\CustomFieldsBundle\\\\Form\\\\CustomFieldsGroupType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php
-
message:
"""
#^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:
Use getReachableCircles$#
"""
count: 1
path: src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\DocStoreBundle\\\\Controller\\\\DocumentPersonController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
-
message:
"""
@@ -435,15 +327,6 @@ parameters:
count: 6
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\EventBundle\\\\Controller\\\\EventController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message:
"""
@@ -462,42 +345,6 @@ parameters:
count: 1
path: src/Bundle/ChillEventBundle/Form/Type/PickEventType.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\EventBundle\\\\Form\\\\Type\\\\PickEventType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillEventBundle/Form/Type/PickEventType.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\EventBundle\\\\Form\\\\Type\\\\PickRoleType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\EventBundle\\\\Form\\\\Type\\\\PickStatusType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\EventBundle\\\\Menu\\\\PersonMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillEventBundle/Menu/PersonMenuBuilder.php
-
message:
"""
@@ -507,24 +354,6 @@ parameters:
count: 1
path: src/Bundle/ChillEventBundle/Search/EventSearch.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\AMLI\\\\FamilyMembersBundle\\\\Controller\\\\FamilyMemberController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillFamilyMembersBundle/Controller/FamilyMemberController.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\AMLI\\\\FamilyMembersBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillFamilyMembersBundle/Menu/UserMenuBuilder.php
-
message:
"""
@@ -534,24 +363,6 @@ parameters:
count: 1
path: src/Bundle/ChillFamilyMembersBundle/Security/Voter/FamilyMemberVoter.php
-
message:
"""
#^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php
-
message:
"""
#^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
-
message:
"""
@@ -561,15 +372,6 @@ parameters:
count: 1
path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
-
message:
"""
#^Return type of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\CRUDController\\:\\:getTranslator\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
-
message:
"""
@@ -588,24 +390,6 @@ parameters:
count: 1
path: src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Controller\\\\ExportController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Controller\\\\PasswordController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/Controller/PasswordController.php
-
message:
"""
@@ -678,42 +462,6 @@ parameters:
count: 1
path: src/Bundle/ChillMainBundle/Export/ExportManager.php
-
message:
"""
#^Parameter \\$translatorInterface of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\CSVListFormatter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php
-
message:
"""
#^Parameter \\$translatorInterface of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\CSVPivotedListFormatter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php
-
message:
"""
#^Parameter \\$translatorInterface of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\SpreadSheetFormatter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php
-
message:
"""
#^Parameter \\$translatorInterface of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\SpreadsheetListFormatter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php
-
message:
"""
@@ -732,15 +480,6 @@ parameters:
count: 1
path: src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Form\\\\Type\\\\PostalCodeType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/Form/Type/PostalCodeType.php
-
message:
"""
@@ -764,38 +503,11 @@ parameters:
count: 1
path: src/Bundle/ChillMainBundle/Form/UserType.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Notification\\\\Mailer\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/Notification/Mailer.php
-
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
count: 2
path: src/Bundle/ChillMainBundle/Repository/NotificationRepository.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Routing\\\\MenuBuilder\\\\SectionMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Routing\\\\MenuComposer\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/Routing/MenuComposer.php
-
message:
"""
@@ -882,15 +594,6 @@ parameters:
count: 1
path: src/Bundle/ChillMainBundle/Templating/Events/DelegatedBlockRenderingEvent.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Validation\\\\Validator\\\\RoleScopeScopePresence\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php
-
message:
"""
@@ -927,15 +630,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php
-
message:
"""
#^Parameter \\$trans of method Chill\\\\PersonBundle\\\\Controller\\\\AccompanyingCourseWorkController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
-
message:
"""
@@ -945,33 +639,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Controller\\\\HouseholdController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Controller/HouseholdController.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Controller\\\\HouseholdMemberController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Controller\\\\PersonController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Controller/PersonController.php
-
message:
"""
@@ -981,15 +648,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Controller\\\\PersonDuplicateController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
-
message: "#^Access to deprecated property \\$proxyAccompanyingPeriodOpenState of class Chill\\\\PersonBundle\\\\Entity\\\\Person\\.$#"
count: 2
@@ -1004,15 +662,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Export/Aggregator/AgeAggregator.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\CountryOfBirthAggregator\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php
-
message:
"""
@@ -1022,15 +671,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\GenderAggregator\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Export/Aggregator/GenderAggregator.php
-
message:
"""
@@ -1040,15 +680,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Export/Aggregator/GenderAggregator.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\NationalityAggregator\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Export/Aggregator/NationalityAggregator.php
-
message:
"""
@@ -1085,15 +716,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\ListPerson\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php
-
message:
"""
@@ -1121,15 +743,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\ListPersonDuplicate\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php
-
message:
"""
@@ -1175,15 +788,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Export/Filter/BirthdateFilter.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\GenderFilter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Export/Filter/GenderFilter.php
-
message:
"""
@@ -1225,24 +829,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Form\\\\Type\\\\PickPersonType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Menu\\\\SectionMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php
-
message:
"""
@@ -1306,15 +892,6 @@ parameters:
count: 1
path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\ReportBundle\\\\Export\\\\Export\\\\ReportList\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php
-
message:
"""
@@ -1324,15 +901,6 @@ parameters:
count: 1
path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\ReportBundle\\\\Export\\\\Export\\\\ReportListProvider\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillReportBundle/Export/Export/ReportListProvider.php
-
message:
"""
@@ -1414,15 +982,6 @@ parameters:
count: 1
path: src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\TaskBundle\\\\Controller\\\\TaskController\\:\\:applyTransitionAction\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillTaskBundle/Controller/TaskController.php
-
message:
"""
@@ -1468,33 +1027,6 @@ parameters:
count: 1
path: src/Bundle/ChillTaskBundle/Form/SingleTaskType.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\TaskBundle\\\\Menu\\\\MenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\TaskBundle\\\\Menu\\\\SectionMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillTaskBundle/Menu/SectionMenuBuilder.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\TaskBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php
-
message:
"""
@@ -1531,33 +1063,6 @@ parameters:
count: 3
path: src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\ThirdPartyBundle\\\\Controller\\\\ThirdPartyController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\ThirdPartyBundle\\\\Form\\\\Type\\\\PickThirdPartyType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyType.php
-
message:
"""
#^Parameter \\$translator of method Chill\\\\ThirdPartyBundle\\\\Menu\\\\MenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
"""
count: 1
path: src/Bundle/ChillThirdPartyBundle/Menu/MenuBuilder.php
-
message:
"""

View File

@@ -400,11 +400,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php
-
message: "#^Method Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkRepository\\:\\:buildQueryBySocialActionWithDescendants\\(\\) has invalid return type Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriod\\\\QueryBuilder\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 3

View File

@@ -31,15 +31,17 @@ use DateTime;
use Doctrine\ORM\EntityManagerInterface;
use InvalidArgumentException;
use Psr\Log\LoggerInterface;
use RuntimeException;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Component\Serializer\SerializerInterface;
use function array_key_exists;
final class ActivityController extends AbstractController
@@ -199,12 +201,36 @@ final class ActivityController extends AbstractController
'role' => new Role('CHILL_ACTIVITY_UPDATE'),
'activityType' => $entity->getActivityType(),
'accompanyingPeriod' => $accompanyingPeriod,
])->handleRequest($request);
]);
if ($form->has('documents')) {
$form->add('gendocTemplateId', HiddenType::class, [
'mapped' => false,
'data' => null,
'attr' => [
// required for js
'data-template-id' => 'data-template-id',
],
]);
}
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$this->entityManager->persist($entity);
$this->entityManager->flush();
if ($form->has('gendocTemplateId') && null !== $form['gendocTemplateId']->getData()) {
return $this->redirectToRoute(
'chill_docgenerator_generate_from_template',
[
'template' => $form->get('gendocTemplateId')->getData(),
'entityClassName' => Activity::class,
'entityId' => $entity->getId(),
]
);
}
$this->addFlash('success', $this->get('translator')->trans('Success : activity updated!'));
$params = $this->buildParamsToUrl($person, $accompanyingPeriod);
@@ -255,7 +281,7 @@ final class ActivityController extends AbstractController
if ($person instanceof Person) {
$this->denyAccessUnlessGranted(ActivityVoter::SEE, $person);
$activities = $this->activityACLAwareRepository
->findByPerson($person, ActivityVoter::SEE, 0, null);
->findByPerson($person, ActivityVoter::SEE, 0, null, ['date' => 'DESC', 'id' => 'DESC']);
$event = new PrivacyEvent($person, [
'element_class' => Activity::class,
@@ -268,7 +294,7 @@ final class ActivityController extends AbstractController
$this->denyAccessUnlessGranted(ActivityVoter::SEE, $accompanyingPeriod);
$activities = $this->activityACLAwareRepository
->findByAccompanyingPeriod($accompanyingPeriod, ActivityVoter::SEE);
->findByAccompanyingPeriod($accompanyingPeriod, ActivityVoter::SEE, 0, null, ['date' => 'DESC', 'id' => 'DESC']);
$view = 'ChillActivityBundle:Activity:listAccompanyingCourse.html.twig';
}
@@ -392,12 +418,36 @@ final class ActivityController extends AbstractController
'role' => new Role('CHILL_ACTIVITY_CREATE'),
'activityType' => $entity->getActivityType(),
'accompanyingPeriod' => $accompanyingPeriod,
])->handleRequest($request);
]);
if ($form->has('documents')) {
$form->add('gendocTemplateId', HiddenType::class, [
'mapped' => false,
'data' => null,
'attr' => [
// required for js
'data-template-id' => 'data-template-id',
],
]);
}
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$this->entityManager->persist($entity);
$this->entityManager->flush();
if ($form->has('gendocTemplateId') && null !== $form['gendocTemplateId']->getData()) {
return $this->redirectToRoute(
'chill_docgenerator_generate_from_template',
[
'template' => $form->get('gendocTemplateId')->getData(),
'entityClassName' => Activity::class,
'entityId' => $entity->getId(),
]
);
}
$this->addFlash('success', $this->get('translator')->trans('Success : activity created!'));
$params = $this->buildParamsToUrl($person, $accompanyingPeriod);
@@ -471,20 +521,21 @@ final class ActivityController extends AbstractController
public function showAction(Request $request, int $id): Response
{
$view = null;
$entity = $this->activityRepository->find($id);
[$person, $accompanyingPeriod] = $this->getEntity($request);
if (null === $entity) {
throw $this->createNotFoundException('Unable to find Activity entity.');
}
$accompanyingPeriod = $entity->getAccompanyingPeriod();
$person = $entity->getPerson();
if ($accompanyingPeriod instanceof AccompanyingPeriod) {
$view = 'ChillActivityBundle:Activity:showAccompanyingCourse.html.twig';
} elseif ($person instanceof Person) {
$view = 'ChillActivityBundle:Activity:showPerson.html.twig';
}
$entity = $this->activityRepository->find($id);
if (null === $entity) {
throw $this->createNotFoundException('Unable to find Activity entity.');
} else {
throw new RuntimeException('the activity should be linked with a period or person');
}
if (null !== $accompanyingPeriod) {
@@ -493,8 +544,7 @@ final class ActivityController extends AbstractController
$entity->personsNotAssociated = $entity->getPersonsNotAssociated();
}
// TODO revoir le Voter de Activity pour tenir compte qu'une activité peut appartenir a une période
// $this->denyAccessUnlessGranted('CHILL_ACTIVITY_SEE', $entity);
$this->denyAccessUnlessGranted(ActivityVoter::SEE, $entity);
$deleteForm = $this->createDeleteForm($entity->getId(), $person, $accompanyingPeriod);

View File

@@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Chill\ActivityBundle\Entity;
use Chill\ActivityBundle\Validator\Constraints as ActivityValidator;
use Chill\DocStoreBundle\Entity\Document;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
use Chill\MainBundle\Entity\HasCenterInterface;
@@ -67,7 +67,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
/**
* @ORM\ManyToOne(targetEntity="Chill\ActivityBundle\Entity\ActivityType")
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
* @SerializedName("activityType")
* @ORM\JoinColumn(name="type_id")
*/
@@ -75,16 +75,19 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
/**
* @ORM\ManyToOne(targetEntity="Chill\ActivityBundle\Entity\ActivityPresence")
* @Groups({"docgen:read"})
*/
private ?ActivityPresence $attendee = null;
/**
* @ORM\Embedded(class="Chill\MainBundle\Entity\Embeddable\CommentEmbeddable", columnPrefix="comment_")
* @Groups({"docgen:read"})
*/
private CommentEmbeddable $comment;
/**
* @ORM\Column(type="datetime")
* @Groups({"docgen:read"})
*/
private DateTime $date;
@@ -100,6 +103,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
/**
* @ORM\Column(type="boolean", options={"default": false})
* @Groups({"docgen:read"})
*/
private bool $emergency = false;
@@ -107,13 +111,13 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
*/
private ?int $id = null;
/**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Location")
* @groups({"read"})
* @groups({"read", "docgen:read"})
*/
private ?Location $location = null;
@@ -124,42 +128,45 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
/**
* @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\Person")
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
*/
private ?Collection $persons = null;
/**
* @ORM\ManyToMany(targetEntity="Chill\ActivityBundle\Entity\ActivityReason")
* @Groups({"docgen:read"})
*/
private Collection $reasons;
/**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope")
* @Groups({"docgen:read"})
*/
private ?Scope $scope = null;
/**
* @ORM\Column(type="string", options={"default": ""})
* @Groups({"docgen:read"})
*/
private string $sentReceived = '';
/**
* @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\SocialWork\SocialAction")
* @ORM\JoinTable(name="chill_activity_activity_chill_person_socialaction")
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
*/
private Collection $socialActions;
/**
* @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\SocialWork\SocialIssue")
* @ORM\JoinTable(name="chill_activity_activity_chill_person_socialissue")
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
*/
private Collection $socialIssues;
/**
* @ORM\ManyToMany(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty")
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
*/
private ?Collection $thirdParties = null;
@@ -170,12 +177,13 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
/**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
* @Groups({"docgen:read"})
*/
private User $user;
/**
* @ORM\ManyToMany(targetEntity="Chill\MainBundle\Entity\User")
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
*/
private ?Collection $users = null;
@@ -191,7 +199,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
$this->socialActions = new ArrayCollection();
}
public function addDocument(Document $document): self
public function addDocument(StoredObject $document): self
{
$this->documents[] = $document;
@@ -302,6 +310,18 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
return $this->documents;
}
/**
* @Groups({"docgen:read"})
*/
public function getDurationMinute(): int
{
if (null === $this->durationTime) {
return 0;
}
return (int) round(($this->durationTime->getTimestamp() + $this->durationTime->getOffset()) / 60.0, 0);
}
public function getDurationTime(): ?DateTime
{
return $this->durationTime;
@@ -402,6 +422,18 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
return $this->travelTime;
}
/**
* @Groups({"docgen:read"})
*/
public function getTravelTimeMinute(): int
{
if (null === $this->travelTime) {
return 0;
}
return (int) round(($this->travelTime->getTimestamp() + $this->travelTime->getOffset()) / 60.0, 0);
}
/**
* @deprecated
*/
@@ -425,7 +457,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
return $this->getEmergency();
}
public function removeDocument(Document $document): void
public function removeDocument(StoredObject $document): void
{
$this->documents->removeElement($document);
}

View File

@@ -12,6 +12,7 @@ declare(strict_types=1);
namespace Chill\ActivityBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
/**
* Class ActivityPresence.
@@ -31,11 +32,14 @@ class ActivityPresence
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
* @Serializer\Groups({"docgen:read"})
*/
private ?int $id;
/**
* @ORM\Column(type="json")
* @Serializer\Groups({"docgen:read"})
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
*/
private array $name = [];

View File

@@ -13,8 +13,10 @@ namespace Chill\ActivityBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use InvalidArgumentException;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
/**
* Class ActivityType.
@@ -118,6 +120,7 @@ class ActivityType
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
* @Groups({"docgen:read"})
*/
private ?int $id;
@@ -133,7 +136,8 @@ class ActivityType
/**
* @ORM\Column(type="json")
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
*/
private array $name = [];
@@ -190,7 +194,6 @@ class ActivityType
/**
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
* @Assert\EqualTo(propertyPath="socialIssuesVisible", message="This parameter must be equal to social issue parameter")
*/
private int $socialActionsVisible = self::FIELD_INVISIBLE;
@@ -260,6 +263,23 @@ class ActivityType
*/
private int $userVisible = self::FIELD_REQUIRED;
/**
* @Assert\Callback
*
* @param mixed $payload
*/
public function checkSocialActionsVisibility(ExecutionContextInterface $context, $payload)
{
if ($this->socialIssuesVisible !== $this->socialActionsVisible) {
if (!(2 === $this->socialIssuesVisible && 1 === $this->socialActionsVisible)) {
$context
->buildViolation('The socialActionsVisible value is not compatible with the socialIssuesVisible value')
->atPath('socialActionsVisible')
->addViolation();
}
}
}
/**
* Get active
* return true if the type is active.

View File

@@ -24,9 +24,9 @@ use Doctrine\ORM\Query;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Constraints\Callback;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_key_exists;
use function count;

View File

@@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormError;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class ActivityDateFilter implements FilterInterface
{

View File

@@ -29,8 +29,8 @@ use Symfony\Component\Form\FormError;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function count;

View File

@@ -15,7 +15,7 @@ use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class PersonMenuBuilder implements LocalMenuBuilderInterface
{

View File

@@ -34,6 +34,8 @@ p.date-label {
font-size: 18pt;
}
div.dashboard,
h4.badge-title,
h3.badge-title,
h2.badge-title {
ul.list-content {
font-size: 70%;

View File

@@ -1,45 +1,52 @@
<template>
<teleport to="#add-persons" v-if="isComponentVisible">
<teleport to="#add-persons" v-if="isComponentVisible">
<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:blocWidth="getBlocWidth"
v-bind:setPersonsInBloc="setPersonsInBloc">
</persons-bloc>
</div>
<div v-if="getContext === 'accompanyingCourse' && suggestedEntities.length > 0">
<ul class="list-suggest add-items inline">
<li v-for="(p, i) in suggestedEntities" @click="addSuggestedEntity(p)" :key="`suggestedEntities-${i}`">
<span>{{ p.text }}</span>
</li>
</ul>
</div>
<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:blocWidth="getBlocWidth"
v-bind:setPersonsInBloc="setPersonsInBloc">
</persons-bloc>
</div>
<div v-if="getContext === 'accompanyingCourse' && suggestedEntities.length > 0">
<ul class="list-suggest add-items inline">
<li v-for="(p, i) in suggestedEntities" @click="addSuggestedEntity(p)" :key="`suggestedEntities-${i}`">
<person-text v-if="p.type === 'person'" :person="p"></person-text>
<span v-else>{{ p.text }}</span>
</li>
</ul>
</div>
<add-persons
buttonTitle="activity.add_persons"
modalTitle="activity.add_persons"
v-bind:key="addPersons.key"
v-bind:options="addPersonsOptions"
@addNewPersons="addNewPersons"
ref="addPersons">
</add-persons>
<ul class="record_actions">
<li class="add-persons">
<add-persons
buttonTitle="activity.add_persons"
modalTitle="activity.add_persons"
v-bind:key="addPersons.key"
v-bind:options="addPersonsOptions"
@addNewPersons="addNewPersons"
ref="addPersons">
</add-persons>
</li>
</ul>
</teleport>
</teleport>
</template>
<script>
import { mapState, mapGetters } from 'vuex';
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue';
import PersonsBloc from './ConcernedGroups/PersonsBloc.vue';
import PersonText from 'ChillPersonAssets/vuejs/_components/Entity/PersonText.vue';
export default {
name: "ConcernedGroups",
components: {
AddPersons,
PersonsBloc
PersonsBloc,
PersonText
},
data() {
return {

View File

@@ -1,21 +1,29 @@
<template>
<li>
<span :title="person.text">
<span class="chill_denomination" @click.prevent="$emit('remove', person)">{{ textCutted }}</span>
<span class="chill_denomination" @click.prevent="$emit('remove', person)">
<person-text :person="person" :isCut="true"></person-text>
</span>
</span>
</li>
</template>
<script>
import PersonText from 'ChillPersonAssets/vuejs/_components/Entity/PersonText.vue';
export default {
name: "PersonBadge",
props: ['person'],
computed: {
textCutted() {
let more = (this.person.text.length > 15) ?'…' : '';
return this.person.text.slice(0,15) + more;
}
components: {
PersonText
},
// computed: {
// textCutted() {
// let more = (this.person.text.length > 15) ?'…' : '';
// return this.person.text.slice(0,15) + more;
// }
// },
emits: ['remove'],
}
</script>

View File

@@ -2,11 +2,15 @@ import { createApp } from 'vue';
import { _createI18n } from 'ChillMainAssets/vuejs/_js/i18n'
import { activityMessages } from './i18n'
import store from './store'
import PickTemplate from 'ChillDocGeneratorAssets/vuejs/_components/PickTemplate.vue';
import {fetchTemplates} from 'ChillDocGeneratorAssets/api/pickTemplate.js';
import App from './App.vue';
const i18n = _createI18n(activityMessages);
// app for activity
const hasSocialIssues = document.querySelector('#social-issues-acc') !== null;
const hasLocation = document.querySelector('#location') !== null;
const hasPerson = document.querySelector('#add-persons') !== null;
@@ -29,3 +33,54 @@ const app = createApp({
.use(i18n)
.component('app', App)
.mount('#activity');
// app for picking template
const i18nGendoc = _createI18n({});
document.querySelectorAll('div[data-docgen-template-picker]').forEach(el => {
fetchTemplates(el.dataset.entityClass).then(templates => {
const picker = {
template:
'<pick-template :templates="this.templates" :preventDefaultMoveToGenerate="true" ' +
':entityClass="faked" @go-to-generate-document="generateDoc"></pick-template>',
components: {
PickTemplate,
},
data() {
return {
templates: templates,
entityId: el.dataset.entityId,
}
},
methods: {
generateDoc({event, link, template}) {
console.log('generateDoc');
console.log('link', link);
console.log('template', template);
let hiddenInput = document.querySelector("input[data-template-id]");
if (hiddenInput === null) {
console.error('hidden input not found');
return;
}
hiddenInput.value = template;
let form = document.querySelector('form[name="chill_activitybundle_activity"');
if (form === null) {
console.error('form not found');
return;
}
form.submit();
}
}
};
createApp(picker).use(i18nGendoc).mount(el);
})
});

View File

@@ -41,6 +41,17 @@
</div>
{% endif %}
{% if activity.attendee and t.attendeeVisible %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Attendee'|trans }}</h3></div>
<div class="wl-col list">
<p class="wl-item">
{{ activity.attendee.name|localize_translatable_string }}
</p>
</div>
</div>
{% endif %}
{% if activity.sentReceived is not empty and t.sentReceivedVisible %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Sent received'|trans }}</h3></div>
@@ -57,7 +68,7 @@
<div class="wl-col title"><h3>{{ 'Referrer'|trans }}</h3></div>
<div class="wl-col list">
<p class="wl-item">
{{ activity.user|chill_entity_render_string|capitalize }}
{{ activity.user|chill_entity_render_box }}
</p>
</div>
</div>
@@ -143,9 +154,17 @@
</div>
<div class="item-row separator">
<ul class="record_actions">
{{ recordAction }}
</ul>
<div class="item-col item-meta">
{% set notif_counter = chill_count_notifications('Chill\\ActivityBundle\\Entity\\Activity', activity.id) %}
{% if notif_counter.total > 0 %}
{{ chill_counter_notifications('Chill\\ActivityBundle\\Entity\\Activity', activity.id) }}
{% endif %}
</div>
<div class="item-col">
<ul class="record_actions">
{{ recordAction }}
</ul>
</div>
</div>
</div>

View File

@@ -8,7 +8,7 @@
action: 'show', displayBadge: true,
targetEntity: { name: type, id: entity.id },
buttonText: entity|chill_entity_render_string,
isDead: entity.deathdate is not null,
isDead: entity.deathdate is defined and entity.deathdate is not null,
parent: parent
} %}
{% endmacro %}

View File

@@ -83,15 +83,15 @@
{{ form_row(edit_form.comment) }}
{% endif %}
{%- if edit_form.documents is defined -%}
{{ form_row(edit_form.documents) }}
{% endif %}
{%- if edit_form.attendee is defined -%}
{{ form_row(edit_form.attendee) }}
{% endif %}
{# TODO .. status #}
{%- if edit_form.documents is defined -%}
{{ form_row(edit_form.documents) }}
<div data-docgen-template-picker="data-docgen-template-picker" data-entity-class="Chill\ActivityBundle\Entity\Activity" data-entity-id="{{ entity.id }}"></div>
{% endif %}
{% set person_id = null %}
{% if entity.person %}

View File

@@ -1,58 +1,62 @@
{% macro recordAction(activity, context = null, person_id = null, accompanying_course_id = null) %}
{% if no_action is not defined or no_action == false %}
<li>
<a class="btn btn-notify" href="{{ chill_path_add_return_path('chill_main_notification_create', {
'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity',
'entityId': activity.id
}) }}">{{ 'notification.Notify'|trans }}</a>
</li>
{% endif %}
{% if context == 'person' and activity.accompanyingPeriod is not empty %}
{#
Disable person_id in following links, for redirect to accompanyingCourse context
#}
{% set person_id = null %}
{% set accompanying_course_id = activity.accompanyingPeriod.id %}
<li>
<a href="{{ chill_path_add_return_path('chill_activity_activity_list',{
'accompanying_period_id': accompanying_course_id
}) }}"
class="btn btn-primary"
title="{{ 'See activity in accompanying course context'|trans }}">
<i class="fa fa-random fa-fw"></i>
{{ 'Period number %number%'|trans({'%number%': accompanying_course_id}) }}
</a>
</li>
{% endif %}
<li>
<a href="{{ path('chill_activity_activity_show', {'id': activity.id,
'person_id': person_id,
'accompanying_period_id': accompanying_course_id
}) }}"
class="btn btn-show"
title="{{ 'Show'|trans }}"></a>
</li>
{% if no_action is not defined or no_action == false %}
{% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
{% if is_granted('CHILL_ACTIVITY_SEE_DETAILS', activity) %}
{% if no_action is not defined or no_action == false %}
<li>
<a href="{{ path('chill_activity_activity_edit', {'id': activity.id,
'person_id': person_id,
'accompanying_period_id': accompanying_course_id
}) }}"
class="btn btn-update"
title="{{ 'Edit'|trans }}"></a>
<a class="btn btn-misc" href="{{ chill_path_add_return_path('chill_main_notification_create', {
'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity',
'entityId': activity.id
}) }}">
<i class="fa fa-paper-plane fa-fw"></i>
{{ 'notification.Notify'|trans }}</a>
</li>
{% endif %}
{% if is_granted('CHILL_ACTIVITY_DELETE', activity) %}
{% if context == 'person' and activity.accompanyingPeriod is not empty %}
{#
Disable person_id in following links, for redirect to accompanyingCourse context
#}
{% set person_id = null %}
{% set accompanying_course_id = activity.accompanyingPeriod.id %}
<li>
<a href="{{ path('chill_activity_activity_delete', {'id': activity.id,
'person_id': person_id,
<a href="{{ chill_path_add_return_path('chill_activity_activity_list',{
'accompanying_period_id': accompanying_course_id
}) }}"
class="btn btn-delete"
title="{{ 'Delete'|trans }}"></a>
class="btn btn-primary"
title="{{ 'See activity in accompanying course context'|trans }}">
<i class="fa fa-random fa-fw"></i>
{{ 'Period number %number%'|trans({'%number%': accompanying_course_id}) }}
</a>
</li>
{% endif %}
<li>
<a href="{{ path('chill_activity_activity_show', {'id': activity.id,
'person_id': person_id,
'accompanying_period_id': accompanying_course_id
}) }}"
class="btn btn-show"
title="{{ 'Show'|trans }}"></a>
</li>
{% if no_action is not defined or no_action == false %}
{% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
<li>
<a href="{{ path('chill_activity_activity_edit', {'id': activity.id,
'person_id': person_id,
'accompanying_period_id': accompanying_course_id
}) }}"
class="btn btn-update"
title="{{ 'Edit'|trans }}"></a>
</li>
{% endif %}
{% if is_granted('CHILL_ACTIVITY_DELETE', activity) %}
<li>
<a href="{{ path('chill_activity_activity_delete', {'id': activity.id,
'person_id': person_id,
'accompanying_period_id': accompanying_course_id
}) }}"
class="btn btn-delete"
title="{{ 'Delete'|trans }}"></a>
</li>
{% endif %}
{% endif %}
{% endif %}
{% endmacro %}

View File

@@ -13,7 +13,7 @@
<p class="date-label">{{ activity.date|format_date('short') }}</p>
{%- endif -%}
<span class="like-h3">{{ activity.type.name | localize_translatable_string }}</span>
<span class="like-h3">{{ activity.type.name|localize_translatable_string }}</span>
{% if activity.emergency %}
<span class="badge bg-danger rounded-pill fs-6">{{ 'Emergency'|trans|upper }}</span>
@@ -41,14 +41,14 @@
{% if activity.user and t.userVisible %}
<li>
<span class="item-key">{{ 'Referrer'|trans ~ ': ' }}</span>
<b>{{ activity.user.usernameCanonical }}</b>
<b>{{ activity.user|chill_entity_render_box}}</b>
</li>
{% endif %}
<li class="associated-persons">
<span class="item-key">{{ 'Participants'|trans ~ ' : ' }}</span>
{% for p in activity.personsAssociated %}
<span class="badge-person">{{ p|chill_entity_render_box }}</span>
<span class="badge-person">{{ p|chill_entity_render_box({'addAgeBadge': true}) }}</span>
{% endfor %}
</li>
</ul>

View File

@@ -87,6 +87,7 @@
{%- if form.documents is defined -%}
{{ form_row(form.documents) }}
<div data-docgen-template-picker="data-docgen-template-picker" data-entity-class="Chill\ActivityBundle\Entity\Activity" data-entity-id="{{ entity.id }}"></div>
{% endif %}
{%- if form.attendee is defined -%}

View File

@@ -17,10 +17,6 @@
{{ 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 }};
{% if default_location is not null %}window.default_location_id = {{ default_location.id }}{% endif %};
</script>

View File

@@ -86,7 +86,7 @@
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {
'context': context,
'render': 'bloc',
'badge_person': 'true'
'badge_person': true
} %}
<h2 class="chill-blue">{{ 'Activity data'|trans }}</h2>
@@ -165,11 +165,7 @@
<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 %}
{{ entity.attendee.name|localize_translatable_string }}
{% else %}
<span class="chill-no-data-statement">{{ 'None'|trans|capitalize }}</span>
{% endif %}
@@ -181,6 +177,13 @@
</div>
</div>
<div class="notification notification-list">
{% set notifications = chill_list_notifications('Chill\\ActivityBundle\\Entity\\Activity', entity.id) %}
{% if notifications is not empty %}
{{ notifications|raw }}
{% endif %}
</div>
{% set person_id = null %}
{% if person %}
{% set person_id = person.id %}
@@ -197,18 +200,21 @@
{{ 'Back to the list'|trans }}
</a>
</li>
{% if is_granted('CHILL_ACTIVITY_UPDATE', entity) %}
<li>
<a class="btn btn-update" href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}">
{{ 'Edit'|trans }}
<li>
<a class="btn btn-notify" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id}) }}">
{{ 'notification.Notify'|trans }}
</a>
</li>
{% if is_granted('CHILL_ACTIVITY_UPDATE', entity) %}
<li>
<a href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"
class="btn btn-update">{{ 'Edit'|trans }}</a>
</li>
{% endif %}
{% if is_granted('CHILL_ACTIVITY_DELETE', entity) %}
<li>
<a href="{{ path('chill_activity_activity_delete', { 'id': entity.id, 'person_id' : person_id, 'accompanying_period_id': accompanying_course_id } ) }}" class="btn btn-delete">
{{ 'Delete'|trans }}
</a>
<a href="{{ path('chill_activity_activity_delete', { 'id': entity.id, 'person_id' : person_id, 'accompanying_period_id': accompanying_course_id } ) }}"
class="btn btn-delete" title="{{ 'Delete'|trans }}"></a>
</li>
{% endif %}
</ul>

View File

@@ -25,19 +25,5 @@
{% endblock content %}
{% block block_post_menu %}
<div class="post-menu pt-4">
<div class="d-grid gap-2">
<a class="btn btn-primary" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id}) }}">
<i class="fa fa-paper-plane fa-fw"></i>
{{ 'notification.Notify'|trans }}
</a>
</div>
{% set notifications = chill_list_notifications('Chill\\ActivityBundle\\Entity\\Activity', entity.id) %}
{% if notifications is not empty %}
{{ notifications|raw }}
{% endif %}
</div>
<div class="post-menu pt-4"></div>
{% endblock %}

View File

@@ -28,8 +28,7 @@
<div class="post-menu pt-4">
<div class="d-grid gap-2">
<a class="btn btn-primary" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id}) }}">
<i class="fa fa-paper-plane fa-fw"></i>
<a class="btn btn-notify" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id}) }}">
{{ 'notification.Notify'|trans }}
</a>
</div>

View File

@@ -0,0 +1,216 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\ActivityBundle\Service\DocGenerator;
use Chill\ActivityBundle\Entity\Activity;
use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithAdminFormInterface;
use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithPublicFormInterface;
use Chill\DocGeneratorBundle\Context\Exception\UnexpectedTypeException;
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
use Chill\DocGeneratorBundle\Service\Context\BaseContextData;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\DocStoreBundle\Repository\DocumentCategoryRepository;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Templating\Entity\PersonRender;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class ActivityContext implements
DocGeneratorContextWithAdminFormInterface,
DocGeneratorContextWithPublicFormInterface
{
private BaseContextData $baseContextData;
private DocumentCategoryRepository $documentCategoryRepository;
private EntityManagerInterface $em;
private NormalizerInterface $normalizer;
private PersonRender $personRender;
private TranslatableStringHelperInterface $translatableStringHelper;
private TranslatorInterface $translator;
public function __construct(
DocumentCategoryRepository $documentCategoryRepository,
NormalizerInterface $normalizer,
TranslatableStringHelperInterface $translatableStringHelper,
EntityManagerInterface $em,
PersonRender $personRender,
TranslatorInterface $translator,
BaseContextData $baseContextData
) {
$this->documentCategoryRepository = $documentCategoryRepository;
$this->normalizer = $normalizer;
$this->translatableStringHelper = $translatableStringHelper;
$this->em = $em;
$this->personRender = $personRender;
$this->translator = $translator;
$this->baseContextData = $baseContextData;
}
public function adminFormReverseTransform(array $data): array
{
return $data;
}
public function adminFormTransform(array $data): array
{
return [
'mainPerson' => $data['mainPerson'] ?? false,
'mainPersonLabel' => $data['mainPersonLabel'] ?? $this->translator->trans('docgen.Main person'),
'person1' => $data['person1'] ?? false,
'person1Label' => $data['person1Label'] ?? $this->translator->trans('docgen.person 1'),
'person2' => $data['person2'] ?? false,
'person2Label' => $data['person2Label'] ?? $this->translator->trans('docgen.person 2'),
];
}
public function buildAdminForm(FormBuilderInterface $builder): void
{
$builder
->add('mainPerson', CheckboxType::class, [
'required' => false,
'label' => 'docgen.Ask for main person',
])
->add('mainPersonLabel', TextType::class, [
'label' => 'main person label',
'required' => true,
])
->add('person1', CheckboxType::class, [
'required' => false,
'label' => 'docgen.Ask for person 1',
])
->add('person1Label', TextType::class, [
'label' => 'person 1 label',
'required' => true,
])
->add('person2', CheckboxType::class, [
'required' => false,
'label' => 'docgen.Ask for person 2',
])
->add('person2Label', TextType::class, [
'label' => 'person 2 label',
'required' => true,
]);
}
/**
* @param Activity $entity
*/
public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void
{
$options = $template->getOptions();
$persons = $entity->getPersons();
foreach (['mainPerson', 'person1', 'person2'] as $key) {
if ($options[$key] ?? false) {
$builder->add($key, EntityType::class, [
'class' => Person::class,
'choices' => $persons,
'choice_label' => function (Person $p) {
return $this->personRender->renderString($p, []);
},
'multiple' => false,
'expanded' => true,
'label' => $options[$key . 'Label'],
]);
}
}
}
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array
{
if (!$entity instanceof Activity) {
throw new UnexpectedTypeException($entity, Activity::class);
}
$options = $template->getOptions();
$data = [];
$data = array_merge($data, $this->baseContextData->getData());
$data['activity'] = $this->normalizer->normalize($entity, 'docgen', ['docgen:expects' => Activity::class, 'groups' => 'docgen:read']);
$data['course'] = $this->normalizer->normalize($entity->getAccompanyingPeriod(), 'docgen', ['docgen:expects' => AccompanyingPeriod::class, 'groups' => 'docgen:read']);
$data['person'] = $this->normalizer->normalize($entity->getPerson(), 'docgen', ['docgen:expects' => Person::class, 'groups' => 'docgen:read']);
foreach (['mainPerson', 'person1', 'person2'] as $k) {
if ($options[$k]) {
$data[$k] = $this->normalizer->normalize($contextGenerationData[$k], 'docgen', [
'docgen:expects' => Person::class,
'groups' => 'docgen:read',
'docgen:person:with-household' => true,
'docgen:person:with-relations' => true,
]);
}
}
return $data;
}
public function getDescription(): string
{
return 'docgen.A basic context for activity';
}
public function getEntityClass(): string
{
return Activity::class;
}
public function getFormData(DocGeneratorTemplate $template, $entity): array
{
return [
'activity' => $entity,
];
}
public static function getKey(): string
{
return self::class;
}
public function getName(): string
{
return 'docgen.Activity basic';
}
public function hasAdminForm(): bool
{
return true;
}
public function hasPublicForm(DocGeneratorTemplate $template, $entity): bool
{
$options = $template->getOptions();
return $options['mainPerson'] || $options['person1'] || $options['person2'];
}
/**
* @param Activity $entity
*/
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void
{
$entity->addDocument($storedObject);
$this->em->persist($storedObject);
}
}

View File

@@ -9,7 +9,7 @@
declare(strict_types=1);
namespace Chill\ActivityBundle\Tests\Aggregator;
namespace Chill\ActivityBundle\Tests\Export\Aggregator;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;

View File

@@ -9,7 +9,7 @@
declare(strict_types=1);
namespace Chill\ActivityBundle\Tests\Aggregator;
namespace Chill\ActivityBundle\Tests\Export\Aggregator;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;

View File

@@ -9,7 +9,7 @@
declare(strict_types=1);
namespace Chill\ActivityBundle\Tests\Aggregator;
namespace Chill\ActivityBundle\Tests\Export\Aggregator;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;

View File

@@ -9,7 +9,7 @@
declare(strict_types=1);
namespace Chill\ActivityBundle\Tests\Filter;
namespace Chill\ActivityBundle\Tests\Export\Filter;
use Chill\MainBundle\Test\Export\AbstractFilterTest;
use Doctrine\Common\Collections\ArrayCollection;

View File

@@ -9,7 +9,7 @@
declare(strict_types=1);
namespace Chill\ActivityBundle\Tests\Filter;
namespace Chill\ActivityBundle\Tests\Export\Filter;
use Chill\MainBundle\Test\Export\AbstractFilterTest;
use DateTime;

View File

@@ -29,9 +29,13 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
final class ActivityVoterTest extends KernelTestCase
{
use PrepareActivityTrait;
use PrepareCenterTrait;
use PreparePersonTrait;
use PrepareScopeTrait;
use PrepareUserTrait;
/**

View File

@@ -32,3 +32,8 @@ services:
autowire: true
autoconfigure: true
resource: '../Validator/Constraints/'
Chill\ActivityBundle\Service\DocGenerator\:
autowire: true
autoconfigure: true
resource: '../Service/DocGenerator/'

View File

@@ -228,3 +228,7 @@ See activity in accompanying course context: Voir l'activité dans le contexte d
You get notified of an activity which does not exists any more: Cette notification ne correspond pas à une activité valide.
you are not allowed to see it details: La notification fait référence à une activité à laquelle vous n'avez pas accès.
This is the minimal activity data: Activité n°
docgen:
Activity basic: Echange
A basic context for activity: Contexte pour les échanges

View File

@@ -20,3 +20,4 @@ For this type of activity, you must add at least one social action: Pour ce type
# admin
This parameter must be equal to social issue parameter: Ce paramètre doit être égal au paramètre "Visibilité du champs Problématiques sociales"
The socialActionsVisible value is not compatible with the socialIssuesVisible value: Cette valeur du paramètre "Visibilité du champs Actions sociales" n'est pas compatible avec la valeur du paramètre "Visibilité du champs Problématiques sociales"

View File

@@ -32,6 +32,8 @@ final class AsideActivityController extends CRUDController
{
$asideActivity = new AsideActivity();
$asideActivity->setAgent($this->getUser());
$duration = $request->query->get('duration', '300');
$duration = DateTime::createFromFormat('U', $duration);
$asideActivity->setDuration($duration);

View File

@@ -167,7 +167,6 @@ class AsideActivityCategory
}
$this->parent = $parent;
dump($this);
return $this;
}

View File

@@ -14,9 +14,9 @@ namespace Chill\AsideActivityBundle\Form;
use Chill\AsideActivityBundle\Entity\AsideActivity;
use Chill\AsideActivityBundle\Entity\AsideActivityCategory;
use Chill\AsideActivityBundle\Templating\Entity\CategoryRender;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\MainBundle\Form\Type\ChillTextareaType;
use Chill\MainBundle\Form\Type\PickUserDynamicType;
use DateInterval;
use DateTime;
use DateTimeImmutable;
@@ -68,22 +68,10 @@ final class AsideActivityFormType extends AbstractType
];
$builder
->add(
'agent',
EntityType::class,
[
'label' => 'For agent',
'required' => true,
'class' => User::class,
'data' => $this->storage->getToken()->getUser(),
'query_builder' => static function (EntityRepository $er) {
return $er->createQueryBuilder('u')->where('u.enabled = true');
},
'attr' => ['class' => 'select2 '],
'placeholder' => 'Choose the agent for whom this activity is created',
'choice_label' => 'username',
]
)
->add('agent', PickUserDynamicType::class, [
'label' => 'For agent',
'required' => true,
])
->add(
'date',
ChillDateType::class,

View File

@@ -16,7 +16,7 @@ use Chill\TaskBundle\Templating\UI\CountNotificationTask;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class UserMenuBuilder implements LocalMenuBuilderInterface
{

View File

@@ -1,5 +1,15 @@
{% extends '@ChillMain/Admin/layout.html.twig' %}
{% block js %}
{{ parent() }}
{{ encore_entry_script_tags('mod_pickentity_type') }}
{% endblock %}
{% block css %}
{{ parent() }}
{{ encore_entry_link_tags('mod_pickentity_type') }}
{% endblock %}
{% block title %}
{% include('@ChillMain/CRUD/_new_title.html.twig') %}
{% endblock %}
@@ -8,4 +18,5 @@
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% endblock %}
{% endblock %}

View File

@@ -20,7 +20,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function get_class;

View File

@@ -21,7 +21,7 @@ use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_merge;
use function count;

View File

@@ -15,7 +15,7 @@ use Chill\AMLI\BudgetBundle\Security\Authorization\BudgetElementVoter;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class UserMenuBuilder implements LocalMenuBuilderInterface
{

View File

@@ -2,6 +2,6 @@ services:
Chill\AMLI\BudgetBundle\Menu\UserMenuBuilder:
arguments:
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
tags:
- { name: 'chill.menu_builder' }

View File

@@ -97,8 +97,6 @@ class CalendarType extends AbstractType
return $res;
},
static function (?string $dateAsString): DateTimeImmutable {
dump($dateAsString);
return new DateTimeImmutable($dateAsString);
}
));

View File

@@ -16,7 +16,7 @@ use Chill\TaskBundle\Templating\UI\CountNotificationTask;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class UserMenuBuilder implements LocalMenuBuilderInterface
{

View File

@@ -19,7 +19,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function count;

View File

@@ -9,7 +9,7 @@
declare(strict_types=1);
namespace Chill\CustomFieldsBundle\Tests;
namespace Chill\CustomFieldsBundle\Tests\CustomFields;
use Chill\CustomFieldsBundle\CustomFields\CustomFieldChoice;
use Chill\CustomFieldsBundle\Entity\CustomField;

View File

@@ -9,7 +9,7 @@
declare(strict_types=1);
namespace Chill\CustomFieldsBundle\Tests;
namespace Chill\CustomFieldsBundle\Tests\CustomFields;
use Chill\CustomFieldsBundle\CustomFields\CustomFieldNumber;
use Chill\CustomFieldsBundle\Entity\CustomField;

View File

@@ -9,10 +9,11 @@
declare(strict_types=1);
namespace Chill\CustomFieldsBundle\Tests;
namespace Chill\CustomFieldsBundle\Tests\CustomFields;
use Chill\CustomFieldsBundle\CustomFields\CustomFieldText;
use Chill\CustomFieldsBundle\Entity\CustomField;
use Chill\CustomFieldsBundle\Tests\CustomFieldTestHelper;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
/**

View File

@@ -9,7 +9,7 @@
declare(strict_types=1);
namespace Chill\CustomFieldsBundle\Tests;
namespace Chill\CustomFieldsBundle\Tests\Routing;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Response;

View File

@@ -0,0 +1,13 @@
const buildLink = function(templateId, entityId, entityClass) {
const
entityIdEncoded = encodeURI(entityId),
returnPath = encodeURIComponent(window.location.pathname + window.location.search + window.location.hash),
entityClassEncoded = encodeURI(entityClass),
url = `/fr/doc/gen/generate/from/${templateId}/for/${entityClassEncoded}/${entityIdEncoded}?returnPath=${returnPath}`
;
console.log('computed Url');
return url;
};
export {buildLink};

View File

@@ -17,11 +17,11 @@
<select class="form-select" v-model="template">
<option disabled selected value="">{{ $t('choose_a_template') }}</option>
<template v-for="t in templates">
<option v-bind:value="t.id">{{ t.name.fr }}</option>
<option v-bind:value="t.id">{{ t.name.fr || 'Aucun nom défini' }}</option>
</template>
</select>
<button v-if="canGenerate" class="btn btn-update btn-sm change-icon" type="button" @click="generateDocument"><i class="fa fa-fw fa-cog"></i></button>
<button v-else class="btn btn-update btn-sm change-icon" type="button" disabled ><i class="fa fa-fw fa-cog"></i></button>
<a v-if="canGenerate" class="btn btn-update btn-sm change-icon" :href="buildUrlGenerate" @click.prevent="clickGenerate($event, buildUrlGenerate)"><i class="fa fa-fw fa-cog"></i></a>
<a v-else class="btn btn-update btn-sm change-icon" href="#" disabled ><i class="fa fa-fw fa-cog"></i></a>
</div>
</div>
</div>
@@ -39,23 +39,27 @@
<script>
import {buildLink} from 'ChillDocGeneratorAssets/lib/document-generator';
export default {
name: "PickTemplate",
props: {
entityId: [String, Number],
entityClass: {
type: String,
required: true,
required: false,
},
templates: {
type: Array,
required: true,
},
// beforeMove execute "something" before
beforeMove: {
type: Function,
preventDefaultMoveToGenerate: {
type: Boolean,
required: false,
default: false,
}
},
emits: ['goToGenerateDocument'],
data() {
return {
template: null,
@@ -73,62 +77,37 @@ export default {
return true;
},
getDescription() {
return this.templates.find(t => t.id === this.template).description || '';
if (null === this.template) {
return '';
}
let desc = this.templates.find(t => t.id === this.template);
if (null === desc) {
return '';
}
return desc.description || '';
},
buildUrlGenerate() {
if (null === this.template) {
return '#';
}
return buildLink(this.template, this.entityId, this.entityClass);
}
},
methods: {
generateDocument() {
console.log('generateDocument');
console.log('beforeMove', this.beforeMove);
if (this.beforeMove != null) {
console.log('execute before move');
let r = this.beforeMove();
if (r instanceof Promise) {
r.then((obj) => this.goToGenerate(obj));
} else {
this.goToGenerate();
}
} else {
this.goToGenerate();
}
},
goToGenerate(obj) {
console.log('goToGenerate');
console.log('obj', obj);
console.log('entityId', this.entityId);
let
realId = this.entityId,
realEntityClass = this.entityClass
;
if (obj !== undefined) {
if (obj.entityId !== undefined) {
realId = obj.entityId;
}
if (obj.entityClass !== undefined) {
realEntityClass = obj.entityClass;
}
clickGenerate(event, link) {
if (!this.preventDefaultMoveToGenerate) {
window.location.assign(link);
}
console.log('realId', realId);
console.log('realEntityClass', realEntityClass);
const
entityId = encodeURI(realId),
returnPath = encodeURIComponent(window.location.pathname + window.location.search + window.location.hash),
fqdnEntityClass = encodeURI(realEntityClass),
url = `/fr/doc/gen/generate/from/${this.template}/for/${fqdnEntityClass}/${entityId}?returnPath=${returnPath}`
;
console.log('I will generate your doc at', url);
window.location.assign(url);
this.$emit('goToGenerateDocument', {event, link, template: this.template});
},
},
i18n: {
messages: {
fr: {
generate_document: 'Générer un document',
select_a_template: 'Choisir un gabarit',
select_a_template: 'Choisir un modèle',
choose_a_template: 'Choisir',
}
}

View File

@@ -13,7 +13,9 @@ namespace Chill\DocStoreBundle\Controller;
use Chill\DocStoreBundle\Entity\AccompanyingCourseDocument;
use Chill\DocStoreBundle\Form\AccompanyingCourseDocumentType;
use Chill\DocStoreBundle\Repository\AccompanyingCourseDocumentRepository;
use Chill\DocStoreBundle\Security\Authorization\AccompanyingCourseDocumentVoter;
use Chill\MainBundle\Pagination\PaginatorFactory;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use DateTime;
@@ -29,20 +31,15 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
class DocumentAccompanyingCourseController extends AbstractController
{
/**
* @var AuthorizationHelper
*/
protected $authorizationHelper;
protected AuthorizationHelper $authorizationHelper;
/**
* @var EventDispatcherInterface
*/
protected $eventDispatcher;
protected EventDispatcherInterface $eventDispatcher;
/**
* @var TranslatorInterface
*/
protected $translator;
protected TranslatorInterface $translator;
private AccompanyingCourseDocumentRepository $courseRepository;
private PaginatorFactory $paginatorFactory;
/**
* DocumentAccompanyingCourseController constructor.
@@ -50,11 +47,15 @@ class DocumentAccompanyingCourseController extends AbstractController
public function __construct(
TranslatorInterface $translator,
EventDispatcherInterface $eventDispatcher,
AuthorizationHelper $authorizationHelper
AuthorizationHelper $authorizationHelper,
PaginatorFactory $paginatorFactory,
AccompanyingCourseDocumentRepository $courseRepository
) {
$this->translator = $translator;
$this->eventDispatcher = $eventDispatcher;
$this->authorizationHelper = $authorizationHelper;
$this->paginatorFactory = $paginatorFactory;
$this->courseRepository = $courseRepository;
}
/**
@@ -130,11 +131,15 @@ class DocumentAccompanyingCourseController extends AbstractController
$this->denyAccessUnlessGranted(AccompanyingCourseDocumentVoter::SEE, $course);
$documents = $em
->getRepository('ChillDocStoreBundle:AccompanyingCourseDocument')
$total = $this->courseRepository->countByCourse($course);
$pagination = $this->paginatorFactory->create($total);
$documents = $this->courseRepository
->findBy(
['course' => $course],
['date' => 'DESC']
['date' => 'DESC'],
$pagination->getItemsPerPage(),
$pagination->getCurrentPageFirstItemNumber()
);
return $this->render(
@@ -142,6 +147,7 @@ class DocumentAccompanyingCourseController extends AbstractController
[
'documents' => $documents,
'accompanyingCourse' => $course,
'pagination' => $pagination,
]
);
}

View File

@@ -13,7 +13,8 @@ namespace Chill\DocStoreBundle\Controller;
use Chill\DocStoreBundle\Entity\PersonDocument;
use Chill\DocStoreBundle\Form\PersonDocumentType;
use Chill\DocStoreBundle\Security\Authorization\PersonDocumentVoter;
use Chill\DocStoreBundle\Repository\PersonDocumentACLAwareRepositoryInterface;
use Chill\MainBundle\Pagination\PaginatorFactory;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Privacy\PrivacyEvent;
@@ -24,7 +25,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Class DocumentPersonController.
@@ -35,20 +36,15 @@ use Symfony\Component\Translation\TranslatorInterface;
*/
class DocumentPersonController extends AbstractController
{
/**
* @var AuthorizationHelper
*/
protected $authorizationHelper;
protected AuthorizationHelper $authorizationHelper;
/**
* @var EventDispatcherInterface
*/
protected $eventDispatcher;
protected EventDispatcherInterface $eventDispatcher;
/**
* @var TranslatorInterface
*/
protected $translator;
protected TranslatorInterface $translator;
private PaginatorFactory $paginatorFactory;
private PersonDocumentACLAwareRepositoryInterface $personDocumentACLAwareRepository;
/**
* DocumentPersonController constructor.
@@ -56,11 +52,15 @@ class DocumentPersonController extends AbstractController
public function __construct(
TranslatorInterface $translator,
EventDispatcherInterface $eventDispatcher,
AuthorizationHelper $authorizationHelper
AuthorizationHelper $authorizationHelper,
PaginatorFactory $paginatorFactory,
PersonDocumentACLAwareRepositoryInterface $personDocumentACLAwareRepository
) {
$this->translator = $translator;
$this->eventDispatcher = $eventDispatcher;
$this->authorizationHelper = $authorizationHelper;
$this->paginatorFactory = $paginatorFactory;
$this->personDocumentACLAwareRepository = $personDocumentACLAwareRepository;
}
/**
@@ -156,19 +156,15 @@ class DocumentPersonController extends AbstractController
$this->denyAccessUnlessGranted(PersonVoter::SEE, $person);
$reachableScopes = $this->authorizationHelper
->getReachableScopes(
$this->getUser(),
PersonDocumentVoter::SEE,
$person->getCenter()
);
$total = $this->personDocumentACLAwareRepository->countByPerson($person);
$pagination = $this->paginatorFactory->create($total);
$documents = $em
->getRepository('ChillDocStoreBundle:PersonDocument')
->findBy(
['person' => $person, 'scope' => $reachableScopes],
['date' => 'DESC']
);
$documents = $this->personDocumentACLAwareRepository->findByPerson(
$person,
[],
$pagination->getItemsPerPage(),
$pagination->getCurrentPageFirstItemNumber()
);
$event = new PrivacyEvent($person, [
'element_class' => PersonDocument::class,
@@ -181,6 +177,7 @@ class DocumentPersonController extends AbstractController
[
'documents' => $documents,
'person' => $person,
'pagination' => $pagination,
]
);
}

View File

@@ -38,6 +38,7 @@ class ChillDocStoreExtension extends Extension implements PrependExtensionInterf
$loader->load('services/menu.yaml');
$loader->load('services/fixtures.yaml');
$loader->load('services/form.yaml');
$loader->load('services/templating.yaml');
}
public function prepend(ContainerBuilder $container)

View File

@@ -11,7 +11,13 @@ declare(strict_types=1);
namespace Chill\DocStoreBundle\Entity;
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Entity\User;
use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
@@ -20,8 +26,12 @@ use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\MappedSuperclass
*/
class Document implements HasScopeInterface
class Document implements HasScopeInterface, TrackCreationInterface, TrackUpdateInterface
{
use TrackCreationTrait;
use TrackUpdateTrait;
/**
* @ORM\ManyToOne(targetEntity="Chill\DocStoreBundle\Entity\DocumentCategory")
* @ORM\JoinColumns({
@@ -67,6 +77,11 @@ class Document implements HasScopeInterface
*/
private $scope;
/**
* @ORM\ManyToOne(targetEntity="Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate")
*/
private $template;
/**
* @ORM\Column(type="text")
* @Assert\Length(
@@ -82,9 +97,6 @@ class Document implements HasScopeInterface
*/
private $user;
/**
* @return DocumentCategory
*/
public function getCategory(): ?DocumentCategory
{
return $this->category;
@@ -115,11 +127,16 @@ class Document implements HasScopeInterface
*
* @return \Chill\MainBundle\Entity\Scope
*/
public function getScope()
public function getScope(): ?Scope
{
return $this->scope;
}
public function getTemplate(): ?DocGeneratorTemplate
{
return $this->template;
}
public function getTitle(): ?string
{
return $this->title;
@@ -165,6 +182,13 @@ class Document implements HasScopeInterface
return $this;
}
public function setTemplate(?DocGeneratorTemplate $template): self
{
$this->template = $template;
return $this;
}
public function setTitle(string $title): self
{
$this->title = $title;

View File

@@ -18,10 +18,12 @@ use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\MainBundle\Form\Type\ChillTextareaType;
use Chill\MainBundle\Form\Type\ScopePickerType;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Chill\MainBundle\Security\Resolver\ScopeResolverDispatcher;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Doctrine\ORM\EntityRepository;
use Doctrine\Persistence\ObjectManager;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
@@ -51,14 +53,25 @@ class PersonDocumentType extends AbstractType
*/
protected $user;
private ParameterBagInterface $parameterBag;
private ScopeResolverDispatcher $scopeResolverDispatcher;
public function __construct(
TranslatableStringHelper $translatableStringHelper
TranslatableStringHelper $translatableStringHelper,
ScopeResolverDispatcher $scopeResolverDispatcher,
ParameterBagInterface $parameterBag
) {
$this->translatableStringHelper = $translatableStringHelper;
$this->scopeResolverDispatcher = $scopeResolverDispatcher;
$this->parameterBag = $parameterBag;
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
$document = $options['data'];
$isScopeConcerned = $this->scopeResolverDispatcher->isConcerned($document);
$builder
->add('title', TextType::class)
->add('description', ChillTextareaType::class, [
@@ -67,10 +80,6 @@ class PersonDocumentType extends AbstractType
->add('object', StoredObjectType::class, [
'error_bubbling' => true,
])
->add('scope', ScopePickerType::class, [
'center' => $options['center'],
'role' => $options['role'],
])
->add('date', ChillDateType::class)
->add('category', EntityType::class, [
'placeholder' => 'Choose a document category',
@@ -84,6 +93,13 @@ class PersonDocumentType extends AbstractType
return $entity ? $this->translatableStringHelper->localize($entity->getName()) : '';
},
]);
if ($isScopeConcerned && $this->parameterBag->get('chill_main')['acl']['form_show_scopes']) {
$builder->add('scope', ScopePickerType::class, [
'center' => $options['center'],
'role' => $options['role'],
]);
}
}
public function configureOptions(OptionsResolver $resolver)

View File

@@ -0,0 +1,75 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\DocStoreBundle\Repository;
use Chill\DocStoreBundle\Entity\AccompanyingCourseDocument;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;
use Doctrine\Persistence\ObjectRepository;
class AccompanyingCourseDocumentRepository implements ObjectRepository
{
private EntityManagerInterface $em;
private EntityRepository $repository;
public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
$this->repository = $em->getRepository(AccompanyingCourseDocument::class);
}
public function buildQueryByCourse(AccompanyingPeriod $course): QueryBuilder
{
$qb = $this->repository->createQueryBuilder('d');
$qb
->where($qb->expr()->eq('d.course', ':course'))
->setParameter('course', $course);
return $qb;
}
public function countByCourse(AccompanyingPeriod $course): int
{
$qb = $this->buildQueryByCourse($course)->select('COUNT(d)');
return $qb->getQuery()->getSingleScalarResult();
}
public function find($id): ?AccompanyingCourseDocument
{
return $this->repository->find($id);
}
public function findAll(): array
{
return $this->repository->findAll();
}
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null)
{
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
}
public function findOneBy(array $criteria): ?AccompanyingCourseDocument
{
return $this->findOneBy($criteria);
}
public function getClassName()
{
return AccompanyingCourseDocument::class;
}
}

View File

@@ -0,0 +1,90 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\DocStoreBundle\Repository;
use Chill\DocStoreBundle\Entity\PersonDocument;
use Chill\DocStoreBundle\Security\Authorization\PersonDocumentVoter;
use Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface;
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcher;
use Chill\PersonBundle\Entity\Person;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Security\Core\Security;
class PersonDocumentACLAwareRepository implements PersonDocumentACLAwareRepositoryInterface
{
private AuthorizationHelperInterface $authorizationHelper;
private CenterResolverDispatcher $centerResolverDispatcher;
private EntityManagerInterface $em;
private Security $security;
public function __construct(EntityManagerInterface $em, AuthorizationHelperInterface $authorizationHelper, CenterResolverDispatcher $centerResolverDispatcher, Security $security)
{
$this->em = $em;
$this->authorizationHelper = $authorizationHelper;
$this->centerResolverDispatcher = $centerResolverDispatcher;
$this->security = $security;
}
public function buildQueryByPerson(Person $person): QueryBuilder
{
$qb = $this->em->getRepository(PersonDocument::class)->createQueryBuilder('d');
$qb
->where($qb->expr()->eq('d.person', ':person'))
->setParameter('person', $person);
return $qb;
}
public function countByPerson(Person $person): int
{
$qb = $this->buildQueryByPerson($person)->select('COUNT(d)');
$this->addACL($qb, $person);
return $qb->getQuery()->getSingleScalarResult();
}
public function findByPerson(Person $person, array $orderBy = [], int $limit = 20, int $offset = 0): array
{
$qb = $this->buildQueryByPerson($person)->select('d');
$this->addACL($qb, $person);
foreach ($orderBy as [$field, $order]) {
$qb->addOrderBy($field, $order);
}
$qb->setFirstResult($offset)->setMaxResults($limit);
return $qb->getQuery()->getResult();
}
private function addACL(QueryBuilder $qb, Person $person): void
{
$center = $this->centerResolverDispatcher->resolveCenter($person);
$reachableScopes = $this->authorizationHelper
->getReachableScopes(
$this->security->getUser(),
PersonDocumentVoter::SEE,
$center
);
$qb->andWhere($qb->expr()->in('d.scope', ':scopes'))
->setParameter('scopes', $reachableScopes);
}
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\DocStoreBundle\Repository;
use Chill\PersonBundle\Entity\Person;
interface PersonDocumentACLAwareRepositoryInterface
{
public function countByPerson(Person $person): int;
public function findByPerson(Person $person, array $orderBy = [], int $limit = 20, int $offset = 0): array;
}

View File

@@ -0,0 +1,64 @@
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
<div class="flex-table accompanying_course_work-list">
<div class="item-bloc document-item bg-chill-llight-gray">
<div class="row justify-content-center my-4">
<div class="col-2">
<i class="fa fa-4x fa-file-text-o text-success"></i>
</div>
<div class="col-8">
<h3>{{ document.title }}</h3>
{{ mm.mimeIcon(document.object.type) }}
{% if document.description is not empty %}
<blockquote class="chill-user-quote mt-4">
{{ document.description }}
</blockquote>
{% endif %}
</div>
</div>
</div>
</div>
{% set freezed = false %}
{% for step in entity_workflow.stepsChained %}
{% if loop.last %}
{% if step.previous is not null and step.previous.freezeAfter == true %}
{% set freezed = true %}
{% endif %}
{% endif %}
{% endfor %}
{% if display_action is defined and display_action == true %}
<ul class="record_actions">
{% if document.course != null and is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', document.course) %}
<li>
<a href="{{ path('chill_person_accompanying_course_index', {'accompanying_period_id': document.course.id}) }}" class="btn btn-show change-icon">
<i class="fa fa-random"></i> {{ 'Course number'|trans }} {{ document.course.id }}
</a>
</li>
{% endif %}
<li>
{{ m.download_button(document.object, document.title) }}
</li>
<li>
{% if chill_document_is_editable(document.object) %}
{% if not freezed %}
{{ document.object|chill_document_edit_button({'title': document.title|e('html') }) }}
{% else %}
<a class="btn btn-wopilink disabled" href="#" title="{{ 'workflow.freezed document'|trans }}">
{{ 'Update document'|trans }}
</a>
{% endif %}
{% endif %}
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE', document) and document.course != null %}
<li>
<a href="{{ chill_path_add_return_path('accompanying_course_document_show', {'course': document.course.id, 'id': document.id}) }}" class="btn btn-show"></a>
</li>
{% endif %}
</li>
</ul>
{% endif %}

View File

@@ -0,0 +1,19 @@
{% import '@ChillMain/Workflow/macro_breadcrumb.html.twig' as m %}
<div class="flex-grow-1 {% if add_classes is defined %}{{ add_classes }}{% else %}h2{% endif %}">
<div>
{% if concerne is defined and concerne == true %}
<span class="item-key">{{ 'Concerne'|trans }}: </span>
{% endif %}
{{ 'workflow.Document (n°%doc%)'|trans({'%doc%': document.id}) }}
{% if description is defined and description == true %}
{{ ' — ' ~ document.title }}
{% endif %}
</div>
{% if breadcrumb is defined and breadcrumb == true %}
{{ m.breadcrumb(_context) }}
{% endif %}
</div>

View File

@@ -19,7 +19,7 @@
{{ form_row(form.description) }}
{{ form_row(form.object, { 'label': 'Document', 'existing': document.object }) }}
<ul class="record_actions">
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('accompanying_course_document_index', {'course': accompanyingCourse.id}) }}" class="btn btn-cancel">
{{ 'Back to the list' | trans }}

View File

@@ -2,8 +2,6 @@
{% set activeRouteKey = '' %}
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
{% block title %}
{{ 'Documents' }}
{% endblock %}
@@ -11,64 +9,35 @@
{% block js %}
{{ parent() }}
{{ encore_entry_script_tags('mod_async_upload') }}
{{ encore_entry_script_tags('mod_docgen_picktemplate') }}
{{ encore_entry_script_tags('mod_docgen_picktemplate') }}
{% endblock %}
{% block css %}
{{ parent() }}
{{ encore_entry_link_tags('mod_async_upload') }}
{{ encore_entry_link_tags('mod_docgen_picktemplate') }}
{{ encore_entry_link_tags('mod_docgen_picktemplate') }}
{% endblock %}
{% block content %}
<div class="col-md-10 col-xxl">
<h1>{{ 'Documents' }}</h1>
<table class="table table-bordered border-dark table-striped">
<thead>
<tr>
<th>{{ 'Title' | trans }}</th>
<th>{{ 'Category'|trans }}</th>
<th>{{ 'Actions' | trans }}</th>
</tr>
</thead>
<tbody>
{% if documents|length == 0 %}
<p class="chill-no-data-statement">{{ 'No documents'|trans }}</p>
{% else %}
<div class="flex-table chill-task-list">
{% for document in documents %}
<tr>
<td>{{ document.title }}</td>
<td>{% if document.category %}{{ document.category.name|localize_translatable_string }}{% endif %}</td>
<td>
<ul class="record_actions">
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE_DETAILS', document) %}
<li>
{{ m.download_button(document.object, document.title) }}
</li>
<li>
<a href="{{ chill_path_add_return_path('accompanying_course_document_show', {'course': accompanyingCourse.id, 'id': document.id}) }}" class="btn btn-show"></a>
</li>
{% endif %}
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
<li>
<a href="{{ path('accompanying_course_document_edit', {'course': accompanyingCourse.id, 'id': document.id }) }}" class="btn btn-update"></a>
</li>
{% endif %}
</ul>
</td>
</tr>
{% else %}
<tr>
<td colspan="9" style="text-align:center;">
<span class="chill-no-data-statement">{{ 'Any document found'|trans }}</span>
</td>
</tr>
{% include 'ChillDocStoreBundle:List:list_item.html.twig' %}
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
<div data-docgen-template-picker="data-docgen-template-picker" data-entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod" data-entity-id="{{ accompanyingCourse.id }}"></div>
{{ chill_pagination(pagination) }}
<div data-docgen-template-picker="data-docgen-template-picker" data-entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod" data-entity-id="{{ accompanyingCourse.id }}"></div>
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_CREATE', accompanyingCourse) %}
<ul class="record_actions">
<ul class="record_actions sticky-form-buttons">
<li class="create">
<a href="{{ path('accompanying_course_document_new', {'course': accompanyingCourse.id}) }}" class="btn btn-create">
{{ 'Create'|trans }}
@@ -76,4 +45,6 @@
</li>
</ul>
{% endif %}
</div>
{% endblock %}

View File

@@ -3,64 +3,82 @@
{% set activeRouteKey = '' %}
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
{% block title %}
{# {{ 'Detail of document of %name%'|trans({ '%name%': accompanyingCourse|chill_entity_render_string } ) }} #}
{% endblock %}
{% block js %}
{{ parent() }}
{{ encore_entry_script_tags('mod_async_upload') }}
{{ 'Document %title%' | trans({ '%title%': document.title }) }}
{% endblock %}
{% block css %}
{{ parent() }}
{{ encore_entry_link_tags('mod_async_upload') }}
{{ encore_entry_link_tags('mod_entity_workflow_pick') }}
{% endblock %}
{% block content %}
<div class="document-show">
<h1>{{ block('title') }}</h1>
<h1>{{ 'Document %title%' | trans({ '%title%': document.title }) }}</h1>
{{ mm.mimeIcon(document.object.type) }}
<dl class="chill_view_data">
<dt>{{ 'Title'|trans }}</dt>
<dd>{{ document.title }}</dd>
<dl class="chill_view_data mt-4">
<dt>{{ 'Title'|trans }}</dt>
<dd>{{ document.title }}</dd>
{% if document.category is not null %}
<dt>{{ 'Category'|trans }}</dt>
<dd>{{ document.category.name|localize_translatable_string }}</dd>
{% endif %}
<dt>{{ 'Description' | trans }}</dt>
<dd>
{% if document.description is empty %}
<span class="chill-no-data-statement">{{ 'Any description'|trans }}</span>
{% else %}
<blockquote class="chill-user-quote">
{{ document.description|chill_markdown_to_html }}
</blockquote>
{% endif %}
</dd>
<dt>{{ 'Description' | trans }}</dt>
<dd>
{% if document.description is empty %}
<span class="chill-no-data-statement">{{ 'Any description'|trans }}</span>
{% else %}
<blockquote class="chill-user-quote">
{{ document.description|chill_markdown_to_html }}
</blockquote>
{% endif %}
</dd>
</dl>
</dl>
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('accompanying_course_document_index', {'course': accompanyingCourse.id}) }}" class="btn btn-cancel">
{{ 'Back to the list' | trans }}
</a>
</li>
<li>
{{ m.download_button(document.object, document.title) }}
</li>
{% if chill_document_is_editable(document.object) %}
<li>
{{ document.object|chill_document_edit_button }}
</li>
{% endif %}
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
<li>
<a href="{{ path('accompanying_course_document_edit', {'id': document.id, 'course': accompanyingCourse.id}) }}"
class="btn btn-edit" title="{{ 'Edit attributes' | trans }}"></a>
</li>
{% endif %}
{% set workflows_frame = chill_entity_workflow_list('Chill\\DocStoreBundle\\Entity\\AccompanyingCourseDocument', document.id) %}
{% if workflows_frame is not empty %}
<li>
{{ workflows_frame|raw }}
</li>
{% endif %}
</ul>
</div>
{% endblock %}
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('accompanying_course_document_index', {'course': accompanyingCourse.id}) }}" class="btn btn-cancel">
{{ 'Back to the list' | trans }}
</a>
</li>
{% block block_post_menu %}
<div class="post-menu pt-4"></div>
{% endblock %}
<li>
{{ m.download_button(document.object, document.title) }}
</li>
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
<li>
<a href="{{ path('accompanying_course_document_edit', {'id': document.id, 'course': accompanyingCourse.id}) }}" class="btn btn-edit">
{{ 'Edit' | trans }}
</a>
</li>
{% endif %}
{% endblock %}
{% block js %}
{{ parent() }}
{{ encore_entry_script_tags('mod_async_upload') }}
{{ encore_entry_script_tags('mod_entity_workflow_pick') }}
{% endblock %}

View File

@@ -0,0 +1,9 @@
{# Twig way
TODO: une route, un template avec un header CHILL et un iframe
#}
<a href="{{ chill_path_add_return_path('chill_wopi_file_edit', {'fileId': document.uuid}) }}"
class="btn btn-wopilink">
{{ 'online_edit_document'|trans }}
</a>

View File

@@ -0,0 +1,83 @@
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
<div class="item-bloc">
<div class="item-row">
<div class="item-col">
<div class="denomination h2">
{{ document.title }}
</div>
<div>
{{ mm.mimeIcon(document.object.type) }}
</div>
<div>
<p>{{ document.category.name|localize_translatable_string }}</p>
</div>
{% if document.template is not null %}
<div>
<p>{{ document.template.name.fr }}</p>
</div>
{% endif %}
</div>
<div class="item-col">
<div class="container">
{% if document.date is not null %}
<div class="dates row" style="float: right;">
<span>{{ document.createdAt|format_date('short') }}</span>
</div>
{% endif %}
</div>
</div>
</div>
{% if document.description is not empty %}
<div class="item-row separator">
<blockquote class="chill-user-quote">
{{ document.description|chill_markdown_to_html }}
</blockquote>
</div>
{% endif %}
<div class="item-row separator">
<div class="item-col item-meta">
<div class="updatedBy">
{{ 'Created by'|trans }}:
<span class="user">{{ document.createdBy|chill_entity_render_string }}</span>
<span class="date">le {{ document.createdAt|format_date('long') }}</span>
</div>
</div>
</div>
<div>
{% if document.course is defined %}
<ul class="record_actions">
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE_DETAILS', document) %}
<li>
{{ m.download_button(document.object, document.title) }}
</li>
<li>
<a href="{{ chill_path_add_return_path('accompanying_course_document_show', {'course': accompanyingCourse.id, 'id': document.id}) }}" class="btn btn-show"></a>
</li>
{% endif %}
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
<li>
<a href="{{ path('accompanying_course_document_edit', {'course': accompanyingCourse.id, 'id': document.id }) }}" class="btn btn-update"></a>
</li>
{% endif %}
</ul>
{% else %}
<ul class="record_actions">
{% if is_granted('CHILL_PERSON_DOCUMENT_SEE_DETAILS', document) %}
<li>
{{ m.download_button(document.object, document.title) }}
</li>
<li>
<a href="{{ path('person_document_show', {'person': person.id, 'id': document.id}) }}" class="btn btn-show"></a>
</li>
{% endif %}
{% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
<li>
<a href="{{ path('person_document_edit', {'person': person.id, 'id': document.id}) }}" class="btn btn-update"></a>
</li>
{% endif %}
</ul>
{% endif %}
</div>
</div>

View File

@@ -0,0 +1,55 @@
{% macro mimeIcon(type) %}
{# mapping
forkawesome and mime type https://gist.github.com/colemanw/9c9a12aae16a4bfe2678de86b661d922
#}
{% set mapmime = {
'image': 'fa-file-image-o',
'audio': 'fa-file-audio-o',
'video': 'fa-file-video-o',
'application/pdf': 'fa-file-pdf-o',
'application/msword': 'fa-file-word-o',
'application/vnd.ms-word': 'fa-file-word-o',
'application/vnd.oasis.opendocument.text': 'fa-file-word-o',
'application/vnd.openxmlformats-officedocument.wordprocessingml': 'fa-file-word-o',
'application/vnd.ms-excel': 'fa-file-excel-o',
'application/vnd.openxmlformats-officedocument.spreadsheetml': 'fa-file-excel-o',
'application/vnd.oasis.opendocument.spreadsheet': 'fa-file-excel-o',
'application/vnd.ms-powerpoint': 'fa-file-powerpoint-o',
'application/vnd.openxmlformats-officedocument.presentationml': 'fa-file-powerpoint-o',
'application/vnd.oasis.opendocument.presentation': 'fa-file-powerpoint-o',
'text/plain': 'fa-file-text-o',
'text/html': 'fa-file-code-o',
'application/json': 'fa-file-code-o',
'application/gzip': 'fa-file-archive-o',
'application/zip': 'fa-file-archive-o',
} %}
{% set icon = 'fa-file-o' %}
{% for key,val in mapmime %}
{% if type starts with key %}
{% set icon = val %}
{% endif %}
{% endfor %}
{# TODO improve mapping
mime type and friendly name https://gist.github.com/rosskmurphy/3724501
#}
{% set maptype = {
'fa-file-word-o': 'office document/texte',
'fa-file-excel-o': 'office document/tableur',
'fa-file-powerpoint-o': 'office document/presentation',
} %}
{% set label = type %}
{% for key, val in maptype %}
{% if icon == key %}
{% set label = val %}
{% endif %}
{% endfor %}
<div class="metadata">
<i class="fa {{ icon }} fa-lg me-1"></i>
{{ label|capitalize }}
</div>
{% endmacro %}

View File

@@ -30,7 +30,9 @@
{{ form_row(form.title) }}
{{ form_row(form.date) }}
{{ form_row(form.category) }}
{{ form_row(form.scope) }}
{% if form.scope is defined %}
{{ form_row(form.scope) }}
{% endif %}
{{ form_row(form.description) }}
{{ form_row(form.object, { 'label': 'Document', 'existing': document.object }) }}

View File

@@ -30,54 +30,24 @@
{% endblock %}
{% block personcontent %}
<div class="col-md-10 col-xxl">
<h1>{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}</h1>
<table class="table table-bordered border-dark table-striped">
<thead>
<tr>
<th>{{ 'Title' | trans }}</th>
<th>{{ 'Category'|trans }}</th>
<th>{{ 'Circle' | trans }}</th>
<th>{{ 'Actions' | trans }}</th>
</tr>
</thead>
<tbody>
{% if documents|length == 0 %}
<p class="chill-no-data-statement">{{ 'No documents'|trans }}</p>
{% else %}
<div class="flex-table chill-task-list">
{% for document in documents %}
<tr>
<td>{{ document.title }}</td>
<td>{{ document.category.name|localize_translatable_string }}</td>
<td>{{ document.scope.name|localize_translatable_string }}</td>
<td>
<ul class="record_actions">
{% if is_granted('CHILL_PERSON_DOCUMENT_SEE_DETAILS', document) %}
<li>
{{ m.download_button(document.object, document.title) }}
</li>
<li>
<a href="{{ path('person_document_show', {'person': person.id, 'id': document.id}) }}" class="btn btn-show"></a>
</li>
{% endif %}
{% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
<li>
<a href="{{ path('person_document_edit', {'person': person.id, 'id': document.id}) }}" class="btn btn-update"></a>
</li>
{% endif %}
</ul>
</td>
</tr>
{% else %}
<tr>
<td colspan="9" style="text-align:center;">
<span class="chill-no-data-statement">{{ 'Any document found'|trans }}</span>
</td>
</tr>
{% include 'ChillDocStoreBundle:List:list_item.html.twig' %}
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{{ chill_pagination(pagination) }}
{% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %}
<ul class="record_actions">
<ul class="record_actions sticky-form-buttons">
<li class="create">
<a href="{{ path('person_document_new', {'person': person.id}) }}" class="btn btn-create">
{{ 'Create new document' | trans }}
@@ -85,4 +55,6 @@
</li>
</ul>
{% endif %}
</div>
{% endblock %}

View File

@@ -19,6 +19,7 @@
{% set activeRouteKey = '' %}
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
{% block title %}{{ 'Detail of document of %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}{% endblock %}
@@ -29,12 +30,16 @@
{% block personcontent %}
<h1>{{ 'Document %title%' | trans({ '%title%': document.title }) }}</h1>
{{ mm.mimeIcon(document.object.type) }}
<dl class="chill_view_data">
<dt>{{ 'Title'|trans }}</dt>
<dd>{{ document.title }}</dd>
{% if document.scope is not null %}
<dt>{{ 'Scope' | trans }}</dt>
<dd>{{ document.scope.name | localize_translatable_string }}</dd>
{% endif %}
<dt>{{ 'Category'|trans }}</dt>
<dd>{{ document.category.name|localize_translatable_string }}</dd>
@@ -52,7 +57,7 @@
</dl>
<ul class="record_actions">
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('person_document_index', {'person': person.id}) }}" class="btn btn-cancel">
{{ 'Back to the list' | trans }}
@@ -63,6 +68,12 @@
{{ m.download_button(document.object, document.title) }}
</li>
{% if chill_document_is_editable(document.object) %}
<li>
{{ document.object|chill_document_edit_button }}
</li>
{% endif %}
{% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
<li>
<a href="{{ path('person_document_edit', {'id': document.id, 'person': person.id}) }}" class="btn btn-edit">

View File

@@ -0,0 +1,36 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\DocStoreBundle\Templating;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
use Twig\TwigFunction;
class WopiEditTwigExtension extends AbstractExtension
{
public function getFilters(): array
{
return [
new TwigFilter('chill_document_edit_button', [WopiEditTwigExtensionRuntime::class, 'renderEditButton'], [
'needs_environment' => true,
'is_safe' => ['html'],
]),
];
}
public function getFunctions(): array
{
return [
new TwigFunction('chill_document_is_editable', [WopiEditTwigExtensionRuntime::class, 'isEditable']),
];
}
}

View File

@@ -0,0 +1,55 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\DocStoreBundle\Templating;
use ChampsLibres\WopiLib\Contract\Service\Discovery\DiscoveryInterface;
use Chill\DocStoreBundle\Entity\StoredObject;
use Twig\Environment;
use Twig\Extension\RuntimeExtensionInterface;
use function array_key_exists;
class WopiEditTwigExtensionRuntime implements RuntimeExtensionInterface
{
public const TEMPLATE = '@ChillDocStore/Button/wopi_edit_document.html.twig';
private DiscoveryInterface $discovery;
public function __construct(DiscoveryInterface $discovery)
{
$this->discovery = $discovery;
}
public function isEditable(StoredObject $document): bool
{
$mime_type = $this->discovery->discoverMimeType($document->getType());
if ([] === $mime_type) {
return false;
}
foreach ($mime_type as $item) {
if (array_key_exists('default', $item) && 'true' === $item['default']) {
return true;
}
}
return false;
}
public function renderEditButton(Environment $environment, StoredObject $document, ?array $options = null): string
{
return $environment->render(self::TEMPLATE, [
'document' => $document,
'options' => $options,
]);
}
}

View File

@@ -0,0 +1,74 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\DocStoreBundle\Workflow;
use Chill\DocStoreBundle\Entity\AccompanyingCourseDocument;
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
use Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
class AccompanyingCourseDocumentWorkflowHandler implements EntityWorkflowHandlerInterface
{
private EntityRepository $repository;
/**
* TODO: injecter le repository directement.
*/
public function __construct(EntityManagerInterface $em)
{
$this->repository = $em->getRepository(AccompanyingCourseDocument::class);
}
public function getRelatedEntity(EntityWorkflow $entityWorkflow): ?AccompanyingCourseDocument
{
return $this->repository->find($entityWorkflow->getRelatedEntityId());
}
public function getRoleShow(EntityWorkflow $entityWorkflow): ?string
{
return null;
}
public function getTemplate(EntityWorkflow $entityWorkflow, array $options = []): string
{
return '@ChillDocStore/AccompanyingCourseDocument/_workflow.html.twig';
}
public function getTemplateData(EntityWorkflow $entityWorkflow, array $options = []): array
{
return [
'entity_workflow' => $entityWorkflow,
'document' => $this->getRelatedEntity($entityWorkflow),
];
}
public function getTemplateTitle(EntityWorkflow $entityWorkflow, array $options = []): string
{
return '@ChillDocStore/AccompanyingCourseDocument/_workflow.title.html.twig';
}
public function getTemplateTitleData(EntityWorkflow $entityWorkflow, array $options = []): array
{
return $this->getTemplateData($entityWorkflow, $options);
}
public function supports(EntityWorkflow $entityWorkflow, array $options = []): bool
{
return $entityWorkflow->getRelatedEntityClass() === AccompanyingCourseDocument::class;
}
public function supportsFreeze(EntityWorkflow $entityWorkflow, array $options = []): bool
{
return true;
}
}

View File

@@ -6,7 +6,6 @@ services:
autowire: true
autoconfigure: true
resource: "../Repository/"
tags: ["doctrine.repository_service"]
Chill\DocStoreBundle\Form\DocumentCategoryType:
class: Chill\DocStoreBundle\Form\DocumentCategoryType
@@ -16,8 +15,10 @@ services:
Chill\DocStoreBundle\Form\PersonDocumentType:
class: Chill\DocStoreBundle\Form\PersonDocumentType
arguments:
- "@chill.main.helper.translatable_string"
autowire: true
autoconfigure: true
# arguments:
# - "@chill.main.helper.translatable_string"
tags:
- { name: form.type, alias: chill_docstorebundle_form_document }
@@ -27,3 +28,8 @@ services:
autoconfigure: true
tags:
- { name: chill.role }
Chill\DocStoreBundle\Workflow\:
resource: './../Workflow/'
autoconfigure: true
autowire: true

View File

@@ -0,0 +1,6 @@
services:
Chill\DocStoreBundle\Templating\:
resource: ../../Templating
autoconfigure: true
autowire: true

View File

@@ -0,0 +1,76 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\Migrations\DocStore;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Implementations of create and update traits for Document entity + template property added.
*/
final class Version20220131093117 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_doc.person_document DROP CONSTRAINT FK_41DA53C5DA0FB8');
$this->addSql('ALTER TABLE chill_doc.person_document DROP CONSTRAINT FK_41DA53C3174800F');
$this->addSql('ALTER TABLE chill_doc.person_document DROP CONSTRAINT FK_41DA53C65FF1AEC');
$this->addSql('ALTER TABLE chill_doc.person_document DROP template_id');
$this->addSql('ALTER TABLE chill_doc.person_document DROP createdAt');
$this->addSql('ALTER TABLE chill_doc.person_document DROP updatedAt');
$this->addSql('ALTER TABLE chill_doc.person_document DROP createdBy_id');
$this->addSql('ALTER TABLE chill_doc.person_document DROP updatedBy_id');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP CONSTRAINT FK_A45098F65DA0FB8');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP CONSTRAINT FK_A45098F63174800F');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP CONSTRAINT FK_A45098F665FF1AEC');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP template_id');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP createdAt');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP updatedAt');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP createdBy_id');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP updatedBy_id');
}
public function getDescription(): string
{
return 'Implementations of create and update traits for Document entity + template property added';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document ADD template_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document ADD createdAt TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document ADD updatedAt TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document ADD createdBy_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document ADD updatedBy_id INT DEFAULT NULL');
$this->addSql('COMMENT ON COLUMN chill_doc.accompanyingcourse_document.createdAt IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('COMMENT ON COLUMN chill_doc.accompanyingcourse_document.updatedAt IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document ADD CONSTRAINT FK_A45098F65DA0FB8 FOREIGN KEY (template_id) REFERENCES chill_docgen_template (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document ADD CONSTRAINT FK_A45098F63174800F FOREIGN KEY (createdBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document ADD CONSTRAINT FK_A45098F665FF1AEC FOREIGN KEY (updatedBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_A45098F65DA0FB8 ON chill_doc.accompanyingcourse_document (template_id)');
$this->addSql('CREATE INDEX IDX_A45098F63174800F ON chill_doc.accompanyingcourse_document (createdBy_id)');
$this->addSql('CREATE INDEX IDX_A45098F665FF1AEC ON chill_doc.accompanyingcourse_document (updatedBy_id)');
$this->addSql('ALTER TABLE chill_doc.person_document ADD template_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE chill_doc.person_document ADD createdAt TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
$this->addSql('ALTER TABLE chill_doc.person_document ADD updatedAt TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
$this->addSql('ALTER TABLE chill_doc.person_document ADD createdBy_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE chill_doc.person_document ADD updatedBy_id INT DEFAULT NULL');
$this->addSql('COMMENT ON COLUMN chill_doc.person_document.createdAt IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('COMMENT ON COLUMN chill_doc.person_document.updatedAt IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('ALTER TABLE chill_doc.person_document ADD CONSTRAINT FK_41DA53C5DA0FB8 FOREIGN KEY (template_id) REFERENCES chill_docgen_template (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE chill_doc.person_document ADD CONSTRAINT FK_41DA53C3174800F FOREIGN KEY (createdBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE chill_doc.person_document ADD CONSTRAINT FK_41DA53C65FF1AEC FOREIGN KEY (updatedBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_41DA53C5DA0FB8 ON chill_doc.person_document (template_id)');
$this->addSql('CREATE INDEX IDX_41DA53C3174800F ON chill_doc.person_document (createdBy_id)');
$this->addSql('CREATE INDEX IDX_41DA53C65FF1AEC ON chill_doc.person_document (updatedBy_id)');
}
}

View File

@@ -9,6 +9,8 @@ Create new document: Créer un nouveau document
New document for %name%: Nouveau document pour %name%
Editing document for %name%: Modification d'un document pour %name%
Edit Document: Modification d'un document
Update document: Modifier le document
Edit attributes: Modifier les propriétés du document
Existing document: Document existant
No document to download: Aucun document à télécharger
'Choose a document category': Choisissez une catégorie de document
@@ -50,4 +52,7 @@ Id inside bundle: Identifiant
Document class: Classe de document
no records found:
Create new category: Créer une nouvelle catégorie
Back to the category list: Retour à la liste
Back to the category list: Retour à la liste
# WOPI EDIT
online_edit_document: Éditer en ligne

View File

@@ -38,7 +38,7 @@ use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function count;

View File

@@ -28,7 +28,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function in_array;
use function is_array;

View File

@@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Allow to pick a choice amongst different choices.

View File

@@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Allow to pick amongst type.

View File

@@ -15,7 +15,7 @@ use Chill\EventBundle\Security\Authorization\EventVoter;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class PersonMenuBuilder implements LocalMenuBuilderInterface
{

View File

@@ -5,7 +5,7 @@ services:
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
$formFactoryInterface: '@Symfony\Component\Form\FormFactoryInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
$paginator: '@chill_main.paginator_factory'
public: true
tags: ['controller.service_arguments']

View File

@@ -44,6 +44,6 @@ services:
$tokenStorage: "@security.token_storage"
$authorizationHelper: "@chill.main.security.authorization.helper"
$urlGenerator: '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
tags:
- { name: form.type }

View File

@@ -2,6 +2,6 @@ services:
Chill\EventBundle\Menu\PersonMenuBuilder:
arguments:
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
tags:
- { name: 'chill.menu_builder' }

View File

@@ -24,7 +24,7 @@ use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class FamilyMemberController extends AbstractController
{

View File

@@ -15,7 +15,7 @@ use Chill\AMLI\FamilyMembersBundle\Security\Voter\FamilyMemberVoter;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class UserMenuBuilder implements LocalMenuBuilderInterface
{

View File

@@ -2,6 +2,6 @@ services:
Chill\AMLI\FamilyMembersBundle\Menu\UserMenuBuilder:
arguments:
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
tags:
- { name: 'chill.menu_builder' }

View File

@@ -20,8 +20,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_merge;

View File

@@ -27,7 +27,7 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_key_exists;
use function array_merge;

View File

@@ -31,6 +31,7 @@ use Chill\MainBundle\Security\Resolver\ScopeResolverInterface;
use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface;
use Chill\MainBundle\Templating\Entity\CompilerPass as RenderEntityCompilerPass;
use Chill\MainBundle\Templating\UI\NotificationCounterInterface;
use Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
@@ -56,6 +57,8 @@ class ChillMainBundle extends Bundle
->addTag('chill_main.notification_handler');
$container->registerForAutoconfiguration(NotificationCounterInterface::class)
->addTag('chill.count_notification.user');
$container->registerForAutoconfiguration(EntityWorkflowHandlerInterface::class)
->addTag('chill_main.workflow_handler');
$container->addCompilerPass(new SearchableServicesCompilerPass());
$container->addCompilerPass(new ConfigConsistencyCompilerPass());

View File

@@ -24,7 +24,7 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function count;
use function serialize;

View File

@@ -12,6 +12,8 @@ declare(strict_types=1);
namespace Chill\MainBundle\Controller;
use Chill\MainBundle\CRUD\Controller\ApiController;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\HttpFoundation\Request;
/**
@@ -19,7 +21,7 @@ use Symfony\Component\HttpFoundation\Request;
*/
class LocationApiController extends ApiController
{
public function customizeQuery(string $action, Request $request, $query): void
protected function customizeQuery(string $action, Request $request, $query): void
{
$query
->leftJoin('e.locationType', 'lt')
@@ -31,4 +33,14 @@ class LocationApiController extends ApiController
)
);
}
/**
* @param QueryBuilder $query
* @param mixed $_format
*/
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator, $_format)
{
return $query
->addOrderBy('e.name', 'ASC');
}
}

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