Skip to content

Commit

Permalink
fix: ne pas afficher les contribs personnalisées
Browse files Browse the repository at this point in the history
  • Loading branch information
m-maillot committed Sep 26, 2024
1 parent 1a16ed6 commit d710591
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
14 changes: 8 additions & 6 deletions targets/frontend/src/components/documents/Container.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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},
Expand Down
9 changes: 3 additions & 6 deletions targets/frontend/src/components/home/UnThemedContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}}
]}
]
}) {
Expand Down

0 comments on commit d710591

Please sign in to comment.