diff --git a/app/missions/[missionId]/page.tsx b/app/missions/[missionId]/page.tsx index d5b5770..cee35e3 100644 --- a/app/missions/[missionId]/page.tsx +++ b/app/missions/[missionId]/page.tsx @@ -578,73 +578,104 @@ export default function MissionDetailPage() {

Ressources Métiers

- {mission.rocketChatChannelId && ( - -
- -
-
-

Espace de discussion

-

RocketChat

-
-
- )} + {mission.rocketChatChannelId && (() => { + // Build RocketChat URL: parole.slm-lab.net/channel/[channelId] + // If it's already a full URL, use it; otherwise build from ID + const rocketChatUrl = mission.rocketChatChannelId.startsWith('http') + ? mission.rocketChatChannelId + : `https://parole.slm-lab.net/channel/${mission.rocketChatChannelId}`; + + return ( + +
+ +
+
+

Tenant de Parole

+

Espace de discussion

+
+
+ ); + })()} - {mission.outlineCollectionId && ( - -
- -
-
-

Espace de documentation

-

Outline

-
-
- )} + {mission.outlineCollectionId && (() => { + // Build Outline URL: chapitre.slm-lab.net/collection/[collectionId] + // If it's already a full URL, use it; otherwise build from ID + const outlineUrl = mission.outlineCollectionId.startsWith('http') + ? mission.outlineCollectionId + : `https://chapitre.slm-lab.net/collection/${mission.outlineCollectionId}`; + + return ( + +
+ +
+
+

Tenant du Chapitre

+

Espace de documentation

+
+
+ ); + })()} - {mission.giteaRepositoryUrl && ( - -
- -
-
-

Espace pour les codes sources

-

Gitea

-
-
- )} + {mission.giteaRepositoryUrl && (() => { + // Gitea URL should already be a full URL, but handle both cases + const giteaUrl = mission.giteaRepositoryUrl.startsWith('http') + ? mission.giteaRepositoryUrl + : `https://gite.slm-lab.net/${mission.giteaRepositoryUrl}`; + + return ( + +
+ +
+
+

Tenant du Code

+

Espace pour les codes sources

+
+
+ ); + })()} - {mission.leantimeProjectId && ( - -
- -
-
-

Espace d'organisation

-

Leantime

-
-
- )} + {mission.leantimeProjectId && (() => { + // Build Leantime URL: agilite.slm-lab.net/projects/showProject/[projectId] + // If it's already a full URL, use it; otherwise build from ID + const leantimeUrl = mission.leantimeProjectId.startsWith('http') + ? mission.leantimeProjectId + : `https://agilite.slm-lab.net/projects/showProject/${mission.leantimeProjectId}`; + + return ( + +
+ +
+
+

Tenant des Devoirs

+

Espace d'organisation

+
+
+ ); + })()}
)}