mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-10 08:44:58 +00:00
Compare commits
455 Commits
issue435_n
...
workflow/d
Author | SHA1 | Date | |
---|---|---|---|
d4ce832e75 | |||
276b5ea394 | |||
c7f2eedd4b | |||
ab74478afc | |||
f88d0ee19e | |||
727480d6d1 | |||
af79ffd544 | |||
80aee185a7 | |||
7afada5dad | |||
739c7e9a77 | |||
03471a74fe | |||
44ed2e44e0 | |||
3352999862 | |||
5605813826 | |||
72795240b9 | |||
d0772fc306 | |||
9265a15427 | |||
6d3b88aee9 | |||
827c85ac56 | |||
|
7b52a10943 | ||
|
187c9d82b6 | ||
e9236875d2 | |||
db4b0b104b | |||
4ad65b616d | |||
|
c5eac09478 | ||
|
a88e052eb6 | ||
|
568a1d95f4 | ||
9769aa1386 | |||
bf4a3a2c91 | |||
3df2335cf4 | |||
1c7c217d1c | |||
f0e41f839f | |||
|
349db2142d | ||
b1c0e18e51 | |||
6edf0bcb3b | |||
6171b3411f | |||
86bf0115dd | |||
|
1b66941746 | ||
|
dca17c409b | ||
|
23fd4be2e5 | ||
|
4406016f82 | ||
d50d68aa86 | |||
fccac80222 | |||
bf70d344bf | |||
d0591d0351 | |||
c83d6d392f | |||
09ca1ec6bb | |||
970431197f | |||
9fdd9da486 | |||
b9eee51de6 | |||
c0ec64e4be | |||
74a84e42a6 | |||
595ddf5b6f | |||
abe183fd10 | |||
9a0883eb5f | |||
663295d436 | |||
9f9986d367 | |||
db37527f72 | |||
6171a221b2 | |||
1312fd0941 | |||
c1832d39f1 | |||
3756631595 | |||
a7a933c7a7 | |||
15bc3e62d3 | |||
5ce62f5458 | |||
3e30684198 | |||
c2e284682f | |||
5407dbfc98 | |||
fa23bfd7d5 | |||
09de7cbf7d | |||
6a3c8017f0 | |||
eb6ec8a4af | |||
c8c2c4c859 | |||
7bd93e53c2 | |||
5d6f3de694 | |||
3eb826d422 | |||
e9ffdb1f03 | |||
f4f488dad1 | |||
2a9f1dc238 | |||
8482c8ffa7 | |||
54ad7a4b8f | |||
ed4cf67e79 | |||
550168fd7c | |||
8470430c57 | |||
a9415488dd | |||
8945703785 | |||
9f90cc8fe1 | |||
|
d6d7edf25d | ||
7b17dc692e | |||
e5f7120733 | |||
1a05ffab96 | |||
aad7a21bc3 | |||
ae0bf7bfd7 | |||
d2ecc5d3a3 | |||
22aefca5c9 | |||
cce790f2f8 | |||
|
84478c651e | ||
|
88e9a96e0e | ||
|
a187bac7b0 | ||
2b108d0d70 | |||
f5accb827c | |||
|
4543c411e7 | ||
|
7aefa5014c | ||
|
d163783ed3 | ||
4536f30da2 | |||
8764aacd92 | |||
8b8f6027cc | |||
6769752c26 | |||
|
5695bb0e9e | ||
|
48a32f2403 | ||
|
a7240e8cc6 | ||
52d8776fbb | |||
0d38cae217 | |||
|
b146f17d2f | ||
df675cd757 | |||
ecc2e390f7 | |||
c3e0b3b708 | |||
449a6a1b4e | |||
eb874a15a6 | |||
3b26466a6c | |||
a6ac6ee6d8 | |||
06c279627a | |||
1e146f542e | |||
cdd21c94c6 | |||
|
30cdcb0836 | ||
|
29308110ea | ||
|
18c57d532c | ||
|
b814e812b6 | ||
|
dbbbd99788 | ||
|
47676c67ff | ||
|
7ad78fbce1 | ||
|
37e38436a8 | ||
|
e1b3719746 | ||
|
68a64aa67f | ||
|
d780d95157 | ||
|
4822acb6fb | ||
260ce8ba17 | |||
822f0aa737 | |||
e10a6b4bf2 | |||
8e1f3a5cc0 | |||
31ec6c70ef | |||
cd84700400 | |||
08fa1edbee | |||
15d9593d0f | |||
010afded18 | |||
c12f633829 | |||
fb6f0c316e | |||
b1ed263c4e | |||
846e487e27 | |||
72a9183ca8 | |||
fe89704672 | |||
93d023007e | |||
8bf179934d | |||
24c79cc4b1 | |||
f93282d657 | |||
3a602385cc | |||
cb4c3b46b9 | |||
abb81bf45f | |||
a9694da557 | |||
|
d205939361 | ||
af0d7765ff | |||
c1f5730c4d | |||
da019a146a | |||
|
4bd50d0148 | ||
|
1826b20b40 | ||
356d1a7133 | |||
|
2cc7473276 | ||
|
2ea5c4b0c7 | ||
432cce280b | |||
530297bc67 | |||
c416f1ef6d | |||
3a5e956e49 | |||
5cf4013a99 | |||
16cca07e12 | |||
|
aae360d6ab | ||
bf25740098 | |||
18836f312a | |||
2b257cc402 | |||
|
289d79e011 | ||
b7d6d69101 | |||
|
15487cd84c | ||
1479e2ae9a | |||
|
1ab4f997ba | ||
|
24b11f609d | ||
|
0661eb8701 | ||
|
c073ec14c8 | ||
|
bf26092764 | ||
|
e035a6fd94 | ||
ff1ff8f5bb | |||
|
3f43574371 | ||
|
b1390f4e9b | ||
|
fd29a4ce65 | ||
|
4655892815 | ||
e46220ff72 | |||
|
f19a090549 | ||
08f9819453 | |||
b56d8c2956 | |||
|
5f71b46bb7 | ||
|
154f976762 | ||
d486f2ddfc | |||
fc5ca30df0 | |||
0601fa0142 | |||
fffed6e3f6 | |||
ffe4dd4a98 | |||
cc4dfdb042 | |||
fd0ca3b29d | |||
daab42109b | |||
ab5bb3963b | |||
262bb13b6c | |||
5d530aaae9 | |||
|
f0e6bfc6c6 | ||
|
d4283a0b94 | ||
|
568c4b60ef | ||
|
736ca2272b | ||
|
88059884ec | ||
|
ce1d213082 | ||
|
71f3a3403c | ||
|
fbeda163f0 | ||
|
08c1bb7992 | ||
|
2f7b237c4c | ||
|
665027085d | ||
|
2618003177 | ||
8f597eb254 | |||
775d223be2 | |||
3849776511 | |||
cb3301bcef | |||
8d74566eac | |||
4a03c2aa43 | |||
292d56cfbe | |||
b41e016a6d | |||
0a2e2301a9 | |||
874c90e0e0 | |||
bb8898a4ec | |||
213da59b0b | |||
4e9879ba92 | |||
0690704391 | |||
610b861345 | |||
b7f8ba4385 | |||
a923a1f135 | |||
0d804dd817 | |||
4f4b1bfbaa | |||
caa63ea97a | |||
8675bb65c1 | |||
104af6d9b5 | |||
2f2d4493ae | |||
2d23068354 | |||
b65dacca72 | |||
265c8b776b | |||
4920c8b28b | |||
4f9acf3174 | |||
962957409b | |||
0b4d79fd5e | |||
0efd3d2af3 | |||
|
02e5a1158d | ||
cfe32828a4 | |||
|
ca6bfea51f | ||
|
8c7da5f80c | ||
|
57175e1c0b | ||
|
c5d2953ecb | ||
ee8044b857 | |||
1fda56b5f7 | |||
ca79da2f9b | |||
c90e6231f9 | |||
e86fa41180 | |||
ebea4b7008 | |||
9565464489 | |||
05f83bf566 | |||
673d0c1e53 | |||
fe35a29fb8 | |||
53d51fea2f | |||
caaebd593b | |||
672fa48140 | |||
a9aeea234c | |||
1683685f6b | |||
e4aac56f2d | |||
d6990349d8 | |||
9ac2f7e359 | |||
f86c0353a2 | |||
0a289e1edd | |||
c2c5bec0e5 | |||
68bfca8a1f | |||
|
6e1b95aa60 | ||
|
baf9b6e1ae | ||
5ff47050ff | |||
|
c302f2dcf9 | ||
|
24fc7a216b | ||
|
2926965400 | ||
|
341177aa5e | ||
56923aa1b8 | |||
62f54a3c27 | |||
64e9461586 | |||
5e01eebd25 | |||
bae2a385aa | |||
9861e3fe1c | |||
95b2fcead7 | |||
45beb27f83 | |||
|
b992bde41d | ||
aebb21935b | |||
20104f1b3b | |||
25264447bc | |||
c1036a3627 | |||
f1a9a872bb | |||
df322d7ebb | |||
|
56a4fd3fa0 | ||
|
02716a6a93 | ||
d4534b56a0 | |||
|
81b7b49170 | ||
c8922a6a82 | |||
cdf0bb30c9 | |||
e4793e1a77 | |||
8347ddd5be | |||
12412e05a7 | |||
|
dd99c35e35 | ||
|
9d651a70e9 | ||
b0d50d315c | |||
41bddf2db6 | |||
769700fe83 | |||
433ccb1fc4 | |||
145c1d59e9 | |||
ae8cc0f700 | |||
a764da3e99 | |||
8f92f79f85 | |||
f093765d03 | |||
c44d962ba8 | |||
20d22b726c | |||
8fa2f0e7ad | |||
604c7f385e | |||
1a07c9d71a | |||
f7e287d415 | |||
b16cc2dc27 | |||
188447fc10 | |||
b920bf6d22 | |||
32ff54e130 | |||
02c09687a4 | |||
3b1fc4aacb | |||
bf9469d538 | |||
c2dec360b1 | |||
dc7422bf56 | |||
89edf508f5 | |||
|
50410d190f | ||
|
b54e076ca0 | ||
2ab7556ac3 | |||
3d38da7b37 | |||
056d5a3f98 | |||
17612afd87 | |||
0a4913f341 | |||
|
3aa12d2e8c | ||
a6504366b4 | |||
4e83e7905a | |||
|
96b1854fef | ||
|
489473806f | ||
|
f5bc8dca5e | ||
|
bc99c85802 | ||
385664e2bc | |||
1658fee090 | |||
b9dbb1916a | |||
|
99afd2e830 | ||
861f461bc5 | |||
b6c118a0c8 | |||
89d3ab38f0 | |||
441704dc29 | |||
8ee451c6e0 | |||
|
785e690404 | ||
|
2fcd7a21a4 | ||
f2221565c5 | |||
|
d5c1591205 | ||
|
7895699ef3 | ||
|
bd9963e65f | ||
df61fbff12 | |||
9ead38ee22 | |||
6402962990 | |||
9e9fa5039f | |||
e6d503a1e2 | |||
844650b685 | |||
4920142540 | |||
|
a7a1f699bb | ||
|
229a91ddf0 | ||
68d0c66402 | |||
c2a132a40b | |||
|
94729a66ca | ||
bd05315de3 | |||
d254a9e14a | |||
|
1c3f6c7c1e | ||
|
f8888462f1 | ||
|
4e2be091cd | ||
|
40a1726ca7 | ||
|
fc9deb8ba8 | ||
|
b1993dbf22 | ||
973644c62d | |||
b9af54892b | |||
f9154233e4 | |||
|
aa7da2559c | ||
753a007172 | |||
|
01a3af694a | ||
|
eee38e9577 | ||
50b7df1f4a | |||
|
1f5d529d33 | ||
|
c19099e76c | ||
|
692343aae4 | ||
|
4dd9bc1123 | ||
bb93cb23a7 | |||
57a88845dc | |||
3532e9dd8c | |||
fddb74f107 | |||
ee817b1d62 | |||
a399804094 | |||
05e9f118d7 | |||
7aad5be29f | |||
41b0dd50bd | |||
4de2cbe807 | |||
bc2d4c1066 | |||
298b597dd0 | |||
481456a038 | |||
|
2c94811c8f | ||
|
eb32b13bcc | ||
b87f14255d | |||
0f2cbbe553 | |||
256c5688a0 | |||
6460007aa1 | |||
f84e088e7b | |||
b8e16d2929 | |||
88fc5e94fa | |||
4431428c26 | |||
724ce8c9af | |||
a31b74e0e5 | |||
47615e2e5d | |||
475585c5e7 | |||
a2e086be75 | |||
e6cf1994b0 | |||
bea0b69858 | |||
95547e961e | |||
c4a859f2d2 | |||
a39bd79930 | |||
424d0533b8 | |||
5a7d187a10 | |||
dc8dd6a423 | |||
006e8cdc27 | |||
cf4f6f06e9 | |||
e467820345 | |||
416a1c4e4d | |||
1febfc11e5 | |||
a288fdf12d | |||
6a3f17962b | |||
3860adc435 | |||
65daf2d0cf | |||
9bf41bbd34 | |||
de7de22492 | |||
ea66fb4c37 | |||
c1232037a9 | |||
75eb6414ce | |||
5e7445a4fe | |||
c527b1b3cf | |||
acacef936c | |||
f971dc05eb | |||
9aba4ea8f6 |
@@ -29,6 +29,7 @@ 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
|
||||
@@ -78,6 +79,7 @@ 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:
|
||||
|
78
CHANGELOG.md
78
CHANGELOG.md
@@ -9,18 +9,78 @@ and this project adheres to
|
||||
* date versioning for test releases
|
||||
|
||||
## Unreleased
|
||||
* AddPersons: remove ul-li html tags from AddPersons (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/419)
|
||||
|
||||
<!-- 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
|
||||
* [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)
|
||||
@@ -31,7 +91,6 @@ and this project adheres to
|
||||
* [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 releases
|
||||
|
||||
### test release 2021-02-01
|
||||
|
||||
@@ -52,7 +111,19 @@ and this project adheres to
|
||||
* [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)
|
||||
@@ -258,6 +329,7 @@ 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,6 +22,7 @@
|
||||
"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",
|
||||
|
@@ -25,11 +25,6 @@ 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: "#^Variable variables are not allowed\\.$#"
|
||||
count: 4
|
||||
|
@@ -105,15 +105,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\ListActivity\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -141,15 +132,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\ActivityDateFilter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -195,15 +177,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\PersonHavingActivityBetweenDateFilter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -213,15 +186,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\ActivityBundle\\\\Menu\\\\PersonMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -258,15 +222,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\AsideActivityBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillAsideActivityBundle/src/Menu/UserMenuBuilder.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -276,15 +231,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\AMLI\\\\BudgetBundle\\\\Controller\\\\AbstractElementController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -294,24 +240,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillBudgetBundle/Controller/ElementController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\AMLI\\\\BudgetBundle\\\\Controller\\\\ElementController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillBudgetBundle/Controller/ElementController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\AMLI\\\\BudgetBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillBudgetBundle/Menu/UserMenuBuilder.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -321,15 +249,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\CalendarBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -399,15 +318,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\CustomFieldsBundle\\\\Form\\\\CustomFieldsGroupType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -417,15 +327,6 @@ parameters:
|
||||
count: 6
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\EventBundle\\\\Controller\\\\EventController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -444,42 +345,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Form/Type/PickEventType.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\EventBundle\\\\Form\\\\Type\\\\PickEventType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Form/Type/PickEventType.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\EventBundle\\\\Form\\\\Type\\\\PickRoleType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\EventBundle\\\\Form\\\\Type\\\\PickStatusType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\EventBundle\\\\Menu\\\\PersonMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Menu/PersonMenuBuilder.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -489,24 +354,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Search/EventSearch.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\AMLI\\\\FamilyMembersBundle\\\\Controller\\\\FamilyMemberController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillFamilyMembersBundle/Controller/FamilyMemberController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\AMLI\\\\FamilyMembersBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillFamilyMembersBundle/Menu/UserMenuBuilder.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -516,24 +363,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillFamilyMembersBundle/Security/Voter/FamilyMemberVoter.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -543,15 +372,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Return type of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\CRUDController\\:\\:getTranslator\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -570,24 +390,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Controller\\\\ExportController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Controller\\\\PasswordController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/PasswordController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -660,42 +462,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Export/ExportManager.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translatorInterface of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\CSVListFormatter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translatorInterface of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\CSVPivotedListFormatter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translatorInterface of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\SpreadSheetFormatter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translatorInterface of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\SpreadsheetListFormatter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -714,15 +480,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Form\\\\Type\\\\PostalCodeType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Form/Type/PostalCodeType.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -746,38 +503,11 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Form/UserType.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Notification\\\\Mailer\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Notification/Mailer.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/Repository/NotificationRepository.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Routing\\\\MenuBuilder\\\\SectionMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Routing\\\\MenuComposer\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Routing/MenuComposer.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -864,15 +594,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Templating/Events/DelegatedBlockRenderingEvent.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\MainBundle\\\\Validation\\\\Validator\\\\RoleScopeScopePresence\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -918,33 +639,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Controller\\\\HouseholdController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/HouseholdController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Controller\\\\HouseholdMemberController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Controller\\\\PersonController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/PersonController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -954,15 +648,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Controller\\\\PersonDuplicateController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
|
||||
|
||||
-
|
||||
message: "#^Access to deprecated property \\$proxyAccompanyingPeriodOpenState of class Chill\\\\PersonBundle\\\\Entity\\\\Person\\.$#"
|
||||
count: 2
|
||||
@@ -977,15 +662,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Export/Aggregator/AgeAggregator.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\CountryOfBirthAggregator\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -995,15 +671,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\GenderAggregator\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Export/Aggregator/GenderAggregator.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -1013,15 +680,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Export/Aggregator/GenderAggregator.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\NationalityAggregator\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Export/Aggregator/NationalityAggregator.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -1058,15 +716,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\ListPerson\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -1094,15 +743,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\ListPersonDuplicate\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -1148,15 +788,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Export/Filter/BirthdateFilter.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\GenderFilter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Export/Filter/GenderFilter.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -1198,24 +829,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Form\\\\Type\\\\PickPersonType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Menu\\\\SectionMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -1279,15 +892,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\ReportBundle\\\\Export\\\\Export\\\\ReportList\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -1297,15 +901,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\ReportBundle\\\\Export\\\\Export\\\\ReportListProvider\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillReportBundle/Export/Export/ReportListProvider.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -1387,15 +982,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\TaskBundle\\\\Controller\\\\TaskController\\:\\:applyTransitionAction\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Controller/TaskController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -1441,33 +1027,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Form/SingleTaskType.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\TaskBundle\\\\Menu\\\\MenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\TaskBundle\\\\Menu\\\\SectionMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Menu/SectionMenuBuilder.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\TaskBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
@@ -1504,33 +1063,6 @@ parameters:
|
||||
count: 3
|
||||
path: src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\ThirdPartyBundle\\\\Controller\\\\ThirdPartyController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\ThirdPartyBundle\\\\Form\\\\Type\\\\PickThirdPartyType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyType.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
#^Parameter \\$translator of method Chill\\\\ThirdPartyBundle\\\\Menu\\\\MenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
|
||||
since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillThirdPartyBundle/Menu/MenuBuilder.php
|
||||
|
||||
-
|
||||
message:
|
||||
"""
|
||||
|
@@ -295,11 +295,6 @@ 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
|
||||
@@ -325,11 +320,6 @@ 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
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<files psalm-version="v4.15.0@a1b5e489e6fcebe40cb804793d964e99fc347820">
|
||||
<files psalm-version="4.18.0.0">
|
||||
<file src="src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php">
|
||||
<UndefinedClass occurrences="4">
|
||||
<code>'ChillActivityBundle:ActivityReasonCategory'</code>
|
||||
@@ -47,6 +47,11 @@
|
||||
<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>
|
||||
@@ -164,72 +169,18 @@
|
||||
<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>
|
||||
@@ -254,11 +205,6 @@
|
||||
<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>
|
||||
@@ -288,11 +234,6 @@
|
||||
<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>
|
||||
@@ -397,10 +338,6 @@
|
||||
</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>
|
||||
@@ -408,61 +345,6 @@
|
||||
<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>
|
||||
@@ -470,11 +352,6 @@
|
||||
<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>
|
||||
@@ -570,9 +447,6 @@
|
||||
<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>
|
||||
@@ -588,10 +462,6 @@
|
||||
</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>
|
||||
@@ -891,11 +761,6 @@
|
||||
<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>
|
||||
@@ -924,11 +789,6 @@
|
||||
<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>
|
||||
@@ -1056,158 +916,15 @@
|
||||
</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>
|
||||
@@ -1412,20 +1129,6 @@
|
||||
<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>
|
||||
@@ -1505,33 +1208,13 @@
|
||||
</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>
|
||||
@@ -1543,40 +1226,19 @@
|
||||
</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>
|
||||
@@ -1586,140 +1248,25 @@
|
||||
</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">
|
||||
@@ -1820,20 +1367,13 @@
|
||||
<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>
|
||||
<MethodSignatureMismatch occurrences="2">
|
||||
<code>public function setUp()</code>
|
||||
<code>public static function setUpBeforeClass()</code>
|
||||
</MethodSignatureMismatch>
|
||||
<UndefinedDocblockClass occurrences="29">
|
||||
<UndefinedDocblockClass occurrences="31">
|
||||
<code>$client</code>
|
||||
<code>$client</code>
|
||||
<code>$client</code>
|
||||
<code>$client</code>
|
||||
<code>$client</code>
|
||||
@@ -1865,16 +1405,7 @@
|
||||
<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>
|
||||
@@ -1882,10 +1413,6 @@
|
||||
</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>
|
||||
@@ -1958,11 +1485,6 @@
|
||||
<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>
|
||||
@@ -1988,11 +1510,6 @@
|
||||
<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>
|
||||
|
@@ -357,7 +357,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
if (null !== $this->accompanyingPeriod) {
|
||||
$personsAssociated = [];
|
||||
|
||||
foreach ($this->accompanyingPeriod->getParticipations() as $participation) {
|
||||
foreach ($this->accompanyingPeriod->getOpenParticipations() as $participation) {
|
||||
if ($this->persons->contains($participation->getPerson())) {
|
||||
$personsAssociated[] = $participation->getPerson();
|
||||
}
|
||||
|
@@ -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\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\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;
|
||||
|
||||
|
@@ -15,7 +15,7 @@ use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
|
||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
||||
use Knp\Menu\MenuItem;
|
||||
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class PersonMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<li>
|
||||
<span :title="person.text">
|
||||
<span class="chill_denomination" @click.prevent="$emit('remove', person)">
|
||||
<span :title="person.text" @click.prevent="$emit('remove', person)">
|
||||
<span class="chill_denomination">
|
||||
<person-text :person="person" :isCut="true"></person-text>
|
||||
</span>
|
||||
</span>
|
||||
|
@@ -110,10 +110,8 @@ 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);
|
||||
console.log(location);
|
||||
if (location !== undefined) {
|
||||
if (location !== undefined & store.state.activity.location === null) {
|
||||
store.dispatch('updateLocation', location);
|
||||
break;
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ use Chill\DocStoreBundle\Repository\DocumentCategoryRepository;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRender;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
@@ -43,7 +43,7 @@ class ActivityContext implements
|
||||
|
||||
private NormalizerInterface $normalizer;
|
||||
|
||||
private PersonRender $personRender;
|
||||
private PersonRenderInterface $personRender;
|
||||
|
||||
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||
|
||||
@@ -54,7 +54,7 @@ class ActivityContext implements
|
||||
NormalizerInterface $normalizer,
|
||||
TranslatableStringHelperInterface $translatableStringHelper,
|
||||
EntityManagerInterface $em,
|
||||
PersonRender $personRender,
|
||||
PersonRenderInterface $personRender,
|
||||
TranslatorInterface $translator,
|
||||
BaseContextData $baseContextData
|
||||
) {
|
||||
|
@@ -76,7 +76,7 @@ activity:
|
||||
Insert a document: Insérer un document
|
||||
Remove a document: Supprimer le document
|
||||
comment: Commentaire
|
||||
No documents: Pas de documents
|
||||
No documents: Aucun document
|
||||
|
||||
#timeline
|
||||
'%user% has done an %activity_type%': '%user% a effectué une activité de type "%activity_type%"'
|
||||
|
@@ -16,7 +16,7 @@ use Chill\TaskBundle\Templating\UI\CountNotificationTask;
|
||||
use Knp\Menu\MenuItem;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
|
@@ -20,7 +20,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function get_class;
|
||||
|
||||
|
@@ -21,7 +21,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function array_merge;
|
||||
use function count;
|
||||
|
@@ -15,7 +15,7 @@ use Chill\AMLI\BudgetBundle\Security\Authorization\BudgetElementVoter;
|
||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
||||
use Knp\Menu\MenuItem;
|
||||
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
|
@@ -2,6 +2,6 @@ services:
|
||||
Chill\AMLI\BudgetBundle\Menu\UserMenuBuilder:
|
||||
arguments:
|
||||
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
|
||||
tags:
|
||||
- { name: 'chill.menu_builder' }
|
||||
|
@@ -16,7 +16,7 @@ use Chill\TaskBundle\Templating\UI\CountNotificationTask;
|
||||
use Knp\Menu\MenuItem;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
|
@@ -19,7 +19,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function count;
|
||||
|
||||
|
@@ -207,21 +207,21 @@ final class DocGeneratorTemplateController extends AbstractController
|
||||
$context instanceof DocGeneratorContextWithPublicFormInterface
|
||||
&& $context->hasPublicForm($template, $entity) || $isTest
|
||||
) {
|
||||
if ($context instanceof DocGeneratorContextWithPublicFormInterface) {
|
||||
if ($context instanceof DocGeneratorContextWithPublicFormInterface && $context->hasPublicForm($template, $entity)) {
|
||||
$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,6 +70,7 @@ final class DocGeneratorTemplateRepository implements ObjectRepository
|
||||
|
||||
$builder
|
||||
->where('t.entity LIKE :entity')
|
||||
->andWhere($builder->expr()->eq('t.active', "'TRUE'"))
|
||||
->setParameter('entity', addslashes($entity));
|
||||
|
||||
return $builder
|
||||
|
@@ -16,8 +16,8 @@
|
||||
<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">
|
||||
<option v-bind:value="t.id">{{ t.name.fr || 'Aucun nom défini' }}</option>
|
||||
<template v-for="t in templates" :key="t.id">
|
||||
<option :value="t.id" >{{ t.name.fr || 'Aucun nom défini' }}</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>
|
||||
|
@@ -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 gabarits
|
||||
Manage templates and document generation: Gestion des documents générés et de leurs modèles
|
||||
Pick template context: Choisir un contexte
|
||||
Context: Contexte
|
||||
New template: Nouveau gabarit
|
||||
Edit template: Modifier gabarit
|
||||
New template: Nouveau modèle
|
||||
Edit template: Modifier modèle
|
||||
test generate: Tester la génération
|
||||
With context: 'Avec le contexte :'
|
||||
|
||||
|
@@ -21,6 +21,8 @@ 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;
|
||||
@@ -59,21 +61,37 @@ class DocumentAccompanyingCourseController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{id}", name="accompanying_course_document_delete", methods="DELETE")
|
||||
* @Route("/{id}/delete", name="chill_docstore_accompanying_course_document_delete")
|
||||
*/
|
||||
public function delete(Request $request, AccompanyingPeriod $course, AccompanyingCourseDocument $document): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(AccompanyingCourseDocumentVoter::DELETE, $document);
|
||||
|
||||
if ($this->isCsrfTokenValid('delete' . $document->getId(), $request->request->get('_token'))) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->remove($document);
|
||||
$em->flush();
|
||||
$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()]);
|
||||
}
|
||||
|
||||
return $this->redirectToRoute(
|
||||
'accompanying_course_document_index',
|
||||
['accompanyingCourse' => $course->getId()]
|
||||
return $this->render(
|
||||
'ChillDocStoreBundle:AccompanyingCourseDocument:delete.html.twig',
|
||||
[
|
||||
'document' => $document,
|
||||
'delete_form' => $form->createView(),
|
||||
'accompanyingCourse' => $course,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -14,6 +14,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;
|
||||
@@ -22,6 +23,8 @@ 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;
|
||||
@@ -64,22 +67,37 @@ class DocumentPersonController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{id}", name="person_document_delete", methods="DELETE")
|
||||
* @Route("/{id}/delete", name="chill_docstore_person_document_delete")
|
||||
*/
|
||||
public function delete(Request $request, Person $person, PersonDocument $document): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
|
||||
$this->denyAccessUnlessGranted('CHILL_PERSON_DOCUMENT_DELETE', $document);
|
||||
$this->denyAccessUnlessGranted(PersonDocumentVoter::DELETE, $document);
|
||||
|
||||
if ($this->isCsrfTokenValid('delete' . $document->getId(), $request->request->get('_token'))) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->remove($document);
|
||||
$em->flush();
|
||||
$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()]);
|
||||
}
|
||||
|
||||
return $this->redirectToRoute(
|
||||
'person_document_index',
|
||||
['person' => $person->getId()]
|
||||
return $this->render(
|
||||
'ChillDocStoreBundle:PersonDocument:delete.html.twig',
|
||||
[
|
||||
'document' => $document,
|
||||
'delete_form' => $form->createView(),
|
||||
'person' => $person,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -98,7 +116,6 @@ class DocumentPersonController extends AbstractController
|
||||
PersonDocumentType::class,
|
||||
$document,
|
||||
[
|
||||
'center' => $document->getCenter(),
|
||||
'role' => 'CHILL_PERSON_DOCUMENT_UPDATE',
|
||||
]
|
||||
);
|
||||
@@ -199,7 +216,6 @@ 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,6 +17,7 @@ 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;
|
||||
|
||||
/**
|
||||
@@ -46,6 +47,28 @@ 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)
|
||||
|
@@ -34,19 +34,19 @@ class StoredObject implements AsyncFileInterface, Document
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="datetime", name="creation_date")
|
||||
* @Serializer\Groups({"read"})
|
||||
* @Serializer\Groups({"read", "write"})
|
||||
*/
|
||||
private DateTimeInterface $creationDate;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json", name="datas")
|
||||
* @Serializer\Groups({"read"})
|
||||
* @Serializer\Groups({"read", "write"})
|
||||
*/
|
||||
private array $datas = [];
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text")
|
||||
* @Serializer\Groups({"read"})
|
||||
* @Serializer\Groups({"read", "write"})
|
||||
*/
|
||||
private $filename;
|
||||
|
||||
@@ -54,30 +54,32 @@ class StoredObject implements AsyncFileInterface, Document
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
* @Serializer\Groups({"read"})
|
||||
* @Serializer\Groups({"read", "write"})
|
||||
*/
|
||||
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"})
|
||||
* @Serializer\Groups({"read", "write"})
|
||||
*/
|
||||
private string $type = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="uuid", unique=true)
|
||||
* @Serializer\Groups({"read"})
|
||||
* @Serializer\Groups({"read", "write"})
|
||||
*/
|
||||
private UuidInterface $uuid;
|
||||
|
||||
|
@@ -13,15 +13,13 @@ 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\Authorization\AuthorizationHelper;
|
||||
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcher;
|
||||
use Chill\MainBundle\Security\Resolver\ScopeResolverDispatcher;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
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;
|
||||
@@ -31,34 +29,16 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class PersonDocumentType extends AbstractType
|
||||
{
|
||||
/**
|
||||
* @var AuthorizationHelper
|
||||
*/
|
||||
protected $authorizationHelper;
|
||||
|
||||
/**
|
||||
* @var ObjectManager
|
||||
*/
|
||||
protected $om;
|
||||
|
||||
/**
|
||||
* @var TranslatableStringHelper
|
||||
*/
|
||||
protected $translatableStringHelper;
|
||||
|
||||
/**
|
||||
* the user running this form.
|
||||
*
|
||||
* @var User
|
||||
*/
|
||||
protected $user;
|
||||
private CenterResolverDispatcher $centerResolverDispatcher;
|
||||
|
||||
private ParameterBagInterface $parameterBag;
|
||||
|
||||
private ScopeResolverDispatcher $scopeResolverDispatcher;
|
||||
|
||||
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||
|
||||
public function __construct(
|
||||
TranslatableStringHelper $translatableStringHelper,
|
||||
TranslatableStringHelperInterface $translatableStringHelper,
|
||||
ScopeResolverDispatcher $scopeResolverDispatcher,
|
||||
ParameterBagInterface $parameterBag
|
||||
) {
|
||||
@@ -96,7 +76,7 @@ class PersonDocumentType extends AbstractType
|
||||
|
||||
if ($isScopeConcerned && $this->parameterBag->get('chill_main')['acl']['form_show_scopes']) {
|
||||
$builder->add('scope', ScopePickerType::class, [
|
||||
'center' => $options['center'],
|
||||
'center' => $this->centerResolverDispatcher->resolveCenter($document),
|
||||
'role' => $options['role'],
|
||||
]);
|
||||
}
|
||||
@@ -108,8 +88,7 @@ class PersonDocumentType extends AbstractType
|
||||
'data_class' => Document::class,
|
||||
]);
|
||||
|
||||
$resolver->setRequired(['role', 'center'])
|
||||
->setAllowedTypes('role', ['string'])
|
||||
->setAllowedTypes('center', [\Chill\MainBundle\Entity\Center::class]);
|
||||
$resolver->setRequired(['role'])
|
||||
->setAllowedTypes('role', ['string']);
|
||||
}
|
||||
}
|
||||
|
@@ -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,7 +37,6 @@ 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]);
|
||||
}
|
||||
@@ -48,32 +47,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
|
||||
@@ -90,34 +89,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));
|
||||
@@ -142,7 +141,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);
|
||||
@@ -150,24 +149,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,
|
||||
@@ -179,7 +178,7 @@ var createZone = (zone, zoneData) => {
|
||||
|
||||
|
||||
var initialize = function(zone) {
|
||||
var
|
||||
var
|
||||
allowRemove = zone.dataset.allowRemove,
|
||||
zoneData = { zone: zone, suffix: createFilename(), allowRemove: allowRemove, old: null }
|
||||
;
|
||||
@@ -204,13 +203,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;
|
||||
@@ -220,18 +219,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;
|
||||
@@ -241,21 +240,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,
|
||||
@@ -268,7 +267,7 @@ var removeDataInForm = (zone, zoneData) => {
|
||||
inputIv.value = "";
|
||||
inputType.value = "";
|
||||
inputObject.value = "";
|
||||
|
||||
|
||||
insertDownloadButton(zone);
|
||||
};
|
||||
|
||||
@@ -279,25 +278,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);
|
||||
});
|
||||
}
|
||||
@@ -306,16 +305,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();
|
||||
@@ -323,7 +322,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]'),
|
||||
@@ -336,18 +335,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;
|
||||
@@ -357,7 +356,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);
|
||||
@@ -370,3 +369,5 @@ window.addEventListener('load', function(e) {
|
||||
window.addEventListener('collection-add-entry', function(e) {
|
||||
searchForZones(e.detail.entry);
|
||||
});
|
||||
|
||||
export { searchForZones };
|
||||
|
@@ -0,0 +1,157 @@
|
||||
<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>
|
@@ -1,5 +0,0 @@
|
||||
<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,19 +0,0 @@
|
||||
{% import '@ChillMain/Workflow/macro_breadcrumb.html.twig' as m %}
|
||||
|
||||
<div class="flex-grow-1 {% if add_classes is defined %}{{ add_classes }}{% else %}h2{% endif %}">
|
||||
<div>
|
||||
{% if concerne is defined and concerne == true %}
|
||||
<span class="item-key">{{ 'Concerne'|trans }}: </span>
|
||||
{% endif %}
|
||||
|
||||
{{ 'workflow.Document (n°%doc%)'|trans({'%doc%': document.id}) }}
|
||||
|
||||
{% if description is defined and description == true %}
|
||||
{{ ' — ' ~ document.title }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if breadcrumb is defined and breadcrumb == true %}
|
||||
{{ m.breadcrumb(_context) }}
|
||||
{% endif %}
|
||||
</div>
|
@@ -0,0 +1,43 @@
|
||||
{% 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 %}
|
@@ -25,8 +25,13 @@
|
||||
{{ 'Back to the list' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="edit">
|
||||
<button class="btn btn-edit">{{ 'Edit'|trans }}</button>
|
||||
{% 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>
|
||||
</ul>
|
||||
|
||||
|
@@ -10,16 +10,18 @@
|
||||
{{ 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 content %}
|
||||
<div class="col-md-10 col-xxl">
|
||||
<div class="document-list">
|
||||
<h1>{{ 'Documents' }}</h1>
|
||||
|
||||
{% if documents|length == 0 %}
|
||||
@@ -27,7 +29,7 @@
|
||||
{% else %}
|
||||
<div class="flex-table chill-task-list">
|
||||
{% for document in documents %}
|
||||
{% include 'ChillDocStoreBundle:List:list_item.html.twig' %}
|
||||
{% include '@ChillDocStore/List/list_item.html.twig' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@@ -49,12 +49,9 @@
|
||||
{{ 'Back to the list' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ m.download_button(document.object, document.title) }}
|
||||
</li>
|
||||
{% if chill_document_is_editable(document.object) %}
|
||||
<li>
|
||||
{{ document.object|chill_document_edit_button }}
|
||||
{% 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) %}
|
||||
@@ -63,6 +60,14 @@
|
||||
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>
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{% 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">
|
||||
<div class="item-col" style="width: unset">
|
||||
<div class="denomination h2">
|
||||
{{ document.title }}
|
||||
</div>
|
||||
@@ -22,62 +24,68 @@
|
||||
<div class="item-col">
|
||||
<div class="container">
|
||||
{% if document.date is not null %}
|
||||
<div class="dates row" style="float: right;">
|
||||
<span>{{ document.createdAt|format_date('short') }}</span>
|
||||
<div 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 separator">
|
||||
<blockquote class="chill-user-quote">
|
||||
<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">
|
||||
<div class="updatedBy">
|
||||
{{ 'Created by'|trans }}:
|
||||
<span class="user">{{ document.createdBy|chill_entity_render_string }}</span>
|
||||
<span class="date">le {{ document.createdAt|format_date('long') }}</span>
|
||||
</div>
|
||||
{{ mmm.createdBy(document) }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
{% if document.course is defined %}
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE_DETAILS', document) %}
|
||||
<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>
|
||||
{{ 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>
|
||||
{{ 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>
|
||||
{% else %}
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_PERSON_DOCUMENT_SEE_DETAILS', document) %}
|
||||
<li>
|
||||
{{ m.download_button(document.object, document.title) }}
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('person_document_show', {'person': person.id, 'id': document.id}) }}" class="btn btn-show"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
|
||||
<li>
|
||||
<a href="{{ path('person_document_edit', {'person': person.id, 'id': document.id}) }}" class="btn btn-update"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -0,0 +1,43 @@
|
||||
{% 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 %}
|
@@ -36,20 +36,20 @@
|
||||
{{ form_row(form.description) }}
|
||||
{{ form_row(form.object, { 'label': 'Document', 'existing': document.object }) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('person_document_index', {'person': person.id}) }}" class="btn btn-cancel">
|
||||
<a href="{{ chill_return_path_or('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,7 +26,17 @@
|
||||
{% 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 %}
|
||||
@@ -46,6 +56,8 @@
|
||||
|
||||
{{ 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>
|
||||
|
||||
{% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="create">
|
||||
|
@@ -40,9 +40,9 @@
|
||||
{{ form_row(form.description) }}
|
||||
{{ form_row(form.object, { 'label': 'Document', 'existing': document.object }) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('person_document_index', {'person': person.id}) }}" class="btn btn-cancel">
|
||||
<a href="{{ chill_return_path_or('person_document_index', {'person': person.id}) }}" class="btn btn-cancel">
|
||||
{{ 'Back to the list' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
|
@@ -64,13 +64,9 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
{{ m.download_button(document.object, document.title) }}
|
||||
</li>
|
||||
|
||||
{% if chill_document_is_editable(document.object) %}
|
||||
<li>
|
||||
{{ document.object|chill_document_edit_button }}
|
||||
{% 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 %}
|
||||
|
||||
@@ -82,5 +78,15 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{# {{ include('ChillDocStoreBundle:PersonDocument:_delete_form.html.twig') }} #}
|
||||
<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') }} #}
|
||||
{% endblock %}
|
||||
|
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\DocStoreBundle\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;
|
||||
}
|
||||
}
|
@@ -15,11 +15,12 @@ use ChampsLibres\WopiLib\Contract\Service\Discovery\DiscoveryInterface;
|
||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||
use Twig\Environment;
|
||||
use Twig\Extension\RuntimeExtensionInterface;
|
||||
|
||||
use function array_key_exists;
|
||||
|
||||
class WopiEditTwigExtensionRuntime implements RuntimeExtensionInterface
|
||||
final class WopiEditTwigExtensionRuntime implements RuntimeExtensionInterface
|
||||
{
|
||||
public const TEMPLATE = '@ChillDocStore/Button/wopi_edit_document.html.twig';
|
||||
private const TEMPLATE = '@ChillDocStore/Button/wopi_edit_document.html.twig';
|
||||
|
||||
private DiscoveryInterface $discovery;
|
||||
|
||||
@@ -32,10 +33,6 @@ class WopiEditTwigExtensionRuntime implements RuntimeExtensionInterface
|
||||
{
|
||||
$mime_type = $this->discovery->discoverMimeType($document->getType());
|
||||
|
||||
if ([] === $mime_type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($mime_type as $item) {
|
||||
if (array_key_exists('default', $item) && 'true' === $item['default']) {
|
||||
return true;
|
||||
|
@@ -12,21 +12,61 @@ 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)
|
||||
{
|
||||
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
|
||||
@@ -34,6 +74,18 @@ class AccompanyingCourseDocumentWorkflowHandler implements EntityWorkflowHandler
|
||||
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;
|
||||
@@ -52,14 +104,9 @@ class AccompanyingCourseDocumentWorkflowHandler implements EntityWorkflowHandler
|
||||
];
|
||||
}
|
||||
|
||||
public function getTemplateTitle(EntityWorkflow $entityWorkflow, array $options = []): string
|
||||
public function isObjectSupported(object $object): bool
|
||||
{
|
||||
return '@ChillDocStore/AccompanyingCourseDocument/_workflow.title.html.twig';
|
||||
}
|
||||
|
||||
public function getTemplateTitleData(EntityWorkflow $entityWorkflow, array $options = []): array
|
||||
{
|
||||
return $this->getTemplateData($entityWorkflow, $options);
|
||||
return $object instanceof AccompanyingCourseDocument;
|
||||
}
|
||||
|
||||
public function supports(EntityWorkflow $entityWorkflow, array $options = []): bool
|
||||
|
46
src/Bundle/ChillDocStoreBundle/chill.api.specs.yaml
Normal file
46
src/Bundle/ChillDocStoreBundle/chill.api.specs.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
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"
|
@@ -1,4 +1,7 @@
|
||||
module.exports = function(encore)
|
||||
{
|
||||
encore.addAliases({
|
||||
ChillDocStoreAssets: __dirname + '/Resources/public'
|
||||
});
|
||||
encore.addEntry('mod_async_upload', __dirname + '/Resources/public/module/async_upload/index.js');
|
||||
};
|
||||
|
@@ -33,3 +33,10 @@ services:
|
||||
resource: './../Workflow/'
|
||||
autoconfigure: true
|
||||
autowire: true
|
||||
|
||||
Chill\DocStoreBundle\Serializer\Normalizer\:
|
||||
autowire: true
|
||||
resource: '../Serializer/Normalizer/'
|
||||
tags:
|
||||
- { name: 'serializer.normalizer', priority: 16 }
|
||||
|
||||
|
@@ -19,6 +19,12 @@ The document is successfully registered: Le document est enregistré
|
||||
The document is successfully updated: Le document est mis à jour
|
||||
Any description: Aucune description
|
||||
|
||||
# delete
|
||||
Delete document ?: Supprimer le document ?
|
||||
Are you sure you want to remove this document ?: Êtes-vous sûr·e de vouloir supprimer ce document ?
|
||||
The document is successfully removed: Le document a été supprimé
|
||||
|
||||
|
||||
# dropzone upload
|
||||
File too big: Fichier trop volumineux
|
||||
Drop your file or click here: Cliquez ici ou faites glissez votre nouveau fichier dans cette zone
|
||||
|
@@ -38,7 +38,7 @@ use Symfony\Component\Form\FormFactoryInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function count;
|
||||
|
||||
|
@@ -28,7 +28,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function in_array;
|
||||
use function is_array;
|
||||
|
@@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
* Allow to pick a choice amongst different choices.
|
||||
|
@@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
* Allow to pick amongst type.
|
||||
|
@@ -15,7 +15,7 @@ use Chill\EventBundle\Security\Authorization\EventVoter;
|
||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
||||
use Knp\Menu\MenuItem;
|
||||
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class PersonMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
|
@@ -5,7 +5,7 @@ services:
|
||||
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
|
||||
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
|
||||
$formFactoryInterface: '@Symfony\Component\Form\FormFactoryInterface'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
|
||||
$paginator: '@chill_main.paginator_factory'
|
||||
public: true
|
||||
tags: ['controller.service_arguments']
|
||||
|
@@ -44,6 +44,6 @@ services:
|
||||
$tokenStorage: "@security.token_storage"
|
||||
$authorizationHelper: "@chill.main.security.authorization.helper"
|
||||
$urlGenerator: '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
@@ -2,6 +2,6 @@ services:
|
||||
Chill\EventBundle\Menu\PersonMenuBuilder:
|
||||
arguments:
|
||||
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
|
||||
tags:
|
||||
- { name: 'chill.menu_builder' }
|
@@ -24,7 +24,7 @@ use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class FamilyMemberController extends AbstractController
|
||||
{
|
||||
|
@@ -15,7 +15,7 @@ use Chill\AMLI\FamilyMembersBundle\Security\Voter\FamilyMemberVoter;
|
||||
use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
|
||||
use Knp\Menu\MenuItem;
|
||||
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
|
@@ -2,6 +2,6 @@ services:
|
||||
Chill\AMLI\FamilyMembersBundle\Menu\UserMenuBuilder:
|
||||
arguments:
|
||||
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
|
||||
tags:
|
||||
- { name: 'chill.menu_builder' }
|
||||
|
@@ -20,8 +20,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function array_merge;
|
||||
|
||||
|
@@ -27,7 +27,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function array_key_exists;
|
||||
use function array_merge;
|
||||
|
@@ -29,7 +29,6 @@ use Chill\MainBundle\Security\ProvideRoleInterface;
|
||||
use Chill\MainBundle\Security\Resolver\CenterResolverInterface;
|
||||
use Chill\MainBundle\Security\Resolver\ScopeResolverInterface;
|
||||
use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface;
|
||||
use Chill\MainBundle\Templating\Entity\CompilerPass as RenderEntityCompilerPass;
|
||||
use Chill\MainBundle\Templating\UI\NotificationCounterInterface;
|
||||
use Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
@@ -70,7 +69,6 @@ class ChillMainBundle extends Bundle
|
||||
$container->addCompilerPass(new MenuCompilerPass());
|
||||
$container->addCompilerPass(new ACLFlagsCompilerPass());
|
||||
$container->addCompilerPass(new GroupingCenterCompilerPass());
|
||||
$container->addCompilerPass(new RenderEntityCompilerPass());
|
||||
$container->addCompilerPass(new CRUDControllerCompilerPass());
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,24 @@
|
||||
<?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\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\CRUD\Controller\ApiController;
|
||||
use Chill\MainBundle\Pagination\PaginatorInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class CivilityApiController extends ApiController
|
||||
{
|
||||
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator, $_format)
|
||||
{
|
||||
return $query->addOrderBy('e.order', 'ASC');
|
||||
}
|
||||
}
|
@@ -24,7 +24,7 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\FormFactoryInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function count;
|
||||
use function serialize;
|
||||
|
@@ -27,9 +27,9 @@ use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Component\Validator\Constraints\Callback;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
* Class PasswordController.
|
||||
|
@@ -11,7 +11,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
|
||||
use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
use Chill\MainBundle\Repository\Workflow\EntityWorkflowRepository;
|
||||
use Chill\MainBundle\Serializer\Model\Collection;
|
||||
use Chill\MainBundle\Serializer\Model\Counter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use LogicException;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
@@ -21,17 +26,71 @@ use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class WorkflowApiController
|
||||
{
|
||||
private EntityManagerInterface $entityManager;
|
||||
|
||||
private EntityWorkflowRepository $entityWorkflowRepository;
|
||||
|
||||
private PaginatorFactory $paginatorFactory;
|
||||
|
||||
private Security $security;
|
||||
|
||||
public function __construct(Security $security, EntityManagerInterface $entityManager)
|
||||
{
|
||||
private SerializerInterface $serializer;
|
||||
|
||||
public function __construct(
|
||||
EntityManagerInterface $entityManager,
|
||||
EntityWorkflowRepository $entityWorkflowRepository,
|
||||
PaginatorFactory $paginatorFactory,
|
||||
Security $security,
|
||||
SerializerInterface $serializer
|
||||
) {
|
||||
$this->entityManager = $entityManager;
|
||||
$this->entityWorkflowRepository = $entityWorkflowRepository;
|
||||
$this->paginatorFactory = $paginatorFactory;
|
||||
$this->security = $security;
|
||||
$this->serializer = $serializer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of workflow which are waiting an action for the user.
|
||||
*
|
||||
* @Route("/api/1.0/main/workflow/my", methods={"GET"})
|
||||
*/
|
||||
public function myWorkflow(Request $request): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_USER') || !$this->security->getUser() instanceof User) {
|
||||
throw new AccessDeniedException();
|
||||
}
|
||||
|
||||
$total = $this->entityWorkflowRepository->countByDest($this->security->getUser());
|
||||
|
||||
if ($request->query->getBoolean('countOnly', false)) {
|
||||
return new JsonResponse(
|
||||
$this->serializer->serialize(new Counter($total), 'json'),
|
||||
JsonResponse::HTTP_OK,
|
||||
[],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$paginator = $this->paginatorFactory->create($total);
|
||||
|
||||
$workflows = $this->entityWorkflowRepository->findByDest(
|
||||
$this->security->getUser(),
|
||||
['id' => 'DESC'],
|
||||
$paginator->getItemsPerPage(),
|
||||
$paginator->getCurrentPageFirstItemNumber()
|
||||
);
|
||||
|
||||
return new JsonResponse(
|
||||
$this->serializer->serialize(new Collection($workflows, $paginator), 'json', ['groups' => ['read']]),
|
||||
JsonResponse::HTTP_OK,
|
||||
[],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -11,21 +11,26 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
|
||||
use Chill\MainBundle\Entity\Workflow\EntityWorkflowComment;
|
||||
use Chill\MainBundle\Entity\Workflow\EntityWorkflowStep;
|
||||
use Chill\MainBundle\Form\EntityWorkflowCommentType;
|
||||
use Chill\MainBundle\Form\WorkflowStepType;
|
||||
use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
use Chill\MainBundle\Repository\Workflow\EntityWorkflowRepository;
|
||||
use Chill\MainBundle\Security\Authorization\EntityWorkflowVoter;
|
||||
use Chill\MainBundle\Workflow\EntityWorkflowManager;
|
||||
use Chill\MainBundle\Workflow\Validator\StepDestValid;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FormType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\HttpFoundation\Exception\BadRequestException;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
use Symfony\Component\Workflow\Registry;
|
||||
use Symfony\Component\Workflow\TransitionBlocker;
|
||||
@@ -80,7 +85,9 @@ class WorkflowController extends AbstractController
|
||||
$entityWorkflow
|
||||
->setRelatedEntityClass($request->query->get('entityClass'))
|
||||
->setRelatedEntityId($request->query->getInt('entityId'))
|
||||
->setWorkflowName($request->query->get('workflow'));
|
||||
->setWorkflowName($request->query->get('workflow'))
|
||||
->addSubscriberToStep($this->getUser())
|
||||
->addSubscriberToFinal($this->getUser());
|
||||
|
||||
$errors = $this->validator->validate($entityWorkflow, null, ['creation']);
|
||||
|
||||
@@ -104,6 +111,121 @@ class WorkflowController extends AbstractController
|
||||
return $this->redirectToRoute('chill_main_workflow_show', ['id' => $entityWorkflow->getId()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/main/workflow/{id}/delete", name="chill_main_workflow_delete")
|
||||
*/
|
||||
public function delete(EntityWorkflow $entityWorkflow, Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(EntityWorkflowVoter::DELETE, $entityWorkflow);
|
||||
|
||||
$form = $this->createForm(FormType::class);
|
||||
$form->add('submit', SubmitType::class, ['label' => 'workflow.Delete workflow']);
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$this->entityManager->remove($entityWorkflow);
|
||||
$this->entityManager->flush();
|
||||
|
||||
$this->addFlash('success', $this->translator->trans('workflow.Workflow deleted with success'));
|
||||
|
||||
return $this->redirectToRoute('chill_main_homepage');
|
||||
}
|
||||
|
||||
return $this->render('@ChillMain/Workflow/delete.html.twig', [
|
||||
'entityWorkflow' => $entityWorkflow,
|
||||
'delete_form' => $form->createView(),
|
||||
'handler' => $this->entityWorkflowManager->getHandler($entityWorkflow),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/main/workflow-step/{id}/access_key", name="chill_main_workflow_grant_access_by_key")
|
||||
*/
|
||||
public function getAccessByAccessKey(EntityWorkflowStep $entityWorkflowStep, Request $request): Response
|
||||
{
|
||||
if (null === $accessKey = $request->query->get('accessKey', null)) {
|
||||
throw new BadRequestException('accessKey is missing');
|
||||
}
|
||||
|
||||
if (!$this->getUser() instanceof User) {
|
||||
throw new AccessDeniedException('Not a valid user');
|
||||
}
|
||||
|
||||
if ($entityWorkflowStep->getAccessKey() !== $accessKey) {
|
||||
throw new AccessDeniedException('Access key is invalid');
|
||||
}
|
||||
|
||||
if (!$entityWorkflowStep->isWaitingForTransition()) {
|
||||
$this->addFlash('error', $this->translator->trans('workflow.Steps is not waiting for transition. Maybe someone apply the transition before you ?'));
|
||||
} else {
|
||||
$entityWorkflowStep->addDestUserByAccessKey($this->getUser());
|
||||
$this->entityManager->flush();
|
||||
$this->addFlash('success', $this->translator->trans('workflow.You get access to this step'));
|
||||
}
|
||||
|
||||
return $this->redirectToRoute('chill_main_workflow_show', ['id' => $entityWorkflowStep->getEntityWorkflow()->getId()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Previous workflows where the user has applyed a transition.
|
||||
*
|
||||
* @Route("/{_locale}/main/workflow/list/previous_transitionned", name="chill_main_workflow_list_previous_transitionned")
|
||||
*/
|
||||
public function myPreviousWorkflowsTransitionned(Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
|
||||
|
||||
$total = $this->entityWorkflowRepository->countByPreviousTransitionned($this->getUser());
|
||||
$paginator = $this->paginatorFactory->create($total);
|
||||
|
||||
$workflows = $this->entityWorkflowRepository->findByPreviousTransitionned(
|
||||
$this->getUser(),
|
||||
['createdAt' => 'DESC'],
|
||||
$paginator->getItemsPerPage(),
|
||||
$paginator->getCurrentPageFirstItemNumber()
|
||||
);
|
||||
|
||||
return $this->render(
|
||||
'@ChillMain/Workflow/list.html.twig',
|
||||
[
|
||||
'help' => 'workflow.Previous workflow transitionned help',
|
||||
'workflows' => $this->buildHandler($workflows),
|
||||
'paginator' => $paginator,
|
||||
'step' => 'previous_transitionned',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Previous workflows where the user was mentioned, but did not give any reaction.
|
||||
*
|
||||
* @Route("/{_locale}/main/workflow/list/previous_without_reaction", name="chill_main_workflow_list_previous_without_reaction")
|
||||
*/
|
||||
public function myPreviousWorkflowsWithoutReaction(Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
|
||||
|
||||
$total = $this->entityWorkflowRepository->countByPreviousDestWithoutReaction($this->getUser());
|
||||
$paginator = $this->paginatorFactory->create($total);
|
||||
|
||||
$workflows = $this->entityWorkflowRepository->findByPreviousDestWithoutReaction(
|
||||
$this->getUser(),
|
||||
['createdAt' => 'DESC'],
|
||||
$paginator->getItemsPerPage(),
|
||||
$paginator->getCurrentPageFirstItemNumber()
|
||||
);
|
||||
|
||||
return $this->render(
|
||||
'@ChillMain/Workflow/list.html.twig',
|
||||
[
|
||||
'help' => 'workflow.Previous workflow without reaction help',
|
||||
'workflows' => $this->buildHandler($workflows),
|
||||
'paginator' => $paginator,
|
||||
'step' => 'previous_without_reaction',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/main/workflow/list/dest", name="chill_main_workflow_list_dest")
|
||||
*/
|
||||
@@ -197,24 +319,22 @@ class WorkflowController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
$entityWorkflow->futureDestUsers = $transitionForm['future_dest_users']->getData();
|
||||
$entityWorkflow->futureDestEmails = $transitionForm['future_dest_emails']->getData();
|
||||
|
||||
$workflow->apply($entityWorkflow, $transition);
|
||||
|
||||
foreach ($transitionForm['future_dest_users']->getData() as $user) {
|
||||
$entityWorkflow->getCurrentStep()->addDestUser($user);
|
||||
}
|
||||
|
||||
$errors = $this->validator->validate(
|
||||
$entityWorkflow->getCurrentStep(),
|
||||
new StepDestValid()
|
||||
);
|
||||
|
||||
if (count($errors) === 0) {
|
||||
$this->entityManager->flush();
|
||||
|
||||
return $this->redirectToRoute('chill_main_workflow_show', ['id' => $entityWorkflow->getId()]);
|
||||
foreach ($transitionForm['future_dest_emails']->getData() as $email) {
|
||||
$entityWorkflow->getCurrentStep()->addDestEmail($email);
|
||||
}
|
||||
|
||||
return new Response((string) $errors, Response::HTTP_UNPROCESSABLE_ENTITY);
|
||||
$this->entityManager->flush();
|
||||
|
||||
return $this->redirectToRoute('chill_main_workflow_show', ['id' => $entityWorkflow->getId()]);
|
||||
}
|
||||
|
||||
if ($transitionForm->isSubmitted() && !$transitionForm->isValid()) {
|
||||
@@ -241,8 +361,8 @@ class WorkflowController extends AbstractController
|
||||
return $this->render(
|
||||
'@ChillMain/Workflow/index.html.twig',
|
||||
[
|
||||
'handler' => $handler,
|
||||
'handler_template' => $handler->getTemplate($entityWorkflow),
|
||||
'handler_template_title' => $handler->getTemplateTitle($entityWorkflow),
|
||||
'handler_template_data' => $handler->getTemplateData($entityWorkflow),
|
||||
'transition_form' => isset($transitionForm) ? $transitionForm->createView() : null,
|
||||
'entity_workflow' => $entityWorkflow,
|
||||
|
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\DependencyInjection;
|
||||
|
||||
use Chill\MainBundle\Controller\AddressApiController;
|
||||
use Chill\MainBundle\Controller\CivilityApiController;
|
||||
use Chill\MainBundle\Controller\LocationController;
|
||||
use Chill\MainBundle\Controller\LocationTypeController;
|
||||
use Chill\MainBundle\Controller\UserController;
|
||||
@@ -38,6 +39,7 @@ use Chill\MainBundle\Form\LocationTypeType;
|
||||
use Chill\MainBundle\Form\UserJobType;
|
||||
use Chill\MainBundle\Form\UserType;
|
||||
use Exception;
|
||||
use Misd\PhoneNumberBundle\Doctrine\DBAL\Types\PhoneNumberType;
|
||||
use Ramsey\Uuid\Doctrine\UuidType;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
@@ -234,6 +236,7 @@ class ChillMainExtension extends Extension implements
|
||||
'dateinterval' => NativeDateIntervalType::class,
|
||||
'point' => PointType::class,
|
||||
'uuid' => UuidType::class,
|
||||
'phone_number' => PhoneNumberType::class,
|
||||
],
|
||||
],
|
||||
]
|
||||
@@ -253,6 +256,13 @@ class ChillMainExtension extends Extension implements
|
||||
'channels' => ['chill'],
|
||||
]);
|
||||
|
||||
$container->prependExtensionConfig('security', [
|
||||
'access_decision_manager' => [
|
||||
'strategy' => 'unanimous',
|
||||
'allow_if_all_abstain' => false,
|
||||
],
|
||||
]);
|
||||
|
||||
//add crud api
|
||||
$this->prependCruds($container);
|
||||
}
|
||||
@@ -559,6 +569,21 @@ class ChillMainExtension extends Extension implements
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'class' => \Chill\MainBundle\Entity\Civility::class,
|
||||
'name' => 'civility',
|
||||
'base_path' => '/api/1.0/main/civility',
|
||||
'base_role' => 'ROLE_USER',
|
||||
'controller' => CivilityApiController::class,
|
||||
'actions' => [
|
||||
'_index' => [
|
||||
'methods' => [
|
||||
Request::METHOD_GET => true,
|
||||
Request::METHOD_HEAD => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
@@ -97,6 +97,9 @@ class Configuration implements ConfigurationInterface
|
||||
->scalarNode('twilio_secret')
|
||||
->defaultNull()
|
||||
->end()
|
||||
->scalarNode('default_carrier_code')
|
||||
->defaultNull()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->arrayNode('acl')
|
||||
|
@@ -139,12 +139,10 @@ class Address
|
||||
private $point;
|
||||
|
||||
/**
|
||||
* @var PostalCode
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\PostalCode")
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
private $postcode;
|
||||
private ?PostalCode $postcode = null;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
@@ -306,10 +304,8 @@ class Address
|
||||
|
||||
/**
|
||||
* Get postcode.
|
||||
*
|
||||
* @return PostalCode
|
||||
*/
|
||||
public function getPostcode()
|
||||
public function getPostcode(): ?PostalCode
|
||||
{
|
||||
return $this->postcode;
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
/**
|
||||
* @ORM\Table(name="chill_main_civility")
|
||||
* @ORM\Entity
|
||||
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={"chill_main_civility": Civility::class})
|
||||
*/
|
||||
class Civility
|
||||
{
|
||||
@@ -29,6 +30,7 @@ class Civility
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private bool $active = true;
|
||||
|
||||
|
@@ -18,9 +18,9 @@ use Chill\MainBundle\Validation\Constraint\PhonenumberConstraint;
|
||||
use DateTimeImmutable;
|
||||
use DateTimeInterface;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use libphonenumber\PhoneNumber;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* @ORM\Table(name="chill_main_location")
|
||||
@@ -90,20 +90,18 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
|
||||
private ?string $name = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=64, nullable=true)
|
||||
* @ORM\Column(type="phone_number", nullable=true)
|
||||
* @Serializer\Groups({"read", "write", "docgen:read"})
|
||||
* @Assert\Regex(pattern="/^([\+{1}])([0-9\s*]{4,20})$/")
|
||||
* @PhonenumberConstraint(type="any")
|
||||
*/
|
||||
private ?string $phonenumber1 = null;
|
||||
private ?PhoneNumber $phonenumber1 = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=64, nullable=true)
|
||||
* @ORM\Column(type="phone_number", nullable=true)
|
||||
* @Serializer\Groups({"read", "write", "docgen:read"})
|
||||
* @Assert\Regex(pattern="/^([\+{1}])([0-9\s*]{4,20})$/")
|
||||
* @PhonenumberConstraint(type="any")
|
||||
*/
|
||||
private ?string $phonenumber2 = null;
|
||||
private ?PhoneNumber $phonenumber2 = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true)
|
||||
@@ -162,12 +160,12 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getPhonenumber1(): ?string
|
||||
public function getPhonenumber1(): ?PhoneNumber
|
||||
{
|
||||
return $this->phonenumber1;
|
||||
}
|
||||
|
||||
public function getPhonenumber2(): ?string
|
||||
public function getPhonenumber2(): ?PhoneNumber
|
||||
{
|
||||
return $this->phonenumber2;
|
||||
}
|
||||
@@ -238,14 +236,14 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setPhonenumber1(?string $phonenumber1): self
|
||||
public function setPhonenumber1(?PhoneNumber $phonenumber1): self
|
||||
{
|
||||
$this->phonenumber1 = $phonenumber1;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setPhonenumber2(?string $phonenumber2): self
|
||||
public function setPhonenumber2(?PhoneNumber $phonenumber2): self
|
||||
{
|
||||
$this->phonenumber2 = $phonenumber2;
|
||||
|
||||
|
@@ -41,6 +41,28 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
|
||||
use TrackUpdateTrait;
|
||||
|
||||
/**
|
||||
* a list of future dest emails for the next steps.
|
||||
*
|
||||
* This is in used in order to let controller inform who will be the future emails which will validate
|
||||
* the next step. This is necessary to perform some computation about the next emails, before they are
|
||||
* associated to the entity EntityWorkflowStep.
|
||||
*
|
||||
* @var array|string[]
|
||||
*/
|
||||
public array $futureDestEmails = [];
|
||||
|
||||
/**
|
||||
* a list of future dest users for the next steps.
|
||||
*
|
||||
* This is in used in order to let controller inform who will be the future users which will validate
|
||||
* the next step. This is necessary to perform some computation about the next users, before they are
|
||||
* associated to the entity EntityWorkflowStep.
|
||||
*
|
||||
* @var array|User[]
|
||||
*/
|
||||
public array $futureDestUsers = [];
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity=EntityWorkflowComment::class, mappedBy="entityWorkflow", orphanRemoval=true)
|
||||
*
|
||||
|
@@ -27,6 +27,11 @@ use function in_array;
|
||||
*/
|
||||
class EntityWorkflowStep
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false)
|
||||
*/
|
||||
private string $accessKey;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", options={"default": ""})
|
||||
*/
|
||||
@@ -48,6 +53,12 @@ class EntityWorkflowStep
|
||||
*/
|
||||
private Collection $destUser;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity=User::class)
|
||||
* @ORM\JoinTable(name="chill_main_workflow_entity_step_user_by_accesskey")
|
||||
*/
|
||||
private Collection $destUserByAccessKey;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=EntityWorkflow::class, inversedBy="steps")
|
||||
*/
|
||||
@@ -86,7 +97,7 @@ class EntityWorkflowStep
|
||||
private ?string $transitionAfter = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable")
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null})
|
||||
*/
|
||||
private ?DateTimeImmutable $transitionAt = null;
|
||||
|
||||
@@ -104,6 +115,8 @@ class EntityWorkflowStep
|
||||
public function __construct()
|
||||
{
|
||||
$this->destUser = new ArrayCollection();
|
||||
$this->destUserByAccessKey = new ArrayCollection();
|
||||
$this->accessKey = bin2hex(openssl_random_pseudo_bytes(32));
|
||||
}
|
||||
|
||||
public function addDestEmail(string $email): self
|
||||
@@ -119,11 +132,45 @@ class EntityWorkflowStep
|
||||
{
|
||||
if (!$this->destUser->contains($user)) {
|
||||
$this->destUser[] = $user;
|
||||
$this->getEntityWorkflow()
|
||||
->addSubscriberToFinal($user)
|
||||
->addSubscriberToStep($user);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function addDestUserByAccessKey(User $user): self
|
||||
{
|
||||
if (!$this->destUserByAccessKey->contains($user) && !$this->destUser->contains($user)) {
|
||||
$this->destUserByAccessKey[] = $user;
|
||||
$this->getEntityWorkflow()
|
||||
->addSubscriberToFinal($user)
|
||||
->addSubscriberToStep($user);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAccessKey(): string
|
||||
{
|
||||
return $this->accessKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* get all the users which are allowed to apply a transition: those added manually, and
|
||||
* those added automatically bu using an access key.
|
||||
*/
|
||||
public function getAllDestUser(): Collection
|
||||
{
|
||||
return new ArrayCollection(
|
||||
[
|
||||
...$this->getDestUser()->toArray(),
|
||||
...$this->getDestUserByAccessKey()->toArray(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function getComment(): string
|
||||
{
|
||||
return $this->comment;
|
||||
@@ -140,13 +187,21 @@ class EntityWorkflowStep
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ArrayCollection|Collection
|
||||
* get dest users added by the creator.
|
||||
*
|
||||
* You should **not** rely on this method to get all users which are able to
|
||||
* apply a transition on this step. Use @see{EntityWorkflowStep::getAllDestUser} instead.
|
||||
*/
|
||||
public function getDestUser()
|
||||
public function getDestUser(): collection
|
||||
{
|
||||
return $this->destUser;
|
||||
}
|
||||
|
||||
public function getDestUserByAccessKey(): Collection
|
||||
{
|
||||
return $this->destUserByAccessKey;
|
||||
}
|
||||
|
||||
public function getEntityWorkflow(): ?EntityWorkflow
|
||||
{
|
||||
return $this->entityWorkflow;
|
||||
@@ -197,6 +252,19 @@ class EntityWorkflowStep
|
||||
return $this->freezeAfter;
|
||||
}
|
||||
|
||||
public function isWaitingForTransition(): bool
|
||||
{
|
||||
if (null !== $this->transitionAfter) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->isFinal()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function removeDestEmail(string $email): self
|
||||
{
|
||||
$this->destEmail = array_filter($this->destEmail, static function (string $existing) use ($email) {
|
||||
@@ -213,6 +281,13 @@ class EntityWorkflowStep
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeDestUserByAccessKey(User $user): self
|
||||
{
|
||||
$this->destUserByAccessKey->removeElement($user);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setComment(?string $comment): EntityWorkflowStep
|
||||
{
|
||||
$this->comment = (string) $comment;
|
||||
|
@@ -18,7 +18,7 @@ use OutOfBoundsException;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function array_key_exists;
|
||||
use function array_keys;
|
||||
|
@@ -17,7 +17,7 @@ use LogicException;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function array_map;
|
||||
use function count;
|
||||
|
@@ -19,7 +19,7 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FormType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function array_map;
|
||||
use function array_merge;
|
||||
|
@@ -23,7 +23,7 @@ use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function array_key_exists;
|
||||
use function array_keys;
|
||||
|
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\Form;
|
||||
|
||||
use Chill\MainBundle\Entity\LocationType as EntityLocationType;
|
||||
use Chill\MainBundle\Form\Type\ChillPhoneNumberType;
|
||||
use Chill\MainBundle\Form\Type\PickAddressType;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
@@ -46,8 +47,8 @@ final class LocationFormType extends AbstractType
|
||||
},
|
||||
])
|
||||
->add('name', TextType::class)
|
||||
->add('phonenumber1', TextType::class, ['required' => false])
|
||||
->add('phonenumber2', TextType::class, ['required' => false])
|
||||
->add('phonenumber1', ChillPhoneNumberType::class, ['required' => false])
|
||||
->add('phonenumber2', ChillPhoneNumberType::class, ['required' => false])
|
||||
->add('email', TextType::class, ['required' => false])
|
||||
->add('address', PickAddressType::class, [
|
||||
'required' => false,
|
||||
|
@@ -0,0 +1,61 @@
|
||||
<?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\MainBundle\Form\Type;
|
||||
|
||||
use libphonenumber\PhoneNumberFormat;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
use Misd\PhoneNumberBundle\Form\Type\PhoneNumberType;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\OptionsResolver\Options;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use function array_key_exists;
|
||||
|
||||
class ChillPhoneNumberType extends AbstractType
|
||||
{
|
||||
private string $defaultCarrierCode;
|
||||
|
||||
private PhoneNumberUtil $phoneNumberUtil;
|
||||
|
||||
public function __construct(ParameterBagInterface $parameterBag)
|
||||
{
|
||||
$this->defaultCarrierCode = $parameterBag->get('chill_main')['phone_helper']['default_carrier_code'];
|
||||
$this->phoneNumberUtil = PhoneNumberUtil::getInstance();
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver
|
||||
->setDefault('default_region', $this->defaultCarrierCode)
|
||||
->setDefault('format', PhoneNumberFormat::NATIONAL)
|
||||
->setDefault('type', \libphonenumber\PhoneNumberType::FIXED_LINE_OR_MOBILE)
|
||||
->setNormalizer('attr', function (Options $options, $value) {
|
||||
if (array_key_exists('placeholder', $value)) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
$examplePhoneNumber = $this->phoneNumberUtil->getExampleNumberForType($this->defaultCarrierCode, $options['type']);
|
||||
|
||||
return array_merge(
|
||||
$value,
|
||||
[
|
||||
'placeholder' => PhoneNumberUtil::getInstance()->format($examplePhoneNumber, $options['format']),
|
||||
]
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
{
|
||||
return PhoneNumberType::class;
|
||||
}
|
||||
}
|
@@ -38,7 +38,7 @@ class ObjectToIdTransformer implements DataTransformerInterface
|
||||
*/
|
||||
public function reverseTransform($id)
|
||||
{
|
||||
if (!$id) {
|
||||
if (null === $id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class ObjectToIdTransformer implements DataTransformerInterface
|
||||
->getRepository($this->class)
|
||||
->find($id);
|
||||
|
||||
if (!$object) {
|
||||
if (null === $object) {
|
||||
throw new TransformationFailedException();
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ class ObjectToIdTransformer implements DataTransformerInterface
|
||||
*/
|
||||
public function transform($object)
|
||||
{
|
||||
if (!$object) {
|
||||
if (null === $object) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
57
src/Bundle/ChillMainBundle/Form/Type/PickCivilityType.php
Normal file
57
src/Bundle/ChillMainBundle/Form/Type/PickCivilityType.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?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\MainBundle\Form\Type;
|
||||
|
||||
use Chill\MainBundle\Entity\Civility;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class PickCivilityType extends AbstractType
|
||||
{
|
||||
private TranslatableStringHelper $translatableStringHelper;
|
||||
|
||||
public function __construct(TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver
|
||||
->setDefault('label', 'Civility')
|
||||
->setDefault(
|
||||
'choice_label',
|
||||
function (Civility $civility): string {
|
||||
return $this->translatableStringHelper->localize($civility->getName());
|
||||
}
|
||||
)
|
||||
->setDefault(
|
||||
'query_builder',
|
||||
static function (EntityRepository $er): QueryBuilder {
|
||||
return $er->createQueryBuilder('c')
|
||||
->where('c.active = true')
|
||||
->orderBy('c.order');
|
||||
},
|
||||
)
|
||||
->setDefault('placeholder', 'choose civility')
|
||||
->setDefault('class', Civility::class);
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
{
|
||||
return EntityType::class;
|
||||
}
|
||||
}
|
@@ -20,7 +20,7 @@ use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\Form\FormView;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
* A form to pick between PostalCode.
|
||||
|
@@ -13,6 +13,7 @@ namespace Chill\MainBundle\Form;
|
||||
|
||||
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
|
||||
use Chill\MainBundle\Entity\Workflow\EntityWorkflowStep;
|
||||
use Chill\MainBundle\Form\Type\ChillCollectionType;
|
||||
use Chill\MainBundle\Form\Type\ChillTextareaType;
|
||||
use Chill\MainBundle\Form\Type\PickUserDynamicType;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
@@ -21,8 +22,14 @@ use LogicException;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Validator\Constraints\Callback;
|
||||
use Symfony\Component\Validator\Constraints\Email;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Symfony\Component\Validator\Constraints\NotNull;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
use Symfony\Component\Workflow\Registry;
|
||||
use Symfony\Component\Workflow\Transition;
|
||||
use function array_key_exists;
|
||||
@@ -146,6 +153,22 @@ class WorkflowStepType extends AbstractType
|
||||
'label' => 'workflow.dest for next steps',
|
||||
'multiple' => true,
|
||||
'mapped' => false,
|
||||
])
|
||||
->add('future_dest_emails', ChillCollectionType::class, [
|
||||
'label' => 'workflow.dest by email',
|
||||
'help' => 'workflow.dest by email help',
|
||||
'mapped' => false,
|
||||
'allow_add' => true,
|
||||
'entry_type' => EmailType::class,
|
||||
'button_add_label' => 'workflow.Add an email',
|
||||
'button_remove_label' => 'workflow.Remove an email',
|
||||
'empty_collection_explain' => 'workflow.Any email',
|
||||
'entry_options' => [
|
||||
'constraints' => [
|
||||
new NotNull(), new NotBlank(), new Email(['checkMX' => true]),
|
||||
],
|
||||
'label' => 'Email',
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -175,6 +198,37 @@ class WorkflowStepType extends AbstractType
|
||||
->setRequired('transition')
|
||||
->setAllowedTypes('transition', 'bool')
|
||||
->setRequired('entity_workflow')
|
||||
->setAllowedTypes('entity_workflow', EntityWorkflow::class);
|
||||
->setAllowedTypes('entity_workflow', EntityWorkflow::class)
|
||||
->setDefault('constraints', [
|
||||
new Callback(
|
||||
function ($step, ExecutionContextInterface $context, $payload) {
|
||||
/** @var EntityWorkflowStep $step */
|
||||
$form = $context->getObject();
|
||||
$workflow = $this->registry->get($step->getEntityWorkflow(), $step->getEntityWorkflow()->getWorkflowName());
|
||||
$transition = $form['transition']->getData();
|
||||
$toFinal = true;
|
||||
|
||||
foreach ($transition->getTos() as $to) {
|
||||
$meta = $workflow->getMetadataStore()->getPlaceMetadata($to);
|
||||
|
||||
if (
|
||||
!array_key_exists('isFinal', $meta) || false === $meta['isFinal']
|
||||
) {
|
||||
$toFinal = false;
|
||||
}
|
||||
}
|
||||
|
||||
$destUsers = $form['future_dest_users']->getData();
|
||||
$destEmails = $form['future_dest_emails']->getData();
|
||||
|
||||
if (!$toFinal && [] === $destUsers && [] === $destEmails) {
|
||||
$context
|
||||
->buildViolation('workflow.You must add at least one dest user or email')
|
||||
->atPath('future_dest_users')
|
||||
->addViolation();
|
||||
}
|
||||
}
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@ use Psr\Log\LoggerInterface;
|
||||
use Swift_Mailer;
|
||||
use Swift_Message;
|
||||
use Symfony\Component\Routing\RouterInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Twig\Environment;
|
||||
|
||||
use function call_user_func;
|
||||
|
@@ -0,0 +1,54 @@
|
||||
<?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\MainBundle\Phonenumber;
|
||||
|
||||
use libphonenumber\PhoneNumber;
|
||||
|
||||
/**
|
||||
* Helper to some task linked to phonenumber.
|
||||
*
|
||||
* Currently, only Twilio is supported (https://www.twilio.com/lookup). A method
|
||||
* allow to check if the helper is configured for validation. This should be used
|
||||
* before doing some validation.
|
||||
*/
|
||||
interface PhoneNumberHelperInterface
|
||||
{
|
||||
public function format(PhoneNumber $phoneNumber): string;
|
||||
|
||||
/**
|
||||
* Get type (mobile, landline, ...) for phone number.
|
||||
*/
|
||||
public function getType(PhoneNumber $phonenumber): string;
|
||||
|
||||
/**
|
||||
* Return true if the validation is configured and available.
|
||||
*/
|
||||
public function isPhonenumberValidationConfigured(): bool;
|
||||
|
||||
/**
|
||||
* Return true if the phonenumber is a landline or voip phone. Return always true
|
||||
* if the validation is not configured.
|
||||
*/
|
||||
public function isValidPhonenumberAny(string $phonenumber): bool;
|
||||
|
||||
/**
|
||||
* Return true if the phonenumber is a landline or voip phone. Return always true
|
||||
* if the validation is not configured.
|
||||
*/
|
||||
public function isValidPhonenumberLandOrVoip(string $phonenumber): bool;
|
||||
|
||||
/**
|
||||
* REturn true if the phoennumber is a mobile phone. Return always true
|
||||
* if the validation is not configured.
|
||||
*/
|
||||
public function isValidPhonenumberMobile(string $phonenumber): bool;
|
||||
}
|
@@ -15,8 +15,13 @@ use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\ClientException;
|
||||
use GuzzleHttp\Exception\ConnectException;
|
||||
use GuzzleHttp\Exception\ServerException;
|
||||
use libphonenumber\NumberParseException;
|
||||
use libphonenumber\PhoneNumber;
|
||||
use libphonenumber\PhoneNumberType;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
use Psr\Cache\CacheItemPoolInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
|
||||
use function array_key_exists;
|
||||
use function in_array;
|
||||
@@ -24,40 +29,32 @@ use function json_decode;
|
||||
use function preg_replace;
|
||||
use function strlen;
|
||||
|
||||
/**
|
||||
* Helper to some task linked to phonenumber.
|
||||
*
|
||||
* Currently, only Twilio is supported (https://www.twilio.com/lookup). A method
|
||||
* allow to check if the helper is configured for validation. This should be used
|
||||
* before doing some validation.
|
||||
*/
|
||||
class PhonenumberHelper
|
||||
final class PhonenumberHelper implements PhoneNumberHelperInterface
|
||||
{
|
||||
public const FORMAT_URI = 'https://lookups.twilio.com/v1/PhoneNumbers/%s';
|
||||
|
||||
public const LOOKUP_URI = 'https://lookups.twilio.com/v1/PhoneNumbers/%s';
|
||||
|
||||
protected CacheItemPoolInterface $cachePool;
|
||||
private CacheItemPoolInterface $cachePool;
|
||||
|
||||
/**
|
||||
* TRUE if the client is properly configured.
|
||||
*/
|
||||
protected bool $isConfigured = false;
|
||||
private array $config;
|
||||
|
||||
protected LoggerInterface $logger;
|
||||
private bool $isConfigured = false;
|
||||
|
||||
/**
|
||||
* Twilio client.
|
||||
*/
|
||||
protected Client $twilioClient;
|
||||
private LoggerInterface $logger;
|
||||
|
||||
private PhonenumberUtil $phoneNumberUtil;
|
||||
|
||||
private Client $twilioClient;
|
||||
|
||||
public function __construct(
|
||||
CacheItemPoolInterface $cachePool,
|
||||
$config,
|
||||
CacheItemPoolInterface $cacheUserData,
|
||||
ParameterBagInterface $parameterBag,
|
||||
LoggerInterface $logger
|
||||
) {
|
||||
$this->logger = $logger;
|
||||
$this->cachePool = $cachePool;
|
||||
$this->cachePool = $cacheUserData;
|
||||
$this->config = $config = $parameterBag->get('chill_main.phone_helper');
|
||||
|
||||
if (
|
||||
array_key_exists('twilio_sid', $config)
|
||||
@@ -72,19 +69,37 @@ class PhonenumberHelper
|
||||
]);
|
||||
$this->isConfigured = true;
|
||||
}
|
||||
|
||||
$this->phoneNumberUtil = PhoneNumberUtil::getInstance();
|
||||
}
|
||||
|
||||
public function format($phonenumber)
|
||||
/**
|
||||
* @param string $phoneNumber A national phone number starting with +
|
||||
*
|
||||
* @throws NumberParseException
|
||||
*/
|
||||
public function format(PhoneNumber $phoneNumber): string
|
||||
{
|
||||
return $this->performTwilioFormat($phonenumber);
|
||||
return $this->phoneNumberUtil
|
||||
->formatOutOfCountryCallingNumber($phoneNumber, $this->config['default_carrier_code']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get type (mobile, landline, ...) for phone number.
|
||||
*/
|
||||
public function getType(string $phonenumber): string
|
||||
public function getType(PhoneNumber $phonenumber): string
|
||||
{
|
||||
return $this->performTwilioLookup($phonenumber) ?? 'unknown';
|
||||
switch ($this->phoneNumberUtil->getNumberType($phonenumber)) {
|
||||
case PhoneNumberType::MOBILE:
|
||||
return 'mobile';
|
||||
|
||||
case PhoneNumberType::FIXED_LINE:
|
||||
case PhoneNumberType::VOIP:
|
||||
return 'landline';
|
||||
|
||||
default:
|
||||
return 'landline';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -137,7 +152,7 @@ class PhonenumberHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* REturn true if the phoennumber is a mobile phone. Return always true
|
||||
* REturn true if the phonenumber is a mobile phone. Return always true
|
||||
* if the validation is not configured.
|
||||
*
|
||||
* @param string $phonenumber
|
||||
@@ -157,68 +172,7 @@ class PhonenumberHelper
|
||||
return 'mobile' === $validation;
|
||||
}
|
||||
|
||||
protected function performTwilioFormat($phonenumber)
|
||||
{
|
||||
if (false === $this->isPhonenumberValidationConfigured()) {
|
||||
return $phonenumber;
|
||||
}
|
||||
|
||||
// filter only number
|
||||
$filtered = preg_replace('/[^0-9]/', '', $phonenumber);
|
||||
|
||||
$item = $this->cachePool->getItem('pnum_format_nat_' . $filtered);
|
||||
|
||||
if ($item->isHit()) {
|
||||
return $item->get();
|
||||
}
|
||||
|
||||
try {
|
||||
$response = $this->twilioClient->get(sprintf(self::FORMAT_URI, '+' . $filtered), [
|
||||
'http_errors' => true,
|
||||
]);
|
||||
} catch (ClientException $e) {
|
||||
$response = $e->getResponse();
|
||||
$this->logger->error('[phonenumber helper] Could not format number '
|
||||
. 'due to client error', [
|
||||
'message' => $response->getBody()->getContents(),
|
||||
'status_code' => $response->getStatusCode(),
|
||||
'phonenumber' => $phonenumber,
|
||||
]);
|
||||
|
||||
return $phonenumber;
|
||||
} catch (ServerException $e) {
|
||||
$response = $e->getResponse();
|
||||
$this->logger->error('[phonenumber helper] Could not format number '
|
||||
. 'due to server error', [
|
||||
'message' => $response->getBody()->getContents(),
|
||||
'status_code' => $response->getStatusCode(),
|
||||
'phonenumber' => $phonenumber,
|
||||
]);
|
||||
|
||||
return null;
|
||||
} catch (ConnectException $e) {
|
||||
$this->logger->error('[phonenumber helper] Could not format number '
|
||||
. 'due to connect error', [
|
||||
'message' => $e->getMessage(),
|
||||
'phonenumber' => $phonenumber,
|
||||
]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$format = json_decode($response->getBody()->getContents())->national_format;
|
||||
|
||||
$item
|
||||
->set($format)
|
||||
// expires after 3d
|
||||
->expiresAfter(3600 * 24 * 3);
|
||||
|
||||
$this->cachePool->save($item);
|
||||
|
||||
return $format;
|
||||
}
|
||||
|
||||
protected function performTwilioLookup($phonenumber)
|
||||
private function performTwilioLookup($phonenumber)
|
||||
{
|
||||
if (false === $this->isPhonenumberValidationConfigured()) {
|
||||
return null;
|
||||
@@ -230,7 +184,7 @@ class PhonenumberHelper
|
||||
$item = $this->cachePool->getItem('pnum_' . $filtered);
|
||||
|
||||
if ($item->isHit()) {
|
||||
//return $item->get();
|
||||
return $item->get();
|
||||
}
|
||||
|
||||
try {
|
||||
|
@@ -16,10 +16,7 @@ use Twig\TwigFilter;
|
||||
|
||||
class Templating extends AbstractExtension
|
||||
{
|
||||
/**
|
||||
* @var PhonenumberHelper
|
||||
*/
|
||||
protected $phonenumberHelper;
|
||||
protected PhonenumberHelper $phonenumberHelper;
|
||||
|
||||
public function __construct(PhonenumberHelper $phonenumberHelper)
|
||||
{
|
||||
|
@@ -34,6 +34,20 @@ class EntityWorkflowRepository implements ObjectRepository
|
||||
return (int) $qb->getQuery()->getSingleScalarResult();
|
||||
}
|
||||
|
||||
public function countByPreviousDestWithoutReaction(User $user): int
|
||||
{
|
||||
$qb = $this->buildQueryByPreviousDestWithoutReaction($user)->select('count(ew)');
|
||||
|
||||
return (int) $qb->getQuery()->getSingleScalarResult();
|
||||
}
|
||||
|
||||
public function countByPreviousTransitionned(User $user): int
|
||||
{
|
||||
$qb = $this->buildQueryByPreviousTransitionned($user)->select('count(ew)');
|
||||
|
||||
return (int) $qb->getQuery()->getSingleScalarResult();
|
||||
}
|
||||
|
||||
public function countBySubscriber(User $user): int
|
||||
{
|
||||
$qb = $this->buildQueryBySubscriber($user)->select('count(ew)');
|
||||
@@ -41,6 +55,30 @@ class EntityWorkflowRepository implements ObjectRepository
|
||||
return (int) $qb->getQuery()->getSingleScalarResult();
|
||||
}
|
||||
|
||||
public function countRelatedWorkflows(array $relateds): int
|
||||
{
|
||||
$qb = $this->repository->createQueryBuilder('w');
|
||||
|
||||
$orX = $qb->expr()->orX();
|
||||
$i = 0;
|
||||
|
||||
foreach ($relateds as $related) {
|
||||
$orX->add(
|
||||
$qb->expr()->andX(
|
||||
$qb->expr()->eq('w.relatedEntityClass', ':entity_class_' . $i),
|
||||
$qb->expr()->eq('w.relatedEntityId', ':entity_id_' . $i)
|
||||
)
|
||||
);
|
||||
$qb
|
||||
->setParameter('entity_class_' . $i, $related['entityClass'])
|
||||
->setParameter('entity_id_' . $i, $related['entityId']);
|
||||
++$i;
|
||||
}
|
||||
$qb->where($orX);
|
||||
|
||||
return $qb->select('COUNT(w)')->getQuery()->getSingleScalarResult();
|
||||
}
|
||||
|
||||
public function find($id): ?EntityWorkflow
|
||||
{
|
||||
return $this->repository->find($id);
|
||||
@@ -78,6 +116,32 @@ class EntityWorkflowRepository implements ObjectRepository
|
||||
return $qb->getQuery()->getResult();
|
||||
}
|
||||
|
||||
public function findByPreviousDestWithoutReaction(User $user, ?array $orderBy = null, $limit = null, $offset = null): array
|
||||
{
|
||||
$qb = $this->buildQueryByPreviousDestWithoutReaction($user)->select('ew');
|
||||
|
||||
foreach ($orderBy as $key => $sort) {
|
||||
$qb->addOrderBy('ew.' . $key, $sort);
|
||||
}
|
||||
|
||||
$qb->setMaxResults($limit)->setFirstResult($offset);
|
||||
|
||||
return $qb->getQuery()->getResult();
|
||||
}
|
||||
|
||||
public function findByPreviousTransitionned(User $user, ?array $orderBy = null, $limit = null, $offset = null): array
|
||||
{
|
||||
$qb = $this->buildQueryByPreviousTransitionned($user)->select('ew')->distinct(true);
|
||||
|
||||
foreach ($orderBy as $key => $sort) {
|
||||
$qb->addOrderBy('ew.' . $key, $sort);
|
||||
}
|
||||
|
||||
$qb->setMaxResults($limit)->setFirstResult($offset);
|
||||
|
||||
return $qb->getQuery()->getResult();
|
||||
}
|
||||
|
||||
public function findBySubscriber(User $user, ?array $orderBy = null, $limit = null, $offset = null): array
|
||||
{
|
||||
$qb = $this->buildQueryBySubscriber($user)->select('ew');
|
||||
@@ -120,6 +184,41 @@ class EntityWorkflowRepository implements ObjectRepository
|
||||
return $qb;
|
||||
}
|
||||
|
||||
private function buildQueryByPreviousDestWithoutReaction(User $user): QueryBuilder
|
||||
{
|
||||
$qb = $this->repository->createQueryBuilder('ew');
|
||||
|
||||
$qb->join('ew.steps', 'step');
|
||||
|
||||
$qb->where(
|
||||
$qb->expr()->andX(
|
||||
$qb->expr()->isMemberOf(':user', 'step.destUser'),
|
||||
$qb->expr()->neq('step.transitionBy', ':user'),
|
||||
)
|
||||
);
|
||||
|
||||
$qb->setParameter('user', $user);
|
||||
|
||||
return $qb;
|
||||
}
|
||||
|
||||
private function buildQueryByPreviousTransitionned(User $user): QueryBuilder
|
||||
{
|
||||
$qb = $this->repository->createQueryBuilder('ew');
|
||||
|
||||
$qb->join('ew.steps', 'step');
|
||||
|
||||
$qb->where(
|
||||
$qb->expr()->andX(
|
||||
$qb->expr()->eq('step.transitionBy', ':user'),
|
||||
)
|
||||
);
|
||||
|
||||
$qb->setParameter('user', $user);
|
||||
|
||||
return $qb;
|
||||
}
|
||||
|
||||
private function buildQueryBySubscriber(User $user): QueryBuilder
|
||||
{
|
||||
$qb = $this->repository->createQueryBuilder('ew');
|
||||
|
@@ -278,6 +278,7 @@ table.table-bordered {
|
||||
}
|
||||
|
||||
/// meta-data
|
||||
div.createdBy,
|
||||
div.updatedBy,
|
||||
div.metadata {
|
||||
span.user, span.date {
|
||||
|
@@ -279,6 +279,7 @@ div.wrap-header {
|
||||
|
||||
li {
|
||||
margin-right: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -316,7 +317,7 @@ div.float-button {
|
||||
|
||||
div.action {
|
||||
height: calc(100% - 0em);
|
||||
shape-outside: inset(calc(100% - 4em) 0 0);
|
||||
shape-outside: inset(calc(100% - 2em) 0 0);
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
padding: 0 0 0 1em;
|
||||
@@ -328,6 +329,10 @@ div.float-button {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.chill-entity.entity-address .address p {
|
||||
display: unset;
|
||||
}
|
||||
}
|
||||
&.debug {
|
||||
padding: 1em;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
ul.record_actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap-reverse;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
padding: 0.5em 0;
|
||||
|
||||
|
@@ -73,8 +73,8 @@ section.chill-entity {
|
||||
}
|
||||
p {
|
||||
display: inline-block;
|
||||
margin: 0 0 0 1.5em;
|
||||
text-indent: -1.5em;
|
||||
//margin: 0 0 0 1.5em;
|
||||
//text-indent: -1.5em;
|
||||
|
||||
&.street {
|
||||
span.streetnumber {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Generic api method that can be adapted to any fetch request
|
||||
*/
|
||||
const makeFetch = (method, url, body) => {
|
||||
const makeFetch = (method, url, body) => {
|
||||
return fetch(url, {
|
||||
method: method,
|
||||
headers: {
|
||||
@@ -11,19 +11,20 @@
|
||||
})
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
console.log('200 error')
|
||||
return response.json();
|
||||
}
|
||||
|
||||
if (response.status === 422) {
|
||||
console.log('422 error')
|
||||
return response.json().then(response => {
|
||||
throw ValidationException(response)
|
||||
});
|
||||
}
|
||||
|
||||
if (response.status === 403) {
|
||||
return response.json().then(() => {
|
||||
throw AccessException();
|
||||
});
|
||||
console.log('403 error')
|
||||
throw AccessException(response);
|
||||
}
|
||||
|
||||
throw {
|
||||
@@ -88,14 +89,13 @@ const ValidationException = (response) => {
|
||||
error.violations = response.violations.map((violation) => `${violation.title}: ${violation.propertyPath}`);
|
||||
error.titles = response.violations.map((violation) => violation.title);
|
||||
error.propertyPaths = response.violations.map((violation) => violation.propertyPath);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
const AccessException = () => {
|
||||
const AccessException = (response) => {
|
||||
const error = {};
|
||||
error.name = 'AccessException';
|
||||
error.violations = ['You are no longer permitted to perform this action'];
|
||||
error.violations = ['You are not allowed to perform this action'];
|
||||
|
||||
return error;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user