diff --git a/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json b/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json index b6cce2a0..d418b64d 100644 --- a/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14,7 +14,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "2026-02-27T11:12:11.224Z" + "x-generation-date": "2026-06-10T10:21:11.749Z" }, "x-strapi-config": { "plugins": [ diff --git a/frontend/src/app/[locale]/projects/[slug]/projectDetail.tsx b/frontend/src/app/[locale]/projects/[slug]/projectDetail.tsx index aa718b68..42df8668 100644 --- a/frontend/src/app/[locale]/projects/[slug]/projectDetail.tsx +++ b/frontend/src/app/[locale]/projects/[slug]/projectDetail.tsx @@ -10,21 +10,34 @@ type ProjectPageProps = { }; function getProjectTags(project: ProjectPageData) { + const getTagColor = (tag?: string) => { + if(tag === "en cours") { + return 'bg-resistance' + } else if(tag === "terminé") { + return 'bg-alive' + } + return "bg-back-green" + } + return [ ...(project.seasons?.map(season => ({ "label": season.title, - "type": "temporal" as 'temporal' | 'subject' + "type": "temporal" as 'temporal' | 'subject', + "color": "bg-back-green" })) || []), { - "label": `${project.start_date ? new Date(project.start_date).toLocaleDateString() : 'N/A'} / ${project.end_date ? new Date(project.end_date).toLocaleDateString() : 'N/A'}`, - "type": "temporal" as 'temporal' | 'subject' + "label": `${(project.start_date && project.end_date) ? `Du ${new Date(project.start_date).toLocaleDateString()} au ${new Date(project.end_date).toLocaleDateString()}` : (project.start_date ? `Depuis le ${new Date(project.start_date).toLocaleDateString()}` : (project.end_date ? `Terminé le ${new Date(project.end_date).toLocaleDateString()}` : 'N/A'))}`, + "type": "temporal" as 'temporal' | 'subject', + "color": "bg-back-green" }, { "label": project.state, - "type": "subject" as 'temporal' | 'subject' + "type": "subject" as 'temporal' | 'subject', + "color": getTagColor(project.state) }, ...((project.category as string[])?.map(cat => ({ "label": cat, - "type": "subject" as 'temporal' | 'subject' + "type": "subject" as 'temporal' | 'subject', + "color": "bg-back-green" })) || [])]; } diff --git a/frontend/src/components/organisms/ProjectPresentation/ProjectPresentation.tsx b/frontend/src/components/organisms/ProjectPresentation/ProjectPresentation.tsx index bc038ebe..80f66e9c 100644 --- a/frontend/src/components/organisms/ProjectPresentation/ProjectPresentation.tsx +++ b/frontend/src/components/organisms/ProjectPresentation/ProjectPresentation.tsx @@ -8,6 +8,7 @@ export type ProjectPresentationProps = { tags?: { label?: string; type: 'temporal' | 'subject'; + color: string; }[]; description: string[]; associations: { @@ -44,7 +45,7 @@ const ProjectPresentation: React.FC = ({ {t('tags')}