mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'master' into testing-2024-03
This commit is contained in:
commit
53df2ec9ba
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
|
25
CHANGELOG.md
25
CHANGELOG.md
@ -6,6 +6,31 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
|||||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||||
|
|
||||||
|
|
||||||
|
## 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
|
## v2.18.1 - 2024-03-26
|
||||||
### Fixed
|
### Fixed
|
||||||
* Fix layout issue in document generation for admin (minor)
|
* Fix layout issue in document generation for admin (minor)
|
||||||
|
@ -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.
|
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
|
In France
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
@ -49,8 +49,6 @@ final class MapAndSubscribeUserCalendarCommand extends Command
|
|||||||
|
|
||||||
$limit = 50;
|
$limit = 50;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
/** @var \DateInterval $interval the interval before the end of the expiration */
|
|
||||||
$interval = new \DateInterval('P1D');
|
|
||||||
$expiration = (new \DateTimeImmutable('now'))->add(new \DateInterval($input->getOption('subscription-duration')));
|
$expiration = (new \DateTimeImmutable('now'))->add(new \DateInterval($input->getOption('subscription-duration')));
|
||||||
$users = $this->userRepository->findAllAsArray('fr');
|
$users = $this->userRepository->findAllAsArray('fr');
|
||||||
$created = 0;
|
$created = 0;
|
||||||
@ -93,7 +91,6 @@ final class MapAndSubscribeUserCalendarCommand extends Command
|
|||||||
} catch (UserAbsenceSyncException $e) {
|
} catch (UserAbsenceSyncException $e) {
|
||||||
$this->logger->error('could not sync user absence', ['userId' => $user->getId(), 'email' => $user->getEmail(), 'exception' => $e->getTraceAsString(), 'message' => $e->getMessage()]);
|
$this->logger->error('could not sync user absence', ['userId' => $user->getId(), 'email' => $user->getEmail(), 'exception' => $e->getTraceAsString(), 'message' => $e->getMessage()]);
|
||||||
$output->writeln(sprintf('Could not sync user absence: id: %s and email: %s', $user->getId(), $user->getEmail()));
|
$output->writeln(sprintf('Could not sync user absence: id: %s and email: %s', $user->getId(), $user->getEmail()));
|
||||||
throw $e;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// we first try to renew an existing subscription, if any.
|
// we first try to renew an existing subscription, if any.
|
||||||
|
@ -1,54 +1,62 @@
|
|||||||
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
|
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %} {% set
|
||||||
|
activeRouteKey = '' %} {% block title %}
|
||||||
|
{{ "Documents" }}
|
||||||
|
{% endblock %} {% block js %}
|
||||||
|
{{ parent() }}
|
||||||
|
{{ encore_entry_script_tags("mod_docgen_picktemplate") }}
|
||||||
|
{{ encore_entry_script_tags("mod_entity_workflow_pick") }}
|
||||||
|
{{ encore_entry_script_tags("mod_document_action_buttons_group") }}
|
||||||
|
{% endblock %} {% block css %}
|
||||||
|
{{ parent() }}
|
||||||
|
{{ encore_entry_script_tags("mod_docgen_picktemplate") }}
|
||||||
|
{{ encore_entry_link_tags("mod_entity_workflow_pick") }}
|
||||||
|
{{ encore_entry_link_tags("mod_document_action_buttons_group") }}
|
||||||
|
{% endblock %} {% block content %}
|
||||||
|
<div class="document-list">
|
||||||
|
<h1>{{ "Documents" }}</h1>
|
||||||
|
|
||||||
{% set activeRouteKey = '' %}
|
{{ filter | chill_render_filter_order_helper }}
|
||||||
|
|
||||||
{% block title %}
|
|
||||||
{{ 'Documents' }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block js %}
|
|
||||||
{{ parent() }}
|
|
||||||
{{ encore_entry_script_tags('mod_docgen_picktemplate') }}
|
|
||||||
{{ encore_entry_script_tags('mod_entity_workflow_pick') }}
|
|
||||||
{{ encore_entry_script_tags('mod_document_action_buttons_group') }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block css %}
|
|
||||||
{{ parent() }}
|
|
||||||
{{ encore_entry_script_tags('mod_docgen_picktemplate') }}
|
|
||||||
{{ encore_entry_link_tags('mod_entity_workflow_pick') }}
|
|
||||||
{{ encore_entry_link_tags('mod_document_action_buttons_group') }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="document-list">
|
|
||||||
<h1>{{ 'Documents' }}</h1>
|
|
||||||
|
|
||||||
{{ filter|chill_render_filter_order_helper }}
|
|
||||||
|
|
||||||
{% if documents|length == 0 %}
|
|
||||||
<p class="chill-no-data-statement">{{ 'No documents'|trans }}</p>
|
|
||||||
{% else %}
|
|
||||||
<div class="flex-table chill-task-list">
|
|
||||||
{% for document in documents %}
|
|
||||||
{{ document|chill_generic_doc_render }}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ chill_pagination(pagination) }}
|
|
||||||
|
|
||||||
<div data-docgen-template-picker="data-docgen-template-picker" data-entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod" data-entity-id="{{ accompanyingCourse.id }}"></div>
|
|
||||||
|
|
||||||
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_CREATE', accompanyingCourse) %}
|
|
||||||
<ul class="record_actions sticky-form-buttons">
|
|
||||||
<li class="create">
|
|
||||||
<a href="{{ path('accompanying_course_document_new', {'course': accompanyingCourse.id}) }}" class="btn btn-create">
|
|
||||||
{{ 'Create'|trans }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% if documents|length > 5 %}
|
||||||
|
<div
|
||||||
|
data-docgen-template-picker="data-docgen-template-picker"
|
||||||
|
data-entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod"
|
||||||
|
data-entity-id="{{ accompanyingCourse.id }}"
|
||||||
|
></div>
|
||||||
|
{% endif %} {% if documents|length == 0 %}
|
||||||
|
<p class="chill-no-data-statement">{{ "No documents" | trans }}</p>
|
||||||
|
{% else %}
|
||||||
|
<div class="flex-table chill-task-list">
|
||||||
|
{% for document in documents %}
|
||||||
|
{{ document | chill_generic_doc_render }}
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ chill_pagination(pagination) }}
|
||||||
|
|
||||||
|
<div
|
||||||
|
data-docgen-template-picker="data-docgen-template-picker"
|
||||||
|
data-entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod"
|
||||||
|
data-entity-id="{{ accompanyingCourse.id }}"
|
||||||
|
></div>
|
||||||
|
|
||||||
|
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_CREATE',
|
||||||
|
accompanyingCourse) %}
|
||||||
|
<ul class="record_actions sticky-form-buttons">
|
||||||
|
<li class="create">
|
||||||
|
<a
|
||||||
|
href="{{
|
||||||
|
path('accompanying_course_document_new', {
|
||||||
|
course: accompanyingCourse.id
|
||||||
|
})
|
||||||
|
}}"
|
||||||
|
class="btn btn-create"
|
||||||
|
>
|
||||||
|
{{ "Create" | trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,74 +1,70 @@
|
|||||||
{#
|
{# * Copyright (C) 2018, Champs Libres Cooperative SCRLFS,
|
||||||
* Copyright (C) 2018, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
|
<http://www.champs-libres.coop> * * This program is free software: you can
|
||||||
*
|
redistribute it and/or modify * it under the terms of the GNU Affero General
|
||||||
* This program is free software: you can redistribute it and/or modify
|
Public License as * published by the Free Software Foundation, either version 3
|
||||||
* it under the terms of the GNU Affero General Public License as
|
of the * License, or (at your option) any later version. * * This program is
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY;
|
||||||
* License, or (at your option) any later version.
|
without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A
|
||||||
*
|
PARTICULAR PURPOSE. See the * GNU Affero General Public License for more
|
||||||
* This program is distributed in the hope that it will be useful,
|
details. * * You should have received a copy of the GNU Affero General Public
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
License * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
#} {% extends "@ChillPerson/Person/layout.html.twig" %} {% set activeRouteKey =
|
||||||
* GNU Affero General Public License for more details.
|
'' %} {% import "@ChillDocStore/Macro/macro.html.twig" as m %} {% block title %}
|
||||||
*
|
{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
{% endblock %} {% block js %}
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
{{ parent() }}
|
||||||
#}
|
{{ encore_entry_script_tags("mod_docgen_picktemplate") }}
|
||||||
|
{{ encore_entry_script_tags("mod_entity_workflow_pick") }}
|
||||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
{{ encore_entry_script_tags("mod_document_action_buttons_group") }}
|
||||||
|
{% endblock %} {% block css %}
|
||||||
{% set activeRouteKey = '' %}
|
{{ parent() }}
|
||||||
|
{{ encore_entry_link_tags("mod_docgen_picktemplate") }}
|
||||||
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
{{ encore_entry_link_tags("mod_entity_workflow_pick") }}
|
||||||
|
{{ encore_entry_link_tags("mod_document_action_buttons_group") }}
|
||||||
{% block title %}
|
{% endblock %} {% block content %}
|
||||||
{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block js %}
|
|
||||||
{{ parent() }}
|
|
||||||
{{ encore_entry_script_tags('mod_docgen_picktemplate') }}
|
|
||||||
{{ encore_entry_script_tags('mod_entity_workflow_pick') }}
|
|
||||||
{{ encore_entry_script_tags('mod_document_action_buttons_group') }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block css %}
|
|
||||||
{{ parent() }}
|
|
||||||
{{ encore_entry_link_tags('mod_docgen_picktemplate') }}
|
|
||||||
{{ encore_entry_link_tags('mod_entity_workflow_pick') }}
|
|
||||||
{{ encore_entry_link_tags('mod_document_action_buttons_group') }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
|
|
||||||
<div class="col-md-10 col-xxl">
|
<div class="col-md-10 col-xxl">
|
||||||
<h1>{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}</h1>
|
<h1>
|
||||||
|
{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}
|
||||||
|
</h1>
|
||||||
|
|
||||||
{{ filter|chill_render_filter_order_helper }}
|
{{ filter | chill_render_filter_order_helper }}
|
||||||
|
|
||||||
{% if documents|length == 0 %}
|
{% if documents|length > 5 %}
|
||||||
<p class="chill-no-data-statement">{{ 'No documents'|trans }}</p>
|
<div
|
||||||
|
data-docgen-template-picker="data-docgen-template-picker"
|
||||||
|
data-entity-class="Chill\PersonBundle\Entity\Person"
|
||||||
|
data-entity-id="{{ person.id }}"
|
||||||
|
></div>
|
||||||
|
{% endif %} {% if documents|length == 0 %}
|
||||||
|
<p class="chill-no-data-statement">{{ "No documents" | trans }}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="flex-table chill-task-list">
|
<div class="flex-table chill-task-list">
|
||||||
{% for document in documents %}
|
{% for document in documents %}
|
||||||
{{ document|chill_generic_doc_render }}
|
{{ document | chill_generic_doc_render }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ chill_pagination(pagination) }}
|
{{ chill_pagination(pagination) }}
|
||||||
|
|
||||||
<div data-docgen-template-picker="data-docgen-template-picker" data-entity-class="Chill\PersonBundle\Entity\Person" data-entity-id="{{ person.id }}"></div>
|
<div
|
||||||
|
data-docgen-template-picker="data-docgen-template-picker"
|
||||||
{% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %}
|
data-entity-class="Chill\PersonBundle\Entity\Person"
|
||||||
<ul class="record_actions sticky-form-buttons">
|
data-entity-id="{{ person.id }}"
|
||||||
<li class="create">
|
></div>
|
||||||
<a href="{{ path('person_document_new', {'person': person.id}) }}" class="btn btn-create">
|
|
||||||
{{ 'Create new document' | trans }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %}
|
||||||
|
<ul class="record_actions sticky-form-buttons">
|
||||||
|
<li class="create">
|
||||||
|
<a
|
||||||
|
href="{{ path('person_document_new', { person: person.id }) }}"
|
||||||
|
class="btn btn-create"
|
||||||
|
>
|
||||||
|
{{ "Create new document" | trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -13,7 +13,7 @@ Update document: Modifier le document
|
|||||||
Edit attributes: Modifier les propriétés du document
|
Edit attributes: Modifier les propriétés du document
|
||||||
Existing document: Document existant
|
Existing document: Document existant
|
||||||
No document to download: Aucun document à télécharger
|
No document to download: Aucun document à télécharger
|
||||||
'Choose a document category': Choisissez une catégorie de document
|
"Choose a document category": Choisissez une catégorie de document
|
||||||
No document found: Aucun document trouvé
|
No document found: Aucun document trouvé
|
||||||
The document is successfully registered: Le document est enregistré
|
The document is successfully registered: Le document est enregistré
|
||||||
The document is successfully updated: Le document est mis à jour
|
The document is successfully updated: Le document est mis à jour
|
||||||
@ -36,7 +36,6 @@ Delete document ?: Supprimer le document ?
|
|||||||
Are you sure you want to remove this document ?: Êtes-vous sûr·e de vouloir supprimer ce document ?
|
Are you sure you want to remove this document ?: Êtes-vous sûr·e de vouloir supprimer ce document ?
|
||||||
The document is successfully removed: Le document a été supprimé
|
The document is successfully removed: Le document a été supprimé
|
||||||
|
|
||||||
|
|
||||||
# dropzone upload
|
# dropzone upload
|
||||||
File too big: Fichier trop volumineux
|
File too big: Fichier trop volumineux
|
||||||
Drop your file or click here: Cliquez ici ou faites glissez votre nouveau fichier dans cette zone
|
Drop your file or click here: Cliquez ici ou faites glissez votre nouveau fichier dans cette zone
|
||||||
|
@ -18,9 +18,9 @@ use Chill\MainBundle\Entity\Center;
|
|||||||
use Chill\MainBundle\Form\Type\ChillCollectionType;
|
use Chill\MainBundle\Form\Type\ChillCollectionType;
|
||||||
use Chill\MainBundle\Form\Type\ChillDateTimeType;
|
use Chill\MainBundle\Form\Type\ChillDateTimeType;
|
||||||
use Chill\MainBundle\Form\Type\CommentType;
|
use Chill\MainBundle\Form\Type\CommentType;
|
||||||
|
use Chill\MainBundle\Form\Type\PickUserDynamicType;
|
||||||
use Chill\MainBundle\Form\Type\PickUserLocationType;
|
use Chill\MainBundle\Form\Type\PickUserLocationType;
|
||||||
use Chill\MainBundle\Form\Type\ScopePickerType;
|
use Chill\MainBundle\Form\Type\ScopePickerType;
|
||||||
use Chill\MainBundle\Form\Type\UserPickerType;
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\MoneyType;
|
use Symfony\Component\Form\Extension\Core\Type\MoneyType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
@ -45,14 +45,8 @@ class EventType extends AbstractType
|
|||||||
'class' => '',
|
'class' => '',
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
->add('moderator', UserPickerType::class, [
|
->add('moderator', PickUserDynamicType::class, [
|
||||||
'center' => $options['center'],
|
'label' => 'Pick a moderator',
|
||||||
'role' => $options['role'],
|
|
||||||
'placeholder' => 'Pick a moderator',
|
|
||||||
'attr' => [
|
|
||||||
'class' => '',
|
|
||||||
],
|
|
||||||
'required' => false,
|
|
||||||
])
|
])
|
||||||
->add('location', PickUserLocationType::class, [
|
->add('location', PickUserLocationType::class, [
|
||||||
'label' => 'event.fields.location',
|
'label' => 'event.fields.location',
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
{% extends '@ChillEvent/layout.html.twig' %}
|
{% extends '@ChillEvent/layout.html.twig' %} {% block js %}
|
||||||
|
{{ encore_entry_script_tags("mod_async_upload") }}
|
||||||
|
{{ encore_entry_script_tags("mod_pickentity_type") }}
|
||||||
|
|
||||||
{% block title 'Event edit'|trans %}
|
{% endblock %} {% block css %}
|
||||||
|
{{ encore_entry_link_tags("mod_async_upload") }}
|
||||||
|
{{ encore_entry_link_tags("mod_pickentity_type") }}
|
||||||
|
|
||||||
{% block event_content -%}
|
{% endblock %} {% block title 'Event edit'|trans %} {% block event_content -%}
|
||||||
<div class="col-10">
|
<div class="col-10">
|
||||||
<h1>{{ 'Event edit'|trans }}</h1>
|
<h1>{{ "Event edit" | trans }}</h1>
|
||||||
|
|
||||||
{{ form_start(edit_form) }}
|
{{ form_start(edit_form) }}
|
||||||
{{ form_errors(edit_form) }}
|
{{ form_errors(edit_form) }}
|
||||||
@ -12,7 +16,7 @@
|
|||||||
{{ form_row(edit_form.name) }}
|
{{ form_row(edit_form.name) }}
|
||||||
{{ form_row(edit_form.date) }}
|
{{ form_row(edit_form.date) }}
|
||||||
|
|
||||||
{{ form_row(edit_form.type, { 'label': 'Event type' }) }}
|
{{ form_row(edit_form.type, { label: "Event type" }) }}
|
||||||
{{ form_row(edit_form.moderator) }}
|
{{ form_row(edit_form.moderator) }}
|
||||||
{{ form_row(edit_form.location) }}
|
{{ form_row(edit_form.location) }}
|
||||||
{{ form_row(edit_form.organizationCost) }}
|
{{ form_row(edit_form.organizationCost) }}
|
||||||
@ -22,16 +26,22 @@
|
|||||||
|
|
||||||
<ul class="record_actions sticky-form-buttons">
|
<ul class="record_actions sticky-form-buttons">
|
||||||
<li class="cancel">
|
<li class="cancel">
|
||||||
<a href="{{ chill_return_path_or('chill_event_event_list') }}" class="btn btn-cancel">
|
<a
|
||||||
{{ 'List of events'|trans|chill_return_path_label }}
|
href="{{ chill_return_path_or('chill_event_event_list') }}"
|
||||||
|
class="btn btn-cancel"
|
||||||
|
>
|
||||||
|
{{ "List of events" | trans | chill_return_path_label }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
{{ form_widget(edit_form.submit, { 'attr' : { 'class' : 'btn btn-update' } }) }}
|
{{
|
||||||
|
form_widget(edit_form.submit, {
|
||||||
|
attr: { class: "btn btn-update" }
|
||||||
|
})
|
||||||
|
}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{{ form_end(edit_form) }}
|
{{ form_end(edit_form) }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,41 +1,41 @@
|
|||||||
{% extends '@ChillEvent/layout.html.twig' %}
|
{% extends '@ChillEvent/layout.html.twig' %} {% block js %}
|
||||||
|
{{ encore_entry_script_tags("mod_async_upload") }}
|
||||||
|
{{ encore_entry_script_tags("mod_pickentity_type") }}
|
||||||
|
|
||||||
{% block js %}
|
{% endblock %} {% block css %}
|
||||||
{{ encore_entry_script_tags('mod_async_upload') }}
|
{{ encore_entry_link_tags("mod_async_upload") }}
|
||||||
{% endblock %}
|
{{ encore_entry_link_tags("mod_pickentity_type") }}
|
||||||
|
|
||||||
{% block css %}
|
{% endblock %} {% block title 'Event creation'|trans %} {% block event_content
|
||||||
{{ encore_entry_link_tags('mod_async_upload') }}
|
-%}
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block title 'Event creation'|trans %}
|
|
||||||
|
|
||||||
{% block event_content -%}
|
|
||||||
<div class="col-10">
|
<div class="col-10">
|
||||||
<h1>{{ 'Event creation'|trans }}</h1>
|
<h1>{{ "Event creation" | trans }}</h1>
|
||||||
|
|
||||||
{{ form_start(form) }}
|
{{ form_start(form) }}
|
||||||
{{ form_errors(form) }}
|
{{ form_errors(form) }}
|
||||||
{{ form_row(form.circle) }}
|
{{ form_row(form.circle) }}
|
||||||
{{ form_row(form.name) }}
|
{{ form_row(form.name) }}
|
||||||
{{ form_row(form.date) }}
|
{{ form_row(form.date) }}
|
||||||
|
{{ form_row(form.type, { label: "Event type" }) }}
|
||||||
{{ form_row(form.type, { 'label': 'Event type' }) }}
|
|
||||||
{{ form_row(form.moderator) }}
|
{{ form_row(form.moderator) }}
|
||||||
{{ form_row(form.location) }}
|
{{ form_row(form.location) }}
|
||||||
{{ form_row(form.organizationCost) }}
|
{{ form_row(form.organizationCost) }}
|
||||||
|
|
||||||
{{ form_row(form.comment) }}
|
{{ form_row(form.comment) }}
|
||||||
{{ form_row(form.documents) }}
|
{{ form_row(form.documents) }}
|
||||||
|
|
||||||
<ul class="record_actions sticky-form-buttons">
|
<ul class="record_actions sticky-form-buttons">
|
||||||
<li class="cancel">
|
<li class="cancel">
|
||||||
<a href="{{ path('chill_event_list_most_recent') }}" class="btn btn-cancel">
|
<a
|
||||||
{{ 'Back to the most recent events'|trans }}
|
href="{{ path('chill_event_list_most_recent') }}"
|
||||||
|
class="btn btn-cancel"
|
||||||
|
>
|
||||||
|
{{ "Back to the most recent events" | trans }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
{{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-create' } }) }}
|
{{
|
||||||
|
form_widget(form.submit, { attr: { class: "btn btn-create" } })
|
||||||
|
}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -1,92 +1,126 @@
|
|||||||
{% extends '@ChillEvent/layout.html.twig' %}
|
{% extends '@ChillEvent/layout.html.twig' %} {% block title 'Events'|trans %} {%
|
||||||
|
block js %}
|
||||||
|
{{ parent() }}
|
||||||
|
{{ encore_entry_script_tags("mod_pickentity_type") }}
|
||||||
|
{% endblock %} {% block css %}
|
||||||
|
{{ parent() }}
|
||||||
|
{{ encore_entry_link_tags("mod_pickentity_type") }}
|
||||||
|
{% endblock %} {% block content %}
|
||||||
|
<div class="col-10">
|
||||||
|
<h1>{{ block("title") }}</h1>
|
||||||
|
|
||||||
{% block title 'Events'|trans %}
|
{{ filter | chill_render_filter_order_helper }}
|
||||||
|
|
||||||
{% block js %}
|
{# {% if is_granted('CHILL_EVENT_CREATE') %} #}
|
||||||
{{ parent() }}
|
<ul class="record_actions">
|
||||||
{{ encore_entry_script_tags('mod_pickentity_type') }}
|
<li>
|
||||||
{% endblock %}
|
<a
|
||||||
|
class="btn btn-create"
|
||||||
{% block css %}
|
href="{{
|
||||||
{{ parent() }}
|
chill_path_add_return_path(
|
||||||
{{ encore_entry_link_tags('mod_pickentity_type') }}
|
'chill_event__event_new_pickcenter'
|
||||||
{% endblock %}
|
)
|
||||||
|
}}"
|
||||||
{% block content %}
|
>{{ "Add an event" | trans }}</a
|
||||||
<h1>{{ block('title') }}</h1>
|
>
|
||||||
|
</li>
|
||||||
{{ filter|chill_render_filter_order_helper }}
|
</ul>
|
||||||
|
{# {% endif %} #} {% if events|length > 0 %}
|
||||||
{# {% if is_granted('CHILL_EVENT_CREATE') %} #}
|
<div class="flex-table">
|
||||||
<ul class="record_actions">
|
{% for e in events %}
|
||||||
<li><a class="btn btn-create" href="{{ chill_path_add_return_path('chill_event__event_new_pickcenter') }}">{{ 'Add an event'|trans }}</a></li>
|
<div class="item-bloc">
|
||||||
</ul>
|
<div class="item-row">
|
||||||
{# {% endif %} #}
|
<div class="item-col">
|
||||||
{% if events|length > 0 %}
|
<div class="denomination h2">
|
||||||
<div class="flex-table">
|
{{ e.name }}
|
||||||
{% for e in events %}
|
|
||||||
<div class="item-bloc">
|
|
||||||
<div class="item-row">
|
|
||||||
<div class="item-col">
|
|
||||||
<div class="denomination h2">
|
|
||||||
{{ e.name }}
|
|
||||||
</div>
|
|
||||||
<p>{{ e.type.name|localize_translatable_string }}</p>
|
|
||||||
{% if e.moderator is not null %}
|
|
||||||
<p>{{ 'Moderator'|trans }}: {{ e.moderator|chill_entity_render_box }}</p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
<div class="item-col">
|
|
||||||
<div class="container" style="text-align: right;">
|
|
||||||
<p>{{ e.date|format_datetime('medium', 'medium') }}</p>
|
|
||||||
<p>{{ 'count participations to this event'|trans({'count': e.participations|length}) }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% if e.participations|length > 0 %}
|
<p>{{ e.type.name | localize_translatable_string }}</p>
|
||||||
<div class="item-row separator">
|
{% if e.moderator is not null %}
|
||||||
<strong>{{ 'Participations'|trans }} : </strong>
|
<p>
|
||||||
{% for part in e.participations|slice(0, 20) %}
|
{{ "Moderator" | trans }}:
|
||||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
{{ e.moderator | chill_entity_render_box }}
|
||||||
targetEntity: { name: 'person', id: part.person.id },
|
</p>
|
||||||
action: 'show',
|
|
||||||
displayBadge: true,
|
|
||||||
buttonText: part.person|chill_entity_render_string,
|
|
||||||
isDead: part.person.deathdate is not null
|
|
||||||
} %}
|
|
||||||
{% endfor %}
|
|
||||||
{% if e.participations|length > 20 %}
|
|
||||||
{{ 'events.and_other_count_participants'|trans({'count': e.participations|length - 20}) }}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="item-row">
|
</div>
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
{{ form_start(eventForms[e.id]) }}
|
<div class="container" style="text-align: right">
|
||||||
{{ form_widget(eventForms[e.id].person_id) }}
|
<p>{{ e.date|format_datetime('medium', 'medium') }}</p>
|
||||||
{{ form_end(eventForms[e.id]) }}
|
<p>
|
||||||
</div>
|
{{ 'count participations to this event'|trans({'count': e.participations|length}) }}
|
||||||
</div>
|
</p>
|
||||||
<div class="item-row separator">
|
|
||||||
<div class="item-col item-meta">
|
|
||||||
</div>
|
|
||||||
<div class="item-col">
|
|
||||||
<ul class="record_actions">
|
|
||||||
{% if is_granted('CHILL_EVENT_UPDATE', e) %}
|
|
||||||
<li><a href="{{ chill_path_add_return_path('chill_event__event_delete', {'event_id': e.id}) }}" class="btn btn-delete"></a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% if is_granted('CHILL_EVENT_UPDATE', e) %}
|
|
||||||
<li><a href="{{ chill_path_add_return_path('chill_event__event_edit', {'event_id': e.id}) }}" class="btn btn-edit"></a></li>
|
|
||||||
{% endif %}
|
|
||||||
<li><a href="{{ chill_path_add_return_path('chill_event__event_show', {'event_id': e.id}) }}" class="btn btn-show"></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
</div>
|
||||||
|
{% if e.participations|length > 0 %}
|
||||||
|
<div class="item-row separator">
|
||||||
|
<strong>{{ "Participations" | trans }} : </strong>
|
||||||
|
{% for part in e.participations|slice(0, 20) %} {% include
|
||||||
|
'@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||||
|
targetEntity: { name: 'person', id: part.person.id }, action:
|
||||||
|
'show', displayBadge: true, buttonText:
|
||||||
|
part.person|chill_entity_render_string, isDead:
|
||||||
|
part.person.deathdate is not null } %} {% endfor %} {% if
|
||||||
|
e.participations|length > 20 %}
|
||||||
|
{{ 'events.and_other_count_participants'|trans({'count': e.participations|length - 20}) }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="item-row">
|
||||||
|
<div class="item-col">
|
||||||
|
{{ form_start(eventForms[e.id]) }}
|
||||||
|
{{ form_widget(eventForms[e.id].person_id) }}
|
||||||
|
{{ form_end(eventForms[e.id]) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item-row separator">
|
||||||
|
<div class="item-col item-meta"></div>
|
||||||
|
<div class="item-col">
|
||||||
|
<ul class="record_actions">
|
||||||
|
{% if is_granted('CHILL_EVENT_UPDATE', e) %}
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="{{
|
||||||
|
chill_path_add_return_path(
|
||||||
|
'chill_event__event_delete',
|
||||||
|
{ event_id: e.id }
|
||||||
|
)
|
||||||
|
}}"
|
||||||
|
class="btn btn-delete"
|
||||||
|
></a>
|
||||||
|
</li>
|
||||||
|
{% endif %} {% if is_granted('CHILL_EVENT_UPDATE', e) %}
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="{{
|
||||||
|
chill_path_add_return_path(
|
||||||
|
'chill_event__event_edit',
|
||||||
|
{ event_id: e.id }
|
||||||
|
)
|
||||||
|
}}"
|
||||||
|
class="btn btn-edit"
|
||||||
|
></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="{{
|
||||||
|
chill_path_add_return_path(
|
||||||
|
'chill_event__event_show',
|
||||||
|
{ event_id: e.id }
|
||||||
|
)
|
||||||
|
}}"
|
||||||
|
class="btn btn-show"
|
||||||
|
></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
{{ chill_pagination(pagination) }}
|
{{ chill_pagination(pagination) }}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -173,10 +173,10 @@
|
|||||||
{{ form_widget(entry) }}
|
{{ form_widget(entry) }}
|
||||||
{{ form_errors(entry) }}
|
{{ form_errors(entry) }}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li data-collection-empty-explain="1">
|
<li data-collection-empty-explain="1">
|
||||||
<span class="chill-no-data-statement">{{ form.vars.empty_collection_explain|default('No item')|trans }}</span>
|
<span class="chill-no-data-statement">{{ form.vars.empty_collection_explain|default('No entities')|trans }}</span>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -23,7 +23,7 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
|
|||||||
*/
|
*/
|
||||||
class PostalCodeFRFromOpenData
|
class PostalCodeFRFromOpenData
|
||||||
{
|
{
|
||||||
private const CSV = 'https://datanova.laposte.fr/data-fair/api/v1/datasets/laposte-hexasmal/data-files/019HexaSmal.csv';
|
private const CSV = 'https://datanova.laposte.fr/data-fair/api/v1/datasets/laposte-hexasmal/metadata-attachments/base-officielle-codes-postaux.csv';
|
||||||
|
|
||||||
public function __construct(private readonly PostalCodeBaseImporter $baseImporter, private readonly HttpClientInterface $client, private readonly LoggerInterface $logger)
|
public function __construct(private readonly PostalCodeBaseImporter $baseImporter, private readonly HttpClientInterface $client, private readonly LoggerInterface $logger)
|
||||||
{
|
{
|
||||||
@ -50,7 +50,7 @@ class PostalCodeFRFromOpenData
|
|||||||
fseek($tmpfile, 0);
|
fseek($tmpfile, 0);
|
||||||
|
|
||||||
$csv = Reader::createFromStream($tmpfile);
|
$csv = Reader::createFromStream($tmpfile);
|
||||||
$csv->setDelimiter(';');
|
$csv->setDelimiter(',');
|
||||||
$csv->setHeaderOffset(0);
|
$csv->setHeaderOffset(0);
|
||||||
|
|
||||||
foreach ($csv as $offset => $record) {
|
foreach ($csv as $offset => $record) {
|
||||||
@ -65,23 +65,23 @@ class PostalCodeFRFromOpenData
|
|||||||
|
|
||||||
private function handleRecord(array $record): void
|
private function handleRecord(array $record): void
|
||||||
{
|
{
|
||||||
if ('' !== trim($record['coordonnees_geographiques'] ?? $record['coordonnees_gps'])) {
|
if ('' !== trim((string) $record['_geopoint'])) {
|
||||||
[$lat, $lon] = array_map(static fn ($el) => (float) trim($el), explode(',', $record['coordonnees_geographiques'] ?? $record['coordonnees_gps']));
|
[$lat, $lon] = array_map(static fn ($el) => (float) trim($el), explode(',', (string) $record['_geopoint']));
|
||||||
} else {
|
} else {
|
||||||
$lat = $lon = 0.0;
|
$lat = $lon = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ref = trim((string) $record['Code_commune_INSEE']);
|
$ref = trim((string) $record['code_commune_insee']);
|
||||||
|
|
||||||
if (str_starts_with($ref, '987')) {
|
if (str_starts_with($ref, '987')) {
|
||||||
// some differences in French Polynesia
|
// some differences in French Polynesia
|
||||||
$ref .= '.'.trim((string) $record['Libellé_d_acheminement']);
|
$ref .= '.'.trim((string) $record['libelle_d_acheminement']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->baseImporter->importCode(
|
$this->baseImporter->importCode(
|
||||||
'FR',
|
'FR',
|
||||||
trim((string) $record['Libellé_d_acheminement']),
|
trim((string) $record['libelle_d_acheminement']),
|
||||||
trim((string) $record['Code_postal']),
|
trim((string) $record['code_postal']),
|
||||||
$ref,
|
$ref,
|
||||||
'INSEE',
|
'INSEE',
|
||||||
$lat,
|
$lat,
|
||||||
|
@ -28,8 +28,11 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
|
|
||||||
final readonly class GeographicalUnitStatAggregator implements AggregatorInterface
|
final readonly class GeographicalUnitStatAggregator implements AggregatorInterface
|
||||||
{
|
{
|
||||||
public function __construct(private GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private TranslatableStringHelperInterface $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter)
|
public function __construct(
|
||||||
{
|
private GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository,
|
||||||
|
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
|
private RollingDateConverterInterface $rollingDateConverter
|
||||||
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
@ -43,10 +46,10 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa
|
|||||||
|
|
||||||
$qb->andWhere(
|
$qb->andWhere(
|
||||||
$qb->expr()->andX(
|
$qb->expr()->andX(
|
||||||
'acp_geog_agg_location_history.startDate <= :acp_geog_aggregator_date',
|
'acp_geog_agg_location_history.startDate <= LEAST(:acp_geog_aggregator_date, acp.closingDate)',
|
||||||
$qb->expr()->orX(
|
$qb->expr()->orX(
|
||||||
'acp_geog_agg_location_history.endDate IS NULL',
|
'acp_geog_agg_location_history.endDate IS NULL',
|
||||||
'acp_geog_agg_location_history.endDate > :acp_geog_aggregator_date'
|
'acp_geog_agg_location_history.endDate > LEAST(:acp_geog_aggregator_date, acp.closingDate)'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -58,9 +61,9 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa
|
|||||||
Join::WITH,
|
Join::WITH,
|
||||||
$qb->expr()->andX(
|
$qb->expr()->andX(
|
||||||
'IDENTITY(acp_geog_agg_address_person_location.person) = IDENTITY(acp_geog_agg_location_history.personLocation)',
|
'IDENTITY(acp_geog_agg_address_person_location.person) = IDENTITY(acp_geog_agg_location_history.personLocation)',
|
||||||
'acp_geog_agg_address_person_location.validFrom <= :acp_geog_aggregator_date',
|
'acp_geog_agg_address_person_location.validFrom <= LEAST(:acp_geog_aggregator_date, acp.closingDate)',
|
||||||
$qb->expr()->orX(
|
$qb->expr()->orX(
|
||||||
'acp_geog_agg_address_person_location.validTo > :acp_geog_aggregator_date',
|
'acp_geog_agg_address_person_location.validTo > LEAST(:acp_geog_aggregator_date, acp.closingDate)',
|
||||||
$qb->expr()->isNull('acp_geog_agg_address_person_location.validTo')
|
$qb->expr()->isNull('acp_geog_agg_address_person_location.validTo')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -33,8 +33,12 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
*/
|
*/
|
||||||
class GeographicalUnitStatFilter implements FilterInterface
|
class GeographicalUnitStatFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
public function __construct(private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter)
|
public function __construct(
|
||||||
{
|
private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository,
|
||||||
|
private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository,
|
||||||
|
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
|
private readonly RollingDateConverterInterface $rollingDateConverter
|
||||||
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRole(): ?string
|
public function addRole(): ?string
|
||||||
@ -48,18 +52,19 @@ class GeographicalUnitStatFilter implements FilterInterface
|
|||||||
'SELECT
|
'SELECT
|
||||||
1
|
1
|
||||||
FROM '.AccompanyingPeriod\AccompanyingPeriodLocationHistory::class.' acp_geog_filter_location_history
|
FROM '.AccompanyingPeriod\AccompanyingPeriodLocationHistory::class.' acp_geog_filter_location_history
|
||||||
|
JOIN acp_geog_filter_location_history.period acp_geog_filter_location_history_period
|
||||||
LEFT JOIN '.PersonHouseholdAddress::class.' acp_geog_filter_address_person_location
|
LEFT JOIN '.PersonHouseholdAddress::class.' acp_geog_filter_address_person_location
|
||||||
WITH IDENTITY(acp_geog_filter_location_history.personLocation) = IDENTITY(acp_geog_filter_address_person_location.person)
|
WITH IDENTITY(acp_geog_filter_location_history.personLocation) = IDENTITY(acp_geog_filter_address_person_location.person)
|
||||||
|
AND
|
||||||
|
(acp_geog_filter_address_person_location.validFrom < LEAST(:acp_geog_filter_date, acp_geog_filter_location_history_period.closingDate) AND (
|
||||||
|
acp_geog_filter_address_person_location.validTo IS NULL OR acp_geog_filter_address_person_location.validTo > LEAST(:acp_geog_filter_date, acp_geog_filter_location_history_period.closingDate)
|
||||||
|
))
|
||||||
LEFT JOIN '.Address::class.' acp_geog_filter_address
|
LEFT JOIN '.Address::class.' acp_geog_filter_address
|
||||||
WITH COALESCE(IDENTITY(acp_geog_filter_address_person_location.address), IDENTITY(acp_geog_filter_location_history.addressLocation)) = acp_geog_filter_address.id
|
WITH COALESCE(IDENTITY(acp_geog_filter_address_person_location.address), IDENTITY(acp_geog_filter_location_history.addressLocation)) = acp_geog_filter_address.id
|
||||||
LEFT JOIN acp_geog_filter_address.geographicalUnits acp_geog_filter_units
|
LEFT JOIN acp_geog_filter_address.geographicalUnits acp_geog_filter_units
|
||||||
WHERE
|
WHERE
|
||||||
(acp_geog_filter_location_history.startDate <= :acp_geog_filter_date AND (
|
(acp_geog_filter_location_history.startDate <= LEAST(:acp_geog_filter_date, acp_geog_filter_location_history_period.closingDate) AND (
|
||||||
acp_geog_filter_location_history.endDate IS NULL OR acp_geog_filter_location_history.endDate > :acp_geog_filter_date
|
acp_geog_filter_location_history.endDate IS NULL OR acp_geog_filter_location_history.endDate > LEAST(:acp_geog_filter_date, acp_geog_filter_location_history_period.closingDate)
|
||||||
))
|
|
||||||
AND
|
|
||||||
(acp_geog_filter_address_person_location.validFrom < :acp_geog_filter_date AND (
|
|
||||||
acp_geog_filter_address_person_location.validTo IS NULL OR acp_geog_filter_address_person_location.validTo > :acp_geog_filter_date
|
|
||||||
))
|
))
|
||||||
AND acp_geog_filter_units IN (:acp_geog_filter_units)
|
AND acp_geog_filter_units IN (:acp_geog_filter_units)
|
||||||
AND acp_geog_filter_location_history.period = acp.id
|
AND acp_geog_filter_location_history.period = acp.id
|
||||||
|
@ -12,6 +12,7 @@ declare(strict_types=1);
|
|||||||
namespace Chill\PersonBundle\Repository\AccompanyingPeriod;
|
namespace Chill\PersonBundle\Repository\AccompanyingPeriod;
|
||||||
|
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
@ -88,6 +89,7 @@ class AccompanyingPeriodWorkEvaluationRepository implements ObjectRepository
|
|||||||
->where(
|
->where(
|
||||||
$qb->expr()->andX(
|
$qb->expr()->andX(
|
||||||
$qb->expr()->isNull('e.endDate'),
|
$qb->expr()->isNull('e.endDate'),
|
||||||
|
$qb->expr()->neq('period.step', ':closed'),
|
||||||
$qb->expr()->gte(':now', $qb->expr()->diff('e.maxDate', 'e.warningInterval')),
|
$qb->expr()->gte(':now', $qb->expr()->diff('e.maxDate', 'e.warningInterval')),
|
||||||
$qb->expr()->orX(
|
$qb->expr()->orX(
|
||||||
$qb->expr()->eq('period.user', ':user'),
|
$qb->expr()->eq('period.user', ':user'),
|
||||||
@ -100,6 +102,7 @@ class AccompanyingPeriodWorkEvaluationRepository implements ObjectRepository
|
|||||||
->setParameters([
|
->setParameters([
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'now' => new \DateTimeImmutable('now'),
|
'now' => new \DateTimeImmutable('now'),
|
||||||
|
'closed' => AccompanyingPeriod::STEP_CLOSED,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $qb;
|
return $qb;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user