mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-10 00:34:58 +00:00
Compare commits
313 Commits
3.0.0-alph
...
v4.0.0-RC1
Author | SHA1 | Date | |
---|---|---|---|
72a91d0864 | |||
8251587288 | |||
f3ac864233 | |||
547a9d1369 | |||
288a02f5b7 | |||
5dfd8daf3a | |||
a46e987f81 | |||
81220b5b22 | |||
5b0019cde7 | |||
b42473b01d | |||
be19d09bad | |||
c82991674e | |||
3fc3f32c5f | |||
20af766cdf | |||
681f637d13 | |||
fb8a6d960e | |||
a2310a662f | |||
dd7d126bec | |||
29f6a43288 | |||
74be6460d4 | |||
c8e87ced35 | |||
b8002d56ec | |||
a80b36bb31 | |||
116fe35ad2 | |||
5b95336bac | |||
f9d5ba7778 | |||
f76379551c | |||
15094d5a91 | |||
1079c7e394 | |||
bc2dfd159c | |||
b100792a34 | |||
00ceee1fd5 | |||
724b98e8c5 | |||
ead1abb825
|
|||
54d045f261
|
|||
702a5a27d2 | |||
|
41dd4d89f7 | ||
|
3a7ed7ef8f | ||
2c99ea17d4 | |||
18df08e8c3 | |||
db3961275b
|
|||
cd488d7576 | |||
436661d952 | |||
c3b8d42047 | |||
|
9c28df25a1 | ||
d88b5a0098
|
|||
|
c5a24e8ac5 | ||
|
d9c50cffb7 | ||
|
25ccb16308 | ||
|
ba25c181f5 | ||
e38d47ec5e | |||
36f2275a56 | |||
9a34064b23 | |||
4c3bfc90b5 | |||
1812e84c92 | |||
dfa7de4f38 | |||
145419a76b | |||
b1ba5cc608 | |||
87a6757e5e | |||
bd41308bbd
|
|||
f8fa96d836
|
|||
d28cec3786
|
|||
7cd36cd483
|
|||
d3d98cdec2
|
|||
49dd7f94fa
|
|||
916724c0c5
|
|||
|
102d0dad94 | ||
|
8d225dd68c | ||
|
61d0005be8 | ||
47f4cfddbb
|
|||
e95f9e9846 | |||
1f4bef754d
|
|||
19e34d5dc0
|
|||
fab00f679c
|
|||
791b3776c5
|
|||
6bd38f1a58
|
|||
68d21c9267
|
|||
e7ca89e0c1
|
|||
fc8bc33ba9
|
|||
cbd9489810
|
|||
90b615c5b2
|
|||
5ca222b501 | |||
3e4495dd6e
|
|||
bca0d04201
|
|||
f66ac50571 | |||
b454774836
|
|||
008f344e49
|
|||
90bfd87ec6
|
|||
cc0030c1cd
|
|||
d60ba3ecb2
|
|||
cd5001ac74 | |||
98f47ac512
|
|||
31b541d12f
|
|||
72045ce082
|
|||
0bfb3de465
|
|||
9ec4c77fb7
|
|||
77c53972c8
|
|||
350d991a85
|
|||
0ce9cdd07a
|
|||
1993fac1c4
|
|||
83883567a2
|
|||
29d57934a1
|
|||
f43d79c940
|
|||
be730679c8
|
|||
f62f1891d8
|
|||
ebb856fe85
|
|||
61877e0157
|
|||
4c3f082163
|
|||
635b1ee537 | |||
35109133f6
|
|||
a220dad83b
|
|||
9eb571549b
|
|||
db8257d230 | |||
bce93efe83 | |||
06401af801 | |||
ea1d4c48f2
|
|||
6db36d5ab6
|
|||
59f721934e
|
|||
|
33cba27dd4 | ||
84ce8a93f3
|
|||
ab5f2ffb65
|
|||
73bae8ccb9
|
|||
dcfa569e3a
|
|||
4b07fe3622
|
|||
3fd6e52e9d | |||
f60a595ab6 | |||
48bf359d2e
|
|||
60c7ea601c
|
|||
785c01d42d
|
|||
06dd7dd4f5
|
|||
84f515d451
|
|||
27b0ec0ae7 | |||
9f141468c7
|
|||
56d173046d
|
|||
059e4a0acd
|
|||
111a21fcec
|
|||
775535e683
|
|||
47a928a6cd
|
|||
0dd58cebec
|
|||
4cff706306
|
|||
fca929f56f
|
|||
8d44bb2c32
|
|||
a57e6c0cc9
|
|||
3fe870ba71
|
|||
6f6683f549
|
|||
146e0090fb
|
|||
436ef33dbc | |||
405aad7333 | |||
a5c2576124 | |||
33a6f9996e | |||
b96cbc5594 | |||
854d72fa42 | |||
cd6fd091dc | |||
cb5ade3d14 | |||
dddb6d66bc | |||
d34f9450b8 | |||
9ce1788a14 | |||
2895638f3b | |||
2708bafb1f | |||
7d309136b1 | |||
82d3ec4d6f | |||
cad2dea148 | |||
bff14aa700 | |||
66570cd430 | |||
53df2ec9ba | |||
068503a830 | |||
c07a728f1d | |||
b7e61c6747 | |||
20291026fb
|
|||
97846a5877 | |||
4ed9d3d8e2 | |||
d0e27d51fe | |||
85d6765178 | |||
30955752c3 | |||
f7f7e1cb1d | |||
651c455bdf | |||
d50d067bf7 | |||
46c647cbb7 | |||
d63e1a15bd | |||
a7ec7c9f37 | |||
da83b1e98c | |||
536c2622c7 | |||
d82d534a4c | |||
684f28291a | |||
5334779b55
|
|||
1230b7f4c0
|
|||
394c752fc3 | |||
43c846d02e | |||
e24c4dc2e8 | |||
cb70c322a4 | |||
526882a5b6 | |||
422b6b99eb | |||
02b150b0a5 | |||
20c27c100c | |||
12a22bcc13 | |||
89c231de41
|
|||
c773f9c6db
|
|||
4c05d1e026 | |||
3e2ff463bc
|
|||
cba8a342d5 | |||
6f55ba15d6 | |||
454ab73303 | |||
800942bc92 | |||
c4e7683e48 | |||
28c986fddf | |||
adca4f0d6a | |||
7b25c8e390 | |||
0b5be0419b | |||
650e85c481 | |||
56d5d08ed3 | |||
d3390ca334 | |||
511c0af5fa | |||
4c354c47c9 | |||
d8b6cef7b4 | |||
e312929d86 | |||
20b38af812 | |||
2f07be0843 | |||
11c069a2ff | |||
3929602f59 | |||
38fcccfd83 | |||
deaab80270 | |||
a71573136a | |||
b1082f6a55 | |||
dcc285e976 | |||
ed3e0f889e | |||
63fe8070c4 | |||
8e3322f578 | |||
00756a3bde | |||
2c68224e9c | |||
59005e83c4 | |||
|
ab6feef371 | ||
8516e89c9c | |||
c9e13be736 | |||
b9b342fe44 | |||
31f29f0bc5 | |||
0bc9fff825 | |||
25f93e8a89 | |||
4e0d8e4def | |||
1ecc825945 | |||
addc623add | |||
1b96deb4ee | |||
f510acd170 | |||
835409cb94 | |||
2121b3ef28 | |||
6c9101c167 | |||
b46883fe36 | |||
8d58805abd | |||
c3a799cb7d | |||
bc683b28d6 | |||
d91b1a70bf | |||
853014d8d2 | |||
ad6154a1e4 | |||
50c04382ef | |||
d62e9ce269 | |||
2149ef1cb4 | |||
d15fbadd27 | |||
fbbf421d8b | |||
fe695f1a14 | |||
d0ec6f9819 | |||
4091efc72e | |||
b577bd7123 | |||
dbb9feb129 | |||
e8b95f8491 | |||
8de37a9ef3 | |||
166d7fe0b0
|
|||
ab9d5439c1
|
|||
0737838dd6
|
|||
88bac5b5d8
|
|||
0b739fda34 | |||
9b8e143855 | |||
a533ab77ed | |||
087032881b | |||
82667a1c0f | |||
db6408926b | |||
f5c7ab6ef0 | |||
a13ada2937 | |||
3be8a39a1a | |||
d7eb1e01da | |||
bd62202d22 | |||
0e3de2ec8a | |||
aa2a398f9e | |||
33187448a0 | |||
a4482ad28b | |||
8ed5a023e8 | |||
cf1df462dc
|
|||
a0328b9d68
|
|||
813a80d6f9
|
|||
ab95bb157e
|
|||
18fd1dbc4a
|
|||
a35f7656cb
|
|||
ff05f9f48a
|
|||
482c494034
|
|||
653ac1d62b | |||
499009ac43 | |||
192b161e78 | |||
1b1f355123 | |||
39a863448c | |||
0c1a4a5f59 | |||
6f358ee1a9 | |||
0f36b9349b | |||
d18cc29acf | |||
4220d1a2d3 | |||
1ae27152c2 | |||
b946f8c10a | |||
62d6106801 | |||
89fb87f71f | |||
1337360690 | |||
9324c33caf | |||
c2dd9ef676 | |||
a42d7231d9 | |||
38deaf6f36 | |||
04fc5b6614 | |||
384b2be577 |
@@ -1,5 +0,0 @@
|
||||
kind: Feature
|
||||
body: '[DX] move async-upload-bundle features into chill-bundles'
|
||||
time: 2023-12-12T15:48:41.954970271+01:00
|
||||
custom:
|
||||
Issue: "221"
|
@@ -1,6 +0,0 @@
|
||||
kind: Fixed
|
||||
body: Fix resolving of centers for an household, which will fix in turn the access
|
||||
control
|
||||
time: 2024-04-10T10:37:36.462484988+02:00
|
||||
custom:
|
||||
Issue: ""
|
3
.changes/v2.18.2.md
Normal file
3
.changes/v2.18.2.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## v2.18.2 - 2024-04-12
|
||||
### Fixed
|
||||
* ([#250](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/250)) Postal codes import : fix the source URL and the keys to handle each record
|
20
.changes/v2.19.0.md
Normal file
20
.changes/v2.19.0.md
Normal file
@@ -0,0 +1,20 @@
|
||||
## v2.19.0 - 2024-05-14
|
||||
### Feature
|
||||
* ([#197](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/197)) Make the script which subscribe to microsoft calendars changes more tolerant to errors or missing configuration on the microsoft side
|
||||
* ([#276](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/276)) Take closing date into account when computing the geographical unit on accompanying period. When a person moved after an accompanying period is closed, the date of closing accompanying period is took into account if it is earlier than the date given by the user.
|
||||
### Fixed
|
||||
* ([#270](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/270)) Fix broken link in homepage when a evaluation from a closed acc period was present in the homepage widget
|
||||
* ([#275](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/275)) Allow the filter "filter accompanying period by geographical unit" to take period's location on address into account
|
||||
### UX
|
||||
* Form for document generation moved to the top of document list page
|
||||
* ([#266](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/266)) Event bundle: adjust certain graphical issues for better user experience
|
||||
|
||||
|
||||
### Traduction francophone des principaux changements
|
||||
|
||||
- script de synchronisation des agendas de microsoft Outlook: le script est plus tolérant aux erreurs de configuration côté serveur (manque de droit d'accès);
|
||||
- dans les statistiques sur les parcours d'accompagnements, regroupement et filtre par unité géographique: lorsque la date de prise en compte de l'adresse est postérieure à la fermeture du parcours, c'est la date de fermeture du parcours qui est prise en compte (cela permet de tenir compte de la localisation de l'usager au moment de la fermeture dans le cas où celui-ci aurait déménagé par la suite);
|
||||
- sur la page d'accueil, il n'y a plus de rappel pour les évaluations pour les parcours cloturés;
|
||||
- correction du filtre "filtrer par zone géographique"
|
||||
- répétition du bouton pour générer un document en haut de la page "liste des documents", quand il y a plus de cinq documents;
|
||||
- module événement: améliorerations graphiques
|
21
.changes/v2.20.0.md
Normal file
21
.changes/v2.20.0.md
Normal file
@@ -0,0 +1,21 @@
|
||||
## v2.20.0 - 2024-06-05
|
||||
### Fixed
|
||||
* ([#170](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/170)) Display agents traitants instead of accompanying period referrer in export list social actions.
|
||||
* Added translations for choices of durations (> 5 hours)
|
||||
### Feature
|
||||
* ([#145](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/145)) Allow to open documents in LibreOffice locally (need configuration within security);
|
||||
|
||||
This endpoint should be added to make the endpoint works properly:
|
||||
|
||||
```yaml
|
||||
security:
|
||||
firewalls:
|
||||
dav:
|
||||
pattern: ^/dav
|
||||
provider: chain_provider
|
||||
stateless: true
|
||||
guard:
|
||||
authenticators:
|
||||
- Chill\DocStoreBundle\Security\Guard\JWTOnDavUrlAuthenticator
|
||||
|
||||
```
|
3
.changes/v2.20.1.md
Normal file
3
.changes/v2.20.1.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## v2.20.1 - 2024-06-05
|
||||
### Fixed
|
||||
* Do not allow StoredObjectCreated for edit and convert buttons
|
31
.changes/v2.21.0.md
Normal file
31
.changes/v2.21.0.md
Normal file
@@ -0,0 +1,31 @@
|
||||
## v2.21.0 - 2024-06-18
|
||||
### Feature
|
||||
* Add flash menu buttons in search results, to open directly a new calendar, or a new activity in an accompanying period
|
||||
* ([#122](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/122)) Improve the list of calendar in the search results: make all calendar clicable, and display a list of calendars
|
||||
* ([#282](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/282)) [export] add start date and end date on filters "filter course by referrer job" and "filter course by referrer scope"
|
||||
* ([#282](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/282)) [export] the aggregator "Group by referrer" now accept a date range.
|
||||
* ([#282](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/282)) [export] add date range on "group course by referrer's scope"
|
||||
* ([#282](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/282)) [export] add date range on "group course by referrer's jobs"
|
||||
* ([#168](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/168) In the UX, display user job and service at the time when he performs an action:
|
||||
now, the job and service is shown:
|
||||
* at the activity's date,
|
||||
* at the appointment's date,
|
||||
* when the user is marked as referrer for an accompanying period work,
|
||||
* when the user apply a transition in a workflow,
|
||||
* when the user updates or creates "something" ("created/updated by ... at ..."),
|
||||
* or when he wrote a comment,
|
||||
* …
|
||||
|
||||
### Traduction francophone
|
||||
* Ajout d'un menu "flash" dans les résultats de recherche, pour créer un rendez-vous ou un échange dans un parcours depuis les résultats de recherche;
|
||||
* Améliore la liste des rendez-vous dans les résultats de recherche: les rendez-vous sont cliquables;
|
||||
* [exports] Ajout d'intervalles de dates pour des filtres et regroupements des parcours par référent, métier du référent, service du référent;
|
||||
* Affiche le métier et le service des utilisateurs à la date à laquelle il a exécuté une action. Le métier et le service est affiché:
|
||||
* à la date d'un échange,
|
||||
* au jour d'un rendez-vous,
|
||||
* quand l'utilisateur est devenu référent d'un parcours d'accompagnement,
|
||||
* quand il a appliqué une transition sur un workflow,
|
||||
* quand il a mise à jour ou créé une fiche, dans les mentions "créé / mise à jour par ..., le ...",
|
||||
* quand il a mis à jour un commentaire,
|
||||
* …
|
||||
|
6
.changes/v2.22.0.md
Normal file
6
.changes/v2.22.0.md
Normal file
@@ -0,0 +1,6 @@
|
||||
## v2.22.0 - 2024-06-25
|
||||
### Feature
|
||||
* ([#216](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/216)) [event bundle] exports added for the event module
|
||||
|
||||
### Traduction francophone
|
||||
* Exports sont ajoutés pour la module événement.
|
5
.changes/v2.22.1.md
Normal file
5
.changes/v2.22.1.md
Normal file
@@ -0,0 +1,5 @@
|
||||
## v2.22.1 - 2024-07-01
|
||||
### Fixed
|
||||
* Remove debug word
|
||||
### DX
|
||||
* Add a command for reading official address DB from Luxembourg and update chill addresses
|
3
.changes/v2.22.2.md
Normal file
3
.changes/v2.22.2.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## v2.22.2 - 2024-07-03
|
||||
### Fixed
|
||||
* Remove scope required for event participation stats
|
11
.changes/v2.23.0.md
Normal file
11
.changes/v2.23.0.md
Normal file
@@ -0,0 +1,11 @@
|
||||
## v2.23.0 - 2024-07-23
|
||||
### Feature
|
||||
* ([#221](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/221)) [DX] move async-upload-bundle features into chill-bundles
|
||||
* Add job bundle (module emploi)
|
||||
* Upgrade import of address list to the last version of compiled addresses of belgian-best-address
|
||||
|
||||
* Upgrade CKEditor and refactor configuration with use of typescript
|
||||
|
||||
### Fixed
|
||||
* Fix resolving of centers for an household, which will fix in turn the access control
|
||||
* Resolved type hinting error in activity list export
|
@@ -27,6 +27,7 @@ $config
|
||||
->setRiskyAllowed(true)
|
||||
->setCacheFile('.cache/php-cs-fixer.cache')
|
||||
->setUsingCache(true)
|
||||
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
|
||||
;
|
||||
|
||||
$rules = $config->getRules();
|
||||
|
112
CHANGELOG.md
112
CHANGELOG.md
@@ -6,6 +6,118 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||
|
||||
|
||||
## v2.23.0 - 2024-07-23
|
||||
### Feature
|
||||
* ([#221](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/221)) [DX] move async-upload-bundle features into chill-bundles
|
||||
* Add job bundle (module emploi)
|
||||
* Upgrade import of address list to the last version of compiled addresses of belgian-best-address
|
||||
|
||||
* Upgrade CKEditor and refactor configuration with use of typescript
|
||||
|
||||
### Fixed
|
||||
* Fix resolving of centers for an household, which will fix in turn the access control
|
||||
* Resolved type hinting error in activity list export
|
||||
|
||||
## v2.22.2 - 2024-07-03
|
||||
### Fixed
|
||||
* Remove scope required for event participation stats
|
||||
|
||||
## v2.22.1 - 2024-07-01
|
||||
### Fixed
|
||||
* Remove debug word
|
||||
### DX
|
||||
* Add a command for reading official address DB from Luxembourg and update chill addresses
|
||||
|
||||
## v2.22.0 - 2024-06-25
|
||||
### Feature
|
||||
* ([#216](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/216)) [event bundle] exports added for the event module
|
||||
|
||||
### Traduction francophone
|
||||
* Exports sont ajoutés pour la module événement.
|
||||
|
||||
## v2.21.0 - 2024-06-18
|
||||
### Feature
|
||||
* Add flash menu buttons in search results, to open directly a new calendar, or a new activity in an accompanying period
|
||||
* ([#122](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/122)) Improve the list of calendar in the search results: make all calendar clicable, and display a list of calendars
|
||||
* ([#282](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/282)) [export] add start date and end date on filters "filter course by referrer job" and "filter course by referrer scope"
|
||||
* ([#282](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/282)) [export] the aggregator "Group by referrer" now accept a date range.
|
||||
* ([#282](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/282)) [export] add date range on "group course by referrer's scope"
|
||||
* ([#282](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/282)) [export] add date range on "group course by referrer's jobs"
|
||||
* ([#168](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/168) In the UX, display user job and service at the time when he performs an action:
|
||||
now, the job and service is shown:
|
||||
* at the activity's date,
|
||||
* at the appointment's date,
|
||||
* when the user is marked as referrer for an accompanying period work,
|
||||
* when the user apply a transition in a workflow,
|
||||
* when the user updates or creates "something" ("created/updated by ... at ..."),
|
||||
* or when he wrote a comment,
|
||||
* …
|
||||
|
||||
### Traduction francophone
|
||||
* Ajout d'un menu "flash" dans les résultats de recherche, pour créer un rendez-vous ou un échange dans un parcours depuis les résultats de recherche;
|
||||
* Améliore la liste des rendez-vous dans les résultats de recherche: les rendez-vous sont cliquables;
|
||||
* [exports] Ajout d'intervalles de dates pour des filtres et regroupements des parcours par référent, métier du référent, service du référent;
|
||||
* Affiche le métier et le service des utilisateurs à la date à laquelle il a exécuté une action. Le métier et le service est affiché:
|
||||
* à la date d'un échange,
|
||||
* au jour d'un rendez-vous,
|
||||
* quand l'utilisateur est devenu référent d'un parcours d'accompagnement,
|
||||
* quand il a appliqué une transition sur un workflow,
|
||||
* quand il a mise à jour ou créé une fiche, dans les mentions "créé / mise à jour par ..., le ...",
|
||||
* quand il a mis à jour un commentaire,
|
||||
* …
|
||||
|
||||
|
||||
## v2.20.1 - 2024-06-05
|
||||
### Fixed
|
||||
* Do not allow StoredObjectCreated for edit and convert buttons
|
||||
|
||||
## v2.20.0 - 2024-06-05
|
||||
### Fixed
|
||||
* ([#170](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/170)) Display agents traitants instead of accompanying period referrer in export list social actions.
|
||||
* Added translations for choices of durations (> 5 hours)
|
||||
### Feature
|
||||
* ([#145](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/145)) Allow to open documents in LibreOffice locally (need configuration within security);
|
||||
|
||||
This endpoint should be added to make the endpoint works properly:
|
||||
|
||||
```yaml
|
||||
security:
|
||||
firewalls:
|
||||
dav:
|
||||
pattern: ^/dav
|
||||
provider: chain_provider
|
||||
stateless: true
|
||||
guard:
|
||||
authenticators:
|
||||
- Chill\DocStoreBundle\Security\Guard\JWTOnDavUrlAuthenticator
|
||||
|
||||
```
|
||||
|
||||
## v2.19.0 - 2024-05-14
|
||||
### Feature
|
||||
* ([#197](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/197)) Make the script which subscribe to microsoft calendars changes more tolerant to errors or missing configuration on the microsoft side
|
||||
* ([#276](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/276)) Take closing date into account when computing the geographical unit on accompanying period. When a person moved after an accompanying period is closed, the date of closing accompanying period is took into account if it is earlier than the date given by the user.
|
||||
### Fixed
|
||||
* ([#270](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/270)) Fix broken link in homepage when a evaluation from a closed acc period was present in the homepage widget
|
||||
* ([#275](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/275)) Allow the filter "filter accompanying period by geographical unit" to take period's location on address into account
|
||||
### UX
|
||||
* Form for document generation moved to the top of document list page
|
||||
* ([#266](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/266)) Event bundle: adjust certain graphical issues for better user experience
|
||||
|
||||
|
||||
### Traduction francophone des principaux changements
|
||||
|
||||
- script de synchronisation des agendas de microsoft Outlook: le script est plus tolérant aux erreurs de configuration côté serveur (manque de droit d'accès);
|
||||
- dans les statistiques sur les parcours d'accompagnements, regroupement et filtre par unité géographique: lorsque la date de prise en compte de l'adresse est postérieure à la fermeture du parcours, c'est la date de fermeture du parcours qui est prise en compte (cela permet de tenir compte de la localisation de l'usager au moment de la fermeture dans le cas où celui-ci aurait déménagé par la suite);
|
||||
- sur la page d'accueil, il n'y a plus de rappel pour les évaluations pour les parcours cloturés;
|
||||
- correction du filtre "filtrer par zone géographique"
|
||||
- répétition du bouton pour générer un document en haut de la page "liste des documents", quand il y a plus de cinq documents;
|
||||
- module événement: améliorerations graphiques
|
||||
|
||||
## v2.18.2 - 2024-04-12
|
||||
### Fixed
|
||||
* ([#250](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/250)) Postal codes import : fix the source URL and the keys to handle each record
|
||||
|
||||
## v2.18.1 - 2024-03-26
|
||||
### Fixed
|
||||
* Fix layout issue in document generation for admin (minor)
|
||||
|
106
composer.json
106
composer.json
@@ -8,7 +8,8 @@
|
||||
"social worker"
|
||||
],
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"php": "^8.3",
|
||||
"ext-dom": "*",
|
||||
"ext-json": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-redis": "*",
|
||||
@@ -18,7 +19,6 @@
|
||||
"doctrine/doctrine-migrations-bundle": "^3.0",
|
||||
"doctrine/orm": "^2.13.0",
|
||||
"erusev/parsedown": "^1.7",
|
||||
"graylog2/gelf-php": "^1.5",
|
||||
"knplabs/knp-menu-bundle": "^3.0",
|
||||
"knplabs/knp-time-bundle": "^1.12",
|
||||
"knpuniversity/oauth2-client-bundle": "^2.10",
|
||||
@@ -30,49 +30,48 @@
|
||||
"ovh/ovh": "^3.0",
|
||||
"phpoffice/phpspreadsheet": "^1.16",
|
||||
"ramsey/uuid-doctrine": "^1.7",
|
||||
"sensio/framework-extra-bundle": "^5.5",
|
||||
"sensio/framework-extra-bundle": "^6.0",
|
||||
"spomky-labs/base64url": "^2.0",
|
||||
"symfony/asset": "^5.4",
|
||||
"symfony/browser-kit": "^5.4",
|
||||
"symfony/cache": "^5.4",
|
||||
"symfony/asset": "6.0.*",
|
||||
"symfony/browser-kit": "6.0.*",
|
||||
"symfony/cache": "6.0.*",
|
||||
"symfony/clock": "^6.2",
|
||||
"symfony/config": "^5.4",
|
||||
"symfony/console": "^5.4",
|
||||
"symfony/css-selector": "^5.4",
|
||||
"symfony/dom-crawler": "^5.4",
|
||||
"symfony/error-handler": "^5.4",
|
||||
"symfony/event-dispatcher": "^5.4",
|
||||
"symfony/expression-language": "^5.4",
|
||||
"symfony/filesystem": "^5.4",
|
||||
"symfony/finder": "^5.4",
|
||||
"symfony/form": "^5.4",
|
||||
"symfony/framework-bundle": "^5.4",
|
||||
"symfony/http-client": "^5.4",
|
||||
"symfony/http-foundation": "^5.4",
|
||||
"symfony/intl": "^5.4",
|
||||
"symfony/mailer": "^5.4",
|
||||
"symfony/messenger": "^5.4",
|
||||
"symfony/mime": "^5.4",
|
||||
"symfony/config": "^6.0",
|
||||
"symfony/console": "6.0.*",
|
||||
"symfony/css-selector": "6.0.*",
|
||||
"symfony/dom-crawler": "6.0.*",
|
||||
"symfony/error-handler": "6.0.*",
|
||||
"symfony/event-dispatcher": "6.0.*",
|
||||
"symfony/expression-language": "6.0.*",
|
||||
"symfony/filesystem": "6.0.*",
|
||||
"symfony/finder": "6.0.*",
|
||||
"symfony/form": "6.0.*",
|
||||
"symfony/framework-bundle": "6.0.*",
|
||||
"symfony/http-client": "6.0.*",
|
||||
"symfony/http-foundation": "6.0.*",
|
||||
"symfony/intl": "6.0.*",
|
||||
"symfony/mailer": "6.0.*",
|
||||
"symfony/messenger": "6.0.*",
|
||||
"symfony/mime": "6.0.*",
|
||||
"symfony/monolog-bundle": "^3.5",
|
||||
"symfony/options-resolver": "^5.4",
|
||||
"symfony/process": "^5.4",
|
||||
"symfony/property-access": "^5.4",
|
||||
"symfony/property-info": "^5.4",
|
||||
"symfony/routing": "^5.4",
|
||||
"symfony/security-bundle": "^5.4",
|
||||
"symfony/security-core": "^5.4",
|
||||
"symfony/security-csrf": "^5.4",
|
||||
"symfony/security-guard": "^5.4",
|
||||
"symfony/security-http": "^5.4",
|
||||
"symfony/serializer": "^5.4",
|
||||
"symfony/string": "^5.4",
|
||||
"symfony/templating": "^5.4",
|
||||
"symfony/translation": "^5.4",
|
||||
"symfony/twig-bundle": "^5.4",
|
||||
"symfony/validator": "^5.4",
|
||||
"symfony/options-resolver": "6.0.*",
|
||||
"symfony/process": "6.0.*",
|
||||
"symfony/property-access": "6.0.*",
|
||||
"symfony/property-info": "6.0.*",
|
||||
"symfony/routing": "6.0.*",
|
||||
"symfony/security-bundle": "^6.0",
|
||||
"symfony/security-core": "6.0.*",
|
||||
"symfony/security-csrf": "6.0.*",
|
||||
"symfony/security-http": "6.0.*",
|
||||
"symfony/serializer": "6.0.*",
|
||||
"symfony/string": "6.0.*",
|
||||
"symfony/templating": "6.0.*",
|
||||
"symfony/translation": "6.0.*",
|
||||
"symfony/twig-bundle": "6.0.*",
|
||||
"symfony/validator": "6.0.*",
|
||||
"symfony/webpack-encore-bundle": "^1.11",
|
||||
"symfony/workflow": "^5.4",
|
||||
"symfony/yaml": "^5.4",
|
||||
"symfony/workflow": "6.0.*",
|
||||
"symfony/yaml": "6.0.*",
|
||||
"thenetworg/oauth2-azure": "^2.0",
|
||||
"twig/extra-bundle": "^3.0",
|
||||
"twig/intl-extra": "^3.0",
|
||||
@@ -91,15 +90,15 @@
|
||||
"phpstan/phpstan": "^1.9",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.1",
|
||||
"phpstan/phpstan-strict-rules": "^1.0",
|
||||
"phpunit/phpunit": ">= 7.5",
|
||||
"rector/rector": "^1.0.0",
|
||||
"symfony/debug-bundle": "^5.4",
|
||||
"symfony/dotenv": "^5.4",
|
||||
"phpunit/phpunit": "^10.5.24",
|
||||
"rector/rector": "^1.1.0",
|
||||
"symfony/debug-bundle": "6.0.*",
|
||||
"symfony/dotenv": "6.0.*",
|
||||
"symfony/maker-bundle": "^1.20",
|
||||
"symfony/phpunit-bridge": "^5.4",
|
||||
"symfony/runtime": "^5.4",
|
||||
"symfony/stopwatch": "^5.4",
|
||||
"symfony/var-dumper": "^5.4"
|
||||
"symfony/phpunit-bridge": "^7.1",
|
||||
"symfony/runtime": "6.0.*",
|
||||
"symfony/stopwatch": "6.0.*",
|
||||
"symfony/var-dumper": "6.0.*"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/symfony": "*"
|
||||
@@ -114,6 +113,8 @@
|
||||
"Chill\\DocGeneratorBundle\\": "src/Bundle/ChillDocGeneratorBundle",
|
||||
"Chill\\DocStoreBundle\\": "src/Bundle/ChillDocStoreBundle",
|
||||
"Chill\\EventBundle\\": "src/Bundle/ChillEventBundle",
|
||||
"Chill\\FranceTravailApiBundle\\": "src/Bundle/ChillFranceTravailApiBundle/src",
|
||||
"Chill\\JobBundle\\": "src/Bundle/ChillJobBundle/src",
|
||||
"Chill\\MainBundle\\": "src/Bundle/ChillMainBundle",
|
||||
"Chill\\PersonBundle\\": "src/Bundle/ChillPersonBundle",
|
||||
"Chill\\ReportBundle\\": "src/Bundle/ChillReportBundle",
|
||||
@@ -148,6 +149,13 @@
|
||||
"scripts": {
|
||||
"auto-scripts": {
|
||||
"cache:clear": "symfony-cmd"
|
||||
},
|
||||
"php-cs-fixer": "php-cs-fixer fix --config=./.php-cs-fixer.dist.php --show-progress=none"
|
||||
},
|
||||
"extra": {
|
||||
"symfony": {
|
||||
"allow-contrib": false,
|
||||
"require": "6.0.*"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -21,13 +21,15 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
class BirthdateFilter implements ExportElementValidatedInterface, FilterInterface
|
||||
{
|
||||
// add specific role for this filter
|
||||
public function addRole()
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
// we do not need any new role for this filter, so we return null
|
||||
return null;
|
||||
}
|
||||
|
||||
// here, we alter the query created by Export
|
||||
#[\Override]
|
||||
public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data)
|
||||
{
|
||||
$where = $qb->getDQLPart('where');
|
||||
@@ -52,12 +54,14 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
|
||||
}
|
||||
|
||||
// we give information on which type of export this filter applies
|
||||
#[\Override]
|
||||
public function applyOn()
|
||||
{
|
||||
return 'person';
|
||||
}
|
||||
|
||||
// we build a form to collect some parameters from the users
|
||||
#[\Override]
|
||||
public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('date_from', DateType::class, [
|
||||
@@ -74,6 +78,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
|
||||
'format' => 'dd-MM-yyyy',
|
||||
]);
|
||||
}
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return ['date_from' => new DateTime(), 'date_to' => new DateTime()];
|
||||
@@ -81,6 +86,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
|
||||
|
||||
// here, we create a simple string which will describe the action of
|
||||
// the filter in the Response
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string')
|
||||
{
|
||||
return ['Filtered by person\'s birtdate: '
|
||||
@@ -90,6 +96,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
|
||||
], ];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'Filter by person\'s birthdate';
|
||||
@@ -99,6 +106,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
|
||||
// is executed here. This function is added by the interface
|
||||
// `ExportElementValidatedInterface`, and can be ignore if there is
|
||||
// no need for a validation
|
||||
#[\Override]
|
||||
public function validateForm($data, ExecutionContextInterface $context)
|
||||
{
|
||||
$date_from = $data['date_from'];
|
||||
|
@@ -32,25 +32,30 @@ class CountPerson implements ExportInterface
|
||||
$this->entityManager = $em;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// this export does not add any form
|
||||
}
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes()
|
||||
{
|
||||
return [FormatterInterface::TYPE_TABULAR];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription()
|
||||
{
|
||||
return 'Count peoples by various parameters.';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
// the Closure which will be executed by the formatter.
|
||||
@@ -60,6 +65,7 @@ class CountPerson implements ExportInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
// this array match the result keys in the query. We have only
|
||||
@@ -67,21 +73,25 @@ class CountPerson implements ExportInterface
|
||||
return ['export_result'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'Count peoples';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType()
|
||||
{
|
||||
return Declarations::PERSON_TYPE;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
// we gather all center the user choose.
|
||||
@@ -98,11 +108,13 @@ class CountPerson implements ExportInterface
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return PersonVoter::STATS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers()
|
||||
{
|
||||
// explain the export manager which formatters and filters are allowed
|
||||
|
@@ -31,6 +31,7 @@ class ChillMainConfiguration implements ConfigurationInterface
|
||||
$this->setWidgetFactories($widgetFactories);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder('chill_main');
|
||||
|
@@ -27,11 +27,13 @@ class ChillMainExtension extends Extension implements Widget\HasWidgetFactoriesE
|
||||
*/
|
||||
protected $widgetFactories = [];
|
||||
|
||||
#[\Override]
|
||||
public function addWidgetFactory(WidgetFactoryInterface $factory)
|
||||
{
|
||||
$this->widgetFactories[] = $factory;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getConfiguration(array $config, ContainerBuilder $container)
|
||||
{
|
||||
return new Configuration($this->widgetFactories, $container);
|
||||
@@ -40,11 +42,13 @@ class ChillMainExtension extends Extension implements Widget\HasWidgetFactoriesE
|
||||
/**
|
||||
* @return WidgetFactoryInterface[]
|
||||
*/
|
||||
#[\Override]
|
||||
public function getWidgetFactories()
|
||||
{
|
||||
return $this->widgetFactories;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
// configuration for main bundle
|
||||
|
@@ -25,6 +25,7 @@ class ChillPersonAddAPersonListWidgetFactory extends AbstractWidgetFactory
|
||||
* see http://symfony.com/doc/current/components/config/definition.html
|
||||
*
|
||||
*/
|
||||
#[\Override]
|
||||
public function configureOptions($place, NodeBuilder $node)
|
||||
{
|
||||
$node->booleanNode('only_active')
|
||||
@@ -56,6 +57,7 @@ class ChillPersonAddAPersonListWidgetFactory extends AbstractWidgetFactory
|
||||
* the service must exists in the container, and it is not required that the service
|
||||
* has the `chill_main` tag.
|
||||
*/
|
||||
#[\Override]
|
||||
public function getServiceId(ContainerBuilder $containerBuilder, $place, $order, array $config)
|
||||
{
|
||||
return 'chill_person.widget.person_list';
|
||||
@@ -66,6 +68,7 @@ class ChillPersonAddAPersonListWidgetFactory extends AbstractWidgetFactory
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
#[\Override]
|
||||
public function getWidgetAlias()
|
||||
{
|
||||
return 'person_list';
|
||||
|
@@ -79,6 +79,7 @@ class ChillPersonAddAPersonWidget implements WidgetInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
#[\Override]
|
||||
public function render(Twig_Environment $env, $place, array $context, array $config)
|
||||
{
|
||||
$qb = $this->personRepository
|
||||
|
@@ -22,6 +22,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
*/
|
||||
class ChillPersonExtension extends Extension implements PrependExtensionInterface
|
||||
{
|
||||
#[\Override]
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
// ...
|
||||
@@ -32,6 +33,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
*
|
||||
* @param \Chill\PersonBundle\DependencyInjection\containerBuilder $container
|
||||
*/
|
||||
#[\Override]
|
||||
public function prepend(ContainerBuilder $container)
|
||||
{
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
|
@@ -14,6 +14,359 @@
|
||||
Installation & Usage
|
||||
####################
|
||||
|
||||
|
||||
You will learn here how to install a new symfony project with chill, and configure it.
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
The installation is tested on a Debian-like linux distribution. The installation on other operating systems is not documented.
|
||||
|
||||
You have to install the following tools on your computer:
|
||||
|
||||
- `PHP <https://www.php.net/>`_, version 8.3+, with the following extensions: pdo_pgsql, intl, mbstring, zip, bcmath, exif, sockets, redis, ast, gd;
|
||||
- `composer <https://getcomposer.org/>`_;
|
||||
- `symfony cli <https://symfony.com/download>`_;
|
||||
- `node, we encourage you to use nvm to configure the correct version <https://github.com/nvm-sh/nvm>`_. The project contains an
|
||||
:code:`.nvmrc` file which selects automatically the required version of node (if present).
|
||||
- `yarn <https://classic.yarnpkg.com/lang/en/docs/install/>`_. We use the version 1.22+ for now.
|
||||
- `docker and the plugin compose <https://docker.com>`_ to run the database
|
||||
|
||||
Chill needs a redis server and a postgresql database, and a few other things like a "relatorio service" which will
|
||||
generate documents from templates. **All these things are available through docker using the plugin compose**. We do not provide
|
||||
information on how to run this without docker compose.
|
||||
|
||||
|
||||
Install a new project
|
||||
=====================
|
||||
|
||||
Initialize project and dependencies
|
||||
***********************************
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
symfony new --version=5.4 my_chill_project
|
||||
cd my_chill_project
|
||||
|
||||
We strongly encourage you to initialize a git repository at this step, to track further changes.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# add the flex endpoints required for custom recipes
|
||||
cat <<< "$(jq '.extra.symfony += {"endpoint": ["flex://defaults", "https://gitlab.com/api/v4/projects/57371968/repository/files/index.json/raw?ref=main"]}' composer.json)" > composer.json
|
||||
# install chill and some dependencies
|
||||
# TODO fix the suffix "alpha1" and replace by ^3.0.0 when version 3.0.0 will be released
|
||||
symfony composer require chill-project/chill-bundles v3.0.0-RC3 champs-libres/wopi-lib dev-master@dev champs-libres/wopi-bundle dev-master@dev
|
||||
|
||||
We encourage you to accept the inclusion of the "Docker configuration from recipes": this is the documented way to run the database.
|
||||
You must also accept to configure recipes from the contrib repository, unless you want to configure the bundles manually).
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# fix some configuration
|
||||
./post-install-chill.sh
|
||||
# install node dependencies
|
||||
yarn install
|
||||
# and compile assets
|
||||
yarn run encore production
|
||||
|
||||
.. note::
|
||||
|
||||
If you encounter this error during assets compilation (:code:`yarn run encore production`) (repeated multiple times):
|
||||
|
||||
.. code-block:: txt
|
||||
|
||||
[tsl] ERROR in /tmp/chill/v1/public/bundles/chillcalendar/types.ts(2,65)
|
||||
TS2307: Cannot find module '../../../ChillMainBundle/Resources/public/types' or its corresponding type declarations.
|
||||
|
||||
run:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
rm -rf public/bundles/*
|
||||
|
||||
Then restart the compilation of assets (:code:```yarn run encore production```)
|
||||
|
||||
Configure your project
|
||||
**********************
|
||||
|
||||
You should read the configuration files in :code:`chill/config/packages` carefully, especially if you have
|
||||
custom developments. But most of the time, this should be fine.
|
||||
|
||||
You have to configure some local variables, which are described in the :code:`.env` file. The secrets should not be stored
|
||||
in this :code:`.env` file, but instead using the `secrets management tool <https://symfony.com/doc/current/configuration/secrets.html>`_
|
||||
or in the :code:`.env.local` file, which should not be committed to the git repository.
|
||||
|
||||
You do not need to set variables for the smtp server, redis server and relatorio server, as they are generated automatically
|
||||
by the symfony server, from the docker compose services.
|
||||
|
||||
The only required variable is the :code:`ADMIN_PASSWORD`. You can generate a hashed and salted admin password using the command
|
||||
:code:`symfony console security:hash-password <your password> 'Symfony\Component\Security\Core\User\User'`. Then,
|
||||
you can either:
|
||||
|
||||
- add this password to the :code:`.env.local` file, you must escape the character :code:`$`: if the generated password
|
||||
is :code:`$2y$13$iyvJLuT4YEa6iWXyQV4/N.hNHpNG8kXlYDkkt5MkYy4FXcSwYAwmm`, your :code:`.env.local` file will be:
|
||||
|
||||
.. code-block:: env
|
||||
|
||||
ADMIN_PASSWORD=\$2y\$13\$iyvJLuT4YEa6iWXyQV4/N.hNHpNG8kXlYDkkt5MkYy4FXcSwYAwmm
|
||||
# note: if you copy-paste the line above, the password will be "admin".
|
||||
|
||||
- add the generated password to the secrets manager (**note**: you must add the generated hashed password to the secrets env,
|
||||
not the password in clear text).
|
||||
|
||||
- set up the jwt authentication bundle
|
||||
|
||||
Some environment variables are available for the JWT authentication bundle in the :code:`.env` file.
|
||||
|
||||
Prepare migrations and other tools
|
||||
**********************************
|
||||
|
||||
To continue the installation process, you will have to run migrations:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# start databases and other services
|
||||
docker compose up -d
|
||||
# the first start, it may last some seconds, you can check with docker compose ps
|
||||
# run migrations
|
||||
symfony console doctrine:migrations:migrate
|
||||
# setup messenger
|
||||
symfony console messenger:setup-transports
|
||||
# prepare some views
|
||||
symfony console chill:db:sync-views
|
||||
# generate jwt token, required for some api features (webdav access, ...)
|
||||
symfony console lexik:jwt:generate-keypair
|
||||
|
||||
.. warning::
|
||||
|
||||
If you encounter an error while running :code:`symfony console messenger:setup-transports`, you can set up the messenger
|
||||
transport to redis, by adding this in the :code:`.env.local` or :code:`.env` file:
|
||||
|
||||
.. code-block:: env
|
||||
|
||||
MESSENGER_TRANSPORT_DSN=redis://${REDIS_HOST}:${REDIS_PORT}/messages
|
||||
|
||||
Start your web server locally
|
||||
*****************************
|
||||
|
||||
At this step, Chill will be ready to be served locally, but without any configuration. You can run the project
|
||||
locally using the `local symfony server <https://symfony.com/doc/current/setup/symfony_server.html>`_:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# see the whole possibilities at https://symfony.com/doc/current/setup/symfony_server.html
|
||||
symfony server:start -d
|
||||
|
||||
|
||||
If you need to test the instance with accounts and some basic configuration, please install the fixtures (see below).
|
||||
|
||||
|
||||
Add capabilities for dev
|
||||
========================
|
||||
|
||||
If you need to add custom bundles, you can develop them in the `src/` directory, like for any other symfony project. You
|
||||
can rely on the whole chill framework, meaning there is no need to add them to the original `chill-bundles`.
|
||||
|
||||
You will require some bundles to have the following development tools:
|
||||
|
||||
- add fixtures
|
||||
- add profiler and debug bundle
|
||||
|
||||
Install fixtures
|
||||
****************
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# generate fixtures for chill
|
||||
symfony composer require --dev doctrine/doctrine-fixtures-bundle nelmio/alice
|
||||
# now, you can generate fixtures (this will reset your database)
|
||||
symfony console doctrine:fixtures:load
|
||||
|
||||
This will generate user accounts, centers, and some basic configuration.
|
||||
|
||||
The accounts created are: :code:`center a_social`, :code:`center b_social`, :code:`center a_direction`, ... The full list is
|
||||
visible in the "users" table: :code:`docker compose exec database psql -U app -c "SELECT username FROM users"`.
|
||||
|
||||
The password is always :code:`password`.
|
||||
|
||||
.. warning::
|
||||
|
||||
The fixtures are not fully functional. See the `corresponding issue <https://gitlab.com/Chill-Projet/chill-bundles/-/issues/280>`_.
|
||||
|
||||
Add web profiler and debugger
|
||||
*****************************
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
symfony composer require --dev symfony/web-profiler-bundle symfony/debug-bundle
|
||||
|
||||
Working on chill bundles
|
||||
************************
|
||||
|
||||
If you plan to improve the chill-bundles repository, that's great!
|
||||
|
||||
You will have to download chill-bundles as a git repository (and not as an archive, which is barely editable).
|
||||
|
||||
In your :code:`composer.json` file, add these lines:
|
||||
|
||||
.. code-block:: diff
|
||||
|
||||
{
|
||||
"config": {
|
||||
+ "preferred-install": {
|
||||
+ "chill-project/chill-bundles": "source",
|
||||
"*": "dist"
|
||||
+ }
|
||||
}
|
||||
|
||||
Then, run :code:`symfony composer reinstall chill-project/chill-bundles` to re-install the package from source.
|
||||
|
||||
Code style, code quality and other tools
|
||||
****************************************
|
||||
|
||||
For development, you will also have to install:
|
||||
|
||||
- `php-cs-fixer <https://cs.symfony.com/>`_
|
||||
|
||||
We also encourage you to use tools like `phpstan <https://phpstan.org>`_ and `rector <https://getrector.com>`_.
|
||||
|
||||
Commit and share your project
|
||||
=============================
|
||||
|
||||
If multiple developers work on a project, you can commit your symfony project and share it with other people.
|
||||
|
||||
When another developer clones your project, they will have to:
|
||||
|
||||
- run :code:`symfony composer install` and :code:`yarn install` to install the same dependencies as the initial developer;
|
||||
- run :code:`yarn run encore production` to compile assets;
|
||||
- copy any possible variables from the :code:`.env.local` files;
|
||||
- start the docker compose stack, using :code:`docker compose`, and run migrations, set up transports, and prepare chill db views
|
||||
(see the corresponding command above)
|
||||
|
||||
Update
|
||||
======
|
||||
|
||||
In order to update your app, you must update dependencies:
|
||||
|
||||
- for chill-bundles, you can `set the last version <https://gitlab.com/Chill-Projet/chill-bundles/-/releases>`_ manually
|
||||
in the :code:`composer.json` file, or set the version to `^3.0.0` and run :code:`symfony composer update` regularly
|
||||
- run :code:`composer update` and :code:`yarn update` to maintain your dependencies up-to-date.
|
||||
|
||||
After each update, you must update your database schema:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
symfony console doctrine:migrations:migrate
|
||||
symfony console chill:db:sync-views
|
||||
|
||||
Operations
|
||||
==========
|
||||
|
||||
Build assets
|
||||
************
|
||||
|
||||
run those commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# for production (or in dev, when you don't need to work on your assets and need some speed)
|
||||
yarn run encore production
|
||||
# in dev, when you wan't to reload the assets on each changes
|
||||
yarn run encore dev --watch
|
||||
|
||||
How to execute the console ?
|
||||
****************************
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# start the console with all required variables
|
||||
symfony console
|
||||
# you can add your command after that:
|
||||
symfony console list
|
||||
|
||||
How to generate documents
|
||||
*************************
|
||||
|
||||
Documents are generated asynchronously by `"consuming messages" <https://symfony.com/doc/current/messenger.html#consuming-messages-running-the-worker>`_.
|
||||
|
||||
You must generate them using a dedicated process:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
symfony console messenger:consume async priority
|
||||
|
||||
To avoid memory issues, we encourage you to also use the :code:`--limit` parameter of the command.
|
||||
|
||||
How to read emails sent by the program ?
|
||||
*******************************************
|
||||
|
||||
In development, there is a built-in "mail catcher". Open it with :code:`symfony open:local:webmail`
|
||||
|
||||
How to run cron-jobs ?
|
||||
**********************
|
||||
|
||||
Some commands must be executed in :ref:`cron jobs <cronjob>`. To execute them:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
symfony console chill:cron-job:execute
|
||||
|
||||
What about materialized views ?
|
||||
*******************************
|
||||
|
||||
There are some materialized views in chill, to speed up some complex computations in the database.
|
||||
|
||||
In order to refresh them, run a cron job or refresh them manually in your database.
|
||||
|
||||
How to run tests for chill-bundles
|
||||
**********************************
|
||||
|
||||
Tests reside inside the installed bundles. You must `cd` into that directory, download the required packages, and execute them from this place.
|
||||
|
||||
**Note**: some bundles require the fixtures to be executed. See the dedicated _how-tos_.
|
||||
|
||||
Example, for running a unit test inside `main` bundle:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# cd into main directory
|
||||
cd vendor/chill-project/chill-bundles
|
||||
composer install
|
||||
# run tests
|
||||
bin/phpunit src/Bundle/path/to/your/test
|
||||
|
||||
Or for running tests to check code style and php conventions with csfixer and phpstan:
|
||||
|
||||
Troubleshooting
|
||||
===============
|
||||
|
||||
Error `An exception has been thrown during the rendering of a template ("Asset manifest file "/var/www/app/web/build/manifest.json" does not exist.").` on first run
|
||||
********************************************************************************************************************************************************************
|
||||
|
||||
Build assets, see above.
|
||||
|
||||
Running in production
|
||||
=====================
|
||||
|
||||
Currently, to run this software in production, the *state of the art* is the following :
|
||||
|
||||
1. Run the software locally and tweak the configuration to your needs ;
|
||||
2. Build the image and store it in a private container registry.
|
||||
|
||||
.. warning::
|
||||
|
||||
In production, you **must** set these variables:
|
||||
|
||||
* ``APP_ENV`` to ``prod``
|
||||
* ``APP_DEBUG`` to ``false``
|
||||
|
||||
There are security issues if you keep the same variables as for production.
|
||||
|
||||
|
||||
Going further
|
||||
=============
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
@@ -21,386 +374,3 @@ Installation & Usage
|
||||
load-addresses.rst
|
||||
prod-calendar-sms-sending.rst
|
||||
msgraph-configure.rst
|
||||
|
||||
|
||||
Requirements
|
||||
************
|
||||
|
||||
- This project use `docker <https://docker.com>`_ to be run. As a developer, use `docker-compose <https://docs.docker.com/compose/overview/>`_ to bootstrap a dev environment in a glance. You do not need any other dependencies ;
|
||||
- Make is used to automate scripts.
|
||||
|
||||
Installation
|
||||
************
|
||||
|
||||
If you plan to run chill in production:
|
||||
|
||||
1. install it locally first, and check if everything is ok on your local machine;
|
||||
2. once ready, build the image from your local machine, and deploy them.
|
||||
|
||||
If you want to develop some bundles, the first step is sufficient (until you deploy on production).
|
||||
|
||||
|
||||
1. Get the code
|
||||
===============
|
||||
|
||||
Clone or download the chill-skeleton project and `cd` into the main directory.
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone https://gitea.champs-libres.be/Chill-project/chill-skeleton-basic.git
|
||||
cd chill-skeleton-basic
|
||||
|
||||
|
||||
As a developer, the code will stay on your computer and will be executed in docker container. To avoid permission problem, the code should be run with the same uid/gid from your current user. This is why we get your current user id with the command ``id -u`` in each following scripts.
|
||||
|
||||
2. Prepare composer to download the sources
|
||||
===========================================
|
||||
|
||||
As you are running in dev, you must configure an auth token for getting the source code.
|
||||
|
||||
.. warning
|
||||
|
||||
If you skip this part, the code will be downloaded from dist instead of source (with git repository). You will probably replace the source manually, but the next time you will run ```composer update```, your repository will be replaced and you might loose something.
|
||||
|
||||
1. Create a personal access token from https://gitlab.com/-/profile/personal_access_tokens, with the `read_api` scope.
|
||||
2. add a file called ```.composer/auth.json``` with this content:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"gitlab-token": {
|
||||
"gitlab.com": "glXXX-XXXXXXXXXXXXXXXXXXXX"
|
||||
}
|
||||
}
|
||||
|
||||
2. Prepare your variables and environment
|
||||
=========================================
|
||||
|
||||
Copy ```docker-compose.override.dev.yml``` into ```docker-compose.override.yml```
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cp docker-compose.override.dev.template.yml docker-compose.override.yml
|
||||
|
||||
2. Prepare your variables and docker-compose
|
||||
============================================
|
||||
|
||||
Have a look at the variable in ``.env`` and check if you need to adapt them. If they do not adapt with your need, or if some are missing:
|
||||
|
||||
1. copy the file as ``.env.local``: ``cp .env .env.local``
|
||||
2. you may replace some variables inside ``.env``
|
||||
|
||||
Prepare also you docker-compose installation, and adapt it to your needs:
|
||||
|
||||
1. If you plan to deploy on dev, copy the file ``docker-compose.override.dev.template.yml`` to ``docker-compose.override.yml``.
|
||||
2. adapt to your needs.
|
||||
|
||||
|
||||
**Note**: If you intend to use the bundle ``Chill-Doc-Store``, you will need to configure and install an openstack object storage container with temporary url middleware. You will have to configure `secret keys <https://docs.openstack.org/swift/latest/api/temporary_url_middleware.html#secret-keys>`_.
|
||||
|
||||
3. Run the bootstrap script
|
||||
===========================
|
||||
|
||||
This script can be run using `make`
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
make init
|
||||
|
||||
This script will :
|
||||
|
||||
1. force docker-compose to, eventually, pull the base images and build the image used by this project ;
|
||||
2. run an install script to download `composer <https://getcomposer.org>`_ ;
|
||||
3. install the php dependencies
|
||||
4. build assets
|
||||
|
||||
.. warning::
|
||||
|
||||
The script will work only if the binary ``docker-compose`` is located into your ``PATH``. If you use ``compose`` as a docker plugin,
|
||||
you can simulate this binary by creating this file at (for instance), ``/usr/local/bin/docker-compose`` (and run ``chmod +x /usr/local/bin/docker-compose``):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
/usr/bin/docker compose "$@"
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
In some cases it can happen that an old image (chill_base_php82 or chill_php82) stored in the docker cache will make the script fail. To solve this problem you have to delete the image and the container, before the make init :
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker-compose images php
|
||||
docker rmi -f chill_php82:prod
|
||||
docker-compose rm php
|
||||
|
||||
|
||||
4. Start the project
|
||||
====================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker-compose up
|
||||
|
||||
**On the first run** (and after each upgrade), you must execute *post update commands* and run database migrations. With a container up and running, execute the following commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# mount into to container
|
||||
./docker-php.sh
|
||||
bin/console chill:db:sync-views
|
||||
# and load fixtures
|
||||
bin/console doctrine:migrations:migrate
|
||||
|
||||
|
||||
Chill will be available at ``http://localhost:8001.`` Currently, there isn't any user or data. To add fixtures, run
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# mount into to container
|
||||
./docker-php.sh
|
||||
# and load fixtures (do not this for production)
|
||||
bin/console doctrine:fixtures:load --purge-with-truncate
|
||||
|
||||
There are several users available:
|
||||
|
||||
- ``center a_social``
|
||||
- ``center b_social``
|
||||
|
||||
The password is always ``password``.
|
||||
|
||||
Now, read `Operations` below. For running in production, read `prod_`.
|
||||
|
||||
|
||||
Operations
|
||||
**********
|
||||
|
||||
Build assets
|
||||
============
|
||||
|
||||
run those commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
make build-assets
|
||||
|
||||
How to execute the console ?
|
||||
============================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# if a container is running
|
||||
./docker-php.sh
|
||||
# if not
|
||||
docker-compose run --user $(id -u) php bin/console
|
||||
|
||||
How to create the database schema (= run migrations) ?
|
||||
======================================================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# if a container is running
|
||||
./docker-php.sh
|
||||
bin/console doctrine:migrations:migrate
|
||||
bin/console chill:db:sync-views
|
||||
# if not
|
||||
docker-compose run --user $(id -u) php bin/console doctrine:migrations:migrate
|
||||
docker-compose run --user $(id -u) php bin/console chill:db:sync-views
|
||||
|
||||
|
||||
How to read the email sent by the program ?
|
||||
===========================================
|
||||
|
||||
Go at ``http://localhost:8005`` and you should have access to mailcatcher.
|
||||
|
||||
In case of you should click on a link in the email, be aware that you should remove the "s" from https.
|
||||
|
||||
How to load fixtures ? (development mode only)
|
||||
==============================================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# if a container is running
|
||||
./docker-php.sh
|
||||
bin/console doctrine:fixtures:load
|
||||
# if not
|
||||
docker-compose run --user $(id -u) php bin/console doctrine:fixtures:load
|
||||
|
||||
How to open a terminal in the project
|
||||
=====================================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# if a container is running
|
||||
./docker-php.sh
|
||||
# if not
|
||||
docker-compose run --user $(id -u) php /bin/bash
|
||||
|
||||
How to run cron-jobs ?
|
||||
======================
|
||||
|
||||
Some command must be executed in :ref:`cron jobs <cronjob>`. To execute them:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# if a container is running
|
||||
./docker-php.sh
|
||||
bin/console chill:cron-job:execute
|
||||
# some of them are executed only during the night. So, we have to force the execution during the day:
|
||||
bin/console chill:cron-job:execute 'name-of-the-cron'
|
||||
# if not
|
||||
docker-compose run --user $(id -u) php bin/console chill:cron-job:execute
|
||||
# some of them are executed only during the night. So, we have to force the execution during the day:
|
||||
docker-compose run --user $(id -u) php bin/console chill:cron-job:execute 'name-of-the-cron'
|
||||
|
||||
How to run composer ?
|
||||
=====================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# if a container is running
|
||||
./docker-php.sh
|
||||
composer
|
||||
# if not
|
||||
docker-compose run --user $(id -u) php composer
|
||||
|
||||
How to access to PGADMIN ?
|
||||
==========================
|
||||
|
||||
Pgadmin is installed with docker-compose, and is available **only if you uncomment the appropriate lines into ``docker-compose.override.yml``.
|
||||
|
||||
You can access it at ``http://localhost:8002``.
|
||||
|
||||
Credentials:
|
||||
|
||||
- login: from the variable you set into ``docker-composer.override.yml``
|
||||
- password: same :-)
|
||||
|
||||
How to run tests ?
|
||||
==================
|
||||
|
||||
Tests reside inside the installed bundles. You must `cd` into that directory, download the required packages, and execute them from this place.
|
||||
|
||||
**Note**: some bundle require the fixture to be executed. See the dedicated _how-tos_.
|
||||
|
||||
Exemple, for running unit test inside `main` bundle:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# mount into the php image
|
||||
./docker-php.sh
|
||||
# cd into main directory
|
||||
cd vendor/chill-project/chill-bundles
|
||||
# download deps
|
||||
git submodule init
|
||||
git submodule update
|
||||
composer install
|
||||
# run tests
|
||||
bin/phpunit src/Bundle/path/to/your/test
|
||||
|
||||
Or for running tests to check code style and php conventions with csfixer and phpstan:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# run code style fixer
|
||||
bin/grumphp run --tasks=phpcsfixer
|
||||
# run phpstan
|
||||
bin/grumphp run --tasks=phpstan
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
To avoid phpstan block your commits:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git commit -n ...
|
||||
|
||||
To avoid phpstan block your commits permanently:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
./bin/grumphp git:deinit
|
||||
|
||||
How to run webpack interactively
|
||||
================================
|
||||
|
||||
Executing :code:`bash docker-node.sh` will open a terminal in a node container, with volumes mounted.
|
||||
|
||||
How to switch the branch for chill-bundles, and get new dependencies
|
||||
====================================================================
|
||||
|
||||
During development, you will switch to new branches for chill-bundles. As long as the dependencies are equals, this does not cause any problem. But sometimes, a new branch introduces a new dependency, and you must download it.
|
||||
|
||||
.. warning::
|
||||
|
||||
Ensure that you have gitlab-token ready before updating your branches. See above.
|
||||
|
||||
In order to do that without pain, use those steps:
|
||||
|
||||
0. Ensuire you have a token, set
|
||||
1. at the app's root, update the ``composer.json`` to your current branch:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"require": {
|
||||
"chill-bundles": "dev-<my-branch>@dev"
|
||||
}
|
||||
|
||||
2. mount into the php container (``./docker-php.sh``), and run ``composer update``
|
||||
|
||||
Error `An exception has been thrown during the rendering of a template ("Asset manifest file "/var/www/app/web/build/manifest.json" does not exist.").` on first run
|
||||
====================================================================================================================================================================
|
||||
|
||||
Run :code:`make build-assets`
|
||||
|
||||
Running in production
|
||||
*********************
|
||||
|
||||
Currently, to run this software in production, the *state of the art* is the following :
|
||||
|
||||
1. Run the software locally and tweak the configuration to your needs ;
|
||||
2. Build the image and store them into a private container registry. This can be done using :code:`make build-and-push-image`.
|
||||
|
||||
To be sure to target the correct container registry, you have to adapt the image names into your ``docker-compose.override.yml`` file.
|
||||
3. Push the image on your registry, or upload them to the destination machine using ``docker image save`` and ``docker image load``.
|
||||
3. Run the image on your production server, using docker-compose or eventually docker stack. You have to customize the variable set in docker-compose.
|
||||
|
||||
See also the :ref:`running-production-tips-and-tricks` below.
|
||||
|
||||
.. warning::
|
||||
|
||||
In production, you **must** set those variables:
|
||||
|
||||
* ``APP_ENV`` to ``prod``
|
||||
* ``APP_DEBUG`` to ``false``
|
||||
|
||||
There are security issues if you keep the same variable than for production.
|
||||
|
||||
|
||||
.. _running-production-tips-and-tricks:
|
||||
|
||||
Tips and tricks
|
||||
===============
|
||||
|
||||
Operation on database (backups, running custom sql, replication) are easier to set when run outside of a container. If you run into a container, take care of the volume where data are stored.
|
||||
|
||||
The PHP sessions are stored inside redis. This is useful if you distribute the traffic amongst different php server: they will share same sessions if a request goes into a different instance of the container.
|
||||
|
||||
When the PHP servers are shared across multiple instances, take care that some data is stored into redis: the same redis server should be reachable by all instances.
|
||||
|
||||
It is worth having an eye on the configuration of logstash container.
|
||||
|
||||
|
||||
Design principles
|
||||
*****************
|
||||
|
||||
Why the DB URL is also set in environment, and not in .env file ?
|
||||
=================================================================
|
||||
|
||||
Because, at startup, a script does check the db is up and, if not, wait for a couple of seconds before running ``entrypoint.sh``. For avoiding double configuration, the configuration of the PHP app takes his configuration from environment also (and it will be standard in future releases, with symfony 4.0).
|
||||
|
||||
|
@@ -8,6 +8,16 @@ Chill can store a list of geolocated address references, which are used to sugge
|
||||
|
||||
Those addresses may be load from a dedicated source.
|
||||
|
||||
Countries
|
||||
=========
|
||||
|
||||
In order to load addresses into the chill application we first have to make sure that a list of countries is present.
|
||||
To import the countries run the following command.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
bin/console chill:main:countries:populate
|
||||
|
||||
In France
|
||||
=========
|
||||
|
||||
|
21
package.json
21
package.json
@@ -6,15 +6,16 @@
|
||||
"@apidevtools/swagger-cli": "^4.0.4",
|
||||
"@babel/core": "^7.20.5",
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@ckeditor/ckeditor5-build-classic": "^35.3.2",
|
||||
"@ckeditor/ckeditor5-dev-utils": "^31.1.13",
|
||||
"@ckeditor/ckeditor5-build-classic": "^41.4.2",
|
||||
"@ckeditor/ckeditor5-dev-utils": "^40.2.0",
|
||||
"@ckeditor/ckeditor5-dev-webpack-plugin": "^31.1.13",
|
||||
"@ckeditor/ckeditor5-markdown-gfm": "^35.3.2",
|
||||
"@ckeditor/ckeditor5-theme-lark": "^35.3.2",
|
||||
"@ckeditor/ckeditor5-vue": "^4.0.1",
|
||||
"@ckeditor/ckeditor5-dev-translations": "^40.2.0",
|
||||
"@ckeditor/ckeditor5-markdown-gfm": "^41.4.2",
|
||||
"@ckeditor/ckeditor5-theme-lark": "^41.4.2",
|
||||
"@ckeditor/ckeditor5-vue": "^5.1.0",
|
||||
"@symfony/webpack-encore": "^4.1.0",
|
||||
"@tsconfig/node14": "^1.0.1",
|
||||
"@types/dompurify": "^3.0.5",
|
||||
"@types/dompurify": "^3.0.5",
|
||||
"bindings": "^1.5.0",
|
||||
"bootstrap": "5.2.3",
|
||||
"chokidar": "^3.5.1",
|
||||
@@ -26,12 +27,12 @@
|
||||
"popper.js": "^1.16.1",
|
||||
"postcss-loader": "^7.0.2",
|
||||
"raw-loader": "^4.0.2",
|
||||
"sass-loader": "^13.0.0",
|
||||
"sass-loader": "^14.0.0",
|
||||
"select2": "^4.0.13",
|
||||
"select2-bootstrap-theme": "0.1.0-beta.10",
|
||||
"style-loader": "^3.3.1",
|
||||
"ts-loader": "^9.3.1",
|
||||
"typescript": "^4.7.2",
|
||||
"typescript": "^5.4.5",
|
||||
"vue-loader": "^17.0.0",
|
||||
"webpack": "^5.75.0",
|
||||
"webpack-cli": "^5.0.1"
|
||||
@@ -45,9 +46,11 @@
|
||||
"@fullcalendar/vue3": "^6.1.4",
|
||||
"@popperjs/core": "^2.9.2",
|
||||
"@types/leaflet": "^1.9.3",
|
||||
"@types/dompurify": "^3.0.5",
|
||||
"dropzone": "^5.7.6",
|
||||
"es6-promise": "^4.2.8",
|
||||
"leaflet": "^1.7.1",
|
||||
"marked": "^12.0.2",
|
||||
"masonry-layout": "^4.2.2",
|
||||
"mime": "^4.0.0",
|
||||
"swagger-ui": "^4.15.5",
|
||||
@@ -55,7 +58,7 @@
|
||||
"vue": "^3.2.37",
|
||||
"vue-i18n": "^9.1.6",
|
||||
"vue-multiselect": "3.0.0-alpha.2",
|
||||
"vue-toast-notification": "^2.0",
|
||||
"vue-toast-notification": "^3.1.2",
|
||||
"vuex": "^4.0.0"
|
||||
},
|
||||
"browserslist": [
|
||||
|
14
phpstan-baseline-2024-05.neon
Normal file
14
phpstan-baseline-2024-05.neon
Normal file
@@ -0,0 +1,14 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$records of method League\\\\Csv\\\\Writer\\:\\:insertAll\\(\\) expects iterable\\<array\\<float\\|int\\|string\\|Stringable\\|null\\>\\>, iterable\\<array\\<string, bool\\|int\\|string\\>\\> given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/UserExportController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching deprecated class constant ASC of class Doctrine\\\\Common\\\\Collections\\\\Criteria\\:
|
||||
use Order\\:\\:Ascending instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php
|
@@ -1,34 +1,29 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: "#^Foreach overwrites \\$key with its key variable\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
message: "#^Property Chill\\\\CustomFieldsBundle\\\\Entity\\\\CustomField\\:\\:\\$required \\(false\\) does not accept bool\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Form/PersonType.php
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\DocStoreBundle\\\\Entity\\\\Document\\:\\:setUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User\\|null, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/Repository/NotificationRepository.php
|
||||
path: src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php
|
||||
|
||||
-
|
||||
message: "#^Foreach overwrites \\$key with its key variable\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\DocStoreBundle\\\\Entity\\\\Document\\:\\:setUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User\\|null, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
|
||||
|
||||
-
|
||||
message: "#^Variable \\$participation might not be defined\\.$#"
|
||||
@@ -40,6 +35,106 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Comparison operation \"\\>\" between \\(bool\\|int\\|Redis\\) and 0 results in an error\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/ApiWrapper.php
|
||||
|
||||
-
|
||||
message: "#^Variable \\$response might not be defined\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/ApiWrapper.php
|
||||
|
||||
-
|
||||
message: "#^Function GuzzleHttp\\\\Psr7\\\\get not found\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/PartenaireRomeAppellation.php
|
||||
|
||||
-
|
||||
message: "#^Function GuzzleHttp\\\\Psr7\\\\str not found\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/PartenaireRomeAppellation.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$seconds of function sleep expects int, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/PartenaireRomeAppellation.php
|
||||
|
||||
-
|
||||
message: "#^Unreachable statement \\- code above always terminates\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Controller/CSPersonController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$interval of method DateTimeImmutable\\:\\:add\\(\\) expects DateInterval, string\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Entity/Immersion.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$object of static method DateTimeImmutable\\:\\:createFromMutable\\(\\) expects DateTime, DateTimeInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Entity/Immersion.php
|
||||
|
||||
-
|
||||
message: "#^Property Chill\\\\JobBundle\\\\Entity\\\\Rome\\\\Metier\\:\\:\\$appellations is never read, only written\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php
|
||||
|
||||
-
|
||||
message: "#^Method Chill\\\\JobBundle\\\\Export\\\\ListCSPerson\\:\\:splitArrayToColumns\\(\\) never returns Closure so it can be removed from the return type\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Export/ListCSPerson.php
|
||||
|
||||
-
|
||||
message: "#^Variable \\$f might not be defined\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Export/ListCSPerson.php
|
||||
|
||||
-
|
||||
message: "#^Method Chill\\\\JobBundle\\\\Export\\\\ListFrein\\:\\:splitArrayToColumns\\(\\) never returns Closure so it can be removed from the return type\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Export/ListFrein.php
|
||||
|
||||
-
|
||||
message: "#^Method Chill\\\\JobBundle\\\\Export\\\\ListProjetProfessionnel\\:\\:splitArrayToColumns\\(\\) never returns Closure so it can be removed from the return type\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php
|
||||
|
||||
-
|
||||
message: "#^Property Chill\\\\JobBundle\\\\Form\\\\ChoiceLoader\\\\RomeAppellationChoiceLoader\\:\\:\\$appellationRepository \\(Chill\\\\JobBundle\\\\Repository\\\\Rome\\\\AppellationRepository\\) does not accept Doctrine\\\\ORM\\\\EntityRepository\\<Chill\\\\JobBundle\\\\Entity\\\\Rome\\\\Appellation\\>\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Result of && is always false\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Strict comparison using \\=\\=\\= between array\\{\\} and Symfony\\\\Component\\\\Validator\\\\ConstraintViolationListInterface will always evaluate to false\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Strict comparison using \\=\\=\\= between null and string will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Variable \\$metier might not be defined\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$interval of method DateTimeImmutable\\:\\:add\\(\\) expects DateInterval, string\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Security/Authorization/CSConnectesVoter.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$object of static method DateTimeImmutable\\:\\:createFromMutable\\(\\) expects DateTime, DateTimeInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Security/Authorization/CSConnectesVoter.php
|
||||
|
||||
-
|
||||
message: "#^Cannot unset offset '_token' on array\\{formatter\\: mixed, export\\: mixed, centers\\: mixed, alias\\: string\\}\\.$#"
|
||||
count: 1
|
||||
@@ -65,11 +160,31 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/Repository/NotificationRepository.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:userHasAccessForCenter\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php
|
||||
|
||||
-
|
||||
message: "#^Foreach overwrites \\$value with its value variable\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Form/PersonType.php
|
||||
|
||||
-
|
||||
message: "#^Foreach overwrites \\$value with its value variable\\.$#"
|
||||
count: 1
|
||||
|
@@ -33,3 +33,5 @@ includes:
|
||||
- phpstan-baseline-level-5.neon
|
||||
- phpstan-deprecations-sf54.neon
|
||||
- phpstan-baseline-deprecations-doctrine-orm.neon
|
||||
- phpstan-baseline-2024-05.neon
|
||||
|
||||
|
14
rector.php
14
rector.php
@@ -28,6 +28,9 @@ return static function (RectorConfig $rectorConfig): void {
|
||||
|
||||
// register a single rule
|
||||
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
|
||||
$rectorConfig->rule(Rector\TypeDeclaration\Rector\ClassMethod\AddParamTypeFromPropertyTypeRector::class);
|
||||
$rectorConfig->rule(Rector\TypeDeclaration\Rector\Class_\MergeDateTimePropertyTypeDeclarationRector::class);
|
||||
$rectorConfig->rule(Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationBasedOnParentClassMethodRector::class);
|
||||
|
||||
// part of the symfony 54 rules
|
||||
$rectorConfig->rule(\Rector\Symfony\Symfony53\Rector\StaticPropertyFetch\KernelTestCaseContainerPropertyDeprecationRector::class);
|
||||
@@ -36,14 +39,19 @@ return static function (RectorConfig $rectorConfig): void {
|
||||
|
||||
//define sets of rules
|
||||
$rectorConfig->sets([
|
||||
LevelSetList::UP_TO_PHP_83,
|
||||
// \Rector\Symfony\Set\SymfonySetList::SYMFONY_40,
|
||||
// \Rector\Symfony\Set\SymfonySetList::SYMFONY_41,
|
||||
// \Rector\Symfony\Set\SymfonySetList::SYMFONY_42,
|
||||
// \Rector\Symfony\Set\SymfonySetList::SYMFONY_43,
|
||||
// \Rector\Symfony\Set\SymfonySetList::SYMFONY_44,
|
||||
\Rector\Symfony\Set\SymfonySetList::SYMFONY_50,
|
||||
\Rector\Symfony\Set\SymfonySetList::SYMFONY_50_TYPES,
|
||||
\Rector\Symfony\Set\SymfonySetList::SYMFONY_51,
|
||||
\Rector\Symfony\Set\SymfonySetList::SYMFONY_52,
|
||||
\Rector\Symfony\Set\SymfonySetList::SYMFONY_53,
|
||||
\Rector\Symfony\Set\SymfonySetList::SYMFONY_54,
|
||||
\Rector\Doctrine\Set\DoctrineSetList::DOCTRINE_CODE_QUALITY,
|
||||
\Rector\Doctrine\Set\DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
|
||||
// \Rector\Doctrine\Set\DoctrineSetList::DOCTRINE_CODE_QUALITY,
|
||||
// \Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_90,
|
||||
]);
|
||||
|
||||
$rectorConfig->ruleWithConfiguration(\Rector\Php80\Rector\Class_\AnnotationToAttributeRector::class, [
|
||||
|
@@ -99,10 +99,10 @@ final class ActivityController extends AbstractController
|
||||
|
||||
$form = $this->createDeleteForm($activity->getId(), $person, $accompanyingPeriod);
|
||||
|
||||
if (Request::METHOD_DELETE === $request->getMethod()) {
|
||||
if (Request::METHOD_POST === $request->getMethod()) {
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isValid()) {
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$this->logger->notice('An activity has been removed', [
|
||||
'by_user' => $this->getUser()->getUsername(),
|
||||
'activity_id' => $activity->getId(),
|
||||
@@ -640,7 +640,6 @@ final class ActivityController extends AbstractController
|
||||
|
||||
return $this->createFormBuilder()
|
||||
->setAction($this->generateUrl('chill_activity_activity_delete', $params))
|
||||
->setMethod('DELETE')
|
||||
->add('submit', SubmitType::class, ['label' => 'Delete'])
|
||||
->getForm();
|
||||
}
|
||||
|
@@ -22,6 +22,7 @@ class AdminActivityPresenceController extends CRUDController
|
||||
*
|
||||
* @return \Doctrine\ORM\QueryBuilder|mixed
|
||||
*/
|
||||
#[\Override]
|
||||
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
|
||||
{
|
||||
/* @var \Doctrine\ORM\QueryBuilder $query */
|
||||
|
@@ -22,6 +22,7 @@ class AdminActivityTypeCategoryController extends CRUDController
|
||||
*
|
||||
* @return \Doctrine\ORM\QueryBuilder|mixed
|
||||
*/
|
||||
#[\Override]
|
||||
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
|
||||
{
|
||||
/* @var \Doctrine\ORM\QueryBuilder $query */
|
||||
|
@@ -22,6 +22,7 @@ class AdminActivityTypeController extends CRUDController
|
||||
*
|
||||
* @return \Doctrine\ORM\QueryBuilder|mixed
|
||||
*/
|
||||
#[\Override]
|
||||
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
|
||||
{
|
||||
/* @var \Doctrine\ORM\QueryBuilder $query */
|
||||
|
@@ -32,11 +32,13 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface
|
||||
$this->faker = FakerFactory::create('fr_FR');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getOrder()
|
||||
{
|
||||
return 16400;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
$persons = $this->em
|
||||
|
@@ -38,6 +38,7 @@ class LoadActivityNotifications extends AbstractFixture implements DependentFixt
|
||||
],
|
||||
];
|
||||
|
||||
#[\Override]
|
||||
public function getDependencies()
|
||||
{
|
||||
return [
|
||||
|
@@ -23,11 +23,13 @@ class LoadActivityReason extends AbstractFixture implements OrderedFixtureInterf
|
||||
{
|
||||
public static $references = [];
|
||||
|
||||
#[\Override]
|
||||
public function getOrder()
|
||||
{
|
||||
return 16300;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
$reasons = [
|
||||
|
@@ -21,11 +21,13 @@ use Doctrine\Persistence\ObjectManager;
|
||||
*/
|
||||
class LoadActivityReasonCategory extends AbstractFixture implements OrderedFixtureInterface
|
||||
{
|
||||
#[\Override]
|
||||
public function getOrder()
|
||||
{
|
||||
return 16200;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
$categs = [
|
||||
|
@@ -23,11 +23,13 @@ class LoadActivityType extends Fixture implements OrderedFixtureInterface
|
||||
{
|
||||
public static $references = [];
|
||||
|
||||
#[\Override]
|
||||
public function getOrder()
|
||||
{
|
||||
return 16100;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
$types = [
|
||||
|
@@ -23,11 +23,13 @@ class LoadActivityTypeCategory extends Fixture implements OrderedFixtureInterfac
|
||||
{
|
||||
public static $references = [];
|
||||
|
||||
#[\Override]
|
||||
public function getOrder()
|
||||
{
|
||||
return 16050;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
$categories = [
|
||||
|
@@ -26,11 +26,13 @@ use Doctrine\Persistence\ObjectManager;
|
||||
*/
|
||||
class LoadActivitytACL extends AbstractFixture implements OrderedFixtureInterface
|
||||
{
|
||||
#[\Override]
|
||||
public function getOrder()
|
||||
{
|
||||
return 16000;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
foreach (LoadPermissionsGroup::$refs as $permissionsGroupRef) {
|
||||
|
@@ -25,6 +25,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
*/
|
||||
class ChillActivityExtension extends Extension implements PrependExtensionInterface
|
||||
{
|
||||
#[\Override]
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$configuration = new Configuration();
|
||||
@@ -44,6 +45,7 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
|
||||
$loader->load('services/doctrine.entitylistener.yaml');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function prepend(ContainerBuilder $container)
|
||||
{
|
||||
$this->prependRoutes($container);
|
||||
|
@@ -22,6 +22,7 @@ use function is_int;
|
||||
*/
|
||||
class Configuration implements ConfigurationInterface
|
||||
{
|
||||
#[\Override]
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder('chill_activity');
|
||||
|
@@ -53,9 +53,9 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
|
||||
use TrackUpdateTrait;
|
||||
|
||||
final public const SENTRECEIVED_RECEIVED = 'received';
|
||||
final public const string SENTRECEIVED_RECEIVED = 'received';
|
||||
|
||||
final public const SENTRECEIVED_SENT = 'sent';
|
||||
final public const string SENTRECEIVED_SENT = 'sent';
|
||||
|
||||
#[Groups(['read'])]
|
||||
#[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class)]
|
||||
@@ -262,6 +262,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
return $this;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAccompanyingPeriod(): ?AccompanyingPeriod
|
||||
{
|
||||
return $this->accompanyingPeriod;
|
||||
@@ -281,6 +282,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
* get the center
|
||||
* center is extracted from person.
|
||||
*/
|
||||
#[\Override]
|
||||
public function getCenters(): iterable
|
||||
{
|
||||
if ($this->person instanceof Person) {
|
||||
@@ -399,6 +401,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
return $this->scope;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getScopes(): iterable
|
||||
{
|
||||
if (null !== $this->getAccompanyingPeriod()) {
|
||||
@@ -422,6 +425,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
return $this->socialActions;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getSocialIssues(): Collection
|
||||
{
|
||||
return $this->socialIssues;
|
||||
@@ -492,6 +496,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
return $this;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function removeSocialIssue(SocialIssue $socialIssue): self
|
||||
{
|
||||
$this->socialIssues->removeElement($socialIssue);
|
||||
|
@@ -79,11 +79,9 @@ class ActivityReason
|
||||
/**
|
||||
* Set active.
|
||||
*
|
||||
* @param bool $active
|
||||
*
|
||||
* @return ActivityReason
|
||||
*/
|
||||
public function setActive($active)
|
||||
public function setActive(bool $active)
|
||||
{
|
||||
$this->active = $active;
|
||||
|
||||
@@ -110,11 +108,9 @@ class ActivityReason
|
||||
/**
|
||||
* Set name.
|
||||
*
|
||||
* @param array $name
|
||||
*
|
||||
* @return ActivityReason
|
||||
*/
|
||||
public function setName($name)
|
||||
public function setName(array $name)
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
|
@@ -53,6 +53,7 @@ class ActivityReasonCategory implements \Stringable
|
||||
$this->reasons = new ArrayCollection();
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function __toString(): string
|
||||
{
|
||||
return 'ActivityReasonCategory('.$this->getName('x').')';
|
||||
|
@@ -25,11 +25,11 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
#[ORM\Table(name: 'activitytype')]
|
||||
class ActivityType
|
||||
{
|
||||
final public const FIELD_INVISIBLE = 0;
|
||||
final public const int FIELD_INVISIBLE = 0;
|
||||
|
||||
final public const FIELD_OPTIONAL = 1;
|
||||
final public const int FIELD_OPTIONAL = 1;
|
||||
|
||||
final public const FIELD_REQUIRED = 2;
|
||||
final public const int FIELD_REQUIRED = 2;
|
||||
|
||||
/**
|
||||
* @deprecated not in use
|
||||
|
@@ -19,11 +19,13 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ByActivityNumberAggregator implements AggregatorInterface
|
||||
{
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb
|
||||
@@ -31,21 +33,25 @@ class ByActivityNumberAggregator implements AggregatorInterface
|
||||
->addGroupBy('activity_by_number_aggregator');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// No form needed
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return static function ($value) {
|
||||
@@ -61,11 +67,13 @@ class ByActivityNumberAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['activity_by_number_aggregator'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Group acp by activity number';
|
||||
|
@@ -25,7 +25,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class ByActivityTypeAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acp_by_activity_type_agg';
|
||||
private const string PREFIX = 'acp_by_activity_type_agg';
|
||||
|
||||
public function __construct(
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
@@ -33,6 +33,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
|
||||
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder
|
||||
@@ -46,6 +47,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [
|
||||
@@ -54,6 +56,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
{
|
||||
return function (int|string|null $value): string {
|
||||
@@ -69,21 +72,25 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
return [self::PREFIX.'_actype_id'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'export.aggregator.acp.by_activity_type.title';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
@@ -115,6 +122,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
|
||||
->addGroupBy("{$p}_actype_id");
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn()
|
||||
{
|
||||
return Declarations::ACP_TYPE;
|
||||
|
@@ -22,11 +22,13 @@ class BySocialActionAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
if (!\in_array('actsocialaction', $qb->getAllAliases(), true)) {
|
||||
@@ -37,21 +39,25 @@ class BySocialActionAggregator implements AggregatorInterface
|
||||
$qb->addGroupBy('socialaction_aggregator');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY_ACP;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value) {
|
||||
@@ -69,11 +75,13 @@ class BySocialActionAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['socialaction_aggregator'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Group activity by linked socialaction';
|
||||
|
@@ -22,11 +22,13 @@ class BySocialIssueAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly SocialIssueRepository $issueRepository, private readonly SocialIssueRender $issueRender) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
if (!\in_array('actsocialissue', $qb->getAllAliases(), true)) {
|
||||
@@ -37,21 +39,25 @@ class BySocialIssueAggregator implements AggregatorInterface
|
||||
$qb->addGroupBy('socialissue_aggregator');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY_ACP;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value): string {
|
||||
@@ -69,11 +75,13 @@ class BySocialIssueAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['socialissue_aggregator'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Group activity by linked socialissue';
|
||||
|
@@ -18,13 +18,15 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class ActivityLocationAggregator implements AggregatorInterface
|
||||
{
|
||||
public const KEY = 'activity_location_aggregator';
|
||||
public const string KEY = 'activity_location_aggregator';
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
|
||||
@@ -34,21 +36,25 @@ final readonly class ActivityLocationAggregator implements AggregatorInterface
|
||||
$qb->addGroupBy(self::KEY);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// no form required for this aggregator
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data): \Closure
|
||||
{
|
||||
return function ($value): string {
|
||||
@@ -64,11 +70,13 @@ final readonly class ActivityLocationAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return [self::KEY];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'export.aggregator.activity.by_location.Title';
|
||||
|
@@ -22,13 +22,16 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
{
|
||||
return function (int|string|null $value): string {
|
||||
@@ -44,27 +47,32 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
return ['activity_presence_aggregator_attendee'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'export.aggregator.activity.by_activity_presence.Group activity by presence';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->addSelect('IDENTITY(activity.attendee) AS activity_presence_aggregator_attendee');
|
||||
$qb->addGroupBy('activity_presence_aggregator_attendee');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn()
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
|
@@ -31,11 +31,13 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
||||
protected TranslatableStringHelper $translatableStringHelper
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
// add select element
|
||||
@@ -67,11 +69,13 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
||||
$qb->addGroupBy($alias);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add(
|
||||
@@ -89,6 +93,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
||||
);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [
|
||||
@@ -96,6 +101,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value) use ($data) {
|
||||
@@ -125,6 +131,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
// add select element
|
||||
@@ -139,11 +146,13 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
||||
throw new \RuntimeException('The data provided are not recognised.');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'Aggregate by activity reason';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function validateForm($data, ExecutionContextInterface $context)
|
||||
{
|
||||
if (null === $data['level']) {
|
||||
|
@@ -20,15 +20,17 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ActivityTypeAggregator implements AggregatorInterface
|
||||
{
|
||||
final public const KEY = 'activity_type_aggregator';
|
||||
final public const string KEY = 'activity_type_aggregator';
|
||||
|
||||
public function __construct(protected ActivityTypeRepositoryInterface $activityTypeRepository, protected TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
if (!\in_array('acttype', $qb->getAllAliases(), true)) {
|
||||
@@ -39,21 +41,25 @@ class ActivityTypeAggregator implements AggregatorInterface
|
||||
$qb->addGroupBy(self::KEY);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// no form required for this aggregator
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data): \Closure
|
||||
{
|
||||
return function (int|string|null $value): string {
|
||||
@@ -69,11 +75,13 @@ class ActivityTypeAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return [self::KEY];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'Aggregate by activity type';
|
||||
|
@@ -20,15 +20,17 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ActivityUserAggregator implements AggregatorInterface
|
||||
{
|
||||
final public const KEY = 'activity_user_id';
|
||||
final public const string KEY = 'activity_user_id';
|
||||
|
||||
public function __construct(private readonly UserRepository $userRepository, private readonly UserRender $userRender) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
// add select element
|
||||
@@ -38,21 +40,25 @@ class ActivityUserAggregator implements AggregatorInterface
|
||||
$qb->addGroupBy(self::KEY);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// nothing to add
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, $values, $data): \Closure
|
||||
{
|
||||
return function ($value) {
|
||||
@@ -70,11 +76,13 @@ class ActivityUserAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
return [self::KEY];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Aggregate by activity user';
|
||||
|
@@ -22,11 +22,13 @@ class ActivityUsersAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
if (!\in_array('actusers', $qb->getAllAliases(), true)) {
|
||||
@@ -38,21 +40,25 @@ class ActivityUsersAggregator implements AggregatorInterface
|
||||
->addGroupBy('activity_users_aggregator');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// nothing to add on the form
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value) {
|
||||
@@ -70,11 +76,13 @@ class ActivityUsersAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
return ['activity_users_aggregator'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'Aggregate by activity users';
|
||||
|
@@ -22,18 +22,20 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ActivityUsersJobAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'act_agg_user_job';
|
||||
private const string PREFIX = 'act_agg_user_job';
|
||||
|
||||
public function __construct(
|
||||
private readonly UserJobRepositoryInterface $userJobRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
@@ -60,18 +62,22 @@ class ActivityUsersJobAggregator implements AggregatorInterface
|
||||
->addGroupBy("{$p}_select");
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value): string {
|
||||
@@ -91,11 +97,13 @@ class ActivityUsersJobAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return [self::PREFIX.'_select'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'export.aggregator.activity.by_user_job.Aggregate by users job';
|
||||
|
@@ -22,18 +22,20 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ActivityUsersScopeAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'act_agg_user_scope';
|
||||
private const string PREFIX = 'act_agg_user_scope';
|
||||
|
||||
public function __construct(
|
||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
@@ -60,18 +62,22 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
|
||||
->addGroupBy("{$p}_select");
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value): string {
|
||||
@@ -91,11 +97,13 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return [self::PREFIX.'_select'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'export.aggregator.activity.by_user_scope.Aggregate by users scope';
|
||||
|
@@ -22,32 +22,38 @@ class ByCreatorAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->addSelect('IDENTITY(activity.createdBy) AS creator_aggregator');
|
||||
$qb->addGroupBy('creator_aggregator');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value): string {
|
||||
@@ -65,11 +71,13 @@ class ByCreatorAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['creator_aggregator'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Group activity by creator';
|
||||
|
@@ -22,11 +22,13 @@ class ByThirdpartyAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository, private readonly ThirdPartyRender $thirdPartyRender) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
if (!\in_array('acttparty', $qb->getAllAliases(), true)) {
|
||||
@@ -37,21 +39,25 @@ class ByThirdpartyAggregator implements AggregatorInterface
|
||||
$qb->addGroupBy('thirdparty_aggregator');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value): string {
|
||||
@@ -69,11 +75,13 @@ class ByThirdpartyAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['thirdparty_aggregator'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Group activity by linked thirdparties';
|
||||
|
@@ -22,18 +22,20 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class CreatorJobAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acp_agg_creator_job';
|
||||
private const string PREFIX = 'acp_agg_creator_job';
|
||||
|
||||
public function __construct(
|
||||
private readonly UserJobRepositoryInterface $userJobRepository,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
@@ -60,18 +62,22 @@ class CreatorJobAggregator implements AggregatorInterface
|
||||
->addGroupBy("{$p}_select");
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value): string {
|
||||
@@ -89,11 +95,13 @@ class CreatorJobAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return [self::PREFIX.'_select'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'export.aggregator.activity.by_creator_job.Group activity by creator job';
|
||||
|
@@ -22,18 +22,20 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class CreatorScopeAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'acp_agg_creator_scope';
|
||||
private const string PREFIX = 'acp_agg_creator_scope';
|
||||
|
||||
public function __construct(
|
||||
private readonly ScopeRepository $scopeRepository,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
@@ -60,18 +62,22 @@ class CreatorScopeAggregator implements AggregatorInterface
|
||||
->addGroupBy("{$p}_select");
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value): string {
|
||||
@@ -91,11 +97,13 @@ class CreatorScopeAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return [self::PREFIX.'_select'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'export.aggregator.activity.by_creator_scope.Group activity by creator scope';
|
||||
|
@@ -19,19 +19,21 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class DateAggregator implements AggregatorInterface
|
||||
{
|
||||
private const CHOICES = [
|
||||
private const array CHOICES = [
|
||||
'by month' => 'month',
|
||||
'by week' => 'week',
|
||||
'by year' => 'year',
|
||||
];
|
||||
|
||||
private const DEFAULT_CHOICE = 'year';
|
||||
private const string DEFAULT_CHOICE = 'year';
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$order = null;
|
||||
@@ -62,11 +64,13 @@ class DateAggregator implements AggregatorInterface
|
||||
$qb->addOrderBy('date_aggregator', $order);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('frequency', ChoiceType::class, [
|
||||
@@ -76,11 +80,13 @@ class DateAggregator implements AggregatorInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return ['frequency' => self::DEFAULT_CHOICE];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return static function ($value) use ($data): string {
|
||||
@@ -98,11 +104,13 @@ class DateAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['date_aggregator'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Group activity by date';
|
||||
|
@@ -22,11 +22,13 @@ class LocationTypeAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly LocationTypeRepository $locationTypeRepository, private readonly TranslatableStringHelper $translatableStringHelper) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
|
||||
@@ -37,21 +39,25 @@ class LocationTypeAggregator implements AggregatorInterface
|
||||
$qb->addGroupBy('locationtype_aggregator');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return function ($value): string {
|
||||
@@ -73,11 +79,13 @@ class LocationTypeAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['locationtype_aggregator'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Group activity by locationtype';
|
||||
|
@@ -21,36 +21,43 @@ final readonly class PersonAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// nothing to add here
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
{
|
||||
return $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.person.by_person.person');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
return ['activity_by_person_agg'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'export.aggregator.person.by_person.title';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb
|
||||
@@ -58,6 +65,7 @@ final readonly class PersonAggregator implements AggregatorInterface
|
||||
->addGroupBy('activity_by_person_agg');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn()
|
||||
{
|
||||
return Declarations::ACTIVITY_PERSON;
|
||||
|
@@ -23,20 +23,23 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
*/
|
||||
final readonly class PersonsAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'act_persons_agg';
|
||||
private const string PREFIX = 'act_persons_agg';
|
||||
|
||||
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// nothing to add here
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
{
|
||||
if ($key !== self::PREFIX.'_pid') {
|
||||
@@ -46,21 +49,25 @@ final readonly class PersonsAggregator implements AggregatorInterface
|
||||
return $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.activity.by_persons.Persons');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
return [self::PREFIX.'_pid'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'export.aggregator.activity.by_persons.Group activity by persons';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
@@ -71,6 +78,7 @@ final readonly class PersonsAggregator implements AggregatorInterface
|
||||
->addGroupBy("{$p}_pid");
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn()
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
|
@@ -21,32 +21,38 @@ class SentReceivedAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->addSelect('activity.sentReceived AS activity_sentreceived_aggregator')
|
||||
->addGroupBy('activity_sentreceived_aggregator');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// No form needed
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function (?string $value): string {
|
||||
@@ -71,11 +77,13 @@ class SentReceivedAggregator implements AggregatorInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['activity_sentreceived_aggregator'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'export.aggregator.activity.by_sent_received.Group activity by sentreceived';
|
||||
|
@@ -36,28 +36,34 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes(): array
|
||||
{
|
||||
return [FormatterInterface::TYPE_TABULAR];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Average activities linked to an accompanying period duration by various parameters.';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of activities linked to an accompanying period';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
if ('export_avg_activity_duration' !== $key) {
|
||||
@@ -67,26 +73,31 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
return static fn ($value) => '_header' === $value ? 'Average activities linked to an accompanying period duration' : $value;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['export_avg_activity_duration'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Average activity linked to an accompanying period duration';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
@@ -116,11 +127,13 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return ActivityStatsVoter::STATS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -41,31 +41,37 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// TODO: Implement buildForm() method.
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes(): array
|
||||
{
|
||||
return [FormatterInterface::TYPE_TABULAR];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Average activities linked to an accompanying period visit duration by various parameters.';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of activities linked to an accompanying period';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
if ('export_avg_activity_visit_duration' !== $key) {
|
||||
@@ -75,26 +81,31 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac
|
||||
return static fn ($value) => '_header' === $value ? 'Average activities linked to an accompanying period visit duration' : $value;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['export_avg_activity_visit_duration'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Average activity linked to an accompanying period visit duration';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
@@ -124,11 +135,13 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return ActivityStatsVoter::STATS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -41,28 +41,34 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes(): array
|
||||
{
|
||||
return [FormatterInterface::TYPE_TABULAR];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Count activities linked to an accompanying period by various parameters.';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of activities linked to an accompanying period';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
if ('export_count_activity' !== $key) {
|
||||
@@ -72,26 +78,31 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
||||
return static fn ($value) => '_header' === $value ? 'Number of activities linked to an accompanying period' : $value;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['export_count_activity'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Count activities linked to an accompanying period';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
@@ -120,11 +131,13 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return ActivityStatsVoter::STATS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -42,28 +42,34 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes(): array
|
||||
{
|
||||
return [FormatterInterface::TYPE_TABULAR];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'export.export.count_household_on_activity.description';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of activities linked to an accompanying period';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
if ('export_count_activity' !== $key) {
|
||||
@@ -73,26 +79,31 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
|
||||
return static fn ($value) => '_header' === $value ? 'export.export.count_household_on_activity.header' : $value;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['export_count_activity'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'export.export.count_household_on_activity.title';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
@@ -129,11 +140,13 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return ActivityStatsVoter::STATS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -41,28 +41,34 @@ class CountPersonsOnActivity implements ExportInterface, GroupedExportInterface
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes(): array
|
||||
{
|
||||
return [FormatterInterface::TYPE_TABULAR];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'export.export.count_person_on_activity.description';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of activities linked to an accompanying period';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
if ('export_count_activity' !== $key) {
|
||||
@@ -72,26 +78,31 @@ class CountPersonsOnActivity implements ExportInterface, GroupedExportInterface
|
||||
return static fn ($value) => '_header' === $value ? 'export.export.count_person_on_activity.header' : $value;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['export_count_activity'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'export.export.count_person_on_activity.title';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
@@ -121,11 +132,13 @@ class CountPersonsOnActivity implements ExportInterface, GroupedExportInterface
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return ActivityStatsVoter::STATS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -33,31 +33,37 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
|
||||
private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper,
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$this->helper->buildForm($builder);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes()
|
||||
{
|
||||
return $this->helper->getAllowedFormattersTypes();
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription()
|
||||
{
|
||||
return ListActivityHelper::MSG_KEY.'List activities linked to an accompanying course';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of activities linked to an accompanying period';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
return match ($key) {
|
||||
@@ -73,6 +79,7 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
return
|
||||
@@ -85,21 +92,25 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
|
||||
);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $this->helper->getResult($query, $data);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return ListActivityHelper::MSG_KEY.'List activity linked to a course';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType()
|
||||
{
|
||||
return $this->helper->getType();
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
@@ -135,11 +146,13 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return ActivityStatsVoter::LISTS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers()
|
||||
{
|
||||
return array_merge(
|
||||
|
@@ -40,31 +40,37 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// TODO: Implement buildForm() method.
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes(): array
|
||||
{
|
||||
return [FormatterInterface::TYPE_TABULAR];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Sum activities linked to an accompanying period duration by various parameters.';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of activities linked to an accompanying period';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
if ('export_sum_activity_duration' !== $key) {
|
||||
@@ -74,26 +80,31 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
return static fn ($value) => '_header' === $value ? 'Sum activities linked to an accompanying period duration' : $value;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['export_sum_activity_duration'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Sum activity linked to an accompanying period duration';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
@@ -123,11 +134,13 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return ActivityStatsVoter::STATS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -40,31 +40,37 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// TODO: Implement buildForm() method.
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes(): array
|
||||
{
|
||||
return [FormatterInterface::TYPE_TABULAR];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Sum activities linked to an accompanying period visit duration by various parameters.';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of activities linked to an accompanying period';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
if ('export_sum_activity_visit_duration' !== $key) {
|
||||
@@ -74,26 +80,31 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac
|
||||
return static fn ($value) => '_header' === $value ? 'Sum activities linked to an accompanying period visit duration' : $value;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['export_sum_activity_visit_duration'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Sum activity linked to an accompanying period visit duration';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
@@ -123,11 +134,13 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return ActivityStatsVoter::STATS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -33,28 +33,34 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes()
|
||||
{
|
||||
return [FormatterInterface::TYPE_TABULAR];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription()
|
||||
{
|
||||
return 'Count activities linked to a person by various parameters.';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of activities linked to a person';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
if ('export_count_activity' !== $key) {
|
||||
@@ -64,26 +70,31 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
||||
return static fn ($value) => '_header' === $value ? 'Number of activities linked to a person' : $value;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
return ['export_count_activity'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'Count activities linked to a person';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
@@ -113,11 +124,13 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return ActivityStatsVoter::STATS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers()
|
||||
{
|
||||
return [
|
||||
|
@@ -34,28 +34,34 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes()
|
||||
{
|
||||
return [FormatterInterface::TYPE_TABULAR];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription()
|
||||
{
|
||||
return 'export.export.count_household_on_activity_person.description';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of activities linked to a person';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
if ('export_count_activity' !== $key) {
|
||||
@@ -65,26 +71,31 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
|
||||
return static fn ($value) => '_header' === $value ? 'export.export.count_household_on_activity_person.header' : $value;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
return ['export_count_activity'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'export.export.count_household_on_activity_person.title';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
@@ -121,11 +132,13 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return ActivityStatsVoter::STATS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers()
|
||||
{
|
||||
return [
|
||||
|
@@ -57,6 +57,7 @@ class ListActivity implements ListInterface, GroupedExportInterface
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('fields', ChoiceType::class, [
|
||||
@@ -76,26 +77,31 @@ class ListActivity implements ListInterface, GroupedExportInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes()
|
||||
{
|
||||
return [FormatterInterface::TYPE_LIST];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription()
|
||||
{
|
||||
return 'List activities linked to a person description';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of activities linked to a person';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
switch ($key) {
|
||||
@@ -165,26 +171,31 @@ class ListActivity implements ListInterface, GroupedExportInterface
|
||||
}
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
return $data['fields'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'List activity linked to a person';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
@@ -279,11 +290,13 @@ class ListActivity implements ListInterface, GroupedExportInterface
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return ActivityStatsVoter::LISTS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers()
|
||||
{
|
||||
return [
|
||||
|
@@ -30,7 +30,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
*/
|
||||
class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
{
|
||||
final public const SUM = 'sum';
|
||||
final public const string SUM = 'sum';
|
||||
private readonly bool $filterStatsByCenters;
|
||||
|
||||
/**
|
||||
@@ -47,18 +47,22 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes()
|
||||
{
|
||||
return [FormatterInterface::TYPE_TABULAR];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription()
|
||||
{
|
||||
if (self::SUM === $this->action) {
|
||||
@@ -68,11 +72,13 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
throw new \LogicException('this action is not supported: '.$this->action);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of activities linked to a person';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
if ('export_stat_activity' !== $key) {
|
||||
@@ -84,16 +90,19 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
return static fn (string $value) => '_header' === $value ? $header : $value;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
return ['export_stat_activity'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
if (self::SUM === $this->action) {
|
||||
@@ -103,11 +112,13 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
throw new \LogicException('This action is not supported: '.$this->action);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(
|
||||
@@ -145,11 +156,13 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return ActivityStatsVoter::STATS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers()
|
||||
{
|
||||
return [
|
||||
|
@@ -28,7 +28,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class ListActivityHelper
|
||||
{
|
||||
final public const MSG_KEY = 'export.list.activity.';
|
||||
final public const string MSG_KEY = 'export.list.activity.';
|
||||
|
||||
public function __construct(
|
||||
private readonly ActivityPresenceRepositoryInterface $activityPresenceRepository,
|
||||
@@ -152,7 +152,7 @@ class ListActivityHelper
|
||||
return '';
|
||||
}
|
||||
|
||||
return $this->translator->trans($value);
|
||||
return $this->translator->trans((string) $value);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class ActivityTypeFilter implements FilterInterface
|
||||
{
|
||||
private const BASE_EXISTS = 'SELECT 1 FROM '.Activity::class.' act_type_filter_activity WHERE act_type_filter_activity.accompanyingPeriod = acp';
|
||||
private const string BASE_EXISTS = 'SELECT 1 FROM '.Activity::class.' act_type_filter_activity WHERE act_type_filter_activity.accompanyingPeriod = acp';
|
||||
|
||||
public function __construct(
|
||||
private ActivityTypeRepositoryInterface $activityTypeRepository,
|
||||
@@ -33,11 +33,13 @@ final readonly class ActivityTypeFilter implements FilterInterface
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$exists = self::BASE_EXISTS;
|
||||
@@ -62,11 +64,13 @@ final readonly class ActivityTypeFilter implements FilterInterface
|
||||
}
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn()
|
||||
{
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('accepted_activitytypes', EntityType::class, [
|
||||
@@ -92,6 +96,7 @@ final readonly class ActivityTypeFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [
|
||||
@@ -101,6 +106,7 @@ final readonly class ActivityTypeFilter implements FilterInterface
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
$types = [];
|
||||
@@ -118,6 +124,7 @@ final readonly class ActivityTypeFilter implements FilterInterface
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Filter accompanying course by activity type';
|
||||
|
@@ -23,11 +23,13 @@ class BySocialActionFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly SocialActionRender $actionRender) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
if (!\in_array('actsocialaction', $qb->getAllAliases(), true)) {
|
||||
@@ -43,11 +45,13 @@ class BySocialActionFilter implements FilterInterface
|
||||
);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY_ACP;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('accepted_socialactions', PickSocialActionType::class, [
|
||||
@@ -55,11 +59,13 @@ class BySocialActionFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
$actions = [];
|
||||
@@ -75,6 +81,7 @@ class BySocialActionFilter implements FilterInterface
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Filter activity by linked socialaction';
|
||||
|
@@ -23,11 +23,13 @@ class BySocialIssueFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly SocialIssueRender $issueRender) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
if (!\in_array('actsocialissue', $qb->getAllAliases(), true)) {
|
||||
@@ -43,11 +45,13 @@ class BySocialIssueFilter implements FilterInterface
|
||||
);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY_ACP;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('accepted_socialissues', PickSocialIssueType::class, [
|
||||
@@ -55,11 +59,13 @@ class BySocialIssueFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
$issues = [];
|
||||
@@ -75,6 +81,7 @@ class BySocialIssueFilter implements FilterInterface
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Filter activity by linked socialissue';
|
||||
|
@@ -22,11 +22,13 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
*/
|
||||
class HasNoActivityFilter implements FilterInterface
|
||||
{
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb
|
||||
@@ -38,26 +40,31 @@ class HasNoActivityFilter implements FilterInterface
|
||||
');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// no form needed
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
return ['Filtered acp which has no activities', []];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Filter acp which has no activity';
|
||||
|
@@ -25,11 +25,13 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'export.filter.activity.course_having_activity_between_date.Title';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder
|
||||
@@ -41,6 +43,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [
|
||||
@@ -49,6 +52,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string')
|
||||
{
|
||||
return [
|
||||
@@ -60,11 +64,13 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$alias = 'act_period_having_act_betw_date_alias';
|
||||
@@ -73,7 +79,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
|
||||
|
||||
$qb->andWhere(
|
||||
$qb->expr()->exists(
|
||||
'SELECT 1 FROM '.Activity::class." {$alias} WHERE {$alias}.date >= :{$from} AND {$alias}.date < :{$to} AND {$alias}.accompanyingPeriod = acp"
|
||||
'SELECT 1 FROM '.Activity::class." {$alias} WHERE {$alias}.date >= :{$from} AND {$alias}.date < :{$to} AND {$alias}.accompanyingPeriod = activity.accompanyingPeriod"
|
||||
)
|
||||
);
|
||||
|
||||
@@ -82,6 +88,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
|
||||
->setParameter($to, $this->rollingDateConverter->convert($data['end_date']));
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn()
|
||||
{
|
||||
return \Chill\PersonBundle\Export\Declarations::ACP_TYPE;
|
||||
|
@@ -25,11 +25,13 @@ class ActivityDateFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(protected TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$where = $qb->getDQLPart('where');
|
||||
@@ -56,11 +58,13 @@ class ActivityDateFilter implements FilterInterface
|
||||
);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder
|
||||
@@ -72,11 +76,13 @@ class ActivityDateFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string')
|
||||
{
|
||||
return [
|
||||
@@ -88,6 +94,7 @@ class ActivityDateFilter implements FilterInterface
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'Filtered by date activity';
|
||||
|
@@ -28,11 +28,13 @@ final readonly class ActivityPresenceFilter implements FilterInterface
|
||||
private TranslatorInterface $translator
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'export.filter.activity.by_presence.Filter activity by activity presence';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('presences', EntityType::class, [
|
||||
@@ -45,11 +47,13 @@ final readonly class ActivityPresenceFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string')
|
||||
{
|
||||
$presences = array_map(
|
||||
@@ -63,11 +67,13 @@ final readonly class ActivityPresenceFilter implements FilterInterface
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb
|
||||
@@ -75,6 +81,7 @@ final readonly class ActivityPresenceFilter implements FilterInterface
|
||||
->setParameter('activity_presence_filter_presences', $data['presences']);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn()
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
|
@@ -29,11 +29,13 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
|
||||
protected ActivityTypeRepositoryInterface $activityTypeRepository
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$clause = $qb->expr()->in('activity.activityType', ':selected_activity_types');
|
||||
@@ -42,11 +44,13 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
|
||||
$qb->setParameter('selected_activity_types', $data['types']);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('types', EntityType::class, [
|
||||
@@ -70,11 +74,13 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string')
|
||||
{
|
||||
// collect all the reasons'name used in this filter in one array
|
||||
@@ -88,11 +94,13 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'Filter by activity type';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function validateForm($data, ExecutionContextInterface $context)
|
||||
{
|
||||
if (null === $data['types'] || 0 === \count($data['types'])) {
|
||||
|
@@ -22,11 +22,13 @@ class ActivityUsersFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly UserRender $userRender) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$orX = $qb->expr()->orX();
|
||||
@@ -39,11 +41,13 @@ class ActivityUsersFilter implements FilterInterface
|
||||
$qb->andWhere($orX);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn()
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('accepted_users', PickUserDynamicType::class, [
|
||||
@@ -52,11 +56,13 @@ class ActivityUsersFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string')
|
||||
{
|
||||
$users = [];
|
||||
@@ -70,6 +76,7 @@ class ActivityUsersFilter implements FilterInterface
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Filter activity by users';
|
||||
|
@@ -22,11 +22,13 @@ class ByCreatorFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly UserRender $userRender) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb
|
||||
@@ -36,11 +38,13 @@ class ByCreatorFilter implements FilterInterface
|
||||
->setParameter('users', $data['accepted_users']);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('accepted_users', PickUserDynamicType::class, [
|
||||
@@ -48,11 +52,13 @@ class ByCreatorFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
$users = [];
|
||||
@@ -66,6 +72,7 @@ class ByCreatorFilter implements FilterInterface
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Filter activity by creator';
|
||||
|
@@ -26,7 +26,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
final readonly class CreatorJobFilter implements FilterInterface
|
||||
{
|
||||
private const PREFIX = 'acp_act_filter_creator_job';
|
||||
private const string PREFIX = 'acp_act_filter_creator_job';
|
||||
|
||||
public function __construct(
|
||||
private TranslatableStringHelper $translatableStringHelper,
|
||||
@@ -34,11 +34,13 @@ final readonly class CreatorJobFilter implements FilterInterface
|
||||
private UserJobRepositoryInterface $userJobRepository,
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
@@ -70,11 +72,13 @@ final readonly class CreatorJobFilter implements FilterInterface
|
||||
);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder
|
||||
@@ -90,6 +94,7 @@ final readonly class CreatorJobFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
$jobs = array_map(
|
||||
@@ -102,6 +107,7 @@ final readonly class CreatorJobFilter implements FilterInterface
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [
|
||||
@@ -109,6 +115,7 @@ final readonly class CreatorJobFilter implements FilterInterface
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'export.filter.activity.by_creator_job.Filter activity by user job';
|
||||
|
@@ -24,18 +24,20 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class CreatorScopeFilter implements FilterInterface
|
||||
{
|
||||
private const PREFIX = 'acp_act_filter_creator_scope';
|
||||
private const string PREFIX = 'acp_act_filter_creator_scope';
|
||||
|
||||
public function __construct(
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
@@ -67,11 +69,13 @@ class CreatorScopeFilter implements FilterInterface
|
||||
);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder
|
||||
@@ -86,6 +90,7 @@ class CreatorScopeFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
$scopes = [];
|
||||
@@ -101,6 +106,7 @@ class CreatorScopeFilter implements FilterInterface
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [
|
||||
@@ -108,6 +114,7 @@ class CreatorScopeFilter implements FilterInterface
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'export.filter.activity.by_creator_scope.Filter activity by user scope';
|
||||
|
@@ -21,20 +21,22 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class EmergencyFilter implements FilterInterface
|
||||
{
|
||||
private const CHOICES = [
|
||||
private const array CHOICES = [
|
||||
'activity is emergency' => 'true',
|
||||
'activity is not emergency' => 'false',
|
||||
];
|
||||
|
||||
private const DEFAULT_CHOICE = 'false';
|
||||
private const string DEFAULT_CHOICE = 'false';
|
||||
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$where = $qb->getDQLPart('where');
|
||||
@@ -51,11 +53,13 @@ class EmergencyFilter implements FilterInterface
|
||||
$qb->setParameter('emergency', $data['accepted_emergency']);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('accepted_emergency', ChoiceType::class, [
|
||||
@@ -66,11 +70,13 @@ class EmergencyFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return ['accepted_emergency' => self::DEFAULT_CHOICE];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
return [
|
||||
@@ -82,6 +88,7 @@ class EmergencyFilter implements FilterInterface
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Filter activity by emergency';
|
||||
|
@@ -19,11 +19,13 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class LocationFilter implements FilterInterface
|
||||
{
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->andWhere(
|
||||
@@ -33,11 +35,13 @@ class LocationFilter implements FilterInterface
|
||||
$qb->setParameter('location', $data['accepted_location']);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('accepted_location', PickUserLocationType::class, [
|
||||
@@ -46,11 +50,13 @@ class LocationFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
$locations = [];
|
||||
@@ -64,6 +70,7 @@ class LocationFilter implements FilterInterface
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Filter activity by location';
|
||||
|
@@ -23,11 +23,13 @@ class LocationTypeFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
|
||||
@@ -47,11 +49,13 @@ class LocationTypeFilter implements FilterInterface
|
||||
$qb->setParameter('locationtype', $data['accepted_locationtype']);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('accepted_locationtype', PickLocationTypeType::class, [
|
||||
@@ -60,11 +64,13 @@ class LocationTypeFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
$types = [];
|
||||
@@ -80,6 +86,7 @@ class LocationTypeFilter implements FilterInterface
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Filter activity by locationtype';
|
||||
|
@@ -28,11 +28,13 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
|
||||
{
|
||||
public function __construct(protected TranslatableStringHelper $translatableStringHelper, protected ActivityReasonRepository $activityReasonRepository) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$where = $qb->getDQLPart('where');
|
||||
@@ -53,11 +55,13 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
|
||||
$qb->setParameter('selected_activity_reasons', $data['reasons']);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY_PERSON;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('reasons', EntityType::class, [
|
||||
@@ -70,11 +74,13 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string')
|
||||
{
|
||||
// collect all the reasons'name used in this filter in one array
|
||||
@@ -91,11 +97,13 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'Filter by reason';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function validateForm($data, ExecutionContextInterface $context)
|
||||
{
|
||||
if (null === $data['reasons'] || 0 === \count($data['reasons'])) {
|
||||
|
@@ -34,11 +34,13 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
// create a subquery for activity
|
||||
@@ -83,11 +85,13 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
||||
);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::PERSON_TYPE;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('date_from_rolling', PickRollingDateType::class, [
|
||||
@@ -112,6 +116,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
||||
}
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [
|
||||
@@ -121,6 +126,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string')
|
||||
{
|
||||
return [
|
||||
@@ -141,11 +147,13 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'export.filter.activity.person_between_dates.title';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function validateForm($data, ExecutionContextInterface $context)
|
||||
{
|
||||
if ($this->rollingDateConverter->convert($data['date_from_rolling'])
|
||||
|
@@ -24,15 +24,17 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
*/
|
||||
final readonly class PersonsFilter implements FilterInterface
|
||||
{
|
||||
private const PREFIX = 'act_persons_filter';
|
||||
private const string PREFIX = 'act_persons_filter';
|
||||
|
||||
public function __construct(private PersonRenderInterface $personRender) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
@@ -47,11 +49,13 @@ final readonly class PersonsFilter implements FilterInterface
|
||||
$qb->andWhere($orX);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn()
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('accepted_persons', PickPersonDynamicType::class, [
|
||||
@@ -60,6 +64,7 @@ final readonly class PersonsFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [
|
||||
@@ -67,6 +72,7 @@ final readonly class PersonsFilter implements FilterInterface
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string')
|
||||
{
|
||||
$users = [];
|
||||
@@ -80,6 +86,7 @@ final readonly class PersonsFilter implements FilterInterface
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'export.filter.activity.by_persons.Filter activity by persons';
|
||||
|
@@ -22,20 +22,22 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class SentReceivedFilter implements FilterInterface
|
||||
{
|
||||
private const CHOICES = [
|
||||
private const array CHOICES = [
|
||||
'export.filter.activity.by_sent_received.is sent' => Activity::SENTRECEIVED_SENT,
|
||||
'export.filter.activity.by_sent_received.is received' => Activity::SENTRECEIVED_RECEIVED,
|
||||
];
|
||||
|
||||
private const DEFAULT_CHOICE = Activity::SENTRECEIVED_SENT;
|
||||
private const string DEFAULT_CHOICE = Activity::SENTRECEIVED_SENT;
|
||||
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$where = $qb->getDQLPart('where');
|
||||
@@ -52,11 +54,13 @@ class SentReceivedFilter implements FilterInterface
|
||||
$qb->setParameter('sentreceived', $data['accepted_sentreceived']);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('accepted_sentreceived', ChoiceType::class, [
|
||||
@@ -68,11 +72,13 @@ class SentReceivedFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return ['accepted_sentreceived' => self::DEFAULT_CHOICE];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
$sentreceived = array_flip(self::CHOICES)[$data['accepted_sentreceived']];
|
||||
@@ -82,6 +88,7 @@ class SentReceivedFilter implements FilterInterface
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Filter activity by sentreceived';
|
||||
|
@@ -23,11 +23,13 @@ class UserFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly UserRender $userRender) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$where = $qb->getDQLPart('where');
|
||||
@@ -44,11 +46,13 @@ class UserFilter implements FilterInterface
|
||||
$qb->setParameter('users', $data['accepted_users']);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn(): string
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder->add('accepted_users', PickUserDynamicType::class, [
|
||||
@@ -57,11 +61,13 @@ class UserFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
$users = [];
|
||||
@@ -75,6 +81,7 @@ class UserFilter implements FilterInterface
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Filter activity by user';
|
||||
|
@@ -25,18 +25,20 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class UsersJobFilter implements FilterInterface
|
||||
{
|
||||
private const PREFIX = 'act_filter_user_job';
|
||||
private const string PREFIX = 'act_filter_user_job';
|
||||
|
||||
public function __construct(
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private readonly UserJobRepositoryInterface $userJobRepository
|
||||
) {}
|
||||
|
||||
#[\Override]
|
||||
public function addRole(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
@@ -60,11 +62,13 @@ class UsersJobFilter implements FilterInterface
|
||||
);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function applyOn()
|
||||
{
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
$builder
|
||||
@@ -77,6 +81,7 @@ class UsersJobFilter implements FilterInterface
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function describeAction($data, $format = 'string')
|
||||
{
|
||||
return ['export.filter.activity.by_users_job.Filtered activity by users job: only %jobs%', [
|
||||
@@ -90,6 +95,7 @@ class UsersJobFilter implements FilterInterface
|
||||
]];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [
|
||||
@@ -97,6 +103,7 @@ class UsersJobFilter implements FilterInterface
|
||||
];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'export.filter.activity.by_users_job.Filter by users job';
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user