mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 17:28:23 +00:00 
			
		
		
		
	Compare commits
	
		
			13 Commits
		
	
	
		
			issue17_us
			...
			issue357_f
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | db65134743 | ||
| 7af4c3434e | |||
|  | a09c8ee8af | ||
|  | a312a9463d | ||
|  | 0035128138 | ||
|  | 49cb154672 | ||
|  | 1a7ec9e396 | ||
|  | fa0b9271c2 | ||
|  | c7b9a1a3fe | ||
|  | f1c61a2387 | ||
|  | 8f6a70b240 | ||
|  | 40e4bf953f | ||
|  | 378f3a16fc | 
							
								
								
									
										64
									
								
								.env
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								.env
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,64 @@ | ||||
| ## | ||||
| ##  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 | ||||
| @@ -29,7 +29,6 @@ variables: | ||||
|     REDIS_URL: redis://redis:6379 | ||||
|     # change vendor dir to make the app install into tests/apps | ||||
|     COMPOSER_VENDOR_DIR: tests/app/vendor | ||||
|     DEFAULT_CARRIER_CODE: BE | ||||
|  | ||||
| stages: | ||||
|     - Composer install | ||||
| @@ -79,7 +78,6 @@ psalm_tests: | ||||
|     image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4 | ||||
|     script: | ||||
|         - bin/grumphp run --tasks=psalm | ||||
|     allow_failure: true | ||||
|     artifacts: | ||||
|         expire_in: 30 min | ||||
|         paths: | ||||
|   | ||||
							
								
								
									
										186
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										186
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @@ -11,195 +11,10 @@ and this project adheres to | ||||
| ## Unreleased | ||||
|  | ||||
| <!-- write down unreleased development here --> | ||||
| * [main] filter user job in undispatch acc period to assign (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/472) | ||||
| * [person] Add url in accompanying period work evaluations entity and form (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/476) | ||||
| * [person] Add document generation in admin and in person/{id}/document (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/464) | ||||
| * [activity] do not override location if already exist (when validating new activity) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/470) | ||||
| * [parcours] Toggle emergency/intensity only by referrer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/442) | ||||
| * [docstore] Add an API entrypoint for StoredObject (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/466) | ||||
| * [person] Add the possibility of uploading existing documents to AccPeriodWorkEvaluationDocument (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/466) | ||||
| * [person] Add title to AccPeriodWorkEvaluationDocument (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/466) | ||||
| * [person] Order social issues by the field "ordering" (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/388) | ||||
| * [Person/Household list] when listing other simultaneous members of an household, exclude the members on person, not on members (avoid to show two membersship with the same person) | ||||
| * [draft periods] add a delete button (if acl granted) on each draft period listed on draft period page (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/463) | ||||
| * [Person] Display suffixText in RenderPerson, PersonText.vue, RenderPersonBox.vue (was made for displaying "enfant confie") (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/441) | ||||
| * [person] residential address: show residential address or info in PersonRenderBox, refactor Residential Address (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/439) | ||||
| * [thirdparty] Add a contact to a thirdparty from within onTheFly (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/345) | ||||
| * [documents] Improve flex-table item-col placement when long buttons and long metadata | ||||
| * [thirdparty] Fix display of multiple contact badges so they wrap onto next line (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/482) | ||||
| * [confidential] Fix position of toggle button so it does not cover text nor fall outside of box (no issue) | ||||
| * [parcours] Fix edit of both thirdparty and contact name (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/474) | ||||
| * [template] do not list inactive templates (for doc generator) | ||||
| * [parcours] location cannot be removed if linked to a user (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/478) | ||||
| * [person] email added to twig personRenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/490) | ||||
| * [person] Add link to current household in person banner (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/484) | ||||
|  | ||||
| ## Test releases | ||||
|  | ||||
| ### test release 2022-02-21 | ||||
|  | ||||
| * [notifications] Word 'un' changed to number '1' for notifications in user menu (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/483) | ||||
| * [documents] 'gabarit' changed to 'modèle' (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/405) | ||||
| * [person_resources] Menu name and order changed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/460) | ||||
| * workflow: fix sending notifications | ||||
| * [thirdparty] Extend the thirdparty search to thirdparty children (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/448) | ||||
| * [person]: AddPersons: allow creation of person or thirdparty only (no users) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/422) | ||||
| * [person]: AddPersons: allow creation of person or thirdparty depending on allowed types (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/422) | ||||
| * [person]: AddPersons: add suggestion of name when creating new person or thirdparty (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/422) | ||||
| * [main] Address: fix small bug: when modifying an address without street (isNoAddress), also check errors if street is an empty string as back-end change null value to empty string for street (and streetNumber) | ||||
| * [main] Address: stronger client-side validation of addresses (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/449) | ||||
| * [person] accompanying course: filter suggested entities by open participations (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/415) | ||||
| [activity] can click through the cross icon for removing person in concerned group (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/476) | ||||
| [activity] correct associated persons by considering only open participations (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/476) | ||||
| * [person_resources]: Renderboxes used to display person/thirdparty info (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/465) | ||||
| * [Household]: Add end date in HouseholdMember form for 'enfant hors menage' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/434) | ||||
| * [homepage_widget]: If no sender then display as 'notification automatique' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/435) | ||||
| * [parcours]: Order social activities and only display most recent three in parcours resumé (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/481) | ||||
| * [3party]: 3party: redirect to parent when contact (child) is opened in view page | ||||
| * [parcours / addresses]: launch an event when a person change address (either through changing household or because the household is associated to a new address). If the person is localising a course, the course location go back to a temporarily address. | ||||
| * [thirdparty]: address/phonenumber/email/fonction displayed in thirdpartyrenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/401) | ||||
| * [thirdparty_contact]: in search results the 'qualité' is displayed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/465) | ||||
| * [bug]: fix confidential toggle of address in thirdpartyrenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/460) | ||||
|  | ||||
|  | ||||
| ## Test releases | ||||
| * Creation of PickCivilityType, and implementation in PersonType and ThirdpartyType | ||||
|  | ||||
| ### 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) | ||||
| * [parcours]: Only the referrer can toggle the intensity of the parcours (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/442) | ||||
| * [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) | ||||
|  | ||||
|  | ||||
| ### 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. | ||||
| * [thirdparty] Add a contact to a thirdparty from within onTheFly (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/345) | ||||
|  | ||||
|  | ||||
| ## Test releases | ||||
| ======= | ||||
| * [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc. | ||||
| >>>>>>> issue422_and_others_on_AddPersons | ||||
|  | ||||
| ======= | ||||
| * [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc. | ||||
| * [thirdparty] Add a contact to a thirdparty from within onTheFly (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/345) | ||||
|  | ||||
| >>>>>>> b0d50d315c8e00959a967badac9cf5057ab2b4bc | ||||
| ### 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) | ||||
| * [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 | ||||
|  | ||||
| * [main] Add editableByUser field to locationType entity, adapt the admin template and add this condition in the location-type endpoint (see https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/297) | ||||
| * [main] Add mainLocation field to User entity and add it in user form type | ||||
| * rewrite page which allow to select activity | ||||
| * [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 | ||||
|  | ||||
| @@ -329,7 +144,6 @@ and this project adheres to | ||||
| * add an endpoint for checking permissions. See https://gitlab.com/Chill-Projet/chill-bundles/-/merge_requests/232 | ||||
| * [activity] for a new activity: suggest and create on-the-fly locations based on the accompanying course location + location of the suggested parties | ||||
| * [calendar] for a new rdv: suggest and create on-the-fly locations based on the accompanying course location + location of the suggested parties | ||||
| * [period] Validation added when period is confidential and confirmed -> user cannot be null. | ||||
|  | ||||
|  | ||||
| ## Test releases | ||||
|   | ||||
| @@ -22,7 +22,6 @@ | ||||
|         "league/csv": "^9.7.1", | ||||
|         "nyholm/psr7": "^1.4", | ||||
|         "ocramius/package-versions": "^1.10", | ||||
|         "odolbeau/phone-number-bundle": "^3.6", | ||||
|         "phpoffice/phpspreadsheet": "^1.16", | ||||
|         "ramsey/uuid-doctrine": "^1.7", | ||||
|         "sensio/framework-extra-bundle": "^5.5", | ||||
| @@ -53,6 +52,9 @@ | ||||
|         "twig/string-extra": "^3.3", | ||||
|         "twig/twig": "^3.0" | ||||
|     }, | ||||
|     "conflict": { | ||||
|         "symfony/symfony": "*" | ||||
|     }, | ||||
|     "require-dev": { | ||||
|         "doctrine/doctrine-fixtures-bundle": "^3.3", | ||||
|         "drupol/php-conventions": "^5", | ||||
| @@ -69,17 +71,23 @@ | ||||
|         "symfony/var-dumper": "^4.4", | ||||
|         "symfony/web-profiler-bundle": "^4.4" | ||||
|     }, | ||||
|     "conflict": { | ||||
|         "symfony/symfony": "*" | ||||
|     "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 | ||||
|         } | ||||
|     }, | ||||
|     "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", | ||||
| @@ -88,6 +96,9 @@ | ||||
|             "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" | ||||
|         } | ||||
|     }, | ||||
| @@ -100,10 +111,10 @@ | ||||
|     "config": { | ||||
|         "allow-plugins": { | ||||
|             "composer/package-versions-deprecated": true, | ||||
|             "phpstan/extension-installer": true, | ||||
|             "ergebnis/composer-normalize": true, | ||||
|             "ocramius/package-versions": true, | ||||
|             "phpro/grumphp": true, | ||||
|             "phpstan/extension-installer": true | ||||
|             "ocramius/package-versions": true | ||||
|         }, | ||||
|         "bin-dir": "bin", | ||||
|         "optimize-autoloader": true, | ||||
| @@ -112,8 +123,8 @@ | ||||
|     }, | ||||
|     "scripts": { | ||||
|         "auto-scripts": { | ||||
|             "assets:install %PUBLIC_DIR%": "symfony-cmd", | ||||
|             "cache:clear": "symfony-cmd" | ||||
|             "cache:clear": "symfony-cmd", | ||||
|             "assets:install %PUBLIC_DIR%": "symfony-cmd" | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
							
								
								
									
										3
									
								
								package.json.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								package.json.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| add npm/yarn dependency in package.json : | ||||
|  | ||||
| "select2-bootstrap-theme": "0.1.0-beta.10", | ||||
| @@ -80,6 +80,11 @@ 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 | ||||
|   | ||||
| @@ -25,6 +25,41 @@ parameters: | ||||
|             count: 1 | ||||
|             path: src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php | ||||
|  | ||||
|         - | ||||
|             message: "#^Access to an undefined property Chill\\\\PersonBundle\\\\Household\\\\MembersEditorFactory\\:\\:\\$validator\\.$#" | ||||
|             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 | ||||
|   | ||||
| @@ -105,6 +105,15 @@ 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: | ||||
| 				""" | ||||
| @@ -132,6 +141,15 @@ 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: | ||||
| 				""" | ||||
| @@ -177,6 +195,15 @@ 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: | ||||
| 				""" | ||||
| @@ -186,6 +213,15 @@ 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: | ||||
| 				""" | ||||
| @@ -222,6 +258,15 @@ 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: | ||||
| 				""" | ||||
| @@ -231,6 +276,15 @@ 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: | ||||
| 				""" | ||||
| @@ -240,6 +294,24 @@ 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: | ||||
| 				""" | ||||
| @@ -249,6 +321,15 @@ 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: | ||||
| 				""" | ||||
| @@ -318,6 +399,33 @@ 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: | ||||
| 				""" | ||||
| @@ -327,6 +435,15 @@ 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: | ||||
| 				""" | ||||
| @@ -345,6 +462,42 @@ 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: | ||||
| 				""" | ||||
| @@ -354,6 +507,24 @@ 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: | ||||
| 				""" | ||||
| @@ -363,6 +534,24 @@ 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: | ||||
| 				""" | ||||
| @@ -372,6 +561,15 @@ 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: | ||||
| 				""" | ||||
| @@ -390,6 +588,24 @@ 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: | ||||
| 				""" | ||||
| @@ -462,6 +678,42 @@ 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: | ||||
| 				""" | ||||
| @@ -480,6 +732,15 @@ 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: | ||||
| 				""" | ||||
| @@ -503,11 +764,38 @@ 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: | ||||
| 				""" | ||||
| @@ -594,6 +882,15 @@ 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: | ||||
| 				""" | ||||
| @@ -630,6 +927,15 @@ 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: | ||||
| 				""" | ||||
| @@ -639,6 +945,33 @@ 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: | ||||
| 				""" | ||||
| @@ -648,6 +981,15 @@ 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 | ||||
| @@ -662,6 +1004,15 @@ 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: | ||||
| 				""" | ||||
| @@ -671,6 +1022,15 @@ 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: | ||||
| 				""" | ||||
| @@ -680,6 +1040,15 @@ 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: | ||||
| 				""" | ||||
| @@ -716,6 +1085,15 @@ 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: | ||||
| 				""" | ||||
| @@ -743,6 +1121,15 @@ 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: | ||||
| 				""" | ||||
| @@ -788,6 +1175,15 @@ 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: | ||||
| 				""" | ||||
| @@ -829,6 +1225,24 @@ 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: | ||||
| 				""" | ||||
| @@ -892,6 +1306,15 @@ 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: | ||||
| 				""" | ||||
| @@ -901,6 +1324,15 @@ 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: | ||||
| 				""" | ||||
| @@ -982,6 +1414,15 @@ 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: | ||||
| 				""" | ||||
| @@ -1027,6 +1468,33 @@ 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: | ||||
| 				""" | ||||
| @@ -1063,6 +1531,33 @@ 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: | ||||
| 				""" | ||||
|   | ||||
| @@ -295,6 +295,11 @@ parameters: | ||||
| 			count: 3 | ||||
| 			path: src/Bundle/ChillMainBundle/Form/Type/DataTransformer/DateIntervalTransformer.php | ||||
|  | ||||
| 		- | ||||
| 			message: "#^Only booleans are allowed in a negated boolean, mixed given\\.$#" | ||||
| 			count: 1 | ||||
| 			path: src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php | ||||
|  | ||||
| 		- | ||||
| 			message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" | ||||
| 			count: 2 | ||||
| @@ -320,6 +325,11 @@ parameters: | ||||
| 			count: 1 | ||||
| 			path: src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php | ||||
|  | ||||
| 		- | ||||
| 			message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" | ||||
| 			count: 1 | ||||
| 			path: src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php | ||||
|  | ||||
| 		- | ||||
| 			message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" | ||||
| 			count: 1 | ||||
| @@ -390,6 +400,11 @@ 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 | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <files psalm-version="4.18.0.0"> | ||||
| <files psalm-version="v4.15.0@a1b5e489e6fcebe40cb804793d964e99fc347820"> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php"> | ||||
|     <UndefinedClass occurrences="4"> | ||||
|       <code>'ChillActivityBundle:ActivityReasonCategory'</code> | ||||
| @@ -47,11 +47,6 @@ | ||||
|       <code>Activity[]|array</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/AppKernel.php"> | ||||
|     <DuplicateClass occurrences="1"> | ||||
|       <code>AppKernel</code> | ||||
|     </DuplicateClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/autoload.php"> | ||||
|     <MissingFile occurrences="1"> | ||||
|       <code>require __DIR__ . '/../../../../../vendor/autoload.php'</code> | ||||
| @@ -169,18 +164,72 @@ | ||||
|       <code>type</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Tests/Export/Export/CountActivityTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Tests/Export/Export/ListActivityTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Tests/Export/Export/StatActivityDurationSumTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedDocblockClass occurrences="1"> | ||||
|       <code>\Chill\PersonBundle\Export\Filter\PersonHavingActivityBetweenDateFilter</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityReasonTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <TooFewArguments occurrences="2"/> | ||||
|     <UndefinedDocblockClass occurrences="1"> | ||||
|       <code>Prophecy\Prophet</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedDocblockClass occurrences="1"> | ||||
|       <code>type</code> | ||||
|     </UndefinedDocblockClass> | ||||
| @@ -205,6 +254,11 @@ | ||||
|       <code>$asideActivityCategory</code> | ||||
|     </ParamNameMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php"> | ||||
|     <InvalidStaticInvocation occurrences="3"> | ||||
|       <code>$calculator::getAlias()</code> | ||||
| @@ -234,6 +288,11 @@ | ||||
|       <code>'ChillCalendarBundle:Calendar'</code> | ||||
|     </UndefinedClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php"> | ||||
|     <UndefinedClass occurrences="1"> | ||||
|       <code>'ChillCustomFieldsBundle:CustomFieldsGroup'</code> | ||||
| @@ -338,6 +397,10 @@ | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public function tearDown()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedDocblockClass occurrences="4"> | ||||
|       <code>type</code> | ||||
|       <code>type</code> | ||||
| @@ -345,6 +408,61 @@ | ||||
|       <code>type</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Encoder/DocGenEncoderTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php"> | ||||
|     <UndefinedClass occurrences="1"> | ||||
|       <code>'ChillDocStoreBundle:AccompanyingCourseDocument'</code> | ||||
|     </UndefinedClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillDocStoreBundle/Controller/DocumentCategoryController.php"> | ||||
|     <UndefinedClass occurrences="3"> | ||||
|       <code>'ChillDocStoreBundle:DocumentCategory'</code> | ||||
| @@ -352,6 +470,11 @@ | ||||
|       <code>'ChillDocStoreBundle:DocumentCategory'</code> | ||||
|     </UndefinedClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php"> | ||||
|     <UndefinedClass occurrences="1"> | ||||
|       <code>'ChillDocStoreBundle:PersonDocument'</code> | ||||
|     </UndefinedClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillDocStoreBundle/Entity/Document.php"> | ||||
|     <UndefinedDocblockClass occurrences="1"> | ||||
|       <code>\Chill\PersonBundle\Entity\user</code> | ||||
| @@ -447,6 +570,9 @@ | ||||
|     <InvalidParamDefault occurrences="1"> | ||||
|       <code>type</code> | ||||
|     </InvalidParamDefault> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedClass occurrences="8"> | ||||
|       <code>'ChillEventBundle:Event'</code> | ||||
|       <code>'ChillEventBundle:Event'</code> | ||||
| @@ -462,6 +588,10 @@ | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public function tearDown()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedClass occurrences="1"> | ||||
|       <code>'ChillMainBundle:Scope'</code> | ||||
|     </UndefinedClass> | ||||
| @@ -761,6 +891,11 @@ | ||||
|       <code>OptionsResolverInterface</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Notification/Mailer.php"> | ||||
|     <UndefinedDocblockClass occurrences="1"> | ||||
|       <code>\Symfony\Component\Mailer\Exception\TransportExceptionInterface</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Pagination/PageGenerator.php"> | ||||
|     <UndefinedVariable occurrences="1"> | ||||
|       <code>$current</code> | ||||
| @@ -789,6 +924,11 @@ | ||||
|       <code>$onlyEnabled</code> | ||||
|     </ParamNameMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/AppKernel.php"> | ||||
|     <DuplicateClass occurrences="1"> | ||||
|       <code>AppKernel</code> | ||||
|     </DuplicateClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/autoload.php"> | ||||
|     <MissingFile occurrences="1"> | ||||
|       <code>require __DIR__ . '/../../../../../vendor/autoload.php'</code> | ||||
| @@ -916,15 +1056,158 @@ | ||||
|     </UndefinedClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedDocblockClass occurrences="1"> | ||||
|       <code>type</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>protected function tearDown()</code> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public function tearDown()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedDocblockClass occurrences="40"> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>$this->prophet</code> | ||||
|       <code>Prophecy\Prophet</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Form/Type/PickCenterTypeTest.php"> | ||||
|     <UndefinedClass occurrences="1"> | ||||
|       <code>CenterType</code> | ||||
|     </UndefinedClass> | ||||
|     <UndefinedDocblockClass occurrences="1"> | ||||
|       <code>CenterType</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Pagination/PageTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Pagination/PaginatorTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Search/AbstractSearchTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedDocblockClass occurrences="1"> | ||||
|       <code>unknown</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php"> | ||||
|     <UndefinedDocblockClass occurrences="1"> | ||||
|       <code>unknown</code> | ||||
| @@ -1129,6 +1412,20 @@ | ||||
|       <code>OptionsResolverInterface</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php"> | ||||
|     <UndefinedClass occurrences="6"> | ||||
|       <code>$qb</code> | ||||
|       <code>$qb</code> | ||||
|       <code>$qb</code> | ||||
|       <code>QueryBuilder</code> | ||||
|       <code>SocialAction</code> | ||||
|       <code>SocialAction</code> | ||||
|     </UndefinedClass> | ||||
|     <UndefinedVariable occurrences="2"> | ||||
|       <code>$action</code> | ||||
|       <code>$orderBy</code> | ||||
|     </UndefinedVariable> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Resources/test/Fixtures/App/app/AppKernel.php"> | ||||
|     <DuplicateClass occurrences="1"> | ||||
|       <code>AppKernel</code> | ||||
| @@ -1208,13 +1505,33 @@ | ||||
|     </ParamNameMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public static function setUpBeforeClass()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedClass occurrences="2"> | ||||
|       <code>AccompanyingPeriodRepository</code> | ||||
|       <code>stdClass</code> | ||||
|     </UndefinedClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public static function setUpBeforeClass()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php"> | ||||
|     <InvalidThrow occurrences="1"/> | ||||
|     <MethodSignatureMismatch occurrences="3"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public function tearDown()</code> | ||||
|       <code>public static function setUpBeforeClass()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedClass occurrences="3"> | ||||
|       <code>'ChillMainBundle:Center'</code> | ||||
|       <code>'ChillPersonBundle:AccompanyingPeriod\ClosingMotive'</code> | ||||
| @@ -1226,19 +1543,40 @@ | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function tearDown()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedClass occurrences="1"> | ||||
|       <code>User</code> | ||||
|     </UndefinedClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php"> | ||||
|     <InvalidScope occurrences="1"> | ||||
|       <code>$this</code> | ||||
|     </InvalidScope> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public static function setUpBeforeClass()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedClass occurrences="1"> | ||||
|       <code>'ChillPersonBundle:Person'</code> | ||||
|     </UndefinedClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public static function tearDownAfterClass()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public function tearDown()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedClass occurrences="2"> | ||||
|       <code>'ChillMainBundle:Country'</code> | ||||
|       <code>'ChillPersonBundle:Person'</code> | ||||
| @@ -1248,25 +1586,140 @@ | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public function tearDown()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedClass occurrences="2"> | ||||
|       <code>'ChillMainBundle:Country'</code> | ||||
|       <code>'ChillPersonBundle:Person'</code> | ||||
|     </UndefinedClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public function tearDown()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedClass occurrences="1"> | ||||
|       <code>'ChillPersonBundle:Person'</code> | ||||
|     </UndefinedClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public function tearDown()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedClass occurrences="1"> | ||||
|       <code>'ChillPersonBundle:Person'</code> | ||||
|     </UndefinedClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Controller/SocialIssueApiControllerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php"> | ||||
|     <AssignmentToVoid occurrences="1"> | ||||
|       <code>$participationL</code> | ||||
|     </AssignmentToVoid> | ||||
|     <NullReference occurrences="1"> | ||||
|       <code>getEndDate</code> | ||||
|     </NullReference> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AgeAggregatorTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/GenderAggregatorTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/NationalityAggregatorTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodFilterTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Export/Filter/BirthdayFilterTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Export/Filter/GenderFilterTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php"> | ||||
|     <UndefinedClass occurrences="1"> | ||||
| @@ -1367,13 +1820,20 @@ | ||||
|       <code>require __DIR__ . '/../../../../../vendor/autoload.php'</code> | ||||
|     </MissingFile> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>public function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php"> | ||||
|     <InvalidParamDefault occurrences="1"> | ||||
|       <code>type</code> | ||||
|     </InvalidParamDefault> | ||||
|     <UndefinedDocblockClass occurrences="31"> | ||||
|       <code>$client</code> | ||||
|       <code>$client</code> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public static function setUpBeforeClass()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedDocblockClass occurrences="29"> | ||||
|       <code>$client</code> | ||||
|       <code>$client</code> | ||||
|       <code>$client</code> | ||||
| @@ -1405,7 +1865,16 @@ | ||||
|       <code>type</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillReportBundle/Tests/DependencyInjection/ChillReportExtensionTest.php"> | ||||
|     <UndefinedClass occurrences="1"> | ||||
|       <code>Exception</code> | ||||
|     </UndefinedClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public static function setUpBeforeClass()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedDocblockClass occurrences="3"> | ||||
|       <code>type</code> | ||||
|       <code>type</code> | ||||
| @@ -1413,6 +1882,10 @@ | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="2"> | ||||
|       <code>public function setUp()</code> | ||||
|       <code>public function tearDown()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|     <UndefinedClass occurrences="1"> | ||||
|       <code>'ChillCustomFieldsBundle:CustomFieldsGroup'</code> | ||||
|     </UndefinedClass> | ||||
| @@ -1485,6 +1958,11 @@ | ||||
|       <code>CacheItempPoolInterface</code> | ||||
|     </UndefinedDocblockClass> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillThirdPartyBundle/DependencyInjection/CompilerPass/ThirdPartyTypeCompilerPass.php"> | ||||
|     <UndefinedClass occurrences="1"> | ||||
|       <code>$taggedService->getClass()::getKey()</code> | ||||
| @@ -1510,6 +1988,11 @@ | ||||
|       <code>$thirdParty</code> | ||||
|     </ParamNameMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyJsonDenormalizerTest.php"> | ||||
|     <MethodSignatureMismatch occurrences="1"> | ||||
|       <code>protected function setUp()</code> | ||||
|     </MethodSignatureMismatch> | ||||
|   </file> | ||||
|   <file src="src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php"> | ||||
|     <UndefinedDocblockClass occurrences="6"> | ||||
|       <code>$object</code> | ||||
|   | ||||
| @@ -31,17 +31,15 @@ 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 function array_key_exists; | ||||
|  | ||||
| final class ActivityController extends AbstractController | ||||
| @@ -201,36 +199,12 @@ final class ActivityController extends AbstractController | ||||
|             'role' => new Role('CHILL_ACTIVITY_UPDATE'), | ||||
|             'activityType' => $entity->getActivityType(), | ||||
|             'accompanyingPeriod' => $accompanyingPeriod, | ||||
|         ]); | ||||
|  | ||||
|         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); | ||||
|         ])->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); | ||||
| @@ -281,7 +255,7 @@ final class ActivityController extends AbstractController | ||||
|         if ($person instanceof Person) { | ||||
|             $this->denyAccessUnlessGranted(ActivityVoter::SEE, $person); | ||||
|             $activities = $this->activityACLAwareRepository | ||||
|                 ->findByPerson($person, ActivityVoter::SEE, 0, null, ['date' => 'DESC', 'id' => 'DESC']); | ||||
|                 ->findByPerson($person, ActivityVoter::SEE, 0, null); | ||||
|  | ||||
|             $event = new PrivacyEvent($person, [ | ||||
|                 'element_class' => Activity::class, | ||||
| @@ -294,7 +268,7 @@ final class ActivityController extends AbstractController | ||||
|             $this->denyAccessUnlessGranted(ActivityVoter::SEE, $accompanyingPeriod); | ||||
|  | ||||
|             $activities = $this->activityACLAwareRepository | ||||
|                 ->findByAccompanyingPeriod($accompanyingPeriod, ActivityVoter::SEE, 0, null, ['date' => 'DESC', 'id' => 'DESC']); | ||||
|                 ->findByAccompanyingPeriod($accompanyingPeriod, ActivityVoter::SEE); | ||||
|  | ||||
|             $view = 'ChillActivityBundle:Activity:listAccompanyingCourse.html.twig'; | ||||
|         } | ||||
| @@ -418,36 +392,12 @@ final class ActivityController extends AbstractController | ||||
|             'role' => new Role('CHILL_ACTIVITY_CREATE'), | ||||
|             'activityType' => $entity->getActivityType(), | ||||
|             'accompanyingPeriod' => $accompanyingPeriod, | ||||
|         ]); | ||||
|  | ||||
|         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); | ||||
|         ])->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); | ||||
| @@ -521,21 +471,20 @@ final class ActivityController extends AbstractController | ||||
|  | ||||
|     public function showAction(Request $request, int $id): Response | ||||
|     { | ||||
|         $entity = $this->activityRepository->find($id); | ||||
|         $view = null; | ||||
|  | ||||
|         if (null === $entity) { | ||||
|             throw $this->createNotFoundException('Unable to find Activity entity.'); | ||||
|         } | ||||
|  | ||||
|         $accompanyingPeriod = $entity->getAccompanyingPeriod(); | ||||
|         $person = $entity->getPerson(); | ||||
|         [$person, $accompanyingPeriod] = $this->getEntity($request); | ||||
|  | ||||
|         if ($accompanyingPeriod instanceof AccompanyingPeriod) { | ||||
|             $view = 'ChillActivityBundle:Activity:showAccompanyingCourse.html.twig'; | ||||
|         } elseif ($person instanceof Person) { | ||||
|             $view = 'ChillActivityBundle:Activity:showPerson.html.twig'; | ||||
|         } else { | ||||
|             throw new RuntimeException('the activity should be linked with a period or person'); | ||||
|         } | ||||
|  | ||||
|         $entity = $this->activityRepository->find($id); | ||||
|  | ||||
|         if (null === $entity) { | ||||
|             throw $this->createNotFoundException('Unable to find Activity entity.'); | ||||
|         } | ||||
|  | ||||
|         if (null !== $accompanyingPeriod) { | ||||
| @@ -544,7 +493,8 @@ final class ActivityController extends AbstractController | ||||
|             $entity->personsNotAssociated = $entity->getPersonsNotAssociated(); | ||||
|         } | ||||
|  | ||||
|         $this->denyAccessUnlessGranted(ActivityVoter::SEE, $entity); | ||||
|         // TODO revoir le Voter de Activity pour tenir compte qu'une activité peut appartenir a une période | ||||
|         // $this->denyAccessUnlessGranted('CHILL_ACTIVITY_SEE', $entity); | ||||
|  | ||||
|         $deleteForm = $this->createDeleteForm($entity->getId(), $person, $accompanyingPeriod); | ||||
|  | ||||
|   | ||||
| @@ -12,7 +12,7 @@ declare(strict_types=1); | ||||
| namespace Chill\ActivityBundle\Entity; | ||||
|  | ||||
| use Chill\ActivityBundle\Validator\Constraints as ActivityValidator; | ||||
| use Chill\DocStoreBundle\Entity\StoredObject; | ||||
| use Chill\DocStoreBundle\Entity\Document; | ||||
| 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", "docgen:read"}) | ||||
|      * @Groups({"read"}) | ||||
|      * @SerializedName("activityType") | ||||
|      * @ORM\JoinColumn(name="type_id") | ||||
|      */ | ||||
| @@ -75,19 +75,16 @@ 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; | ||||
|  | ||||
| @@ -103,7 +100,6 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="boolean", options={"default": false}) | ||||
|      * @Groups({"docgen:read"}) | ||||
|      */ | ||||
|     private bool $emergency = false; | ||||
|  | ||||
| @@ -111,13 +107,13 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac | ||||
|      * @ORM\Id | ||||
|      * @ORM\Column(name="id", type="integer") | ||||
|      * @ORM\GeneratedValue(strategy="AUTO") | ||||
|      * @Groups({"read", "docgen:read"}) | ||||
|      * @Groups({"read"}) | ||||
|      */ | ||||
|     private ?int $id = null; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Location") | ||||
|      * @groups({"read", "docgen:read"}) | ||||
|      * @groups({"read"}) | ||||
|      */ | ||||
|     private ?Location $location = null; | ||||
|  | ||||
| @@ -128,45 +124,42 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac | ||||
|  | ||||
|     /** | ||||
|      * @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\Person") | ||||
|      * @Groups({"read", "docgen:read"}) | ||||
|      * @Groups({"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", "docgen:read"}) | ||||
|      * @Groups({"read"}) | ||||
|      */ | ||||
|     private Collection $socialActions; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\SocialWork\SocialIssue") | ||||
|      * @ORM\JoinTable(name="chill_activity_activity_chill_person_socialissue") | ||||
|      * @Groups({"read", "docgen:read"}) | ||||
|      * @Groups({"read"}) | ||||
|      */ | ||||
|     private Collection $socialIssues; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\ManyToMany(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty") | ||||
|      * @Groups({"read", "docgen:read"}) | ||||
|      * @Groups({"read"}) | ||||
|      */ | ||||
|     private ?Collection $thirdParties = null; | ||||
|  | ||||
| @@ -177,13 +170,12 @@ 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", "docgen:read"}) | ||||
|      * @Groups({"read"}) | ||||
|      */ | ||||
|     private ?Collection $users = null; | ||||
|  | ||||
| @@ -199,7 +191,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac | ||||
|         $this->socialActions = new ArrayCollection(); | ||||
|     } | ||||
|  | ||||
|     public function addDocument(StoredObject $document): self | ||||
|     public function addDocument(Document $document): self | ||||
|     { | ||||
|         $this->documents[] = $document; | ||||
|  | ||||
| @@ -310,18 +302,6 @@ 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; | ||||
| @@ -357,7 +337,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac | ||||
|         if (null !== $this->accompanyingPeriod) { | ||||
|             $personsAssociated = []; | ||||
|  | ||||
|             foreach ($this->accompanyingPeriod->getOpenParticipations() as $participation) { | ||||
|             foreach ($this->accompanyingPeriod->getParticipations() as $participation) { | ||||
|                 if ($this->persons->contains($participation->getPerson())) { | ||||
|                     $personsAssociated[] = $participation->getPerson(); | ||||
|                 } | ||||
| @@ -422,18 +402,6 @@ 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 | ||||
|      */ | ||||
| @@ -457,7 +425,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac | ||||
|         return $this->getEmergency(); | ||||
|     } | ||||
|  | ||||
|     public function removeDocument(StoredObject $document): void | ||||
|     public function removeDocument(Document $document): void | ||||
|     { | ||||
|         $this->documents->removeElement($document); | ||||
|     } | ||||
|   | ||||
| @@ -12,7 +12,6 @@ declare(strict_types=1); | ||||
| namespace Chill\ActivityBundle\Entity; | ||||
|  | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
| use Symfony\Component\Serializer\Annotation as Serializer; | ||||
|  | ||||
| /** | ||||
|  * Class ActivityPresence. | ||||
| @@ -32,14 +31,11 @@ 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 = []; | ||||
|  | ||||
|   | ||||
| @@ -13,10 +13,8 @@ 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. | ||||
| @@ -120,7 +118,6 @@ class ActivityType | ||||
|      * @ORM\Id | ||||
|      * @ORM\Column(name="id", type="integer") | ||||
|      * @ORM\GeneratedValue(strategy="AUTO") | ||||
|      * @Groups({"docgen:read"}) | ||||
|      */ | ||||
|     private ?int $id; | ||||
|  | ||||
| @@ -136,8 +133,7 @@ class ActivityType | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="json") | ||||
|      * @Groups({"read", "docgen:read"}) | ||||
|      * @Serializer\Context({"is-translatable": true}, groups={"docgen:read"}) | ||||
|      * @Groups({"read"}) | ||||
|      */ | ||||
|     private array $name = []; | ||||
|  | ||||
| @@ -194,6 +190,7 @@ 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; | ||||
|  | ||||
| @@ -263,23 +260,6 @@ 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. | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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\Contracts\Translation\TranslatorInterface; | ||||
| use Symfony\Component\Translation\TranslatorInterface; | ||||
|  | ||||
| class ActivityDateFilter implements FilterInterface | ||||
| { | ||||
|   | ||||
| @@ -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; | ||||
|  | ||||
|   | ||||
| @@ -307,7 +307,6 @@ class ActivityType extends AbstractType | ||||
|                 'allow_add' => true, | ||||
|                 'button_add_label' => 'activity.Insert a document', | ||||
|                 'button_remove_label' => 'activity.Remove a document', | ||||
|                 'empty_collection_explain' => 'No documents', | ||||
|             ]); | ||||
|         } | ||||
|  | ||||
|   | ||||
| @@ -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\Contracts\Translation\TranslatorInterface; | ||||
| use Symfony\Component\Translation\TranslatorInterface; | ||||
|  | ||||
| class PersonMenuBuilder implements LocalMenuBuilderInterface | ||||
| { | ||||
|   | ||||
| @@ -9,9 +9,8 @@ div.new-activity-select-type { | ||||
|       display: flex; | ||||
|       flex-direction: row; | ||||
|       flex-wrap: wrap; | ||||
|       justify-content: flex-start; | ||||
|       justify-content: center; | ||||
|       gap: 12px; | ||||
|       margin-bottom: 30px; | ||||
|  | ||||
|       div.bloc { | ||||
|          width: 200px; | ||||
| @@ -28,28 +27,26 @@ div.new-activity-select-type { | ||||
| // precise dashboard specific details | ||||
|  | ||||
| p.date-label { | ||||
|    display: inline-block; | ||||
|    margin: 0 0.5em 0 0; | ||||
|    font-weight: 700; | ||||
|    font-size: 18pt; | ||||
|     display: inline-block; | ||||
|     margin: 0 0.5em 0 0; | ||||
|     font-weight: 700; | ||||
|     font-size: 18pt; | ||||
| } | ||||
| div.dashboard, | ||||
| h4.badge-title, | ||||
| h3.badge-title, | ||||
| h2.badge-title { | ||||
|    ul.list-content { | ||||
|       font-size: 70%; | ||||
|       list-style-type: none; | ||||
|       padding-left: 0; | ||||
|       margin: 0; | ||||
|       li { | ||||
|          margin-bottom: 0.2em; | ||||
|          // exception: change bg color for action badges above dashboard | ||||
|          .bg-light { | ||||
|                background-color: $chill-light-gray !important; | ||||
|          } | ||||
|       } | ||||
|    } | ||||
|     ul.list-content { | ||||
|         font-size: 70%; | ||||
|         list-style-type: none; | ||||
|         padding-left: 0; | ||||
|         margin: 0; | ||||
|         li { | ||||
|             margin-bottom: 0.2em; | ||||
|             // exception: change bg color for action badges above dashboard | ||||
|             .bg-light { | ||||
|                 background-color: $chill-light-gray !important; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| //// ACTIVITY SHOW AND FORM PAGES | ||||
|   | ||||
| @@ -1,52 +1,45 @@ | ||||
| <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}`"> | ||||
|                   <person-text v-if="p.type === 'person'" :person="p"></person-text> | ||||
|                   <span v-else>{{ 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}`"> | ||||
|                     <span>{{ p.text }}</span> | ||||
|                 </li> | ||||
|             </ul> | ||||
|         </div> | ||||
|  | ||||
|       <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> | ||||
|         <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> | ||||
|  | ||||
|    </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, | ||||
|       PersonText | ||||
|       PersonsBloc | ||||
|    }, | ||||
|    data() { | ||||
|       return { | ||||
|   | ||||
| @@ -1,29 +1,21 @@ | ||||
| <template> | ||||
|    <li> | ||||
|       <span :title="person.text" @click.prevent="$emit('remove', person)"> | ||||
|          <span class="chill_denomination"> | ||||
|             <person-text :person="person" :isCut="true"></person-text> | ||||
|          </span> | ||||
|       <span :title="person.text"> | ||||
|          <span class="chill_denomination" @click.prevent="$emit('remove', person)">{{ textCutted }}</span> | ||||
|       </span> | ||||
|    </li> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import PersonText from 'ChillPersonAssets/vuejs/_components/Entity/PersonText.vue'; | ||||
|  | ||||
|  | ||||
| export default { | ||||
|    name: "PersonBadge", | ||||
|    props: ['person'], | ||||
|    components: { | ||||
|       PersonText | ||||
|    computed: { | ||||
|       textCutted() { | ||||
|          let more = (this.person.text.length > 15) ?'…' : ''; | ||||
|          return this.person.text.slice(0,15) + more; | ||||
|       } | ||||
|    }, | ||||
|    // computed: { | ||||
|    //    textCutted() { | ||||
|    //       let more = (this.person.text.length > 15) ?'…' : ''; | ||||
|    //       return this.person.text.slice(0,15) + more; | ||||
|    //    } | ||||
|    // }, | ||||
|    emits: ['remove'], | ||||
| } | ||||
| </script> | ||||
|   | ||||
| @@ -2,15 +2,11 @@ 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; | ||||
| @@ -33,54 +29,3 @@ 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); | ||||
|     }) | ||||
|  | ||||
| }); | ||||
|   | ||||
| @@ -110,8 +110,10 @@ export default function prepareLocations(store) { | ||||
|         console.log('default loation id', window.default_location_id); | ||||
|         if (window.default_location_id) { | ||||
|             for (let group of store.state.availableLocations) { | ||||
|                 console.log(group); | ||||
|                 let location = group.locations.find((l) => l.id === window.default_location_id); | ||||
|                 if (location !== undefined & store.state.activity.location === null) { | ||||
|                 console.log(location); | ||||
|                 if (location !== undefined) { | ||||
|                     store.dispatch('updateLocation', location); | ||||
|                     break; | ||||
|                 } | ||||
|   | ||||
| @@ -41,17 +41,6 @@ | ||||
|                 </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> | ||||
| @@ -68,7 +57,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_box }} | ||||
|                             {{ activity.user|chill_entity_render_string|capitalize }} | ||||
|                         </p> | ||||
|                     </div> | ||||
|                 </div> | ||||
| @@ -154,17 +143,9 @@ | ||||
|     </div> | ||||
|  | ||||
|     <div class="item-row separator"> | ||||
|         <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> | ||||
|         <ul class="record_actions"> | ||||
|             {{ recordAction }} | ||||
|         </ul> | ||||
|     </div> | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -8,7 +8,6 @@ | ||||
|         action: 'show', displayBadge: true, | ||||
|         targetEntity: { name: type, id: entity.id }, | ||||
|         buttonText: entity|chill_entity_render_string, | ||||
|         isDead: entity.deathdate is defined and entity.deathdate is not null, | ||||
|         parent: parent | ||||
|     } %} | ||||
| {% endmacro %} | ||||
|   | ||||
| @@ -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 %} | ||||
|  | ||||
| {%- 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 %} | ||||
|  | ||||
| {# TODO .. status #} | ||||
|  | ||||
| {% set person_id = null %} | ||||
| {% if entity.person %} | ||||
|   | ||||
| @@ -15,7 +15,7 @@ | ||||
|  | ||||
| {% block js %} | ||||
|     {{ parent() }} | ||||
|     {{ encore_entry_script_tags('mod_async_upload') }} | ||||
|     {{ encore_entry_link_tags('mod_async_upload') }} | ||||
|     <script type="text/javascript"> | ||||
|         window.addEventListener('DOMContentLoaded', function (e) { | ||||
|             chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]', | ||||
|   | ||||
| @@ -30,7 +30,7 @@ | ||||
| {% endblock %} | ||||
|  | ||||
| {% block js %} | ||||
|     {{ encore_entry_script_tags('mod_async_upload') }} | ||||
|     {{ encore_entry_link_tags('mod_async_upload') }} | ||||
|     <script type="text/javascript"> | ||||
|         window.addEventListener('DOMContentLoaded', function (e) { | ||||
|             chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]', | ||||
|   | ||||
| @@ -1,61 +1,57 @@ | ||||
| {% macro recordAction(activity, context = null, person_id = null, accompanying_course_id = null) %} | ||||
|     {% if is_granted('CHILL_ACTIVITY_SEE_DETAILS', activity) %} | ||||
|         {% if no_action is not defined or no_action == false %} | ||||
|             <li> | ||||
|                 <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 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 %} | ||||
|     {% if no_action is not defined or no_action == false %} | ||||
|         <li> | ||||
|             <a href="{{ path('chill_activity_activity_show', {'id': activity.id, | ||||
|                     'person_id': person_id, | ||||
|             <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-show" | ||||
|                 title="{{ 'Show'|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> | ||||
|         {% 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 %} | ||||
|     <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 %} | ||||
| {% endmacro %} | ||||
|   | ||||
| @@ -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|chill_entity_render_box}}</b> | ||||
|                                 <b>{{ activity.user.usernameCanonical }}</b> | ||||
|                             </li> | ||||
|                         {% endif %} | ||||
|  | ||||
|                         <li class="associated-persons"> | ||||
|                             <span class="item-key">{{ 'Participants'|trans ~ ' : ' }}</span> | ||||
|                             {% for p in activity.personsAssociated %} | ||||
|                                 <span class="badge-person">{{ p|chill_entity_render_box({'addAgeBadge': true}) }}</span> | ||||
|                                 <span class="badge-person">{{ p|chill_entity_render_box }}</span> | ||||
|                             {% endfor %} | ||||
|                         </li> | ||||
|                     </ul> | ||||
|   | ||||
| @@ -87,7 +87,6 @@ | ||||
|  | ||||
| {%- 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 -%} | ||||
|   | ||||
| @@ -17,6 +17,10 @@ | ||||
|     {{ 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> | ||||
|   | ||||
| @@ -14,7 +14,7 @@ | ||||
| {% endblock %} | ||||
|  | ||||
| {% block js %} | ||||
|     {{ encore_entry_script_tags('mod_async_upload') }} | ||||
|     {{ encore_entry_link_tags('mod_async_upload') }} | ||||
|     <script type="text/javascript"> | ||||
|         window.addEventListener('DOMContentLoaded', function (e) { | ||||
|             chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]', | ||||
|   | ||||
| @@ -25,7 +25,7 @@ | ||||
|                     'activityData': activityData | ||||
|                 }) }}"> | ||||
|  | ||||
|                     <div class="btn btn-primary"> | ||||
|                     <div class="bloc btn btn-primary btn-lg btn-block"> | ||||
|                         {{ activityType.name|localize_translatable_string }} | ||||
|                     </div> | ||||
|                 </a> | ||||
|   | ||||
| @@ -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,7 +165,11 @@ | ||||
|                 <dt class="inline">{{ 'Attendee'|trans }}</dt> | ||||
|                 <dd> | ||||
|                     {% if entity.attendee is not null %} | ||||
|                         {{ entity.attendee.name|localize_translatable_string }} | ||||
|                         {% if entity.attendee %} | ||||
|                             {{ 'present'|trans|capitalize }} | ||||
|                         {% else %} | ||||
|                             {{ 'not present'|trans|capitalize }} | ||||
|                         {% endif %} | ||||
|                     {% else %} | ||||
|                         <span class="chill-no-data-statement">{{ 'None'|trans|capitalize }}</span> | ||||
|                     {% endif %} | ||||
| @@ -177,13 +181,6 @@ | ||||
|     </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 %} | ||||
| @@ -200,21 +197,18 @@ | ||||
|             {{ 'Back to the list'|trans }} | ||||
|         </a> | ||||
|     </li> | ||||
|     <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> | ||||
|             <a class="btn btn-update" href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"> | ||||
|             {{ 'Edit'|trans }} | ||||
|         </a> | ||||
|     </li> | ||||
|     {% 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" title="{{ '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"> | ||||
|             {{ 'Delete'|trans }} | ||||
|         </a> | ||||
|     </li> | ||||
|     {% endif %} | ||||
| </ul> | ||||
|   | ||||
| @@ -7,13 +7,11 @@ | ||||
| {% block js %} | ||||
|     {{ parent() }} | ||||
|     {{ encore_entry_script_tags('mod_notification_toggle_read_status') }} | ||||
|     {{ encore_entry_script_tags('mod_async_upload') }} | ||||
| {% endblock %} | ||||
|  | ||||
| {% block css %} | ||||
|     {{ parent() }} | ||||
|     {{ encore_entry_link_tags('mod_notification_toggle_read_status') }} | ||||
|     {{ encore_entry_link_tags('mod_async_upload') }} | ||||
| {% endblock %} | ||||
|  | ||||
| {% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %} | ||||
| @@ -25,5 +23,19 @@ | ||||
| {% endblock content %} | ||||
|  | ||||
| {% block block_post_menu %} | ||||
| <div class="post-menu pt-4"></div> | ||||
|     <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> | ||||
| {% endblock %} | ||||
|   | ||||
| @@ -7,13 +7,11 @@ | ||||
| {% block js %} | ||||
|     {{ parent() }} | ||||
|     {{ encore_entry_script_tags('mod_notification_toggle_read_status') }} | ||||
|     {{ encore_entry_link_tags('mod_async_upload') }} | ||||
| {% endblock %} | ||||
|  | ||||
| {% block css %} | ||||
|     {{ parent() }} | ||||
|     {{ encore_entry_link_tags('mod_notification_toggle_read_status') }} | ||||
|     {{ encore_entry_link_tags('mod_async_upload') }} | ||||
| {% endblock %} | ||||
|  | ||||
| {% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %} | ||||
| @@ -28,7 +26,8 @@ | ||||
|     <div class="post-menu pt-4"> | ||||
|  | ||||
|         <div class="d-grid gap-2"> | ||||
|             <a class="btn btn-notify" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id}) }}"> | ||||
|             <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> | ||||
|   | ||||
| @@ -1,216 +0,0 @@ | ||||
| <?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\PersonRenderInterface; | ||||
| 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 PersonRenderInterface $personRender; | ||||
|  | ||||
|     private TranslatableStringHelperInterface $translatableStringHelper; | ||||
|  | ||||
|     private TranslatorInterface $translator; | ||||
|  | ||||
|     public function __construct( | ||||
|         DocumentCategoryRepository $documentCategoryRepository, | ||||
|         NormalizerInterface $normalizer, | ||||
|         TranslatableStringHelperInterface $translatableStringHelper, | ||||
|         EntityManagerInterface $em, | ||||
|         PersonRenderInterface $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); | ||||
|     } | ||||
| } | ||||
| @@ -9,7 +9,7 @@ | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace Chill\ActivityBundle\Tests\Export\Aggregator; | ||||
| namespace Chill\ActivityBundle\Tests\Aggregator; | ||||
|  | ||||
| use Chill\MainBundle\Test\Export\AbstractAggregatorTest; | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace Chill\ActivityBundle\Tests\Export\Aggregator; | ||||
| namespace Chill\ActivityBundle\Tests\Aggregator; | ||||
|  | ||||
| use Chill\MainBundle\Test\Export\AbstractAggregatorTest; | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace Chill\ActivityBundle\Tests\Export\Aggregator; | ||||
| namespace Chill\ActivityBundle\Tests\Aggregator; | ||||
|  | ||||
| use Chill\MainBundle\Test\Export\AbstractAggregatorTest; | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace Chill\ActivityBundle\Tests\Export\Filter; | ||||
| namespace Chill\ActivityBundle\Tests\Filter; | ||||
|  | ||||
| use Chill\MainBundle\Test\Export\AbstractFilterTest; | ||||
| use Doctrine\Common\Collections\ArrayCollection; | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace Chill\ActivityBundle\Tests\Export\Filter; | ||||
| namespace Chill\ActivityBundle\Tests\Filter; | ||||
|  | ||||
| use Chill\MainBundle\Test\Export\AbstractFilterTest; | ||||
| use DateTime; | ||||
|   | ||||
| @@ -29,13 +29,9 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; | ||||
| final class ActivityVoterTest extends KernelTestCase | ||||
| { | ||||
|     use PrepareActivityTrait; | ||||
|  | ||||
|     use PrepareCenterTrait; | ||||
|  | ||||
|     use PreparePersonTrait; | ||||
|  | ||||
|     use PrepareScopeTrait; | ||||
|  | ||||
|     use PrepareUserTrait; | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -32,8 +32,3 @@ services: | ||||
|         autowire: true | ||||
|         autoconfigure: true | ||||
|         resource: '../Validator/Constraints/' | ||||
|  | ||||
|     Chill\ActivityBundle\Service\DocGenerator\: | ||||
|         autowire: true | ||||
|         autoconfigure: true | ||||
|         resource: '../Service/DocGenerator/' | ||||
|   | ||||
| @@ -76,7 +76,7 @@ activity: | ||||
|     Insert a document: Insérer un document | ||||
|     Remove a document: Supprimer le document | ||||
|     comment: Commentaire | ||||
| No documents: Aucun document | ||||
|  | ||||
|  | ||||
| #timeline | ||||
| '%user% has done an %activity_type%': '%user% a effectué une activité de type "%activity_type%"' | ||||
| @@ -228,7 +228,3 @@ 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 | ||||
|   | ||||
| @@ -20,4 +20,3 @@ 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" | ||||
| @@ -32,8 +32,6 @@ 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); | ||||
|   | ||||
| @@ -167,6 +167,7 @@ class AsideActivityCategory | ||||
|         } | ||||
|  | ||||
|         $this->parent = $parent; | ||||
|         dump($this); | ||||
|  | ||||
|         return $this; | ||||
|     } | ||||
|   | ||||
| @@ -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,10 +68,22 @@ final class AsideActivityFormType extends AbstractType | ||||
|         ]; | ||||
|  | ||||
|         $builder | ||||
|             ->add('agent', PickUserDynamicType::class, [ | ||||
|                 'label' => 'For agent', | ||||
|                 'required' => true, | ||||
|             ]) | ||||
|             ->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( | ||||
|                 'date', | ||||
|                 ChillDateType::class, | ||||
|   | ||||
| @@ -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\Contracts\Translation\TranslatorInterface; | ||||
| use Symfony\Component\Translation\TranslatorInterface; | ||||
|  | ||||
| class UserMenuBuilder implements LocalMenuBuilderInterface | ||||
| { | ||||
|   | ||||
| @@ -1,15 +1,5 @@ | ||||
| {% 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 %} | ||||
| @@ -18,5 +8,4 @@ | ||||
| {% embed '@ChillMain/CRUD/_new_content.html.twig' %} | ||||
|     {% block content_form_actions_save_and_show %}{% endblock %} | ||||
| {% endembed %} | ||||
| {% endblock %} | ||||
|  | ||||
| {% endblock %} | ||||
| @@ -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\Contracts\Translation\TranslatorInterface; | ||||
| use Symfony\Component\Translation\TranslatorInterface; | ||||
|  | ||||
| use function get_class; | ||||
|  | ||||
|   | ||||
| @@ -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\Contracts\Translation\TranslatorInterface; | ||||
| use Symfony\Component\Translation\TranslatorInterface; | ||||
|  | ||||
| use function array_merge; | ||||
| use function count; | ||||
|   | ||||
| @@ -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\Contracts\Translation\TranslatorInterface; | ||||
| use Symfony\Component\Translation\TranslatorInterface; | ||||
|  | ||||
| class UserMenuBuilder implements LocalMenuBuilderInterface | ||||
| { | ||||
|   | ||||
| @@ -2,6 +2,6 @@ services: | ||||
|     Chill\AMLI\BudgetBundle\Menu\UserMenuBuilder: | ||||
|         arguments: | ||||
|             $authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface' | ||||
|             $translator: '@Symfony\Contracts\Translation\TranslatorInterface' | ||||
|             $translator: '@Symfony\Component\Translation\TranslatorInterface' | ||||
|         tags: | ||||
|             - { name: 'chill.menu_builder' } | ||||
|   | ||||
| @@ -97,6 +97,8 @@ class CalendarType extends AbstractType | ||||
|                     return $res; | ||||
|                 }, | ||||
|                 static function (?string $dateAsString): DateTimeImmutable { | ||||
|                     dump($dateAsString); | ||||
|  | ||||
|                     return new DateTimeImmutable($dateAsString); | ||||
|                 } | ||||
|             )); | ||||
|   | ||||
| @@ -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\Contracts\Translation\TranslatorInterface; | ||||
| use Symfony\Component\Translation\TranslatorInterface; | ||||
|  | ||||
| class UserMenuBuilder implements LocalMenuBuilderInterface | ||||
| { | ||||
|   | ||||
| @@ -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\Contracts\Translation\TranslatorInterface; | ||||
| use Symfony\Component\Translation\TranslatorInterface; | ||||
|  | ||||
| use function count; | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace Chill\CustomFieldsBundle\Tests\CustomFields; | ||||
| namespace Chill\CustomFieldsBundle\Tests; | ||||
|  | ||||
| use Chill\CustomFieldsBundle\CustomFields\CustomFieldChoice; | ||||
| use Chill\CustomFieldsBundle\Entity\CustomField; | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace Chill\CustomFieldsBundle\Tests\CustomFields; | ||||
| namespace Chill\CustomFieldsBundle\Tests; | ||||
|  | ||||
| use Chill\CustomFieldsBundle\CustomFields\CustomFieldNumber; | ||||
| use Chill\CustomFieldsBundle\Entity\CustomField; | ||||
|   | ||||
| @@ -9,11 +9,10 @@ | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace Chill\CustomFieldsBundle\Tests\CustomFields; | ||||
| namespace Chill\CustomFieldsBundle\Tests; | ||||
|  | ||||
| use Chill\CustomFieldsBundle\CustomFields\CustomFieldText; | ||||
| use Chill\CustomFieldsBundle\Entity\CustomField; | ||||
| use Chill\CustomFieldsBundle\Tests\CustomFieldTestHelper; | ||||
| use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | ||||
|  | ||||
| /** | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace Chill\CustomFieldsBundle\Tests\Routing; | ||||
| namespace Chill\CustomFieldsBundle\Tests; | ||||
|  | ||||
| use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | ||||
| use Symfony\Component\HttpFoundation\Response; | ||||
|   | ||||
| @@ -207,21 +207,21 @@ final class DocGeneratorTemplateController extends AbstractController | ||||
|             $context instanceof DocGeneratorContextWithPublicFormInterface | ||||
|             && $context->hasPublicForm($template, $entity) || $isTest | ||||
|         ) { | ||||
|             if ($context instanceof DocGeneratorContextWithPublicFormInterface && $context->hasPublicForm($template, $entity)) { | ||||
|             if ($context instanceof DocGeneratorContextWithPublicFormInterface) { | ||||
|                 $builder = $this->createFormBuilder( | ||||
|                     array_merge( | ||||
|                         $context->getFormData($template, $entity), | ||||
|                         $isTest ? ['test_file' => null] : [] | ||||
|                     ) | ||||
|                 ); | ||||
|  | ||||
|                 $context->buildPublicForm($builder, $template, $entity); | ||||
|             } else { | ||||
|                 $builder = $this->createFormBuilder( | ||||
|                     ['test_file' => null] | ||||
|                 ); | ||||
|             } | ||||
|  | ||||
|             $context->buildPublicForm($builder, $template, $entity); | ||||
|  | ||||
|             if ($isTest) { | ||||
|                 $builder->add('test_file', FileType::class, [ | ||||
|                     'label' => 'Template file', | ||||
|   | ||||
| @@ -70,7 +70,6 @@ final class DocGeneratorTemplateRepository implements ObjectRepository | ||||
|  | ||||
|         $builder | ||||
|             ->where('t.entity LIKE :entity') | ||||
|             ->andWhere($builder->expr()->eq('t.active', "'TRUE'")) | ||||
|             ->setParameter('entity', addslashes($entity)); | ||||
|  | ||||
|         return $builder | ||||
|   | ||||
| @@ -1,13 +0,0 @@ | ||||
|  | ||||
| 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}; | ||||
| @@ -16,12 +16,12 @@ | ||||
|                         <div class="input-group mb-3"> | ||||
|                             <select class="form-select" v-model="template"> | ||||
|                                 <option disabled selected value="">{{ $t('choose_a_template') }}</option> | ||||
|                                 <template v-for="t in templates" :key="t.id"> | ||||
|                                     <option :value="t.id" >{{ t.name.fr || 'Aucun nom défini' }}</option> | ||||
|                                 <template v-for="t in templates"> | ||||
|                                     <option  v-bind:value="t.id">{{ t.name.fr }}</option> | ||||
|                                 </template> | ||||
|                             </select> | ||||
|                             <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> | ||||
|                             <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> | ||||
|                         </div> | ||||
|                     </div> | ||||
|                 </div> | ||||
| @@ -39,27 +39,23 @@ | ||||
|  | ||||
| <script> | ||||
|  | ||||
| import {buildLink} from 'ChillDocGeneratorAssets/lib/document-generator'; | ||||
|  | ||||
| export default { | ||||
|     name: "PickTemplate", | ||||
|     props: { | ||||
|         entityId: [String, Number], | ||||
|         entityClass: { | ||||
|             type: String, | ||||
|             required: false, | ||||
|         }, | ||||
|         templates: { | ||||
|             type: Array, | ||||
|             required: true, | ||||
|         }, | ||||
|         preventDefaultMoveToGenerate: { | ||||
|             type: Boolean, | ||||
|         templates: { | ||||
|             required: true, | ||||
|         }, | ||||
|         // beforeMove execute "something" before | ||||
|         beforeMove: { | ||||
|             type: Function, | ||||
|             required: false, | ||||
|             default: false, | ||||
|         } | ||||
|     }, | ||||
|     emits: ['goToGenerateDocument'], | ||||
|     data() { | ||||
|         return { | ||||
|             template: null, | ||||
| @@ -77,37 +73,62 @@ export default { | ||||
|             return true; | ||||
|         }, | ||||
|         getDescription() { | ||||
|             if (null === this.template) { | ||||
|                 return ''; | ||||
|             } | ||||
|             let desc = this.templates.find(t => t.id === this.template); | ||||
|             if (null === desc) { | ||||
|                 return ''; | ||||
|             } | ||||
|             return desc.description || ''; | ||||
|             return this.templates.find(t => t.id === this.template).description || ''; | ||||
|         }, | ||||
|         buildUrlGenerate() { | ||||
|             if (null === this.template) { | ||||
|                 return '#'; | ||||
|             } | ||||
|  | ||||
|             return buildLink(this.template, this.entityId, this.entityClass); | ||||
|         } | ||||
|     }, | ||||
|     methods: { | ||||
|         clickGenerate(event, link) { | ||||
|             if (!this.preventDefaultMoveToGenerate) { | ||||
|                 window.location.assign(link); | ||||
|         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; | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             this.$emit('goToGenerateDocument', {event, link, template: this.template}); | ||||
|             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); | ||||
|         }, | ||||
|     }, | ||||
|     i18n: { | ||||
|         messages: { | ||||
|             fr: { | ||||
|                 generate_document: 'Générer un document', | ||||
|                 select_a_template: 'Choisir un modèle', | ||||
|                 select_a_template: 'Choisir un gabarit', | ||||
|                 choose_a_template: 'Choisir', | ||||
|             } | ||||
|         } | ||||
|   | ||||
| @@ -2,11 +2,11 @@ docgen: | ||||
|     Generate a document: Génerer un document | ||||
|     Generate: Génerer | ||||
|     Document generation: Génération de documents | ||||
|     Manage templates and document generation: Gestion des documents générés et de leurs modèles | ||||
|     Manage templates and document generation: Gestion des documents générés et de leurs gabarits | ||||
|     Pick template context: Choisir un contexte | ||||
|     Context: Contexte | ||||
|     New template: Nouveau modèle | ||||
|     Edit template: Modifier modèle | ||||
|     New template: Nouveau gabarit | ||||
|     Edit template: Modifier gabarit | ||||
|     test generate: Tester la génération | ||||
|     With context: 'Avec le contexte :' | ||||
|  | ||||
|   | ||||
| @@ -13,16 +13,12 @@ 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; | ||||
| use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||||
| use Symfony\Component\EventDispatcher\EventDispatcherInterface; | ||||
| use Symfony\Component\Form\Extension\Core\Type\FormType; | ||||
| use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
| use Symfony\Component\HttpFoundation\Response; | ||||
| use Symfony\Component\Routing\Annotation\Route; | ||||
| @@ -33,15 +29,20 @@ use Symfony\Contracts\Translation\TranslatorInterface; | ||||
|  */ | ||||
| class DocumentAccompanyingCourseController extends AbstractController | ||||
| { | ||||
|     protected AuthorizationHelper $authorizationHelper; | ||||
|     /** | ||||
|      * @var AuthorizationHelper | ||||
|      */ | ||||
|     protected $authorizationHelper; | ||||
|  | ||||
|     protected EventDispatcherInterface $eventDispatcher; | ||||
|     /** | ||||
|      * @var EventDispatcherInterface | ||||
|      */ | ||||
|     protected $eventDispatcher; | ||||
|  | ||||
|     protected TranslatorInterface $translator; | ||||
|  | ||||
|     private AccompanyingCourseDocumentRepository $courseRepository; | ||||
|  | ||||
|     private PaginatorFactory $paginatorFactory; | ||||
|     /** | ||||
|      * @var TranslatorInterface | ||||
|      */ | ||||
|     protected $translator; | ||||
|  | ||||
|     /** | ||||
|      * DocumentAccompanyingCourseController constructor. | ||||
| @@ -49,49 +50,29 @@ class DocumentAccompanyingCourseController extends AbstractController | ||||
|     public function __construct( | ||||
|         TranslatorInterface $translator, | ||||
|         EventDispatcherInterface $eventDispatcher, | ||||
|         AuthorizationHelper $authorizationHelper, | ||||
|         PaginatorFactory $paginatorFactory, | ||||
|         AccompanyingCourseDocumentRepository $courseRepository | ||||
|         AuthorizationHelper $authorizationHelper | ||||
|     ) { | ||||
|         $this->translator = $translator; | ||||
|         $this->eventDispatcher = $eventDispatcher; | ||||
|         $this->authorizationHelper = $authorizationHelper; | ||||
|         $this->paginatorFactory = $paginatorFactory; | ||||
|         $this->courseRepository = $courseRepository; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @Route("/{id}/delete", name="chill_docstore_accompanying_course_document_delete") | ||||
|      * @Route("/{id}", name="accompanying_course_document_delete", methods="DELETE") | ||||
|      */ | ||||
|     public function delete(Request $request, AccompanyingPeriod $course, AccompanyingCourseDocument $document): Response | ||||
|     { | ||||
|         $this->denyAccessUnlessGranted(AccompanyingCourseDocumentVoter::DELETE, $document); | ||||
|  | ||||
|         $form = $this->createForm(FormType::class); | ||||
|         $form->add('submit', SubmitType::class, ['label' => 'Delete']); | ||||
|  | ||||
|         $form->handleRequest($request); | ||||
|  | ||||
|         if ($form->isSubmitted() && $form->isValid()) { | ||||
|             $this->getDoctrine()->getManager()->remove($document); | ||||
|             $this->getDoctrine()->getManager()->flush(); | ||||
|  | ||||
|             $this->addFlash('success', $this->translator->trans('The document is successfully removed')); | ||||
|  | ||||
|             if ($request->query->has('returnPath')) { | ||||
|                 return $this->redirect($request->query->get('returnPath')); | ||||
|             } | ||||
|  | ||||
|             return $this->redirectToRoute('accompanying_course_document_index', ['course' => $course->getId()]); | ||||
|         if ($this->isCsrfTokenValid('delete' . $document->getId(), $request->request->get('_token'))) { | ||||
|             $em = $this->getDoctrine()->getManager(); | ||||
|             $em->remove($document); | ||||
|             $em->flush(); | ||||
|         } | ||||
|  | ||||
|         return $this->render( | ||||
|             'ChillDocStoreBundle:AccompanyingCourseDocument:delete.html.twig', | ||||
|             [ | ||||
|                 'document' => $document, | ||||
|                 'delete_form' => $form->createView(), | ||||
|                 'accompanyingCourse' => $course, | ||||
|             ] | ||||
|         return $this->redirectToRoute( | ||||
|             'accompanying_course_document_index', | ||||
|             ['accompanyingCourse' => $course->getId()] | ||||
|         ); | ||||
|     } | ||||
|  | ||||
| @@ -149,15 +130,11 @@ class DocumentAccompanyingCourseController extends AbstractController | ||||
|  | ||||
|         $this->denyAccessUnlessGranted(AccompanyingCourseDocumentVoter::SEE, $course); | ||||
|  | ||||
|         $total = $this->courseRepository->countByCourse($course); | ||||
|         $pagination = $this->paginatorFactory->create($total); | ||||
|  | ||||
|         $documents = $this->courseRepository | ||||
|         $documents = $em | ||||
|             ->getRepository('ChillDocStoreBundle:AccompanyingCourseDocument') | ||||
|             ->findBy( | ||||
|                 ['course' => $course], | ||||
|                 ['date' => 'DESC'], | ||||
|                 $pagination->getItemsPerPage(), | ||||
|                 $pagination->getCurrentPageFirstItemNumber() | ||||
|                 ['date' => 'DESC'] | ||||
|             ); | ||||
|  | ||||
|         return $this->render( | ||||
| @@ -165,7 +142,6 @@ class DocumentAccompanyingCourseController extends AbstractController | ||||
|             [ | ||||
|                 'documents' => $documents, | ||||
|                 'accompanyingCourse' => $course, | ||||
|                 'pagination' => $pagination, | ||||
|             ] | ||||
|         ); | ||||
|     } | ||||
|   | ||||
| @@ -13,9 +13,7 @@ namespace Chill\DocStoreBundle\Controller; | ||||
|  | ||||
| use Chill\DocStoreBundle\Entity\PersonDocument; | ||||
| use Chill\DocStoreBundle\Form\PersonDocumentType; | ||||
| use Chill\DocStoreBundle\Repository\PersonDocumentACLAwareRepositoryInterface; | ||||
| use Chill\DocStoreBundle\Security\Authorization\PersonDocumentVoter; | ||||
| use Chill\MainBundle\Pagination\PaginatorFactory; | ||||
| use Chill\MainBundle\Security\Authorization\AuthorizationHelper; | ||||
| use Chill\PersonBundle\Entity\Person; | ||||
| use Chill\PersonBundle\Privacy\PrivacyEvent; | ||||
| @@ -23,12 +21,10 @@ use Chill\PersonBundle\Security\Authorization\PersonVoter; | ||||
| use DateTime; | ||||
| use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||||
| use Symfony\Component\EventDispatcher\EventDispatcherInterface; | ||||
| use Symfony\Component\Form\Extension\Core\Type\FormType; | ||||
| use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
| use Symfony\Component\HttpFoundation\Response; | ||||
| use Symfony\Component\Routing\Annotation\Route; | ||||
| use Symfony\Contracts\Translation\TranslatorInterface; | ||||
| use Symfony\Component\Translation\TranslatorInterface; | ||||
|  | ||||
| /** | ||||
|  * Class DocumentPersonController. | ||||
| @@ -39,15 +35,20 @@ use Symfony\Contracts\Translation\TranslatorInterface; | ||||
|  */ | ||||
| class DocumentPersonController extends AbstractController | ||||
| { | ||||
|     protected AuthorizationHelper $authorizationHelper; | ||||
|     /** | ||||
|      * @var AuthorizationHelper | ||||
|      */ | ||||
|     protected $authorizationHelper; | ||||
|  | ||||
|     protected EventDispatcherInterface $eventDispatcher; | ||||
|     /** | ||||
|      * @var EventDispatcherInterface | ||||
|      */ | ||||
|     protected $eventDispatcher; | ||||
|  | ||||
|     protected TranslatorInterface $translator; | ||||
|  | ||||
|     private PaginatorFactory $paginatorFactory; | ||||
|  | ||||
|     private PersonDocumentACLAwareRepositoryInterface $personDocumentACLAwareRepository; | ||||
|     /** | ||||
|      * @var TranslatorInterface | ||||
|      */ | ||||
|     protected $translator; | ||||
|  | ||||
|     /** | ||||
|      * DocumentPersonController constructor. | ||||
| @@ -55,49 +56,30 @@ class DocumentPersonController extends AbstractController | ||||
|     public function __construct( | ||||
|         TranslatorInterface $translator, | ||||
|         EventDispatcherInterface $eventDispatcher, | ||||
|         AuthorizationHelper $authorizationHelper, | ||||
|         PaginatorFactory $paginatorFactory, | ||||
|         PersonDocumentACLAwareRepositoryInterface $personDocumentACLAwareRepository | ||||
|         AuthorizationHelper $authorizationHelper | ||||
|     ) { | ||||
|         $this->translator = $translator; | ||||
|         $this->eventDispatcher = $eventDispatcher; | ||||
|         $this->authorizationHelper = $authorizationHelper; | ||||
|         $this->paginatorFactory = $paginatorFactory; | ||||
|         $this->personDocumentACLAwareRepository = $personDocumentACLAwareRepository; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @Route("/{id}/delete", name="chill_docstore_person_document_delete") | ||||
|      * @Route("/{id}", name="person_document_delete", methods="DELETE") | ||||
|      */ | ||||
|     public function delete(Request $request, Person $person, PersonDocument $document): Response | ||||
|     { | ||||
|         $this->denyAccessUnlessGranted(PersonDocumentVoter::DELETE, $document); | ||||
|         $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person); | ||||
|         $this->denyAccessUnlessGranted('CHILL_PERSON_DOCUMENT_DELETE', $document); | ||||
|  | ||||
|         $form = $this->createForm(FormType::class); | ||||
|         $form->add('submit', SubmitType::class, ['label' => 'Delete']); | ||||
|  | ||||
|         $form->handleRequest($request); | ||||
|  | ||||
|         if ($form->isSubmitted() && $form->isValid()) { | ||||
|             $this->getDoctrine()->getManager()->remove($document); | ||||
|             $this->getDoctrine()->getManager()->flush(); | ||||
|  | ||||
|             $this->addFlash('success', $this->translator->trans('The document is successfully removed')); | ||||
|  | ||||
|             if ($request->query->has('returnPath')) { | ||||
|                 return $this->redirect($request->query->get('returnPath')); | ||||
|             } | ||||
|  | ||||
|             return $this->redirectToRoute('person_document_index', ['person' => $person->getId()]); | ||||
|         if ($this->isCsrfTokenValid('delete' . $document->getId(), $request->request->get('_token'))) { | ||||
|             $em = $this->getDoctrine()->getManager(); | ||||
|             $em->remove($document); | ||||
|             $em->flush(); | ||||
|         } | ||||
|  | ||||
|         return $this->render( | ||||
|             'ChillDocStoreBundle:PersonDocument:delete.html.twig', | ||||
|             [ | ||||
|                 'document' => $document, | ||||
|                 'delete_form' => $form->createView(), | ||||
|                 'person' => $person, | ||||
|             ] | ||||
|         return $this->redirectToRoute( | ||||
|             'person_document_index', | ||||
|             ['person' => $person->getId()] | ||||
|         ); | ||||
|     } | ||||
|  | ||||
| @@ -116,6 +98,7 @@ class DocumentPersonController extends AbstractController | ||||
|             PersonDocumentType::class, | ||||
|             $document, | ||||
|             [ | ||||
|                 'center' => $document->getCenter(), | ||||
|                 'role' => 'CHILL_PERSON_DOCUMENT_UPDATE', | ||||
|             ] | ||||
|         ); | ||||
| @@ -173,15 +156,19 @@ class DocumentPersonController extends AbstractController | ||||
|  | ||||
|         $this->denyAccessUnlessGranted(PersonVoter::SEE, $person); | ||||
|  | ||||
|         $total = $this->personDocumentACLAwareRepository->countByPerson($person); | ||||
|         $pagination = $this->paginatorFactory->create($total); | ||||
|         $reachableScopes = $this->authorizationHelper | ||||
|             ->getReachableScopes( | ||||
|                 $this->getUser(), | ||||
|                 PersonDocumentVoter::SEE, | ||||
|                 $person->getCenter() | ||||
|             ); | ||||
|  | ||||
|         $documents = $this->personDocumentACLAwareRepository->findByPerson( | ||||
|             $person, | ||||
|             [], | ||||
|             $pagination->getItemsPerPage(), | ||||
|             $pagination->getCurrentPageFirstItemNumber() | ||||
|         ); | ||||
|         $documents = $em | ||||
|             ->getRepository('ChillDocStoreBundle:PersonDocument') | ||||
|             ->findBy( | ||||
|                 ['person' => $person, 'scope' => $reachableScopes], | ||||
|                 ['date' => 'DESC'] | ||||
|             ); | ||||
|  | ||||
|         $event = new PrivacyEvent($person, [ | ||||
|             'element_class' => PersonDocument::class, | ||||
| @@ -194,7 +181,6 @@ class DocumentPersonController extends AbstractController | ||||
|             [ | ||||
|                 'documents' => $documents, | ||||
|                 'person' => $person, | ||||
|                 'pagination' => $pagination, | ||||
|             ] | ||||
|         ); | ||||
|     } | ||||
| @@ -216,6 +202,7 @@ class DocumentPersonController extends AbstractController | ||||
|         $document->setDate(new DateTime('Now')); | ||||
|  | ||||
|         $form = $this->createForm(PersonDocumentType::class, $document, [ | ||||
|             'center' => $document->getCenter(), | ||||
|             'role' => 'CHILL_PERSON_DOCUMENT_CREATE', | ||||
|         ]); | ||||
|         $form->handleRequest($request); | ||||
|   | ||||
| @@ -17,7 +17,6 @@ use Symfony\Component\Config\FileLocator; | ||||
| use Symfony\Component\DependencyInjection\ContainerBuilder; | ||||
| use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; | ||||
| use Symfony\Component\DependencyInjection\Loader; | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
| use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||||
|  | ||||
| /** | ||||
| @@ -39,7 +38,6 @@ 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) | ||||
| @@ -47,28 +45,6 @@ class ChillDocStoreExtension extends Extension implements PrependExtensionInterf | ||||
|         $this->prependRoute($container); | ||||
|         $this->prependAuthorization($container); | ||||
|         $this->prependTwig($container); | ||||
|         $this->prependApis($container); | ||||
|     } | ||||
|  | ||||
|     protected function prependApis(ContainerBuilder $container) | ||||
|     { | ||||
|         $container->prependExtensionConfig('chill_main', [ | ||||
|             'apis' => [ | ||||
|                 [ | ||||
|                     'class' => \Chill\DocStoreBundle\Entity\StoredObject::class, | ||||
|                     'name' => 'stored_object', | ||||
|                     'base_path' => '/api/1.0/docstore/stored-object', | ||||
|                     'base_role' => 'ROLE_USER', | ||||
|                     'actions' => [ | ||||
|                         '_entity' => [ | ||||
|                             'methods' => [ | ||||
|                                 Request::METHOD_POST => true, | ||||
|                             ], | ||||
|                         ], | ||||
|                     ], | ||||
|                 ], | ||||
|             ], | ||||
|         ]); | ||||
|     } | ||||
|  | ||||
|     protected function prependAuthorization(ContainerBuilder $container) | ||||
|   | ||||
| @@ -11,13 +11,7 @@ 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; | ||||
| @@ -26,12 +20,8 @@ use Symfony\Component\Validator\Constraints as Assert; | ||||
| /** | ||||
|  * @ORM\MappedSuperclass | ||||
|  */ | ||||
| class Document implements HasScopeInterface, TrackCreationInterface, TrackUpdateInterface | ||||
| class Document implements HasScopeInterface | ||||
| { | ||||
|     use TrackCreationTrait; | ||||
|  | ||||
|     use TrackUpdateTrait; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\ManyToOne(targetEntity="Chill\DocStoreBundle\Entity\DocumentCategory") | ||||
|      * @ORM\JoinColumns({ | ||||
| @@ -77,11 +67,6 @@ class Document implements HasScopeInterface, TrackCreationInterface, TrackUpdate | ||||
|      */ | ||||
|     private $scope; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\ManyToOne(targetEntity="Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate") | ||||
|      */ | ||||
|     private $template; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="text") | ||||
|      * @Assert\Length( | ||||
| @@ -97,6 +82,9 @@ class Document implements HasScopeInterface, TrackCreationInterface, TrackUpdate | ||||
|      */ | ||||
|     private $user; | ||||
|  | ||||
|     /** | ||||
|      * @return DocumentCategory | ||||
|      */ | ||||
|     public function getCategory(): ?DocumentCategory | ||||
|     { | ||||
|         return $this->category; | ||||
| @@ -127,16 +115,11 @@ class Document implements HasScopeInterface, TrackCreationInterface, TrackUpdate | ||||
|      * | ||||
|      * @return \Chill\MainBundle\Entity\Scope | ||||
|      */ | ||||
|     public function getScope(): ?Scope | ||||
|     public function getScope() | ||||
|     { | ||||
|         return $this->scope; | ||||
|     } | ||||
|  | ||||
|     public function getTemplate(): ?DocGeneratorTemplate | ||||
|     { | ||||
|         return $this->template; | ||||
|     } | ||||
|  | ||||
|     public function getTitle(): ?string | ||||
|     { | ||||
|         return $this->title; | ||||
| @@ -182,13 +165,6 @@ class Document implements HasScopeInterface, TrackCreationInterface, TrackUpdate | ||||
|         return $this; | ||||
|     } | ||||
|  | ||||
|     public function setTemplate(?DocGeneratorTemplate $template): self | ||||
|     { | ||||
|         $this->template = $template; | ||||
|  | ||||
|         return $this; | ||||
|     } | ||||
|  | ||||
|     public function setTitle(string $title): self | ||||
|     { | ||||
|         $this->title = $title; | ||||
|   | ||||
| @@ -34,19 +34,19 @@ class StoredObject implements AsyncFileInterface, Document | ||||
| { | ||||
|     /** | ||||
|      * @ORM\Column(type="datetime", name="creation_date") | ||||
|      * @Serializer\Groups({"read", "write"}) | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private DateTimeInterface $creationDate; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="json", name="datas") | ||||
|      * @Serializer\Groups({"read", "write"}) | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private array $datas = []; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="text") | ||||
|      * @Serializer\Groups({"read", "write"}) | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private $filename; | ||||
|  | ||||
| @@ -54,32 +54,30 @@ class StoredObject implements AsyncFileInterface, Document | ||||
|      * @ORM\Id | ||||
|      * @ORM\GeneratedValue | ||||
|      * @ORM\Column(type="integer") | ||||
|      * @Serializer\Groups({"read", "write"}) | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private $id; | ||||
|  | ||||
|     /** | ||||
|      * @var int[] | ||||
|      * @ORM\Column(type="json", name="iv") | ||||
|      * @Serializer\Groups({"write"}) | ||||
|      */ | ||||
|     private array $iv = []; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="json", name="key") | ||||
|      * @Serializer\Groups({"write"}) | ||||
|      */ | ||||
|     private array $keyInfos = []; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="text", name="type") | ||||
|      * @Serializer\Groups({"read", "write"}) | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private string $type = ''; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="uuid", unique=true) | ||||
|      * @Serializer\Groups({"read", "write"}) | ||||
|      * @Serializer\Groups({"read"}) | ||||
|      */ | ||||
|     private UuidInterface $uuid; | ||||
|  | ||||
|   | ||||
| @@ -13,15 +13,15 @@ namespace Chill\DocStoreBundle\Form; | ||||
|  | ||||
| use Chill\DocStoreBundle\Entity\Document; | ||||
| use Chill\DocStoreBundle\Entity\PersonDocument; | ||||
| use Chill\MainBundle\Entity\User; | ||||
| use Chill\MainBundle\Form\Type\ChillDateType; | ||||
| use Chill\MainBundle\Form\Type\ChillTextareaType; | ||||
| use Chill\MainBundle\Form\Type\ScopePickerType; | ||||
| use Chill\MainBundle\Security\Resolver\CenterResolverDispatcher; | ||||
| use Chill\MainBundle\Security\Resolver\ScopeResolverDispatcher; | ||||
| use Chill\MainBundle\Templating\TranslatableStringHelperInterface; | ||||
| use Chill\MainBundle\Security\Authorization\AuthorizationHelper; | ||||
| 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; | ||||
| @@ -29,29 +29,36 @@ use Symfony\Component\OptionsResolver\OptionsResolver; | ||||
|  | ||||
| class PersonDocumentType extends AbstractType | ||||
| { | ||||
|     private CenterResolverDispatcher $centerResolverDispatcher; | ||||
|     /** | ||||
|      * @var AuthorizationHelper | ||||
|      */ | ||||
|     protected $authorizationHelper; | ||||
|  | ||||
|     private ParameterBagInterface $parameterBag; | ||||
|     /** | ||||
|      * @var ObjectManager | ||||
|      */ | ||||
|     protected $om; | ||||
|  | ||||
|     private ScopeResolverDispatcher $scopeResolverDispatcher; | ||||
|     /** | ||||
|      * @var TranslatableStringHelper | ||||
|      */ | ||||
|     protected $translatableStringHelper; | ||||
|  | ||||
|     private TranslatableStringHelperInterface $translatableStringHelper; | ||||
|     /** | ||||
|      * the user running this form. | ||||
|      * | ||||
|      * @var User | ||||
|      */ | ||||
|     protected $user; | ||||
|  | ||||
|     public function __construct( | ||||
|         TranslatableStringHelperInterface $translatableStringHelper, | ||||
|         ScopeResolverDispatcher $scopeResolverDispatcher, | ||||
|         ParameterBagInterface $parameterBag | ||||
|         TranslatableStringHelper $translatableStringHelper | ||||
|     ) { | ||||
|         $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, [ | ||||
| @@ -60,6 +67,10 @@ 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', | ||||
| @@ -73,13 +84,6 @@ 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' => $this->centerResolverDispatcher->resolveCenter($document), | ||||
|                 'role' => $options['role'], | ||||
|             ]); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     public function configureOptions(OptionsResolver $resolver) | ||||
| @@ -88,7 +92,8 @@ class PersonDocumentType extends AbstractType | ||||
|             'data_class' => Document::class, | ||||
|         ]); | ||||
|  | ||||
|         $resolver->setRequired(['role']) | ||||
|             ->setAllowedTypes('role', ['string']); | ||||
|         $resolver->setRequired(['role', 'center']) | ||||
|             ->setAllowedTypes('role', ['string']) | ||||
|             ->setAllowedTypes('center', [\Chill\MainBundle\Entity\Center::class]); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1,75 +0,0 @@ | ||||
| <?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; | ||||
|     } | ||||
| } | ||||
| @@ -1,90 +0,0 @@ | ||||
| <?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); | ||||
|     } | ||||
| } | ||||
| @@ -1,21 +0,0 @@ | ||||
| <?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; | ||||
| } | ||||
| @@ -4,12 +4,12 @@ var initializeDownload = require('./downloader.js'); | ||||
|  | ||||
|  | ||||
| /** | ||||
|  * | ||||
|  *  | ||||
|  * define a dropzone for chill usage | ||||
|  * | ||||
|  * An event is launched when dropzone is initialize, allowing to customize events | ||||
|  *  | ||||
|  * An event is launched when dropzone is initialize, allowing to customize events  | ||||
|  * on dropzone : | ||||
|  * | ||||
|  *  | ||||
|  * ``` | ||||
|  * window.addEventListener("chill_dropzone_initialized", (e) => { | ||||
|  *    // do something with dropzone: | ||||
| @@ -18,7 +18,7 @@ var initializeDownload = require('./downloader.js'); | ||||
|  *    }); | ||||
|  * }); | ||||
|  * ``` | ||||
|  * | ||||
|  *  | ||||
|  */ | ||||
|  | ||||
| // load css | ||||
| @@ -37,6 +37,7 @@ var keyDefinition = { | ||||
|  | ||||
| var searchForZones = function(root) { | ||||
|     var zones = root.querySelectorAll('div[data-stored-object]'); | ||||
|      | ||||
|     for(let i=0; i < zones.length; i++) { | ||||
|         initialize(zones[i]); | ||||
|     } | ||||
| @@ -47,32 +48,32 @@ var getUploadUrl = function(zoneData, files) { | ||||
|         generateTempUrlPost  = zoneData.zone.querySelector('input[data-async-file-upload]').dataset.generateTempUrlPost, | ||||
|         oReq = new XMLHttpRequest() | ||||
|         ; | ||||
|  | ||||
|      | ||||
|     // arg, dropzone, you cannot handle async upload... | ||||
|     oReq.open("GET", generateTempUrlPost, false); | ||||
|     oReq.send(); | ||||
|  | ||||
|      | ||||
|     if (oReq.readyState !== XMLHttpRequest.DONE) { | ||||
|         throw new Error("Error while fetching url to upload"); | ||||
|     } | ||||
|  | ||||
|      | ||||
|     zoneData.params = JSON.parse(oReq.responseText); | ||||
|  | ||||
|      | ||||
|     return zoneData.params.url; | ||||
| }; | ||||
|  | ||||
| var encryptFile = function(originalFile, zoneData, done) { | ||||
|     var | ||||
|     var  | ||||
|         iv = crypto.getRandomValues(new Uint8Array(16)), | ||||
|         reader = new FileReader(), | ||||
|         jsKey, rawKey | ||||
|         ; | ||||
|  | ||||
|          | ||||
|     zoneData.originalType = originalFile.type; | ||||
|  | ||||
|          | ||||
|     reader.onload = e => { | ||||
|         window.crypto.subtle.generateKey(keyDefinition, true, [ "encrypt", "decrypt" ]) | ||||
|             .then(key => { | ||||
|             .then(key => {  | ||||
|                 jsKey = key; | ||||
|  | ||||
|                 // we register the key somwhere | ||||
| @@ -89,34 +90,34 @@ var encryptFile = function(originalFile, zoneData, done) { | ||||
|                     rawKey: rawKey, | ||||
|                     iv: iv | ||||
|                 }; | ||||
|  | ||||
|                  | ||||
|                 done(new File( [ encrypted ], zoneData.suffix)); | ||||
|             }); | ||||
|     }; | ||||
|  | ||||
|      | ||||
|     reader.readAsArrayBuffer(originalFile); | ||||
| }; | ||||
|  | ||||
| var addBelowButton = (btn, zone, zoneData) => { | ||||
|     let | ||||
|         belowZone = zone.querySelector('.chill-dropzone__below-zone'); | ||||
|  | ||||
|          | ||||
|     if (belowZone === null) { | ||||
|         belowZone = document.createElement('div'); | ||||
|         belowZone.classList.add('chill-dropzone__below-zone'); | ||||
|         zone.appendChild(belowZone); | ||||
|     } | ||||
|  | ||||
|              | ||||
|     belowZone.appendChild(btn); | ||||
| }; | ||||
|  | ||||
| var createZone = (zone, zoneData) => { | ||||
|     var | ||||
|     var  | ||||
|         created = document.createElement('div'), | ||||
|         initMessage = document.createElement('div'), | ||||
|         initContent = zone.dataset.labelInitMessage, | ||||
|         dropzoneI; | ||||
|  | ||||
|      | ||||
|     created.classList.add('dropzone'); | ||||
|     initMessage.classList.add('dz-message'); | ||||
|     initMessage.appendChild(document.createTextNode(initContent)); | ||||
| @@ -141,7 +142,7 @@ var createZone = (zone, zoneData) => { | ||||
|                 return zoneData.suffix; | ||||
|             } | ||||
|         }); | ||||
|  | ||||
|          | ||||
|     dropzoneI.on("sending", function(file, xhr, formData) { | ||||
|         formData.append("redirect", zoneData.params.redirect); | ||||
|         formData.append("max_file_size", zoneData.params.max_file_size); | ||||
| @@ -149,24 +150,24 @@ var createZone = (zone, zoneData) => { | ||||
|         formData.append("expires", zoneData.params.expires); | ||||
|         formData.append("signature", zoneData.params.signature); | ||||
|     }); | ||||
|  | ||||
|      | ||||
|     dropzoneI.on("success", function(file, response) { | ||||
|         zoneData.currentFile = file; | ||||
|         storeDataInForm(zone, zoneData); | ||||
|     }); | ||||
|  | ||||
|      | ||||
|     dropzoneI.on("addedfile", function(file) { | ||||
|         if (zoneData.hasOwnProperty('currentFile')) { | ||||
|             dropzoneI.removeFile(zoneData.currentFile); | ||||
|         } | ||||
|     }); | ||||
|  | ||||
|      | ||||
|     dropzoneI.on("removedfile", function(file) { | ||||
|         removeDataInForm(zone, zoneData); | ||||
|     }); | ||||
|  | ||||
|     zone.insertBefore(created, zone.firstChild); | ||||
|  | ||||
|      | ||||
|     let event = new CustomEvent("chill_dropzone_initialized", { | ||||
|         detail: { | ||||
|             dropzone: dropzoneI, | ||||
| @@ -178,7 +179,7 @@ var createZone = (zone, zoneData) => { | ||||
|  | ||||
|  | ||||
| var initialize = function(zone) { | ||||
|     var | ||||
|     var  | ||||
|         allowRemove = zone.dataset.allowRemove, | ||||
|         zoneData = { zone: zone, suffix: createFilename(), allowRemove: allowRemove, old: null } | ||||
|         ; | ||||
| @@ -203,13 +204,13 @@ var createFilename = () => { | ||||
| }; | ||||
|  | ||||
| var storeDataInForm = (zone, zoneData) => { | ||||
|     var | ||||
|     var  | ||||
|         inputKey = zone.querySelector('input[data-stored-object-key]'), | ||||
|         inputIv  = zone.querySelector('input[data-stored-object-iv]'), | ||||
|         inputObject = zone.querySelector('input[data-async-file-upload]'), | ||||
|         inputType = zone.querySelector('input[data-async-file-type]') | ||||
|         ; | ||||
|  | ||||
|      | ||||
|     inputKey.value = JSON.stringify(zoneData.crypto.rawKey); | ||||
|     inputIv.value = JSON.stringify(Array.from(zoneData.crypto.iv)); | ||||
|     inputType.value = zoneData.originalType; | ||||
| @@ -219,18 +220,18 @@ var storeDataInForm = (zone, zoneData) => { | ||||
| }; | ||||
|  | ||||
| const restoreDataInForm = (zone, zoneData) => { | ||||
|     var | ||||
|     var  | ||||
|         inputKey = zone.querySelector('input[data-stored-object-key]'), | ||||
|         inputIv  = zone.querySelector('input[data-stored-object-iv]'), | ||||
|         inputObject = zone.querySelector('input[data-async-file-upload]'), | ||||
|         inputType = zone.querySelector('input[data-async-file-type]') | ||||
|         ; | ||||
|  | ||||
|          | ||||
|     if (zoneData.old === null) { | ||||
|         console.log('should not have restored data'); | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|      | ||||
|     inputKey.value    = zoneData.old.key; | ||||
|     inputIv.value     = zoneData.old.iv; | ||||
|     inputType.value   = zoneData.old.type; | ||||
| @@ -240,21 +241,21 @@ const restoreDataInForm = (zone, zoneData) => { | ||||
| }; | ||||
|  | ||||
| const hasDataInForm = (zone, zoneData) => { | ||||
|     var | ||||
|     var  | ||||
|         inputObject = zone.querySelector('input[data-async-file-upload]') | ||||
|         ; | ||||
|  | ||||
|          | ||||
|     return inputObject.value.length > 0; | ||||
| }; | ||||
|  | ||||
| var removeDataInForm = (zone, zoneData) => { | ||||
|     var | ||||
|     var  | ||||
|         inputKey = zone.querySelector('input[data-stored-object-key]'), | ||||
|         inputIv  = zone.querySelector('input[data-stored-object-iv]'), | ||||
|         inputObject = zone.querySelector('input[data-async-file-upload]'), | ||||
|         inputType = zone.querySelector('input[data-async-file-type]') | ||||
|         ; | ||||
|  | ||||
|          | ||||
|     // store data for future usage | ||||
|     zoneData.old = { | ||||
|             key: inputKey.value, | ||||
| @@ -267,7 +268,7 @@ var removeDataInForm = (zone, zoneData) => { | ||||
|     inputIv.value = ""; | ||||
|     inputType.value = ""; | ||||
|     inputObject.value = ""; | ||||
|  | ||||
|      | ||||
|     insertDownloadButton(zone); | ||||
| }; | ||||
|  | ||||
| @@ -278,25 +279,25 @@ var insertRemoveButton = (zone, zoneData) => { | ||||
|         labelRemove = zone.dataset.dictRemove, | ||||
|         labelCancel = 'Restaurer' | ||||
|         ; | ||||
|  | ||||
|      | ||||
|     removeButton.classList.add('btn', 'btn-delete'); | ||||
|     removeButton.textContent = labelRemove; | ||||
|  | ||||
|      | ||||
|     cancelButton.classList.add('btn', 'btn-cancel'); | ||||
|     cancelButton.textContent = labelCancel; | ||||
|  | ||||
|      | ||||
|     removeButton.addEventListener('click', (e) => { | ||||
|         e.preventDefault(); | ||||
|         if (zoneData.allowRemove === 'true') { | ||||
|             removeDataInForm(zone, zoneData); | ||||
|             cancelButton.addEventListener('click', (e) => { | ||||
|                 e.preventDefault(); | ||||
|  | ||||
|                  | ||||
|                 restoreDataInForm(zone, zoneData); | ||||
|  | ||||
|                  | ||||
|                 cancelButton.remove(); | ||||
|                 zone.querySelector('.dropzone').remove(); | ||||
|  | ||||
|                  | ||||
|                 initialize(zone); | ||||
|             }); | ||||
|         } | ||||
| @@ -305,16 +306,16 @@ var insertRemoveButton = (zone, zoneData) => { | ||||
|         removeButton.remove(); | ||||
|         createZone(zone, zoneData); | ||||
|     }); | ||||
|  | ||||
|      | ||||
|     addBelowButton(removeButton, zone, zoneData); | ||||
|     // zone.appendChild(removeButton); | ||||
| }; | ||||
|  | ||||
| const removeDownloadButton = (zone, zoneData) => { | ||||
|     var | ||||
|     var  | ||||
|         existingButtons = zone.querySelectorAll('a[data-download-button]') | ||||
|         ; | ||||
|  | ||||
|          | ||||
|     // remove existing | ||||
|     existingButtons.forEach(function(b) { | ||||
|         b.remove(); | ||||
| @@ -322,7 +323,7 @@ const removeDownloadButton = (zone, zoneData) => { | ||||
| }; | ||||
|  | ||||
| var insertDownloadButton = (zone, zoneData) => { | ||||
|     var | ||||
|     var  | ||||
|         existingButtons = zone.querySelectorAll('a[data-download-button]'), | ||||
|         newButton = document.createElement('a'), | ||||
|         inputKey = zone.querySelector('input[data-stored-object-key]'), | ||||
| @@ -335,18 +336,18 @@ var insertDownloadButton = (zone, zoneData) => { | ||||
|         tempUrlGenerator = zone.dataset.tempUrlGenerator, | ||||
|         tempUrlGeneratorParams = new URLSearchParams() | ||||
|         ; | ||||
|  | ||||
|          | ||||
|     // remove existing | ||||
|     existingButtons.forEach(function(b) { | ||||
|         b.remove(); | ||||
|     }); | ||||
|  | ||||
|      | ||||
|     if (inputObject.value === '') { | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|      | ||||
|     tempUrlGeneratorParams.append('object_name', inputObject.value); | ||||
|  | ||||
|      | ||||
|     newButton.dataset.downloadButton = true; | ||||
|     newButton.dataset.key = inputKey.value; | ||||
|     newButton.dataset.iv = inputIv.value; | ||||
| @@ -356,7 +357,7 @@ var insertDownloadButton = (zone, zoneData) => { | ||||
|     newButton.dataset.tempUrlGetGenerator = tempUrlGenerator + '?' + tempUrlGeneratorParams.toString(); | ||||
|     newButton.classList.add('btn', 'btn-download', 'dz-bt-below-dropzone'); | ||||
|     newButton.textContent = labelQuietButton; | ||||
|  | ||||
|      | ||||
|     addBelowButton(newButton, zone, zoneData); | ||||
|     //zone.appendChild(newButton); | ||||
|     initializeDownload(zone); | ||||
| @@ -369,5 +370,3 @@ window.addEventListener('load', function(e) { | ||||
| window.addEventListener('collection-add-entry', function(e) { | ||||
|     searchForZones(e.detail.entry); | ||||
| }); | ||||
|  | ||||
| export { searchForZones }; | ||||
|   | ||||
| @@ -1,157 +0,0 @@ | ||||
| <template> | ||||
|    <a class="btn btn-create" :title="$t(buttonTitle)" @click="openModal"> | ||||
|       <span>{{ $t(buttonTitle) }}</span> | ||||
|    </a> | ||||
|    <teleport to="body"> | ||||
|       <div> | ||||
|          <modal v-if="modal.showModal" | ||||
|             :modalDialogClass="modal.modalDialogClass" | ||||
|             @close="modal.showModal = false"> | ||||
|  | ||||
|             <template v-slot:header> | ||||
|                {{ $t('upload_a_document') }} | ||||
|             </template> | ||||
|  | ||||
|             <template v-slot:body> | ||||
|                 <div id="dropZoneWrapper" ref="dropZoneWrapper"> | ||||
|                     <div | ||||
|                         data-stored-object="data-stored-object" | ||||
|                         :data-label-preparing="$t('data_label_preparing')" | ||||
|                         :data-label-quiet-button="$t('data_label_quiet_button')" | ||||
|                         :data-label-ready="$t('data_label_ready')" | ||||
|                         :data-dict-file-too-big="$t('data_dict_file_too_big')" | ||||
|                         :data-dict-default-message="$t('data_dict_default_message')" | ||||
|                         :data-dict-remove-file="$t('data_dict_remove_file')" | ||||
|                         :data-dict-max-files-exceeded="$t('data_dict_max_files_exceeded')" | ||||
|                         :data-dict-cancel-upload="$t('data_dict_cancel_upload')" | ||||
|                         :data-dict-cancel-upload-confirm="$t('data_dict_cancel_upload_confirm')" | ||||
|                         :data-dict-upload-canceled="$t('data_dict_upload_canceled')" | ||||
|                         :data-dict-remove="$t('data_dict_remove')" | ||||
|                         :data-allow-remove="!options.required" | ||||
|                         data-temp-url-generator="/asyncupload/temp_url/generate/GET"> | ||||
|                         <input | ||||
|                            type="hidden" | ||||
|                            data-async-file-upload="data-async-file-upload" | ||||
|                            data-generate-temp-url-post="/asyncupload/temp_url/generate/post?expires_delay=180&submit_delay=3600" | ||||
|                            data-temp-url-get="/asyncupload/temp_url/generate/GET" | ||||
|                            :data-max-files="options.maxFiles" | ||||
|                            :data-max-post-size="options.maxPostSize" | ||||
|                            :v-model="dataAsyncFileUpload" | ||||
|                         > | ||||
|                         <input | ||||
|                            type="hidden" | ||||
|                            data-stored-object-key="1" | ||||
|                         > | ||||
|                         <input | ||||
|                            type="hidden" | ||||
|                            data-stored-object-iv="1" | ||||
|                         > | ||||
|                         <input | ||||
|                            type="hidden" | ||||
|                            data-async-file-type="1" | ||||
|                         > | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </template> | ||||
|  | ||||
|             <template v-slot:footer> | ||||
|                <button class="btn btn-create" | ||||
|                   @click.prevent="saveDocument"> | ||||
|                   {{ $t('action.add')}} | ||||
|             </button> | ||||
|             </template> | ||||
|  | ||||
|          </modal> | ||||
|       </div> | ||||
|    </teleport> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import Modal from 'ChillMainAssets/vuejs/_components/Modal'; | ||||
| import { searchForZones } from '../../module/async_upload/uploader'; | ||||
| import { makeFetch } from "ChillMainAssets/lib/api/apiMethods"; | ||||
|  | ||||
| const i18n = { | ||||
|    messages: { | ||||
|       fr: { | ||||
|          upload_a_document: "Téléversez un document", | ||||
|          data_label_preparing: "Chargement...", | ||||
|          data_label_quiet_button: "Téléchargez le fichier existant", | ||||
|          data_label_ready: "Prêt à montrer", | ||||
|          data_dict_file_too_big: "Fichier trop volumineux", | ||||
|          data_dict_default_message: "Glissez votre fichier ou cliquez ici", | ||||
|          data_dict_remove_file: "Enlevez votre fichier pour en téléversez un autre", | ||||
|          data_dict_max_files_exceeded: "Nombre maximum de fichiers atteint. Enlevez les fichiers précédents", | ||||
|          data_dict_cancel_upload: "Annulez le téléversement", | ||||
|          data_dict_cancel_upload_confirm: "Êtes-vous sûr·e de vouloir annuler ce téléversement?", | ||||
|          data_dict_upload_canceled: "Téléversement annulé", | ||||
|          data_dict_remove: "Enlevez le fichier existant", | ||||
|       } | ||||
|    } | ||||
| }; | ||||
|  | ||||
| export default { | ||||
|    name: "AddAsyncUpload", | ||||
|    components: { | ||||
|       Modal | ||||
|    }, | ||||
|    i18n, | ||||
|    props: [ | ||||
|      'buttonTitle', | ||||
|      'options' | ||||
|    ], | ||||
|    emits: ['addDocument'], | ||||
|    data() { | ||||
|       return { | ||||
|          modal: { | ||||
|             showModal: false, | ||||
|             modalDialogClass: "modal-dialog-centered modal-md" | ||||
|          }, | ||||
|       } | ||||
|    }, | ||||
|    updated() { | ||||
|      if (this.modal.showModal){ | ||||
|          searchForZones(this.$refs.dropZoneWrapper); | ||||
|      } | ||||
|    }, | ||||
|    methods: { | ||||
|       openModal() { | ||||
|          this.modal.showModal = true; | ||||
|       }, | ||||
|       saveDocument() { | ||||
|          const dropzone = this.$refs.dropZoneWrapper; | ||||
|          if (dropzone) { | ||||
|             const inputKey = dropzone.querySelector('input[data-stored-object-key]'); | ||||
|             const inputIv  = dropzone.querySelector('input[data-stored-object-iv]'); | ||||
|             const inputObject = dropzone.querySelector('input[data-async-file-upload]'); | ||||
|             const inputType = dropzone.querySelector('input[data-async-file-type]'); | ||||
|  | ||||
|             const url = '/api/1.0/docstore/stored-object.json'; | ||||
|             const body = { | ||||
|                filename: inputObject.value, | ||||
|                keyInfos: JSON.parse(inputKey.value), | ||||
|                iv: JSON.parse(inputIv.value), | ||||
|                type: inputType.value, | ||||
|             }; | ||||
|             makeFetch('POST', url, body) | ||||
|                .then(r => { | ||||
|                   this.$emit("addDocument", r); | ||||
|                   this.modal.showModal = false; | ||||
|                }) | ||||
|                .catch((error) => { | ||||
|                   if (error.name === 'ValidationException') { | ||||
|                      for (let v of error.violations) { | ||||
|                         this.$toast.open({message: v }); | ||||
|                      } | ||||
|                   } else { | ||||
|                      console.error(error); | ||||
|                      this.$toast.open({message: 'An error occurred'}); | ||||
|                   } | ||||
|                }); | ||||
|          } else { | ||||
|             this.$toast.open({message: 'An error occurred - drop zone not found'}); | ||||
|          } | ||||
|       } | ||||
|    } | ||||
| } | ||||
| </script> | ||||
| @@ -0,0 +1,5 @@ | ||||
| <form method="post" action="{{ path('accompanying_course_document_delete', {'id': document.id, 'course': course.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');"> | ||||
| 	<input type="hidden" name="_method" value="DELETE"> | ||||
| 	<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ document.id) }}"> | ||||
| 	<button class="btn btn-delete">{{ 'Delete' | trans }}</button> | ||||
| </form> | ||||
| @@ -1,64 +0,0 @@ | ||||
| {% 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 %} | ||||
| @@ -1,43 +0,0 @@ | ||||
| {% extends "@ChillPerson/AccompanyingCourse/layout.html.twig"  %} | ||||
|  | ||||
| {% set activeRouteKey = '' %} | ||||
|  | ||||
| {% block title %}{{ 'Delete document ?' }}{% endblock %} | ||||
|  | ||||
| {% block docdescription %} | ||||
|     <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> | ||||
|  | ||||
|         <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> | ||||
| {% endblock %} | ||||
|  | ||||
| {% block content %} | ||||
| {{ include('@ChillMain/Util/confirmation_template.html.twig', | ||||
|     { | ||||
|         'title'             : 'Delete document ?'|trans, | ||||
|         'display_content'   : block('docdescription'), | ||||
|         'confirm_question'  : 'Are you sure you want to remove this document ?'|trans, | ||||
|         'cancel_route'      : 'accompanying_course_document_index', | ||||
|         'cancel_parameters' : {'course' : accompanyingCourse.id, 'id': document.id}, | ||||
|         'form'              : delete_form | ||||
|     } ) }} | ||||
| {% endblock %} | ||||
| @@ -19,19 +19,14 @@ | ||||
| 	{{ form_row(form.description) }} | ||||
| 	{{ form_row(form.object, { 'label': 'Document', 'existing': document.object }) }} | ||||
|  | ||||
| 	<ul class="record_actions sticky-form-buttons"> | ||||
| 	<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> | ||||
|         {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_DELETE', document) %} | ||||
|             <li class="delete"> | ||||
|                 <a href="{{ chill_return_path_or('chill_docstore_accompanying_course_document_delete', {'course': accompanyingCourse.id, 'id': document.id}) }}" class="btn btn-delete"></a> | ||||
|             </li> | ||||
|         {% endif %} | ||||
|         <li class="edit"> | ||||
|             <button class="btn btn-edit">{{ 'Edit'|trans }}</button> | ||||
| 		<li class="edit"> | ||||
| 			<button class="btn btn-edit">{{ 'Edit'|trans }}</button> | ||||
| 		</li> | ||||
| 	</ul> | ||||
|  | ||||
|   | ||||
| @@ -2,6 +2,8 @@ | ||||
|  | ||||
| {% set activeRouteKey = '' %} | ||||
|  | ||||
| {% import "@ChillDocStore/Macro/macro.html.twig" as m %} | ||||
|  | ||||
| {% block title %} | ||||
| 	{{ 'Documents' }} | ||||
| {% endblock %} | ||||
| @@ -9,37 +11,64 @@ | ||||
| {% block js %} | ||||
| 	{{ parent() }} | ||||
| 	{{ encore_entry_script_tags('mod_async_upload') }} | ||||
|     {{ encore_entry_script_tags('mod_docgen_picktemplate') }} | ||||
|     {{ encore_entry_script_tags('mod_entity_workflow_pick') }} | ||||
|   {{ 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_entity_workflow_pick') }} | ||||
|   {{ encore_entry_link_tags('mod_docgen_picktemplate') }} | ||||
| {% endblock %} | ||||
|  | ||||
| {% block content %} | ||||
| <div class="document-list"> | ||||
| 	<h1>{{ 'Documents' }}</h1> | ||||
|  | ||||
| 	{% if documents|length == 0 %} | ||||
|             <p class="chill-no-data-statement">{{ 'No documents'|trans }}</p> | ||||
|     {% else %} | ||||
| 		<div class="flex-table chill-task-list"> | ||||
| 	<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> | ||||
| 			{% for document in documents %} | ||||
| 				{% include '@ChillDocStore/List/list_item.html.twig' %} | ||||
| 				<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> | ||||
| 			{% endfor %} | ||||
| 		</div> | ||||
|     {% endif %} | ||||
| 		</tbody> | ||||
| 	</table> | ||||
|  | ||||
| 	{{ 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> | ||||
|     <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 sticky-form-buttons"> | ||||
| 		<ul class="record_actions"> | ||||
| 			<li class="create"> | ||||
| 				<a href="{{ path('accompanying_course_document_new', {'course': accompanyingCourse.id}) }}" class="btn btn-create"> | ||||
| 					{{ 'Create'|trans }} | ||||
| @@ -47,6 +76,4 @@ | ||||
| 			</li> | ||||
| 		</ul> | ||||
| 	{% endif %} | ||||
|  | ||||
| </div> | ||||
| {% endblock %} | ||||
|   | ||||
| @@ -3,87 +3,64 @@ | ||||
| {% 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 } ) }} #} | ||||
|     {{ 'Document %title%' | trans({ '%title%': document.title }) }} | ||||
| {% endblock %} | ||||
|  | ||||
|  | ||||
| {% block js %} | ||||
| 	{{ parent() }} | ||||
| 	{{ encore_entry_script_tags('mod_async_upload') }} | ||||
| {% 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> | ||||
|  | ||||
|     {{ mm.mimeIcon(document.object.type) }} | ||||
| 	<h1>{{ 'Document %title%' | trans({ '%title%': document.title }) }}</h1> | ||||
|  | ||||
|     <dl class="chill_view_data mt-4"> | ||||
|         <dt>{{ 'Title'|trans }}</dt> | ||||
|         <dd>{{ document.title }}</dd> | ||||
| 	<dl class="chill_view_data"> | ||||
| 		<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> | ||||
|     </dl> | ||||
| 		<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> | ||||
|  | ||||
|     <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> | ||||
|         {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_DELETE', document) %} | ||||
|             <li class="delete"> | ||||
|                 <a href="{{ chill_return_path_or('chill_docstore_accompanying_course_document_delete', {'course': accompanyingCourse.id, 'id': document.id}) }}" class="btn btn-delete"></a> | ||||
|             </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 %} | ||||
|         <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 %} | ||||
|         {% 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 %} | ||||
| 	</dl> | ||||
|  | ||||
| {% block block_post_menu %} | ||||
|     <div class="post-menu pt-4"></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 js %} | ||||
|     {{ parent() }} | ||||
|     {{ encore_entry_script_tags('mod_async_upload') }} | ||||
|     {{ encore_entry_script_tags('mod_entity_workflow_pick') }} | ||||
| {% 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 %} | ||||
|   | ||||
| @@ -1,9 +0,0 @@ | ||||
|  | ||||
| {# 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> | ||||
|  | ||||
| @@ -1,91 +0,0 @@ | ||||
| {% import "@ChillDocStore/Macro/macro.html.twig" as m %} | ||||
| {% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %} | ||||
| {% import '@ChillPerson/Macro/updatedBy.html.twig' as mmm %} | ||||
|  | ||||
| <div class="item-bloc"> | ||||
|     <div class="item-row"> | ||||
|         <div class="item-col" style="width: unset"> | ||||
|             <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 text-end"> | ||||
|                         <span>{{ document.date|format_date('short') }}</span> | ||||
|                     </div> | ||||
|                 {% endif %} | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|     {% if document.description is not empty %} | ||||
|         <div class="item-row"> | ||||
|             <blockquote class="chill-user-quote col"> | ||||
|                 {{ document.description|chill_markdown_to_html }} | ||||
|             </blockquote> | ||||
|         </div> | ||||
|     {% endif %} | ||||
|     <div class="item-row separator"> | ||||
|         <div class="item-col item-meta"> | ||||
|             {{ mmm.createdBy(document) }} | ||||
|         </div> | ||||
|         <ul class="item-col record_actions flex-shrink-1"> | ||||
|             {% if document.course is defined %} | ||||
|                 {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_DELETE', document) %} | ||||
|                     <li class="delete"> | ||||
|                         <a href="{{ chill_return_path_or('chill_docstore_accompanying_course_document_delete', {'course': accompanyingCourse.id, 'id': document.id}) }}" class="btn btn-delete"></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 %} | ||||
|                 {% 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 %} | ||||
|                 <li> | ||||
|                     {{ chill_entity_workflow_list('Chill\\DocStoreBundle\\Entity\\AccompanyingCourseDocument', document.id) }} | ||||
|                 </li> | ||||
|             {% else %} | ||||
|                 {% if is_granted('CHILL_PERSON_DOCUMENT_DELETE', document) %} | ||||
|                     <li class="delete"> | ||||
|                         <a href="{{ chill_return_path_or('chill_docstore_person_document_delete', {'person': person.id, 'id': document.id}) }}" class="btn btn-delete"></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 %} | ||||
|                 {% 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 %} | ||||
|             {% endif %} | ||||
|         </ul> | ||||
|  | ||||
|     </div> | ||||
| </div> | ||||
| @@ -1,55 +0,0 @@ | ||||
| {% 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 %} | ||||
| @@ -1,43 +0,0 @@ | ||||
| {% extends "@ChillPerson/Person/layout.html.twig"  %} | ||||
|  | ||||
| {% set activeRouteKey = '' %} | ||||
|  | ||||
| {% block title %}{{ 'Delete document ?' }}{% endblock %} | ||||
|  | ||||
| {% block docdescription %} | ||||
|     <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> | ||||
|  | ||||
|         <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> | ||||
| {% endblock %} | ||||
|  | ||||
| {% block personcontent %} | ||||
| {{ include('@ChillMain/Util/confirmation_template.html.twig', | ||||
|     { | ||||
|         'title'             : 'Delete document ?'|trans, | ||||
|         'display_content'   : block('docdescription'), | ||||
|         'confirm_question'  : 'Are you sure you want to remove this document ?'|trans, | ||||
|         'cancel_route'      : 'person_document_index', | ||||
|         'cancel_parameters' : {'person' : person.id, 'id': document.id}, | ||||
|         'form'              : delete_form | ||||
|     } ) }} | ||||
| {% endblock %} | ||||
| @@ -30,26 +30,24 @@ | ||||
|     {{ form_row(form.title) }} | ||||
|     {{ form_row(form.date) }} | ||||
|     {{ form_row(form.category) }} | ||||
|     {% if form.scope is defined %} | ||||
|         {{ form_row(form.scope) }} | ||||
|     {% endif %} | ||||
|     {{ form_row(form.scope) }} | ||||
|     {{ form_row(form.description) }} | ||||
|     {{ form_row(form.object, { 'label': 'Document', 'existing': document.object }) }} | ||||
|  | ||||
|     <ul class="record_actions sticky-form-buttons"> | ||||
|     <ul class="record_actions"> | ||||
|         <li class="cancel"> | ||||
|             <a href="{{ chill_return_path_or('person_document_index', {'person': person.id}) }}" class="btn btn-cancel"> | ||||
|             <a href="{{ path('person_document_index', {'person': person.id}) }}" class="btn btn-cancel"> | ||||
|                 {{ 'Back to the list' | trans }} | ||||
|             </a> | ||||
|         </li> | ||||
|         {% if is_granted('CHILL_PERSON_DOCUMENT_DELETE', document) %} | ||||
|             <li class="delete"> | ||||
|                 <a href="{{ chill_return_path_or('chill_docstore_person_document_delete', {'person': person.id, 'id': document.id}) }}" class="btn btn-delete"></a> | ||||
|             </li> | ||||
|         {% endif %} | ||||
|         <li class="edit"> | ||||
|             <button class="btn btn-edit">{{ 'Edit'|trans }}</button> | ||||
|         </li> | ||||
|         {# {% if is_granted('CHILL_PERSON_DOCUMENT_DELETE', document) %} | ||||
|             <li class="delete"> | ||||
|                 {{ include('ChillDocStoreBundle:PersonDocument:_delete_form.html.twig') }} | ||||
|             </li> | ||||
|         {% endif %} #} | ||||
|     </ul> | ||||
|  | ||||
|     {{ form_end(form) }} | ||||
|   | ||||
| @@ -26,40 +26,58 @@ | ||||
| {% endblock %} | ||||
|  | ||||
| {% block js %} | ||||
| 	{{ parent() }} | ||||
| 	{{ encore_entry_script_tags('mod_async_upload') }} | ||||
|     {{ encore_entry_script_tags('mod_docgen_picktemplate') }} | ||||
|     {{ encore_entry_script_tags('mod_entity_workflow_pick') }} | ||||
| {% endblock %} | ||||
|  | ||||
| {% block css %} | ||||
| 	{{ parent() }} | ||||
| 	{{ encore_entry_link_tags('mod_async_upload') }} | ||||
|     {{ encore_entry_link_tags('mod_docgen_picktemplate') }} | ||||
|     {{ encore_entry_link_tags('mod_entity_workflow_pick') }} | ||||
| {% endblock %} | ||||
|  | ||||
| {% block personcontent %} | ||||
|  | ||||
| <div class="col-md-10 col-xxl"> | ||||
| 	<h1>{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}</h1> | ||||
|  | ||||
| 	{% if documents|length == 0 %} | ||||
|             <p class="chill-no-data-statement">{{ 'No documents'|trans }}</p> | ||||
|     {% else %} | ||||
| 		<div class="flex-table chill-task-list"> | ||||
| 	<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> | ||||
| 			{% for document in documents %} | ||||
| 				{% include 'ChillDocStoreBundle:List:list_item.html.twig' %} | ||||
| 				<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> | ||||
| 			{% endfor %} | ||||
| 		</div> | ||||
|     {% endif %} | ||||
|  | ||||
| 	{{ chill_pagination(pagination) }} | ||||
|  | ||||
| 	<div data-docgen-template-picker="data-docgen-template-picker" data-entity-class="Chill\PersonBundle\Entity\Person" data-entity-id="{{ person.id }}"></div> | ||||
| 		</tbody> | ||||
| 	</table> | ||||
|  | ||||
| 	{% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %} | ||||
| 		<ul class="record_actions sticky-form-buttons"> | ||||
| 		<ul class="record_actions"> | ||||
| 			<li class="create"> | ||||
| 				<a href="{{ path('person_document_new', {'person': person.id}) }}" class="btn btn-create"> | ||||
| 					{{ 'Create new document' | trans }} | ||||
| @@ -67,6 +85,4 @@ | ||||
| 			</li> | ||||
| 		</ul> | ||||
| 	{% endif %} | ||||
|  | ||||
| </div> | ||||
| {% endblock %} | ||||
|   | ||||
| @@ -40,9 +40,9 @@ | ||||
| 	{{ form_row(form.description) }} | ||||
| 	{{ form_row(form.object, { 'label': 'Document', 'existing': document.object }) }} | ||||
|  | ||||
| 	<ul class="record_actions sticky-form-buttons"> | ||||
| 	<ul class="record_actions"> | ||||
| 		<li class="cancel"> | ||||
| 			<a href="{{ chill_return_path_or('person_document_index', {'person': person.id}) }}" class="btn btn-cancel"> | ||||
| 			<a href="{{ path('person_document_index', {'person': person.id}) }}" class="btn btn-cancel"> | ||||
| 				{{ 'Back to the list' | trans }} | ||||
| 			</a> | ||||
| 		</li> | ||||
|   | ||||
| @@ -19,7 +19,6 @@ | ||||
| {% 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 %} | ||||
|  | ||||
| @@ -30,16 +29,12 @@ | ||||
| {% 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> | ||||
| @@ -57,18 +52,16 @@ | ||||
|  | ||||
|     </dl> | ||||
|  | ||||
|     <ul class="record_actions sticky-form-buttons"> | ||||
|     <ul class="record_actions"> | ||||
|         <li class="cancel"> | ||||
|             <a href="{{ path('person_document_index', {'person': person.id}) }}" class="btn btn-cancel"> | ||||
|                 {{ 'Back to the list' | trans }} | ||||
|             </a> | ||||
|         </li> | ||||
|  | ||||
|         {% if is_granted('CHILL_PERSON_DOCUMENT_DELETE', document) %} | ||||
|             <li class="delete"> | ||||
|                 <a href="{{ chill_return_path_or('chill_docstore_person_document_delete', {'person': person.id, 'id': document.id}) }}" class="btn btn-delete"></a> | ||||
|             </li> | ||||
|         {% endif %} | ||||
|         <li> | ||||
|             {{ m.download_button(document.object, document.title) }} | ||||
|         </li> | ||||
|  | ||||
|         {% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %} | ||||
|             <li> | ||||
| @@ -78,15 +71,5 @@ | ||||
|             </li> | ||||
|         {% endif %} | ||||
|  | ||||
|         <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 %} | ||||
|  | ||||
|         {# {{ include('ChillDocStoreBundle:PersonDocument:_delete_form.html.twig') }} #} | ||||
|     {# {{ include('ChillDocStoreBundle:PersonDocument:_delete_form.html.twig') }} #} | ||||
| {% endblock %} | ||||
|   | ||||
| @@ -1,55 +0,0 @@ | ||||
| <?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\Serializer\Normalizer; | ||||
|  | ||||
| use Chill\DocStoreBundle\Entity\StoredObject; | ||||
| use Chill\DocStoreBundle\Repository\StoredObjectRepository; | ||||
| use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; | ||||
| use Symfony\Component\Serializer\Normalizer\ObjectToPopulateTrait; | ||||
| use function array_key_exists; | ||||
| use function is_array; | ||||
|  | ||||
| class StoredObjectDenormalizer implements DenormalizerInterface | ||||
| { | ||||
|     use ObjectToPopulateTrait; | ||||
|  | ||||
|     private StoredObjectRepository $storedObjectRepository; | ||||
|  | ||||
|     public function __construct(StoredObjectRepository $storedObjectRepository) | ||||
|     { | ||||
|         $this->storedObjectRepository = $storedObjectRepository; | ||||
|     } | ||||
|  | ||||
|     public function denormalize($data, $type, $format = null, array $context = []) | ||||
|     { | ||||
|         $object = $this->extractObjectToPopulate(StoredObject::class, $context); | ||||
|  | ||||
|         if (null !== $object) { | ||||
|             return $object; | ||||
|         } | ||||
|  | ||||
|         return $this->storedObjectRepository->find($data['id']); | ||||
|     } | ||||
|  | ||||
|     public function supportsDenormalization($data, $type, $format = null) | ||||
|     { | ||||
|         if (false === is_array($data)) { | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|         if (false === array_key_exists('id', $data)) { | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|         return StoredObject::class === $type; | ||||
|     } | ||||
| } | ||||
| @@ -1,36 +0,0 @@ | ||||
| <?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']), | ||||
|         ]; | ||||
|     } | ||||
| } | ||||
| @@ -1,52 +0,0 @@ | ||||
| <?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; | ||||
|  | ||||
| final class WopiEditTwigExtensionRuntime implements RuntimeExtensionInterface | ||||
| { | ||||
|     private 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()); | ||||
|  | ||||
|         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, | ||||
|         ]); | ||||
|     } | ||||
| } | ||||
| @@ -1,121 +0,0 @@ | ||||
| <?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\DocStoreBundle\Security\Authorization\AccompanyingCourseDocumentVoter; | ||||
| use Chill\MainBundle\Entity\Workflow\EntityWorkflow; | ||||
| use Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface; | ||||
| use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; | ||||
| use Doctrine\ORM\EntityManagerInterface; | ||||
| use Doctrine\ORM\EntityRepository; | ||||
| use Symfony\Contracts\Translation\TranslatorInterface; | ||||
|  | ||||
| class AccompanyingCourseDocumentWorkflowHandler implements EntityWorkflowHandlerInterface | ||||
| { | ||||
|     private EntityRepository $repository; | ||||
|  | ||||
|     private TranslatorInterface $translator; | ||||
|  | ||||
|     /** | ||||
|      * TODO: injecter le repository directement. | ||||
|      */ | ||||
|     public function __construct( | ||||
|         EntityManagerInterface $em, | ||||
|         TranslatorInterface $translator | ||||
|     ) { | ||||
|         $this->repository = $em->getRepository(AccompanyingCourseDocument::class); | ||||
|         $this->translator = $translator; | ||||
|     } | ||||
|  | ||||
|     public function getDeletionRoles(): array | ||||
|     { | ||||
|         return [ | ||||
|             AccompanyingCourseDocumentVoter::DELETE, | ||||
|         ]; | ||||
|     } | ||||
|  | ||||
|     public function getEntityData(EntityWorkflow $entityWorkflow, array $options = []): array | ||||
|     { | ||||
|         $course = $this->getRelatedEntity($entityWorkflow) | ||||
|             ->getCourse(); | ||||
|         $persons = []; | ||||
|  | ||||
|         if (null !== $course) { | ||||
|             $persons = $course->getCurrentParticipations()->map(static function (AccompanyingPeriodParticipation $participation) { | ||||
|                 return $participation->getPerson(); | ||||
|             })->toArray(); | ||||
|         } | ||||
|  | ||||
|         return [ | ||||
|             'persons' => array_values($persons), | ||||
|         ]; | ||||
|     } | ||||
|  | ||||
|     public function getEntityTitle(EntityWorkflow $entityWorkflow, array $options = []): string | ||||
|     { | ||||
|         $doc = $this->getRelatedEntity($entityWorkflow); | ||||
|  | ||||
|         return $this->translator->trans('workflow.Document (n°%doc%)', ['%doc%' => $entityWorkflow->getRelatedEntityId()]) | ||||
|             . ' - ' . $doc->getTitle(); | ||||
|     } | ||||
|  | ||||
|     public function getRelatedEntity(EntityWorkflow $entityWorkflow): ?AccompanyingCourseDocument | ||||
|     { | ||||
|         return $this->repository->find($entityWorkflow->getRelatedEntityId()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @param AccompanyingCourseDocument $object | ||||
|      * | ||||
|      * @return array[] | ||||
|      */ | ||||
|     public function getRelatedObjects(object $object): array | ||||
|     { | ||||
|         return [ | ||||
|             ['entityClass' => AccompanyingCourseDocument::class, 'entityId' => $object->getId()], | ||||
|         ]; | ||||
|     } | ||||
|  | ||||
|     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 isObjectSupported(object $object): bool | ||||
|     { | ||||
|         return $object instanceof AccompanyingCourseDocument; | ||||
|     } | ||||
|  | ||||
|     public function supports(EntityWorkflow $entityWorkflow, array $options = []): bool | ||||
|     { | ||||
|         return $entityWorkflow->getRelatedEntityClass() === AccompanyingCourseDocument::class; | ||||
|     } | ||||
|  | ||||
|     public function supportsFreeze(EntityWorkflow $entityWorkflow, array $options = []): bool | ||||
|     { | ||||
|         return true; | ||||
|     } | ||||
| } | ||||
| @@ -1,46 +0,0 @@ | ||||
| --- | ||||
| openapi: "3.0.0" | ||||
| info: | ||||
|   version: "1.0.0" | ||||
|   title: "Chill api" | ||||
|   description: "Api documentation for chill. Currently, work in progress" | ||||
| servers: | ||||
|   - url: "/api" | ||||
|     description: "Your current dev server" | ||||
|  | ||||
| components: | ||||
|   schemas: | ||||
|     StoredObject: | ||||
|       type: object | ||||
|       properties: | ||||
|         id: | ||||
|           type: integer | ||||
|         filename: | ||||
|           type: string | ||||
|         type: | ||||
|           type: string | ||||
|  | ||||
| paths: | ||||
|   /1.0/docstore/stored-object.json: | ||||
|     post: | ||||
|       tags: | ||||
|         - storedobject | ||||
|       summary: Create a stored object | ||||
|       requestBody: | ||||
|         description: "A stored object" | ||||
|         required: true | ||||
|         content: | ||||
|           application/json: | ||||
|             schema: | ||||
|               $ref: "#/components/schemas/StoredObject" | ||||
|       responses: | ||||
|         200: | ||||
|           description: "OK" | ||||
|           content: | ||||
|             application/json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/StoredObject" | ||||
|         403: | ||||
|           description: "Unauthorized" | ||||
|         422: | ||||
|           description: "Invalid data" | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user