diff --git a/app/mission-tab/[missionId]/page.tsx b/app/mission-tab/[missionId]/page.tsx index 3322891..a900bed 100644 --- a/app/mission-tab/[missionId]/page.tsx +++ b/app/mission-tab/[missionId]/page.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from "react"; import { Button } from "@/components/ui/button"; -import { FileIcon, Calendar, Eye, MapPin, Users, Clock, ThumbsUp, Languages, ArrowLeft } from "lucide-react"; +import { FileIcon, Calendar, Eye, MapPin, Users, Clock, ThumbsUp, Languages, ArrowLeft, FileText } from "lucide-react"; import { useToast } from "@/components/ui/use-toast"; import { useParams, useRouter } from "next/navigation"; import Link from "next/link"; @@ -41,6 +41,10 @@ interface Mission { createdAt: string; creator: User; missionUsers: any[]; + rocketChatChannelId?: string | null; + outlineCollectionId?: string | null; + giteaRepositoryUrl?: string | null; + leantimeProjectId?: string | null; } export default function MissionTabDetailPage() { @@ -135,6 +139,23 @@ export default function MissionTabDetailPage() { }; }; + // Function to sanitize mission name (same logic as N8N) + const sanitizeMissionName = (name: string): string => { + if (!name || typeof name !== "string") return "unnamed-mission"; + return name.toLowerCase() + .split("") + .map(c => { + if (c >= "a" && c <= "z") return c; + if (c >= "0" && c <= "9") return c; + if (c === " " || c === "-") return c; + return ""; + }) + .join("") + .split(" ") + .filter(Boolean) + .join("-"); + }; + // Loading state if (loading) { return ( @@ -361,6 +382,120 @@ export default function MissionTabDetailPage() { )} + + {/* Ressources Métiers */} + {(mission.rocketChatChannelId || mission.outlineCollectionId || mission.giteaRepositoryUrl || mission.leantimeProjectId) && ( +
Tenant de Parole
+Espace de discussion
+Tenant du Chapitre
+Espace de documentation
+Tenant du Code
+Espace pour les codes sources
+Tenant des Devoirs
+Espace d'organisation
+