From 8de37a9ef3298dfeef10c9daa4c436c797889944 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 11 Apr 2024 16:45:22 +0200 Subject: [PATCH 01/16] Fix import of postal codes. URL changed + names of keys --- .../Service/Import/PostalCodeFRFromOpenData.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php b/src/Bundle/ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php index e5934af3b..c073e5bdb 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php +++ b/src/Bundle/ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php @@ -23,7 +23,7 @@ use Symfony\Contracts\HttpClient\HttpClientInterface; */ 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) { @@ -50,7 +50,7 @@ class PostalCodeFRFromOpenData fseek($tmpfile, 0); $csv = Reader::createFromStream($tmpfile); - $csv->setDelimiter(';'); + $csv->setDelimiter(','); $csv->setHeaderOffset(0); foreach ($csv as $offset => $record) { @@ -65,23 +65,23 @@ class PostalCodeFRFromOpenData private function handleRecord(array $record): void { - if ('' !== trim($record['coordonnees_geographiques'] ?? $record['coordonnees_gps'])) { - [$lat, $lon] = array_map(static fn ($el) => (float) trim($el), explode(',', $record['coordonnees_geographiques'] ?? $record['coordonnees_gps'])); + if ('' !== trim($record['_geopoint'])) { + [$lat, $lon] = array_map(static fn ($el) => (float) trim($el), explode(',', $record['_geopoint'])); } else { $lat = $lon = 0.0; } - $ref = trim((string) $record['Code_commune_INSEE']); + $ref = trim((string) $record['code_commune_insee']); if (str_starts_with($ref, '987')) { // some differences in French Polynesia - $ref .= '.'.trim((string) $record['Libellé_d_acheminement']); + $ref .= '.'.trim((string) $record['libelle_d_acheminement']); } $this->baseImporter->importCode( 'FR', - trim((string) $record['Libellé_d_acheminement']), - trim((string) $record['Code_postal']), + trim((string) $record['libelle_d_acheminement']), + trim((string) $record['code_postal']), $ref, 'INSEE', $lat, From e8b95f8491252e64050e9630998930eef3b2b419 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 11 Apr 2024 16:45:43 +0200 Subject: [PATCH 02/16] Add changie for fix import postal codes --- .changes/unreleased/Fixed-20240411-164104.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changes/unreleased/Fixed-20240411-164104.yaml diff --git a/.changes/unreleased/Fixed-20240411-164104.yaml b/.changes/unreleased/Fixed-20240411-164104.yaml new file mode 100644 index 000000000..aa63f022a --- /dev/null +++ b/.changes/unreleased/Fixed-20240411-164104.yaml @@ -0,0 +1,5 @@ +kind: Fixed +body: 'Postal codes import : fix the source URL and the keys to handle each record' +time: 2024-04-11T16:41:04.786062252+02:00 +custom: + Issue: "250" From dbb9feb12980f474698dd42a05f6a88bd73c1993 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 12 Apr 2024 12:35:52 +0200 Subject: [PATCH 03/16] rector correction: cast value to string --- .../Service/Import/PostalCodeFRFromOpenData.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php b/src/Bundle/ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php index c073e5bdb..e40b4dff9 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php +++ b/src/Bundle/ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php @@ -65,8 +65,8 @@ class PostalCodeFRFromOpenData private function handleRecord(array $record): void { - if ('' !== trim($record['_geopoint'])) { - [$lat, $lon] = array_map(static fn ($el) => (float) trim($el), explode(',', $record['_geopoint'])); + if ('' !== trim((string) $record['_geopoint'])) { + [$lat, $lon] = array_map(static fn ($el) => (float) trim($el), explode(',', (string) $record['_geopoint'])); } else { $lat = $lon = 0.0; } From 4091efc72ec308931fcb3d0d740c0895b9c6ff6e Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 12 Apr 2024 12:58:23 +0200 Subject: [PATCH 04/16] Update bundles version to 2.18.2 --- .changes/unreleased/Fixed-20240411-164104.yaml | 5 ----- .changes/v2.18.2.md | 3 +++ CHANGELOG.md | 4 ++++ 3 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 .changes/unreleased/Fixed-20240411-164104.yaml create mode 100644 .changes/v2.18.2.md diff --git a/.changes/unreleased/Fixed-20240411-164104.yaml b/.changes/unreleased/Fixed-20240411-164104.yaml deleted file mode 100644 index aa63f022a..000000000 --- a/.changes/unreleased/Fixed-20240411-164104.yaml +++ /dev/null @@ -1,5 +0,0 @@ -kind: Fixed -body: 'Postal codes import : fix the source URL and the keys to handle each record' -time: 2024-04-11T16:41:04.786062252+02:00 -custom: - Issue: "250" diff --git a/.changes/v2.18.2.md b/.changes/v2.18.2.md new file mode 100644 index 000000000..42eff9e25 --- /dev/null +++ b/.changes/v2.18.2.md @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c0a6b008..ae9407c8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## 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) From 8516e89c9cac8b8be16a581ef9a55bafef03e9d7 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 17 Apr 2024 16:16:56 +0200 Subject: [PATCH 05/16] update docs to include import of countries which is necessary to be able to import addresses --- docs/source/installation/load-addresses.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/source/installation/load-addresses.rst b/docs/source/installation/load-addresses.rst index 779032fd0..85c29d618 100644 --- a/docs/source/installation/load-addresses.rst +++ b/docs/source/installation/load-addresses.rst @@ -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 ========= From ab6feef371eda7885bd6ab80967389fb754303ef Mon Sep 17 00:00:00 2001 From: juminet Date: Thu, 18 Apr 2024 07:37:05 +0000 Subject: [PATCH 06/16] Do not display evaluation from closed accompanying period on homepage --- .changes/unreleased/Fixed-20240416-161817.yaml | 6 ++++++ .../AccompanyingPeriodWorkEvaluationRepository.php | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 .changes/unreleased/Fixed-20240416-161817.yaml diff --git a/.changes/unreleased/Fixed-20240416-161817.yaml b/.changes/unreleased/Fixed-20240416-161817.yaml new file mode 100644 index 000000000..6884c11fe --- /dev/null +++ b/.changes/unreleased/Fixed-20240416-161817.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Fix broken link in homepage when a evaluation from a closed acc period was present + in the homepage widget +time: 2024-04-16T16:18:17.888645172+02:00 +custom: + Issue: "270" diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationRepository.php index 9c6ed19fc..6110f8bb0 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationRepository.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Repository\AccompanyingPeriod; use Chill\MainBundle\Entity\User; +use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork; use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation; use Doctrine\ORM\EntityManagerInterface; @@ -88,6 +89,7 @@ class AccompanyingPeriodWorkEvaluationRepository implements ObjectRepository ->where( $qb->expr()->andX( $qb->expr()->isNull('e.endDate'), + $qb->expr()->neq('period.step', ':closed'), $qb->expr()->gte(':now', $qb->expr()->diff('e.maxDate', 'e.warningInterval')), $qb->expr()->orX( $qb->expr()->eq('period.user', ':user'), @@ -100,6 +102,7 @@ class AccompanyingPeriodWorkEvaluationRepository implements ObjectRepository ->setParameters([ 'user' => $user, 'now' => new \DateTimeImmutable('now'), + 'closed' => AccompanyingPeriod::STEP_CLOSED, ]); return $qb; From 3e2ff463bce58bd0603f3bb3859ad01227e3f141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 26 Apr 2024 13:47:25 +0200 Subject: [PATCH 07/16] make the script which subscribe to user calendars on ms-graph more tolerant to errors The script does not fails and exit when some calendar settings are not reachable --- .changes/unreleased/Feature-20240426-134831.yaml | 6 ++++++ .../Command/MapAndSubscribeUserCalendarCommand.php | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .changes/unreleased/Feature-20240426-134831.yaml diff --git a/.changes/unreleased/Feature-20240426-134831.yaml b/.changes/unreleased/Feature-20240426-134831.yaml new file mode 100644 index 000000000..00952fe57 --- /dev/null +++ b/.changes/unreleased/Feature-20240426-134831.yaml @@ -0,0 +1,6 @@ +kind: Feature +body: Make the script which subscribe to microsoft calendars changes more tolerant + to errors or missing configuration on the microsoft side +time: 2024-04-26T13:48:31.476415017+02:00 +custom: + Issue: "197" diff --git a/src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php b/src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php index 4964f0064..177fd2375 100644 --- a/src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php +++ b/src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php @@ -49,8 +49,6 @@ final class MapAndSubscribeUserCalendarCommand extends Command $limit = 50; $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'))); $users = $this->userRepository->findAllAsArray('fr'); $created = 0; @@ -93,7 +91,6 @@ final class MapAndSubscribeUserCalendarCommand extends Command } catch (UserAbsenceSyncException $e) { $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())); - throw $e; } // we first try to renew an existing subscription, if any. From c773f9c6db31542685f409475182168e9ba607ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 29 Apr 2024 11:39:46 +0200 Subject: [PATCH 08/16] Update geographical unit filter for period's location The geographical unit filter in the accompanying course filters now takes the period's location on the address into account. This enhancement was achieved by modifying the GeographicalUnitStatFilter class. As a result, the "filter accompanying period by geographical unit" option provides more accurate data. --- .changes/unreleased/Fixed-20240429-113804.yaml | 6 ++++++ .../GeographicalUnitStatFilter.php | 16 ++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 .changes/unreleased/Fixed-20240429-113804.yaml diff --git a/.changes/unreleased/Fixed-20240429-113804.yaml b/.changes/unreleased/Fixed-20240429-113804.yaml new file mode 100644 index 000000000..0fa696901 --- /dev/null +++ b/.changes/unreleased/Fixed-20240429-113804.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Allow the filter "filter accompanying period by geographical unit" to take period's + location on address into account +time: 2024-04-29T11:38:04.966027861+02:00 +custom: + Issue: "275" diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php index ce193e1a4..7d0980dad 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php @@ -33,8 +33,12 @@ use Symfony\Component\Form\FormBuilderInterface; */ 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 @@ -50,6 +54,10 @@ class GeographicalUnitStatFilter implements FilterInterface FROM '.AccompanyingPeriod\AccompanyingPeriodLocationHistory::class.' acp_geog_filter_location_history 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) + 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 + )) 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 LEFT JOIN acp_geog_filter_address.geographicalUnits acp_geog_filter_units @@ -57,10 +65,6 @@ class GeographicalUnitStatFilter implements FilterInterface (acp_geog_filter_location_history.startDate <= :acp_geog_filter_date AND ( acp_geog_filter_location_history.endDate IS NULL OR acp_geog_filter_location_history.endDate > :acp_geog_filter_date )) - 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_location_history.period = acp.id '; From 89c231de41a1ad13a04663599bb20bd21539446c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 29 Apr 2024 13:03:22 +0200 Subject: [PATCH 09/16] Update geographical unit computation for closed periods in exports The geographical unit computation in the ChillPersonBundle now considers the closing date of an accompanying period when a person changes location. This provides more accurate statistics, especially in situations where the individual moved after the period closed. The changes also include refinements for the validFrom and validTo data within the AccompanyingCourseFilters and AccompanyingCourseAggregators. --- .changes/unreleased/Feature-20240429-130102.yaml | 7 +++++++ .../GeographicalUnitStatAggregator.php | 15 +++++++++------ .../GeographicalUnitStatFilter.php | 9 +++++---- 3 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 .changes/unreleased/Feature-20240429-130102.yaml diff --git a/.changes/unreleased/Feature-20240429-130102.yaml b/.changes/unreleased/Feature-20240429-130102.yaml new file mode 100644 index 000000000..e07dcb40e --- /dev/null +++ b/.changes/unreleased/Feature-20240429-130102.yaml @@ -0,0 +1,7 @@ +kind: Feature +body: '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.' +time: 2024-04-29T13:01:02.463796452+02:00 +custom: + Issue: "276" diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php index 2d6dbeae4..0a861d64c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php @@ -28,8 +28,11 @@ use Symfony\Component\Form\FormBuilderInterface; 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 @@ -43,10 +46,10 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa $qb->andWhere( $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( '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, $qb->expr()->andX( '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( - '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') ) ) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php index 7d0980dad..d84745403 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php @@ -52,18 +52,19 @@ class GeographicalUnitStatFilter implements FilterInterface 'SELECT 1 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 WITH IDENTITY(acp_geog_filter_location_history.personLocation) = IDENTITY(acp_geog_filter_address_person_location.person) 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 + (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 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 WHERE - (acp_geog_filter_location_history.startDate <= :acp_geog_filter_date 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.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 > LEAST(:acp_geog_filter_date, acp_geog_filter_location_history_period.closingDate) )) AND acp_geog_filter_units IN (:acp_geog_filter_units) AND acp_geog_filter_location_history.period = acp.id From 536c2622c79a8e38e075f61b6c689b001fafe10c Mon Sep 17 00:00:00 2001 From: Ronchie Blondiau Date: Tue, 7 May 2024 14:30:16 +0000 Subject: [PATCH 10/16] 239 - doc generation form added to top of doc list page when more than 5 documents --- .changes/unreleased/UX-20240507-160217.yaml | 5 + .../accompanying_period_list.html.twig | 108 +++++++++------- .../views/GenericDoc/person_list.html.twig | 122 +++++++++--------- 3 files changed, 122 insertions(+), 113 deletions(-) create mode 100644 .changes/unreleased/UX-20240507-160217.yaml diff --git a/.changes/unreleased/UX-20240507-160217.yaml b/.changes/unreleased/UX-20240507-160217.yaml new file mode 100644 index 000000000..f74a2f2ef --- /dev/null +++ b/.changes/unreleased/UX-20240507-160217.yaml @@ -0,0 +1,5 @@ +kind: UX +body: Form for document generation moved to the top of document list page +time: 2024-05-07T16:02:17.11820977+02:00 +custom: + Issue: "" diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/accompanying_period_list.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/accompanying_period_list.html.twig index b22c7d00f..46b08f37d 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/accompanying_period_list.html.twig +++ b/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/accompanying_period_list.html.twig @@ -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 %} +
+

{{ "Documents" }}

-{% 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 %} -
-

{{ 'Documents' }}

- - {{ filter|chill_render_filter_order_helper }} - - {% if documents|length == 0 %} -

{{ 'No documents'|trans }}

- {% else %} -
- {% for document in documents %} - {{ document|chill_generic_doc_render }} - {% endfor %} -
- {% endif %} - - {{ chill_pagination(pagination) }} - -
- - {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_CREATE', accompanyingCourse) %} - - {% endif %} + {{ filter | chill_render_filter_order_helper }} + {% if documents|length > 5 %} +
+ {% endif %} {% if documents|length == 0 %} +

{{ "No documents" | trans }}

+ {% else %} +
+ {% for document in documents %} + {{ document | chill_generic_doc_render }} + {% endfor %}
+ {% endif %} + + {{ chill_pagination(pagination) }} + +
+ + {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_CREATE', + accompanyingCourse) %} + + {% endif %} +
{% endblock %} diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/person_list.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/person_list.html.twig index a4aa4fbbc..5bc9f42d1 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/person_list.html.twig +++ b/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/person_list.html.twig @@ -1,74 +1,70 @@ -{# - * Copyright (C) 2018, Champs Libres Cooperative SCRLFS, - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . -#} - -{% extends "@ChillPerson/Person/layout.html.twig" %} - -{% set activeRouteKey = '' %} - -{% import "@ChillDocStore/Macro/macro.html.twig" as m %} - -{% block title %} - {{ '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 %} +{# * Copyright (C) 2018, Champs Libres Cooperative SCRLFS, + * * This program is free software: you can +redistribute it and/or modify * it under the terms of the GNU Affero General +Public License as * published by the Free Software Foundation, either version 3 +of the * License, or (at your option) any later version. * * This program is +distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; +without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the * GNU Affero General Public License for more +details. * * You should have received a copy of the GNU Affero General Public +License * along with this program. If not, see . +#} {% extends "@ChillPerson/Person/layout.html.twig" %} {% set activeRouteKey = +'' %} {% import "@ChillDocStore/Macro/macro.html.twig" as m %} {% block title %} +{{ '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 %}
-

{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}

+

+ {{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }} +

- {{ filter|chill_render_filter_order_helper }} + {{ filter | chill_render_filter_order_helper }} - {% if documents|length == 0 %} -

{{ 'No documents'|trans }}

+ {% if documents|length > 5 %} +
+ {% endif %} {% if documents|length == 0 %} +

{{ "No documents" | trans }}

{% else %} -
- {% for document in documents %} - {{ document|chill_generic_doc_render }} - {% endfor %} -
+
+ {% for document in documents %} + {{ document | chill_generic_doc_render }} + {% endfor %} +
{% endif %} - {{ chill_pagination(pagination) }} + {{ chill_pagination(pagination) }} -
- - {% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %} - - {% endif %} +
+ {% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %} + + {% endif %}
{% endblock %} From 46c647cbb77ebeef220ec5463a5183213a298a22 Mon Sep 17 00:00:00 2001 From: rblondiau Date: Thu, 25 Apr 2024 10:39:56 +0200 Subject: [PATCH 11/16] fixed events width --- .../Resources/views/Event/new.html.twig | 34 ++- .../Resources/views/Event/page_list.html.twig | 196 ++++++++++-------- 2 files changed, 131 insertions(+), 99 deletions(-) diff --git a/src/Bundle/ChillEventBundle/Resources/views/Event/new.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Event/new.html.twig index 12ea8f246..6412c94a5 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Event/new.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Event/new.html.twig @@ -1,18 +1,11 @@ -{% extends '@ChillEvent/layout.html.twig' %} - -{% block js %} - {{ encore_entry_script_tags('mod_async_upload') }} -{% endblock %} - -{% block css %} - {{ encore_entry_link_tags('mod_async_upload') }} -{% endblock %} - -{% block title 'Event creation'|trans %} - -{% block event_content -%} +{% extends '@ChillEvent/layout.html.twig' %} {% block js %} +{{ encore_entry_script_tags("mod_async_upload") }} +{% endblock %} {% block css %} +{{ encore_entry_link_tags("mod_async_upload") }} +{% endblock %} {% block title 'Event creation'|trans %} {% block event_content +-%}
-

{{ 'Event creation'|trans }}

+

{{ "Event creation" | trans }}

{{ form_start(form) }} {{ form_errors(form) }} @@ -20,7 +13,7 @@ {{ form_row(form.name) }} {{ 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.location) }} {{ form_row(form.organizationCost) }} @@ -30,12 +23,17 @@ diff --git a/src/Bundle/ChillEventBundle/Resources/views/Event/page_list.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Event/page_list.html.twig index f22b56c05..bb1ffa24e 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Event/page_list.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Event/page_list.html.twig @@ -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 %} +
+

{{ block("title") }}

-{% block title 'Events'|trans %} + {{ filter | chill_render_filter_order_helper }} -{% block js %} - {{ parent() }} - {{ encore_entry_script_tags('mod_pickentity_type') }} -{% endblock %} - -{% block css %} - {{ parent() }} - {{ encore_entry_link_tags('mod_pickentity_type') }} -{% endblock %} - -{% block content %} -

{{ block('title') }}

- - {{ filter|chill_render_filter_order_helper }} - -{# {% if is_granted('CHILL_EVENT_CREATE') %} #} - - {# {% endif %} #} - {% if events|length > 0 %} -
- {% for e in events %} -
-
-
-
- {{ e.name }} -
-

{{ e.type.name|localize_translatable_string }}

- {% if e.moderator is not null %} -

{{ 'Moderator'|trans }}: {{ e.moderator|chill_entity_render_box }}

- {% endif %} -
-
-
-

{{ e.date|format_datetime('medium', 'medium') }}

-

{{ 'count participations to this event'|trans({'count': e.participations|length}) }}

-
-
+ {# {% if is_granted('CHILL_EVENT_CREATE') %} #} + + {# {% endif %} #} {% if events|length > 0 %} +
+ {% for e in events %} +
+
+
+
+ {{ e.name }}
- {% if e.participations|length > 0 %} -
- {{ 'Participations'|trans }} : - {% 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 %} -
+

{{ e.type.name | localize_translatable_string }}

+ {% if e.moderator is not null %} +

+ {{ "Moderator" | trans }}: + {{ e.moderator | chill_entity_render_box }} +

{% endif %} -
-
- {{ form_start(eventForms[e.id]) }} - {{ form_widget(eventForms[e.id].person_id) }} - {{ form_end(eventForms[e.id]) }} -
-
-
-
-
-
-
    - {% if is_granted('CHILL_EVENT_UPDATE', e) %} -
  • - {% endif %} - {% if is_granted('CHILL_EVENT_UPDATE', e) %} -
  • - {% endif %} -
  • -
-
+
+
+
+

{{ e.date|format_datetime('medium', 'medium') }}

+

+ {{ 'count participations to this event'|trans({'count': e.participations|length}) }} +

- {% endfor %} +
+ {% if e.participations|length > 0 %} +
+ {{ "Participations" | trans }} : + {% 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 %} +
+ {% endif %} +
+
+ {{ form_start(eventForms[e.id]) }} + {{ form_widget(eventForms[e.id].person_id) }} + {{ form_end(eventForms[e.id]) }} +
+
+
+
+
+
    + {% if is_granted('CHILL_EVENT_UPDATE', e) %} +
  • + +
  • + {% endif %} {% if is_granted('CHILL_EVENT_UPDATE', e) %} +
  • + +
  • + {% endif %} +
  • + +
  • +
+
+
+ {% endfor %} +
{% endif %} +
- {{ chill_pagination(pagination) }} +{{ chill_pagination(pagination) }} {% endblock %} From d50d067bf79df4812a121c87647d3fe505108b3d Mon Sep 17 00:00:00 2001 From: rblondiau Date: Thu, 25 Apr 2024 12:51:20 +0200 Subject: [PATCH 12/16] added button for moderators and fixed participant styling --- .../ChillEventBundle/Form/EventType.php | 14 ++++------ .../Resources/views/Event/edit.html.twig | 28 +++++++++++++------ .../Resources/views/Event/new.html.twig | 6 ++-- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src/Bundle/ChillEventBundle/Form/EventType.php b/src/Bundle/ChillEventBundle/Form/EventType.php index fe64ef12b..3363079fa 100644 --- a/src/Bundle/ChillEventBundle/Form/EventType.php +++ b/src/Bundle/ChillEventBundle/Form/EventType.php @@ -18,6 +18,7 @@ use Chill\MainBundle\Entity\Center; use Chill\MainBundle\Form\Type\ChillCollectionType; use Chill\MainBundle\Form\Type\ChillDateTimeType; use Chill\MainBundle\Form\Type\CommentType; +use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Form\Type\PickUserLocationType; use Chill\MainBundle\Form\Type\ScopePickerType; use Chill\MainBundle\Form\Type\UserPickerType; @@ -45,14 +46,9 @@ class EventType extends AbstractType 'class' => '', ], ]) - ->add('moderator', UserPickerType::class, [ - 'center' => $options['center'], - 'role' => $options['role'], - 'placeholder' => 'Pick a moderator', - 'attr' => [ - 'class' => '', - ], - 'required' => false, + ->add('moderator', PickUserDynamicType::class, [ + 'label' => 'Pick a moderator', + ]) ->add('location', PickUserLocationType::class, [ 'label' => 'event.fields.location', @@ -68,7 +64,7 @@ class EventType extends AbstractType ], 'allow_add' => true, 'allow_delete' => true, - 'delete_empty' => fn (StoredObject $storedObject): bool => '' === $storedObject->getFilename(), + 'delete_empty' => fn(StoredObject $storedObject): bool => '' === $storedObject->getFilename(), 'button_remove_label' => 'event.form.remove_document', 'button_add_label' => 'event.form.add_document', ]) diff --git a/src/Bundle/ChillEventBundle/Resources/views/Event/edit.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Event/edit.html.twig index fc4001c63..b6b11878b 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Event/edit.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Event/edit.html.twig @@ -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 -%}
-

{{ 'Event edit'|trans }}

+

{{ "Event edit" | trans }}

{{ form_start(edit_form) }} {{ form_errors(edit_form) }} @@ -12,7 +16,7 @@ {{ form_row(edit_form.name) }} {{ 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.location) }} {{ form_row(edit_form.organizationCost) }} @@ -22,16 +26,22 @@ {{ form_end(edit_form) }} -
{% endblock %} diff --git a/src/Bundle/ChillEventBundle/Resources/views/Event/new.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Event/new.html.twig index 6412c94a5..0fb69a4ea 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Event/new.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Event/new.html.twig @@ -1,7 +1,11 @@ {% extends '@ChillEvent/layout.html.twig' %} {% block js %} {{ encore_entry_script_tags("mod_async_upload") }} +{{ encore_entry_script_tags("mod_pickentity_type") }} + {% endblock %} {% block css %} {{ encore_entry_link_tags("mod_async_upload") }} +{{ encore_entry_link_tags("mod_pickentity_type") }} + {% endblock %} {% block title 'Event creation'|trans %} {% block event_content -%}
@@ -12,12 +16,10 @@ {{ form_row(form.circle) }} {{ form_row(form.name) }} {{ form_row(form.date) }} - {{ form_row(form.type, { label: "Event type" }) }} {{ form_row(form.moderator) }} {{ form_row(form.location) }} {{ form_row(form.organizationCost) }} - {{ form_row(form.comment) }} {{ form_row(form.documents) }} From 651c455bdf7c52f4639473b0c5019192d632e68f Mon Sep 17 00:00:00 2001 From: rblondiau Date: Thu, 25 Apr 2024 15:05:11 +0200 Subject: [PATCH 13/16] added translation for No item --- src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml b/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml index ffabdaa59..0bfe2b64c 100644 --- a/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml @@ -13,13 +13,14 @@ Update document: Modifier le document Edit attributes: Modifier les propriétés du document Existing document: Document existant No document to download: Aucun document à télécharger -'Choose a document category': Choisissez une catégorie de document +"Choose a document category": Choisissez une catégorie de document No document found: Aucun document trouvé The document is successfully registered: Le document est enregistré The document is successfully updated: Le document est mis à jour Any description: Aucune description Document from person %name%: Document de l'usager %name% See the document: Voir le document +No item: Aucun document document: Any title: Aucun titre @@ -36,7 +37,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 ? The document is successfully removed: Le document a été supprimé - # dropzone upload File too big: Fichier trop volumineux Drop your file or click here: Cliquez ici ou faites glissez votre nouveau fichier dans cette zone From f7f7e1cb1d905b4f5fa6d9bfbc8d72060a6a1f22 Mon Sep 17 00:00:00 2001 From: rblondiau Date: Thu, 25 Apr 2024 15:44:29 +0200 Subject: [PATCH 14/16] updated translation by changing translation in twig --- src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml | 1 - .../ChillMainBundle/Resources/views/Form/fields.html.twig | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml b/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml index 0bfe2b64c..c16c161bc 100644 --- a/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml @@ -20,7 +20,6 @@ The document is successfully updated: Le document est mis à jour Any description: Aucune description Document from person %name%: Document de l'usager %name% See the document: Voir le document -No item: Aucun document document: Any title: Aucun titre diff --git a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig index 9c60028ad..1d0764980 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig @@ -173,10 +173,10 @@ {{ form_widget(entry) }} {{ form_errors(entry) }}
- + {% else %}
  • - {{ form.vars.empty_collection_explain|default('No item')|trans }} + {{ form.vars.empty_collection_explain|default('No entities')|trans }}
  • {% endfor %} From 30955752c34ac3b2586bed9fef5a03eda19db509 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 8 May 2024 10:28:14 +0200 Subject: [PATCH 15/16] fix pipeline and add changie --- .changes/unreleased/UX-20240508-102757.yaml | 5 +++++ src/Bundle/ChillEventBundle/Form/EventType.php | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .changes/unreleased/UX-20240508-102757.yaml diff --git a/.changes/unreleased/UX-20240508-102757.yaml b/.changes/unreleased/UX-20240508-102757.yaml new file mode 100644 index 000000000..8ba540e2d --- /dev/null +++ b/.changes/unreleased/UX-20240508-102757.yaml @@ -0,0 +1,5 @@ +kind: UX +body: Adjust certain graphical issues for better user experience +time: 2024-05-08T10:27:57.220873296+02:00 +custom: + Issue: "266" diff --git a/src/Bundle/ChillEventBundle/Form/EventType.php b/src/Bundle/ChillEventBundle/Form/EventType.php index 3363079fa..98cb5ea5e 100644 --- a/src/Bundle/ChillEventBundle/Form/EventType.php +++ b/src/Bundle/ChillEventBundle/Form/EventType.php @@ -21,7 +21,6 @@ use Chill\MainBundle\Form\Type\CommentType; use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Form\Type\PickUserLocationType; use Chill\MainBundle\Form\Type\ScopePickerType; -use Chill\MainBundle\Form\Type\UserPickerType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\MoneyType; use Symfony\Component\Form\FormBuilderInterface; @@ -48,7 +47,6 @@ class EventType extends AbstractType ]) ->add('moderator', PickUserDynamicType::class, [ 'label' => 'Pick a moderator', - ]) ->add('location', PickUserLocationType::class, [ 'label' => 'event.fields.location', @@ -64,7 +62,7 @@ class EventType extends AbstractType ], 'allow_add' => true, 'allow_delete' => true, - 'delete_empty' => fn(StoredObject $storedObject): bool => '' === $storedObject->getFilename(), + 'delete_empty' => fn (StoredObject $storedObject): bool => '' === $storedObject->getFilename(), 'button_remove_label' => 'event.form.remove_document', 'button_add_label' => 'event.form.add_document', ]) From 20291026fb94de1ab535db8dd458cbc49d0be440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 14 May 2024 16:05:23 +0200 Subject: [PATCH 16/16] release 2.19.0 --- .../unreleased/Feature-20240426-134831.yaml | 6 ------ .../unreleased/Feature-20240429-130102.yaml | 7 ------- .../unreleased/Fixed-20240416-161817.yaml | 6 ------ .../unreleased/Fixed-20240429-113804.yaml | 6 ------ .changes/unreleased/UX-20240507-160217.yaml | 5 ----- .changes/unreleased/UX-20240508-102757.yaml | 5 ----- .changes/v2.19.0.md | 20 ++++++++++++++++++ CHANGELOG.md | 21 +++++++++++++++++++ 8 files changed, 41 insertions(+), 35 deletions(-) delete mode 100644 .changes/unreleased/Feature-20240426-134831.yaml delete mode 100644 .changes/unreleased/Feature-20240429-130102.yaml delete mode 100644 .changes/unreleased/Fixed-20240416-161817.yaml delete mode 100644 .changes/unreleased/Fixed-20240429-113804.yaml delete mode 100644 .changes/unreleased/UX-20240507-160217.yaml delete mode 100644 .changes/unreleased/UX-20240508-102757.yaml create mode 100644 .changes/v2.19.0.md diff --git a/.changes/unreleased/Feature-20240426-134831.yaml b/.changes/unreleased/Feature-20240426-134831.yaml deleted file mode 100644 index 00952fe57..000000000 --- a/.changes/unreleased/Feature-20240426-134831.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Feature -body: Make the script which subscribe to microsoft calendars changes more tolerant - to errors or missing configuration on the microsoft side -time: 2024-04-26T13:48:31.476415017+02:00 -custom: - Issue: "197" diff --git a/.changes/unreleased/Feature-20240429-130102.yaml b/.changes/unreleased/Feature-20240429-130102.yaml deleted file mode 100644 index e07dcb40e..000000000 --- a/.changes/unreleased/Feature-20240429-130102.yaml +++ /dev/null @@ -1,7 +0,0 @@ -kind: Feature -body: '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.' -time: 2024-04-29T13:01:02.463796452+02:00 -custom: - Issue: "276" diff --git a/.changes/unreleased/Fixed-20240416-161817.yaml b/.changes/unreleased/Fixed-20240416-161817.yaml deleted file mode 100644 index 6884c11fe..000000000 --- a/.changes/unreleased/Fixed-20240416-161817.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Fixed -body: Fix broken link in homepage when a evaluation from a closed acc period was present - in the homepage widget -time: 2024-04-16T16:18:17.888645172+02:00 -custom: - Issue: "270" diff --git a/.changes/unreleased/Fixed-20240429-113804.yaml b/.changes/unreleased/Fixed-20240429-113804.yaml deleted file mode 100644 index 0fa696901..000000000 --- a/.changes/unreleased/Fixed-20240429-113804.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Fixed -body: Allow the filter "filter accompanying period by geographical unit" to take period's - location on address into account -time: 2024-04-29T11:38:04.966027861+02:00 -custom: - Issue: "275" diff --git a/.changes/unreleased/UX-20240507-160217.yaml b/.changes/unreleased/UX-20240507-160217.yaml deleted file mode 100644 index f74a2f2ef..000000000 --- a/.changes/unreleased/UX-20240507-160217.yaml +++ /dev/null @@ -1,5 +0,0 @@ -kind: UX -body: Form for document generation moved to the top of document list page -time: 2024-05-07T16:02:17.11820977+02:00 -custom: - Issue: "" diff --git a/.changes/unreleased/UX-20240508-102757.yaml b/.changes/unreleased/UX-20240508-102757.yaml deleted file mode 100644 index 8ba540e2d..000000000 --- a/.changes/unreleased/UX-20240508-102757.yaml +++ /dev/null @@ -1,5 +0,0 @@ -kind: UX -body: Adjust certain graphical issues for better user experience -time: 2024-05-08T10:27:57.220873296+02:00 -custom: - Issue: "266" diff --git a/.changes/v2.19.0.md b/.changes/v2.19.0.md new file mode 100644 index 000000000..6b24baa6a --- /dev/null +++ b/.changes/v2.19.0.md @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index ae9407c8a..9b2f5e2e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,27 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), 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