diff --git a/backend/src/middlewares/multer.middleware.ts b/backend/src/middlewares/multer.middleware.ts index f21d24f..1d42489 100644 --- a/backend/src/middlewares/multer.middleware.ts +++ b/backend/src/middlewares/multer.middleware.ts @@ -22,6 +22,7 @@ const acceptedMIMETypesByItem: Record> = { }, plannings: { tc: [MIMEType.PDF], + tci: [MIMEType.PDF], bachelor_ia: [MIMEType.PDF], fise: [MIMEType.PDF], fisea: [MIMEType.PDF], diff --git a/frontend/src/components/Admin/adminExportImport.tsx b/frontend/src/components/Admin/adminExportImport.tsx index d1be2d0..33a01e5 100644 --- a/frontend/src/components/Admin/adminExportImport.tsx +++ b/frontend/src/components/Admin/adminExportImport.tsx @@ -104,6 +104,7 @@ export const AdminImportPlannings = () => { + diff --git a/frontend/src/components/Plannings/planningSection.tsx b/frontend/src/components/Plannings/planningSection.tsx index 80de0b1..2845626 100644 --- a/frontend/src/components/Plannings/planningSection.tsx +++ b/frontend/src/components/Plannings/planningSection.tsx @@ -1,6 +1,6 @@ -import { useEffect, useState } from "react"; +import { useEffect, useState } from 'react'; -import { Card, CardContent, CardHeader, CardTitle } from "../ui/card"; +import { Card, CardContent, CardHeader, CardTitle } from '../ui/card'; type Planning = { name: string; @@ -9,38 +9,40 @@ type Planning = { const plannings: Planning[] = [ { - name: "Planning TC", + name: 'Planning TC', url: `${import.meta.env.VITE_API_URL}/uploads/plannings/tc.pdf`, }, { - name: "Planning Bachelor IA", + name: 'Planning TCI', + url: `${import.meta.env.VITE_API_URL}/uploads/plannings/tci.pdf`, + }, + { + name: 'Planning Bachelor IA', url: `${import.meta.env.VITE_API_URL}/uploads/plannings/bachelor_ia.pdf`, }, { - name: "Planning Branche (non-alternant)", + name: 'Planning Branche (non-alternant)', url: `${import.meta.env.VITE_API_URL}/uploads/plannings/fise.pdf`, }, { - name: "Planning Branche FISEA (alternants)", + name: 'Planning Branche FISEA (alternants)', url: `${import.meta.env.VITE_API_URL}/uploads/plannings/fisea.pdf`, }, { - name: "Planning Master", + name: 'Planning Master', url: `${import.meta.env.VITE_API_URL}/uploads/plannings/master.pdf`, }, ]; export const PlanningSection = () => { - const [availablePlannings, setAvailablePlannings] = useState< - Record - >({}); + const [availablePlannings, setAvailablePlannings] = useState>({}); useEffect(() => { const checkAvailability = async () => { const availability: Record = {}; for (const planning of plannings) { try { - const response = await fetch(planning.url, { method: "HEAD" }); + const response = await fetch(planning.url, { method: 'HEAD' }); availability[planning.name] = response.ok; } catch { availability[planning.name] = false; @@ -59,17 +61,13 @@ export const PlanningSection = () => { 📅 Plannings de la semaine d'Intégration

- Retrouve ici tous les plannings (TC, Branche, FISEA, Master) et - télécharge-les. + Retrouve ici tous les plannings (TC, Branche, FISEA, Master) et télécharge-les.

{plannings.map((planning) => ( - + {/* Titre planning centré */} @@ -94,8 +92,7 @@ export const PlanningSection = () => { + className="px-6 py-2 bg-blue-600 text-white font-medium rounded-xl hover:bg-blue-700 transition"> Télécharger le planning