From 7ed10efcd1af82092dcaa0d7ec4ebeefd1c8322d Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 24 Feb 2025 13:49:33 +0100 Subject: [PATCH 01/26] Fix declaration of variables for dynamic picker --- .../Resources/public/module/pick-entity/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js b/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js index b8fbf2022..d887a6870 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js @@ -12,6 +12,10 @@ function loadDynamicPicker(element) { let apps = element.querySelectorAll('[data-module="pick-dynamic"]'); apps.forEach(function (el) { + let suggested; + let as_id; + let submit_on_adding_new_entity; + let label; const isMultiple = parseInt(el.dataset.multiple) === 1, uniqId = el.dataset.uniqid, input = element.querySelector( From be901822bccc2dd80ae3d85dcfcb84e12d8ee621 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 27 Feb 2025 11:26:25 +0100 Subject: [PATCH 02/26] Update chill version to v3.9.0 --- .changes/unreleased/DX-20250131-131801.yaml | 6 ------ .changes/unreleased/Feature-20250130-120207.yaml | 6 ------ .changes/unreleased/Feature-20250130-120459.yaml | 6 ------ .changes/unreleased/Feature-20250214-150328.yaml | 6 ------ .changes/unreleased/Feature-20250219-120928.yaml | 6 ------ .changes/unreleased/Fixed-20250214-121010.yaml | 6 ------ .changes/v3.9.0.md | 10 ++++++++++ CHANGELOG.md | 11 +++++++++++ 8 files changed, 21 insertions(+), 36 deletions(-) delete mode 100644 .changes/unreleased/DX-20250131-131801.yaml delete mode 100644 .changes/unreleased/Feature-20250130-120207.yaml delete mode 100644 .changes/unreleased/Feature-20250130-120459.yaml delete mode 100644 .changes/unreleased/Feature-20250214-150328.yaml delete mode 100644 .changes/unreleased/Feature-20250219-120928.yaml delete mode 100644 .changes/unreleased/Fixed-20250214-121010.yaml create mode 100644 .changes/v3.9.0.md diff --git a/.changes/unreleased/DX-20250131-131801.yaml b/.changes/unreleased/DX-20250131-131801.yaml deleted file mode 100644 index 387f48054..000000000 --- a/.changes/unreleased/DX-20250131-131801.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: DX -body: Create an unique source of trust for translations -time: 2025-01-31T13:18:01.239211506+01:00 -custom: - Issue: "333" - SchemaChange: No schema change diff --git a/.changes/unreleased/Feature-20250130-120207.yaml b/.changes/unreleased/Feature-20250130-120207.yaml deleted file mode 100644 index c707205ad..000000000 --- a/.changes/unreleased/Feature-20250130-120207.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Feature -body: Suggest all referrers within actions of the accompanying period when creating an activity -time: 2025-01-30T12:02:07.053587034+01:00 -custom: - Issue: "349" - SchemaChange: No schema change diff --git a/.changes/unreleased/Feature-20250130-120459.yaml b/.changes/unreleased/Feature-20250130-120459.yaml deleted file mode 100644 index 0e348a9e6..000000000 --- a/.changes/unreleased/Feature-20250130-120459.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Feature -body: Add possibility to export a csv with all social issues and social actions -time: 2025-01-30T12:04:59.754998541+01:00 -custom: - Issue: "343" - SchemaChange: No schema change diff --git a/.changes/unreleased/Feature-20250214-150328.yaml b/.changes/unreleased/Feature-20250214-150328.yaml deleted file mode 100644 index 9ca416984..000000000 --- a/.changes/unreleased/Feature-20250214-150328.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Feature -body: Restore document to previous kept version when a workflow is canceled -time: 2025-02-14T15:03:28.707250207+01:00 -custom: - Issue: "360" - SchemaChange: No schema change diff --git a/.changes/unreleased/Feature-20250219-120928.yaml b/.changes/unreleased/Feature-20250219-120928.yaml deleted file mode 100644 index 3c4f000e4..000000000 --- a/.changes/unreleased/Feature-20250219-120928.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Feature -body: Add a list of third parties from within the admin (csv download) -time: 2025-02-19T12:09:28.487991703+01:00 -custom: - Issue: "341" - SchemaChange: No schema change diff --git a/.changes/unreleased/Fixed-20250214-121010.yaml b/.changes/unreleased/Fixed-20250214-121010.yaml deleted file mode 100644 index d7000c11c..000000000 --- a/.changes/unreleased/Fixed-20250214-121010.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Fixed -body: fix generation of document with accompanying period context, and list of activities and works -time: 2025-02-14T12:10:10.920355454+01:00 -custom: - Issue: "" - SchemaChange: No schema change diff --git a/.changes/v3.9.0.md b/.changes/v3.9.0.md new file mode 100644 index 000000000..7cc6a7f9f --- /dev/null +++ b/.changes/v3.9.0.md @@ -0,0 +1,10 @@ +## v3.9.0 - 2025-02-27 +### Feature +* ([#349](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/349)) Suggest all referrers within actions of the accompanying period when creating an activity +* ([#343](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/343)) Add possibility to export a csv with all social issues and social actions +* ([#360](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/360)) Restore document to previous kept version when a workflow is canceled +* ([#341](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/341)) Add a list of third parties from within the admin (csv download) +### Fixed +* fix generation of document with accompanying period context, and list of activities and works +### DX +* ([#333](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/333)) Create an unique source of trust for translations diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b3635b2f..477d99c11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,17 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## v3.9.0 - 2025-02-27 +### Feature +* ([#349](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/349)) Suggest all referrers within actions of the accompanying period when creating an activity +* ([#343](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/343)) Add possibility to export a csv with all social issues and social actions +* ([#360](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/360)) Restore document to previous kept version when a workflow is canceled +* ([#341](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/341)) Add a list of third parties from within the admin (csv download) +### Fixed +* fix generation of document with accompanying period context, and list of activities and works +### DX +* ([#333](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/333)) Create an unique source of trust for translations + ## v3.8.2 - 2025-02-10 ### Fixed * ([#358](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/358)) Remove "filter" button on list of documents in the workflow's "add attachement" modal From 217ac7b9e786372c434449eb04cb2eafc2909e9e Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 27 Feb 2025 11:54:48 +0100 Subject: [PATCH 03/26] Linter fixes --- .../Resources/public/module/pick-entity/index.js | 10 +++++----- .../Component/PickGenericDocItem.vue | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js b/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js index d887a6870..6f6aad7ff 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js @@ -27,10 +27,10 @@ function loadDynamicPicker(element) { : input.value === "[]" || input.value === "" ? null : [JSON.parse(input.value)]; - (suggested = JSON.parse(el.dataset.suggested)), - (as_id = parseInt(el.dataset.asId) === 1), - (submit_on_adding_new_entity = - parseInt(el.dataset.submitOnAddingNewEntity) === 1); + suggested = JSON.parse(el.dataset.suggested); + as_id = parseInt(el.dataset.asId) === 1; + submit_on_adding_new_entity = + parseInt(el.dataset.submitOnAddingNewEntity) === 1; label = el.dataset.label; if (!isMultiple) { @@ -177,7 +177,7 @@ document.addEventListener("pick-entity-type-action", function (e) { } }); -document.addEventListener("DOMContentLoaded", function (e) { +document.addEventListener("DOMContentLoaded", function () { loadDynamicPicker(document); }); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDocItem.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDocItem.vue index 2e1cf6d04..e8e35573c 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDocItem.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/WorkflowAttachment/Component/PickGenericDocItem.vue @@ -70,8 +70,7 @@ const clickOnAddButton = () => { diff --git a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/SocialIssuesAcc/CheckSocialAction.vue b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/SocialIssuesAcc/CheckSocialAction.vue index 0d5a6bbf4..8172b2b6f 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/SocialIssuesAcc/CheckSocialAction.vue +++ b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/SocialIssuesAcc/CheckSocialAction.vue @@ -10,7 +10,9 @@ :value="action" /> @@ -43,5 +45,9 @@ span.badge { font-size: 95%; margin-bottom: 5px; margin-right: 1em; + max-width: 100%; /* Adjust as needed */ + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } diff --git a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/store.js b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/store.js index c910d7318..f29e2e6d4 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/store.js +++ b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/store.js @@ -124,9 +124,19 @@ const store = createStore({ ); }, socialActionsListSorted(state) { - return [...state.socialActionsList].sort( - (a, b) => a.ordering - b.ordering, - ); + return [...state.socialActionsList] + .sort((a, b) => a.ordering - b.ordering) + .reduce((acc, action) => { + const issueText = action.issue?.text || "Uncategorized"; + // Find if the group for the issue already exists + let group = acc.find((item) => item.issue === issueText); + if (!group) { + group = { issue: issueText, actions: [] }; + acc.push(group); + } + group.actions.push(action); + return acc; + }, []); }, }, mutations: { From 03b24968173a65cb7957448dc9fdaf00380ce526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 4 Mar 2025 23:02:19 +0100 Subject: [PATCH 13/26] Fix dependency injection issues in AbstractCRUDController Replaced incorrect service definitions in AbstractCRUDController to ensure proper dependency injection. Specifically, fixed retrieval of the ManagerRegistry and Validator services to resolve CalendarRange save errors (Issue #362). No schema changes were introduced. --- .changes/unreleased/Fixed-20250304-160058.yaml | 6 ++++++ .../CRUD/Controller/AbstractCRUDController.php | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changes/unreleased/Fixed-20250304-160058.yaml diff --git a/.changes/unreleased/Fixed-20250304-160058.yaml b/.changes/unreleased/Fixed-20250304-160058.yaml new file mode 100644 index 000000000..d2e9cf3ed --- /dev/null +++ b/.changes/unreleased/Fixed-20250304-160058.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Fix Dependency Injection, which prevented to save the CalendarRange +time: 2025-03-04T16:00:58.269626007+01:00 +custom: + Issue: "362" + SchemaChange: No schema change diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php index ea5e55a69..1cbf69630 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php +++ b/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php @@ -63,7 +63,6 @@ abstract class AbstractCRUDController extends AbstractController parent::getSubscribedServices(), [ 'chill_main.paginator_factory' => PaginatorFactory::class, - ManagerRegistry::class => ManagerRegistry::class, 'translator' => TranslatorInterface::class, AuthorizationHelper::class => AuthorizationHelper::class, EventDispatcherInterface::class => EventDispatcherInterface::class, @@ -213,7 +212,7 @@ abstract class AbstractCRUDController extends AbstractController protected function getManagerRegistry(): ManagerRegistry { - return $this->container->get(ManagerRegistry::class); + return $this->container->get('doctrine'); } /** @@ -226,7 +225,7 @@ abstract class AbstractCRUDController extends AbstractController protected function getValidator(): ValidatorInterface { - return $this->get('validator'); + return $this->container->get('validator'); } /** From 08af5307269984d6a0ef63c0f7094a53a5213e9e Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 5 Mar 2025 10:26:22 +0100 Subject: [PATCH 14/26] Replace deprecated Statement::create() method use constructor directly --- .../AddressReferenceBEFromBestAddress.php | 4 ++-- .../Import/AddressReferenceFromBAN.php | 4 ++-- .../Import/AddressReferenceFromBano.php | 22 +++++++++---------- .../Service/Import/AddressReferenceLU.php | 6 +++-- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php index ea6575e43..fcf49079f 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php +++ b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php @@ -68,8 +68,8 @@ class AddressReferenceBEFromBestAddress $csv->setDelimiter(','); $csv->setHeaderOffset(0); - $stmt = Statement::create() - ->process($csv); + $stmt = new Statement(); + $stmt = $stmt->process($csv); foreach ($stmt as $record) { $this->baseImporter->importAddress( diff --git a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBAN.php b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBAN.php index b45760592..d79997b0a 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBAN.php +++ b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBAN.php @@ -55,8 +55,8 @@ class AddressReferenceFromBAN $csv = Reader::createFromStream($csvDecompressed); $csv->setDelimiter(';')->setHeaderOffset(0); - $stmt = Statement::create() - ->process($csv, [ + $stmt = new Statement(); + $stmt = $stmt->process($csv, [ 'id', 'id_fantoir', 'numero', diff --git a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBano.php b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBano.php index 5ee3f6964..be20bbc11 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBano.php +++ b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBano.php @@ -43,17 +43,17 @@ class AddressReferenceFromBano $csv = Reader::createFromStream($file); $csv->setDelimiter(','); - $stmt = Statement::create() - ->process($csv, [ - 'refId', - 'streetNumber', - 'street', - 'postcode', - 'city', - '_o', - 'lat', - 'lon', - ]); + $stmt = new Statement(); + $stmt = $stmt->process($csv, [ + 'refId', + 'streetNumber', + 'street', + 'postcode', + 'city', + '_o', + 'lat', + 'lon', + ]); foreach ($stmt as $record) { $this->baseImporter->importAddress( diff --git a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceLU.php b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceLU.php index 86c1b61b8..e1294732b 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceLU.php +++ b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceLU.php @@ -54,7 +54,8 @@ class AddressReferenceLU private function process_address(Reader $csv, ?string $sendAddressReportToEmail = null): void { - $stmt = Statement::create()->process($csv); + $stmt = new Statement(); + $stmt = $stmt->process($csv); foreach ($stmt as $record) { $this->addressBaseImporter->importAddress( $record['id_geoportail'], @@ -74,7 +75,8 @@ class AddressReferenceLU private function process_postal_code(Reader $csv): void { - $stmt = Statement::create()->process($csv); + $stmt = new Statement(); + $stmt = $stmt->process($csv); $arr_postal_codes = []; foreach ($stmt as $record) { if (false === \array_key_exists($record['code_postal'], $arr_postal_codes)) { From 84b7cc81452a670d89172af32a9b733d19fd1056 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 5 Mar 2025 10:46:36 +0100 Subject: [PATCH 15/26] Php cs fixes --- .../Import/AddressReferenceFromBAN.php | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBAN.php b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBAN.php index d79997b0a..1c03b7bfb 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBAN.php +++ b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBAN.php @@ -57,30 +57,30 @@ class AddressReferenceFromBAN $csv->setDelimiter(';')->setHeaderOffset(0); $stmt = new Statement(); $stmt = $stmt->process($csv, [ - 'id', - 'id_fantoir', - 'numero', - 'rep', - 'nom_voie', - 'code_postal', - 'code_insee', - 'nom_commune', - 'code_insee_ancienne_commune', - 'nom_ancienne_commune', - 'x', - 'y', - 'lon', - 'lat', - 'type_position', - 'alias', - 'nom_ld', - 'libelle_acheminement', - 'nom_afnor', - 'source_position', - 'source_nom_voie', - 'certification_commune', - 'cad_parcelles', - ]); + 'id', + 'id_fantoir', + 'numero', + 'rep', + 'nom_voie', + 'code_postal', + 'code_insee', + 'nom_commune', + 'code_insee_ancienne_commune', + 'nom_ancienne_commune', + 'x', + 'y', + 'lon', + 'lat', + 'type_position', + 'alias', + 'nom_ld', + 'libelle_acheminement', + 'nom_afnor', + 'source_position', + 'source_nom_voie', + 'certification_commune', + 'cad_parcelles', + ]); foreach ($stmt as $record) { $this->baseImporter->importAddress( From 7a9168fcdb92febf358965bb00b22b95326836ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 14 Mar 2025 15:02:09 +0100 Subject: [PATCH 16/26] Refactor variable declarations in pick-entity module. Consolidated variable declarations into a single statement using const. This improves code readability and aligns with modern JavaScript best practices. --- .../Resources/public/module/pick-entity/index.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js b/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js index 6f6aad7ff..1b3ee4594 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js @@ -12,10 +12,6 @@ function loadDynamicPicker(element) { let apps = element.querySelectorAll('[data-module="pick-dynamic"]'); apps.forEach(function (el) { - let suggested; - let as_id; - let submit_on_adding_new_entity; - let label; const isMultiple = parseInt(el.dataset.multiple) === 1, uniqId = el.dataset.uniqid, input = element.querySelector( @@ -26,12 +22,12 @@ function loadDynamicPicker(element) { ? JSON.parse(input.value) : input.value === "[]" || input.value === "" ? null - : [JSON.parse(input.value)]; - suggested = JSON.parse(el.dataset.suggested); - as_id = parseInt(el.dataset.asId) === 1; - submit_on_adding_new_entity = - parseInt(el.dataset.submitOnAddingNewEntity) === 1; - label = el.dataset.label; + : [JSON.parse(input.value)], + suggested = JSON.parse(el.dataset.suggested), + as_id = parseInt(el.dataset.asId) === 1, + submit_on_adding_new_entity = + parseInt(el.dataset.submitOnAddingNewEntity) === 1, + label = el.dataset.label; if (!isMultiple) { if (input.value === "[]") { From f202625ea834e3f0fee691bedf3bfd4ac414b695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 14 Mar 2025 15:02:26 +0100 Subject: [PATCH 17/26] Fix LIKE clause logic in UserGroupRepository query Adjusted the parameter order and ensured consistent use of LOWER and UNACCENT functions in the LIKE clause. This resolves potential mismatches and improves query reliability for pattern matching. --- .changes/unreleased/Fixed-20250314-150408.yaml | 6 ++++++ .../ChillMainBundle/Repository/UserGroupRepository.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changes/unreleased/Fixed-20250314-150408.yaml diff --git a/.changes/unreleased/Fixed-20250314-150408.yaml b/.changes/unreleased/Fixed-20250314-150408.yaml new file mode 100644 index 000000000..0c278aa12 --- /dev/null +++ b/.changes/unreleased/Fixed-20250314-150408.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: fix search query for user groups +time: 2025-03-14T15:04:08.622666838+01:00 +custom: + Issue: "368" + SchemaChange: No schema change diff --git a/src/Bundle/ChillMainBundle/Repository/UserGroupRepository.php b/src/Bundle/ChillMainBundle/Repository/UserGroupRepository.php index e1c54442d..71266f8e5 100644 --- a/src/Bundle/ChillMainBundle/Repository/UserGroupRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/UserGroupRepository.php @@ -75,8 +75,8 @@ final class UserGroupRepository implements UserGroupRepositoryInterface, LocaleA ->setWhereClauses(' ug.active AND ( SIMILARITY(LOWER(UNACCENT(?)), ug.label->>?) > 0.15 - OR ug.label->>? LIKE \'%\' || LOWER(UNACCENT(?)) || \'%\') - ', [$pattern, $lang, $pattern, $lang]); + OR LOWER(UNACCENT(ug.label->>?)) LIKE \'%\' || LOWER(UNACCENT(?)) || \'%\') + ', [$pattern, $lang, $lang, $pattern]); return $query; } From 7ddf84ea5a76c63afa50f323fe37d6b3ea1d3517 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 14 Mar 2025 15:07:23 +0100 Subject: [PATCH 18/26] Fix ts errors upon prod compilation --- assets/translator.ts | 2 +- package.json | 1 + .../public/vuejs/DocumentSignature/App.vue | 29 ++++++++++--------- .../HistoryButton/HistoryButtonModal.vue | 7 +++-- .../public/vuejs/WorkflowAttachment/App.vue | 5 +++- .../Component/PickGenericDoc.vue | 8 +++-- 6 files changed, 32 insertions(+), 20 deletions(-) diff --git a/assets/translator.ts b/assets/translator.ts index 4834e30a6..ad2de8c0b 100644 --- a/assets/translator.ts +++ b/assets/translator.ts @@ -1,5 +1,5 @@ // @ts-ignore Cannot find module (when used within an app) -import { trans, getLocale, setLocale, setLocaleFallbacks } from "@symfony/ux-translator"; +import { trans, setLocale, setLocaleFallbacks } from "@symfony/ux-translator"; setLocaleFallbacks({"en": "fr", "nl": "fr", "fr": "en"}); setLocale('fr'); diff --git a/package.json b/package.json index a24c4ee8f..e2b8d8ba3 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "@hotwired/stimulus": "^3.0.0", "@luminateone/eslint-baseline": "^1.0.9", "@symfony/stimulus-bridge": "^3.2.0", + "@symfony/ux-translator": "file:vendor/symfony/ux-translator/assets", "@symfony/webpack-encore": "^4.1.0", "@tsconfig/node20": "^20.1.4", "@types/dompurify": "^3.0.5", diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue index b47a6bce0..283156696 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentSignature/App.vue @@ -92,8 +92,7 @@ >