Skip to content

Commit

Permalink
fix(agreements): mise à jour du slug de la convention collective 7026 (
Browse files Browse the repository at this point in the history
…#1440)

* fix(agreements): mise à jour du slug de la convention collective 7026

* feat: optimise export prequa
  • Loading branch information
m-maillot authored Jul 5, 2024
1 parent ba1d026 commit 83351b1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ jest.mock("../fetchPrequalified", () => ({
text: "textContribution",
isPublished: true,
isSeachable: true,
document: {
description: "descriptionContribution",
},
documentDescription: "descriptionContribution",
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ query fetch_prequalified {
isPublished: is_published
isSearchable: is_searchable
description: meta_description
document
documentDescription: document(path: "$.description")
url: document(path: "$.url")
action: document(path: "$.action")
}
}
}
Expand All @@ -40,7 +42,9 @@ export interface FetchedPrequalified {
isPublished: boolean;
isSearchable: boolean;
description: string;
document: any;
documentDescription: string;
url?: string;
action?: string;
};
}[];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ export const generatePrequalified = async (
slug: document.slug,
title: document.title,
source: document.source,
description: document.description || document.document.description,
description: document.description || document.documentDescription,
breadcrumbs: getBreadcrumbs(document.cdtnId),
url: document.document.url, // pour les outils externes
action: document.document.action, // pour les outils (interne/externe)
url: document.url, // pour les outils externes
action: document.action, // pour les outils (interne/externe)
} as RelatedDocument)
),
}));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
UPDATE public.documents
SET slug = 'personnels-des-activites-hippiques'
WHERE cdtn_id = 'ebe937ec29';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
UPDATE public.documents
SET slug = '7026-personnels-des-activites-hippiques'
WHERE cdtn_id = 'ebe937ec29';

0 comments on commit 83351b1

Please sign in to comment.