From fa4294db291ad036e1245db11801317cde39d84d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20M=C3=A9vollon?= <38255502+matmut7@users.noreply.github.com> Date: Mon, 23 Sep 2024 17:12:31 +0200 Subject: [PATCH 1/6] fix: back to main nodepool (#1474) --- .kontinuous/values.yaml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/.kontinuous/values.yaml b/.kontinuous/values.yaml index c2603b8d2..c1bb46caa 100644 --- a/.kontinuous/values.yaml +++ b/.kontinuous/values.yaml @@ -61,20 +61,6 @@ www: fsGroup: 1000 runAsUser: 1000 runAsGroup: 1000 - tolerations: - - key: startup - operator: Equal - value: cdtn - effect: NoSchedule - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: nodepool - operator: In - values: - - cdtn-worker-nodepool export: ~chart: app @@ -100,20 +86,6 @@ export: oblik.socialgouv.io/min-request-memory: "2Gi" oblik.socialgouv.io/min-limit-cpu: "2000m" oblik.socialgouv.io/min-limit-memory: "4Gi" - tolerations: - - key: startup - operator: Equal - value: cdtn - effect: NoSchedule - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: nodepool - operator: In - values: - - cdtn-worker-nodepool hasura: ~chart: hasura From d1d850ef2b6c3b54239a57239a1696c72a603e56 Mon Sep 17 00:00:00 2001 From: Martial Maillot Date: Mon, 23 Sep 2024 17:57:10 +0200 Subject: [PATCH 2/6] =?UTF-8?q?fix:=20augmente=20la=20taille=20autoris?= =?UTF-8?q?=C3=A9e=20pour=20glossariser=20un=20contenu=20(#1476)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- targets/export-elasticsearch/src/server.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/targets/export-elasticsearch/src/server.ts b/targets/export-elasticsearch/src/server.ts index d038adb31..efd5c0292 100644 --- a/targets/export-elasticsearch/src/server.ts +++ b/targets/export-elasticsearch/src/server.ts @@ -4,6 +4,7 @@ import "./controllers"; import bodyParser from "body-parser"; import cors from "cors"; import type { NextFunction, Request, Response } from "express"; +import express from "express"; import { Container } from "inversify"; import { InversifyExpressServer } from "inversify-express-utils"; @@ -11,7 +12,7 @@ import { ExportEsRunMiddleware, GlossaryMiddleware, } from "./controllers/middlewares"; -import { S3Parameters, S3Repository, ExportRepository } from "./repositories"; +import { ExportRepository, S3Parameters, S3Repository } from "./repositories"; import { CopyContainerService, ExportService, @@ -87,6 +88,9 @@ rootContainer // create server const server = new InversifyExpressServer(rootContainer); server.setConfig((srv) => { + // Increase limit for glossary + srv.use(express.json({ limit: "5mb" })); + // add body parser srv.use( bodyParser.urlencoded({ From 1a973aa25b7becf3bfd555fe975147d5fd5a0d89 Mon Sep 17 00:00:00 2001 From: Social Groovy Bot <45039513+SocialGroovyBot@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:00:45 +0000 Subject: [PATCH 3/6] chore(release): version 2.49.3 --- CHANGELOG.md | 7 +++++++ lerna.json | 2 +- shared/elasticsearch/CHANGELOG.md | 4 ++++ shared/elasticsearch/package.json | 2 +- shared/eslint-config/CHANGELOG.md | 4 ++++ shared/eslint-config/package.json | 2 +- shared/types/CHANGELOG.md | 4 ++++ shared/types/package.json | 2 +- shared/utils/CHANGELOG.md | 4 ++++ shared/utils/package.json | 2 +- targets/alert-cli/CHANGELOG.md | 4 ++++ targets/alert-cli/package.json | 2 +- targets/export-elasticsearch/CHANGELOG.md | 6 ++++++ targets/export-elasticsearch/package.json | 2 +- targets/frontend/CHANGELOG.md | 4 ++++ targets/frontend/package.json | 2 +- targets/ingester/CHANGELOG.md | 4 ++++ targets/ingester/package.json | 2 +- 18 files changed, 50 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b16187c38..81fc35603 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) + +### Bug Fixes + +- augmente la taille autorisée pour glossariser un contenu ([#1476](https://github.com/SocialGouv/cdtn-admin/issues/1476)) ([d1d850e](https://github.com/SocialGouv/cdtn-admin/commit/d1d850ef2b6c3b54239a57239a1696c72a603e56)) +- back to main nodepool ([#1474](https://github.com/SocialGouv/cdtn-admin/issues/1474)) ([fa4294d](https://github.com/SocialGouv/cdtn-admin/commit/fa4294db291ad036e1245db11801317cde39d84d)) + ## [2.49.2](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.1...v2.49.2) (2024-09-18) ### Bug Fixes diff --git a/lerna.json b/lerna.json index fbf1426ff..c50e3a65f 100644 --- a/lerna.json +++ b/lerna.json @@ -7,6 +7,6 @@ } }, "npmClient": "yarn", - "version": "2.49.2", + "version": "2.49.3", "useWorkspaces": true } diff --git a/shared/elasticsearch/CHANGELOG.md b/shared/elasticsearch/CHANGELOG.md index 5fcc9ab4f..a7b4cf3c1 100644 --- a/shared/elasticsearch/CHANGELOG.md +++ b/shared/elasticsearch/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) + +**Note:** Version bump only for package @socialgouv/cdtn-elasticsearch + ## [2.49.2](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.1...v2.49.2) (2024-09-18) **Note:** Version bump only for package @socialgouv/cdtn-elasticsearch diff --git a/shared/elasticsearch/package.json b/shared/elasticsearch/package.json index 0b643a76f..91edace46 100644 --- a/shared/elasticsearch/package.json +++ b/shared/elasticsearch/package.json @@ -1,7 +1,7 @@ { "name": "@socialgouv/cdtn-elasticsearch", "description": "SocialGouv - Code du travail numerique - Infrastructure - Elasticsearch", - "version": "2.49.2", + "version": "2.49.3", "babel": { "plugins": [ "@babel/plugin-transform-modules-commonjs" diff --git a/shared/eslint-config/CHANGELOG.md b/shared/eslint-config/CHANGELOG.md index e2a66de3f..05e7155af 100644 --- a/shared/eslint-config/CHANGELOG.md +++ b/shared/eslint-config/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) + +**Note:** Version bump only for package @shared/eslint-config + ## [2.49.2](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.1...v2.49.2) (2024-09-18) **Note:** Version bump only for package @shared/eslint-config diff --git a/shared/eslint-config/package.json b/shared/eslint-config/package.json index 5039b4cc0..64b9a96dc 100644 --- a/shared/eslint-config/package.json +++ b/shared/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@shared/eslint-config", - "version": "2.49.2", + "version": "2.49.3", "main": "index.js", "private": true, "dependencies": { diff --git a/shared/types/CHANGELOG.md b/shared/types/CHANGELOG.md index 645724d7f..6b6bd32a4 100644 --- a/shared/types/CHANGELOG.md +++ b/shared/types/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) + +**Note:** Version bump only for package @socialgouv/cdtn-types + ## [2.49.2](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.1...v2.49.2) (2024-09-18) **Note:** Version bump only for package @socialgouv/cdtn-types diff --git a/shared/types/package.json b/shared/types/package.json index 3ca89b171..15c80301f 100644 --- a/shared/types/package.json +++ b/shared/types/package.json @@ -10,7 +10,7 @@ "type": "git", "url": "https://github.com/SocialGouv/cdtn-admin.git" }, - "version": "2.49.2", + "version": "2.49.3", "main": "build/index.js", "module": "build/index.js", "types": "build/index.d.ts", diff --git a/shared/utils/CHANGELOG.md b/shared/utils/CHANGELOG.md index 95e480df5..998b57024 100644 --- a/shared/utils/CHANGELOG.md +++ b/shared/utils/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) + +**Note:** Version bump only for package @shared/utils + ## [2.49.2](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.1...v2.49.2) (2024-09-18) **Note:** Version bump only for package @shared/utils diff --git a/shared/utils/package.json b/shared/utils/package.json index 9c94f7d8a..1404d2a41 100644 --- a/shared/utils/package.json +++ b/shared/utils/package.json @@ -1,6 +1,6 @@ { "name": "@shared/utils", - "version": "2.49.2", + "version": "2.49.3", "dependencies": { "@socialgouv/cdtn-sources": "^4.91.1", "@socialgouv/cdtn-utils": "^4.109.0", diff --git a/targets/alert-cli/CHANGELOG.md b/targets/alert-cli/CHANGELOG.md index 77618dfdb..6a7225109 100644 --- a/targets/alert-cli/CHANGELOG.md +++ b/targets/alert-cli/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) + +**Note:** Version bump only for package alert-cli + ## [2.49.2](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.1...v2.49.2) (2024-09-18) ### Bug Fixes diff --git a/targets/alert-cli/package.json b/targets/alert-cli/package.json index bd83ef1d5..935e96480 100644 --- a/targets/alert-cli/package.json +++ b/targets/alert-cli/package.json @@ -1,6 +1,6 @@ { "name": "alert-cli", - "version": "2.49.2", + "version": "2.49.3", "engines": { "node": ">=20.0.2" }, diff --git a/targets/export-elasticsearch/CHANGELOG.md b/targets/export-elasticsearch/CHANGELOG.md index 7ede5613a..a3e711164 100644 --- a/targets/export-elasticsearch/CHANGELOG.md +++ b/targets/export-elasticsearch/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) + +### Bug Fixes + +- augmente la taille autorisée pour glossariser un contenu ([#1476](https://github.com/SocialGouv/cdtn-admin/issues/1476)) ([d1d850e](https://github.com/SocialGouv/cdtn-admin/commit/d1d850ef2b6c3b54239a57239a1696c72a603e56)) + ## [2.49.2](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.1...v2.49.2) (2024-09-18) **Note:** Version bump only for package export-elasticsearch diff --git a/targets/export-elasticsearch/package.json b/targets/export-elasticsearch/package.json index 95ecd249b..9e890c31a 100644 --- a/targets/export-elasticsearch/package.json +++ b/targets/export-elasticsearch/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "export-elasticsearch", - "version": "2.49.2", + "version": "2.49.3", "license": "MIT", "description": "", "main": "./build/index.js", diff --git a/targets/frontend/CHANGELOG.md b/targets/frontend/CHANGELOG.md index 37d3e45e4..c0690874d 100644 --- a/targets/frontend/CHANGELOG.md +++ b/targets/frontend/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) + +**Note:** Version bump only for package frontend + ## [2.49.2](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.1...v2.49.2) (2024-09-18) **Note:** Version bump only for package frontend diff --git a/targets/frontend/package.json b/targets/frontend/package.json index 12e3caa50..f9e3ea1af 100644 --- a/targets/frontend/package.json +++ b/targets/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "2.49.2", + "version": "2.49.3", "dependencies": { "@aws-sdk/client-s3": "^3.525.0", "@codegouvfr/react-dsfr": "^0.76.4", diff --git a/targets/ingester/CHANGELOG.md b/targets/ingester/CHANGELOG.md index 59e4da26e..6d9906cf3 100644 --- a/targets/ingester/CHANGELOG.md +++ b/targets/ingester/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) + +**Note:** Version bump only for package ingester + ## [2.49.2](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.1...v2.49.2) (2024-09-18) **Note:** Version bump only for package ingester diff --git a/targets/ingester/package.json b/targets/ingester/package.json index ab57e2990..ddd114d55 100644 --- a/targets/ingester/package.json +++ b/targets/ingester/package.json @@ -1,6 +1,6 @@ { "name": "ingester", - "version": "2.49.2", + "version": "2.49.3", "dependencies": { "@shared/utils": "workspace:^", "@socialgouv/cdtn-slugify": "4.52.1", From cfd1c8eb98ebb67a3741cf3bd49ea6b2bdabfc92 Mon Sep 17 00:00:00 2001 From: Martial Maillot Date: Thu, 26 Sep 2024 11:35:05 +0200 Subject: [PATCH 4/6] =?UTF-8?q?fix:=20ne=20pas=20afficher=20les=20contribs?= =?UTF-8?q?=20personnalis=C3=A9es=20(#1478)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../forms/ContentPicker/ContentSearch.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/targets/frontend/src/components/forms/ContentPicker/ContentSearch.js b/targets/frontend/src/components/forms/ContentPicker/ContentSearch.js index 099ae8dc8..80fb88372 100644 --- a/targets/frontend/src/components/forms/ContentPicker/ContentSearch.js +++ b/targets/frontend/src/components/forms/ContentPicker/ContentSearch.js @@ -24,7 +24,17 @@ const AUTOSUGGEST_MAX_RESULTS = 15; const searchDocumentsQuery = ` query searchDocuments($sources: [String!]! = "", $search: String = "") { - documents(where: {title: {_ilike: $search}, source: {_in: $sources}, _not: {document: {_has_key: "split"}}}, limit: ${AUTOSUGGEST_MAX_RESULTS}) { + documents( + where: { + title: { _ilike: $search } + source: { _in: $sources } + _or: [ + { source: { _neq: "contributions" } } + { source: { _eq: "contributions" }, document: { _contains: { idcc: "0000" } } } + ] + } + limit: ${AUTOSUGGEST_MAX_RESULTS} + ) { source title cdtnId: cdtn_id @@ -136,6 +146,7 @@ const renderInputComponent = (inputProps) => ( function shouldRenderSuggestions(value) { return value.trim().length > 2; } + function renderSectionTitle(section) { return section.suggestions.length ? ( @@ -154,7 +165,7 @@ const renderSuggestion = (content) => (
{content.title} {content.category === "document" && ( - | {getLabelBySource(content.source)} + | {getLabelBySource(content.source)} )}
); From 1a16ed6a919e05e1cdb44bdc7a5389df128b92f7 Mon Sep 17 00:00:00 2001 From: Social Groovy Bot <45039513+SocialGroovyBot@users.noreply.github.com> Date: Thu, 26 Sep 2024 09:38:12 +0000 Subject: [PATCH 5/6] chore(release): version 2.49.4 --- CHANGELOG.md | 6 ++++++ lerna.json | 2 +- shared/elasticsearch/CHANGELOG.md | 4 ++++ shared/elasticsearch/package.json | 2 +- shared/eslint-config/CHANGELOG.md | 4 ++++ shared/eslint-config/package.json | 2 +- shared/types/CHANGELOG.md | 4 ++++ shared/types/package.json | 2 +- shared/utils/CHANGELOG.md | 4 ++++ shared/utils/package.json | 2 +- targets/alert-cli/CHANGELOG.md | 4 ++++ targets/alert-cli/package.json | 2 +- targets/export-elasticsearch/CHANGELOG.md | 4 ++++ targets/export-elasticsearch/package.json | 2 +- targets/frontend/CHANGELOG.md | 6 ++++++ targets/frontend/package.json | 2 +- targets/ingester/CHANGELOG.md | 4 ++++ targets/ingester/package.json | 2 +- 18 files changed, 49 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81fc35603..6329dd9d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.4](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.3...v2.49.4) (2024-09-26) + +### Bug Fixes + +- ne pas afficher les contribs personnalisées ([#1478](https://github.com/SocialGouv/cdtn-admin/issues/1478)) ([cfd1c8e](https://github.com/SocialGouv/cdtn-admin/commit/cfd1c8eb98ebb67a3741cf3bd49ea6b2bdabfc92)) + ## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) ### Bug Fixes diff --git a/lerna.json b/lerna.json index c50e3a65f..3bf0bf768 100644 --- a/lerna.json +++ b/lerna.json @@ -7,6 +7,6 @@ } }, "npmClient": "yarn", - "version": "2.49.3", + "version": "2.49.4", "useWorkspaces": true } diff --git a/shared/elasticsearch/CHANGELOG.md b/shared/elasticsearch/CHANGELOG.md index a7b4cf3c1..f8b6f8086 100644 --- a/shared/elasticsearch/CHANGELOG.md +++ b/shared/elasticsearch/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.4](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.3...v2.49.4) (2024-09-26) + +**Note:** Version bump only for package @socialgouv/cdtn-elasticsearch + ## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) **Note:** Version bump only for package @socialgouv/cdtn-elasticsearch diff --git a/shared/elasticsearch/package.json b/shared/elasticsearch/package.json index 91edace46..9d94d7aef 100644 --- a/shared/elasticsearch/package.json +++ b/shared/elasticsearch/package.json @@ -1,7 +1,7 @@ { "name": "@socialgouv/cdtn-elasticsearch", "description": "SocialGouv - Code du travail numerique - Infrastructure - Elasticsearch", - "version": "2.49.3", + "version": "2.49.4", "babel": { "plugins": [ "@babel/plugin-transform-modules-commonjs" diff --git a/shared/eslint-config/CHANGELOG.md b/shared/eslint-config/CHANGELOG.md index 05e7155af..61c4f3ccc 100644 --- a/shared/eslint-config/CHANGELOG.md +++ b/shared/eslint-config/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.4](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.3...v2.49.4) (2024-09-26) + +**Note:** Version bump only for package @shared/eslint-config + ## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) **Note:** Version bump only for package @shared/eslint-config diff --git a/shared/eslint-config/package.json b/shared/eslint-config/package.json index 64b9a96dc..8308172d6 100644 --- a/shared/eslint-config/package.json +++ b/shared/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@shared/eslint-config", - "version": "2.49.3", + "version": "2.49.4", "main": "index.js", "private": true, "dependencies": { diff --git a/shared/types/CHANGELOG.md b/shared/types/CHANGELOG.md index 6b6bd32a4..1053d4263 100644 --- a/shared/types/CHANGELOG.md +++ b/shared/types/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.4](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.3...v2.49.4) (2024-09-26) + +**Note:** Version bump only for package @socialgouv/cdtn-types + ## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) **Note:** Version bump only for package @socialgouv/cdtn-types diff --git a/shared/types/package.json b/shared/types/package.json index 15c80301f..4f8929afd 100644 --- a/shared/types/package.json +++ b/shared/types/package.json @@ -10,7 +10,7 @@ "type": "git", "url": "https://github.com/SocialGouv/cdtn-admin.git" }, - "version": "2.49.3", + "version": "2.49.4", "main": "build/index.js", "module": "build/index.js", "types": "build/index.d.ts", diff --git a/shared/utils/CHANGELOG.md b/shared/utils/CHANGELOG.md index 998b57024..59daf6735 100644 --- a/shared/utils/CHANGELOG.md +++ b/shared/utils/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.4](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.3...v2.49.4) (2024-09-26) + +**Note:** Version bump only for package @shared/utils + ## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) **Note:** Version bump only for package @shared/utils diff --git a/shared/utils/package.json b/shared/utils/package.json index 1404d2a41..ea3951b9b 100644 --- a/shared/utils/package.json +++ b/shared/utils/package.json @@ -1,6 +1,6 @@ { "name": "@shared/utils", - "version": "2.49.3", + "version": "2.49.4", "dependencies": { "@socialgouv/cdtn-sources": "^4.91.1", "@socialgouv/cdtn-utils": "^4.109.0", diff --git a/targets/alert-cli/CHANGELOG.md b/targets/alert-cli/CHANGELOG.md index 6a7225109..20b4ebff8 100644 --- a/targets/alert-cli/CHANGELOG.md +++ b/targets/alert-cli/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.4](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.3...v2.49.4) (2024-09-26) + +**Note:** Version bump only for package alert-cli + ## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) **Note:** Version bump only for package alert-cli diff --git a/targets/alert-cli/package.json b/targets/alert-cli/package.json index 935e96480..50f71da93 100644 --- a/targets/alert-cli/package.json +++ b/targets/alert-cli/package.json @@ -1,6 +1,6 @@ { "name": "alert-cli", - "version": "2.49.3", + "version": "2.49.4", "engines": { "node": ">=20.0.2" }, diff --git a/targets/export-elasticsearch/CHANGELOG.md b/targets/export-elasticsearch/CHANGELOG.md index a3e711164..c7b18614e 100644 --- a/targets/export-elasticsearch/CHANGELOG.md +++ b/targets/export-elasticsearch/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.4](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.3...v2.49.4) (2024-09-26) + +**Note:** Version bump only for package export-elasticsearch + ## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) ### Bug Fixes diff --git a/targets/export-elasticsearch/package.json b/targets/export-elasticsearch/package.json index 9e890c31a..920adf29c 100644 --- a/targets/export-elasticsearch/package.json +++ b/targets/export-elasticsearch/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "export-elasticsearch", - "version": "2.49.3", + "version": "2.49.4", "license": "MIT", "description": "", "main": "./build/index.js", diff --git a/targets/frontend/CHANGELOG.md b/targets/frontend/CHANGELOG.md index c0690874d..0511c9a4a 100644 --- a/targets/frontend/CHANGELOG.md +++ b/targets/frontend/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.4](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.3...v2.49.4) (2024-09-26) + +### Bug Fixes + +- ne pas afficher les contribs personnalisées ([#1478](https://github.com/SocialGouv/cdtn-admin/issues/1478)) ([cfd1c8e](https://github.com/SocialGouv/cdtn-admin/commit/cfd1c8eb98ebb67a3741cf3bd49ea6b2bdabfc92)) + ## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) **Note:** Version bump only for package frontend diff --git a/targets/frontend/package.json b/targets/frontend/package.json index f9e3ea1af..e6b2d8d4a 100644 --- a/targets/frontend/package.json +++ b/targets/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "2.49.3", + "version": "2.49.4", "dependencies": { "@aws-sdk/client-s3": "^3.525.0", "@codegouvfr/react-dsfr": "^0.76.4", diff --git a/targets/ingester/CHANGELOG.md b/targets/ingester/CHANGELOG.md index 6d9906cf3..ee632beaa 100644 --- a/targets/ingester/CHANGELOG.md +++ b/targets/ingester/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.49.4](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.3...v2.49.4) (2024-09-26) + +**Note:** Version bump only for package ingester + ## [2.49.3](https://github.com/SocialGouv/cdtn-admin/compare/v2.49.2...v2.49.3) (2024-09-23) **Note:** Version bump only for package ingester diff --git a/targets/ingester/package.json b/targets/ingester/package.json index ddd114d55..bfabbb7bd 100644 --- a/targets/ingester/package.json +++ b/targets/ingester/package.json @@ -1,6 +1,6 @@ { "name": "ingester", - "version": "2.49.3", + "version": "2.49.4", "dependencies": { "@shared/utils": "workspace:^", "@socialgouv/cdtn-slugify": "4.52.1", From f7f0d8a66966756d878817f754525f7b27ccd33c Mon Sep 17 00:00:00 2001 From: Martial Maillot Date: Thu, 26 Sep 2024 13:41:43 +0200 Subject: [PATCH 6/6] =?UTF-8?q?fix:=20ne=20pas=20afficher=20les=20contribs?= =?UTF-8?q?=20personnalis=C3=A9es=20(#1479)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/documents/Container.js | 14 ++++--- .../src/components/documents/SearchFilters.js | 41 ------------------- .../src/components/home/UnThemedContent.tsx | 9 ++-- 3 files changed, 11 insertions(+), 53 deletions(-) diff --git a/targets/frontend/src/components/documents/Container.js b/targets/frontend/src/components/documents/Container.js index c8ebf5703..97f18a8c5 100644 --- a/targets/frontend/src/components/documents/Container.js +++ b/targets/frontend/src/components/documents/Container.js @@ -129,9 +129,10 @@ DocumentListContainer.propTypes = { const searchDocumentQuery = ` query documents($source: String, $search: String!, $published: [Boolean!]!, $available: [Boolean!]!, $offset: Int = 0, $limit: Int = 50) { documents(where: { - _not: { - document: {_has_key: "split"} - } + _or: [ + { source: { _neq: "contributions" } } + { source: { _eq: "contributions" }, document: { _contains: { idcc: "0000" } } } + ] _and: { source: {_eq: $source, _neq: "code_du_travail"} title: {_ilike: $search} @@ -149,9 +150,10 @@ query documents($source: String, $search: String!, $published: [Boolean!]!, $ava } documents_aggregate(where: { - _not: { - document: {_has_key: "split"} - } + _or: [ + { source: { _neq: "contributions" } } + { source: { _eq: "contributions" }, document: { _contains: { idcc: "0000" } } } + ] _and: { source: {_eq: $source, _neq: "code_du_travail"} title: {_ilike: $search}, diff --git a/targets/frontend/src/components/documents/SearchFilters.js b/targets/frontend/src/components/documents/SearchFilters.js index 503fad852..23bffb6d8 100644 --- a/targets/frontend/src/components/documents/SearchFilters.js +++ b/targets/frontend/src/components/documents/SearchFilters.js @@ -12,7 +12,6 @@ import { Select, Stack, } from "@mui/material"; -import { useQuery } from "urql"; import { Button } from "../button"; @@ -36,28 +35,8 @@ export function SearchFilters({ initialValues, onSearchUpdate }) { ]; const { handleSubmit, register } = useForm(); - const [result] = useQuery({ - query: sourceQuery, - variables: { - available: - initialValues.available === "yes" - ? [true] - : initialValues.available === "no" - ? [false] - : [true, false], - published: - initialValues.published === "yes" - ? [true] - : initialValues.published === "no" - ? [false] - : [true, false], - search: `%${initialValues.q}%`, - source: initialValues.source || null, - }, - }); function triggerUpdateUrl(event) { - console.log("update filters"); onSearchUpdate({ ...initialValues, [event.target.name]: @@ -201,23 +180,3 @@ SearchFilters.propTypes = { }), onSearchUpdate: PropTypes.func.isRequired, }; - -const sourceQuery = ` -query documents($source: String, $search: String!, $published: [Boolean!]!, $available: [Boolean!]!) { - sources: documents_aggregate(where: { - _not: { - document: {_has_key: "split"} - } - _and: { - source: {_eq: $source, _neq: "code_du_travail"} - title: {_ilike: $search}, - is_published: {_in: $published} - is_available: {_in: $available} - } - }) { - nodes { - source - } - } -} -`; diff --git a/targets/frontend/src/components/home/UnThemedContent.tsx b/targets/frontend/src/components/home/UnThemedContent.tsx index 205056946..0d2a6ea0c 100644 --- a/targets/frontend/src/components/home/UnThemedContent.tsx +++ b/targets/frontend/src/components/home/UnThemedContent.tsx @@ -18,12 +18,9 @@ query getUnthemed($themeSources: [String!]!) { {_not: { relation_b: {type: {_eq: "${RELATIONS.THEME_CONTENT}"} a :{source: {_eq: "${SOURCES.THEMES}"}} } }} - {_and: [ - {_not: {document: {_has_key: "split"}}}, - {_or: [ - {_not: {document: {_has_key: "idcc"}}}, - {document: {_contains: {idcc: "0000"}}} - ]} + {_or: [ + {_not: {document: {_has_key: "idcc"}}}, + {document: {_contains: {idcc: "0000"}}} ]} ] }) {