Centrale Refactor Big
This commit is contained in:
parent
06f5560d27
commit
818a96d0a0
@ -578,73 +578,104 @@ export default function MissionDetailPage() {
|
|||||||
<div className="bg-white rounded-lg shadow-sm border border-gray-100 p-6">
|
<div className="bg-white rounded-lg shadow-sm border border-gray-100 p-6">
|
||||||
<h2 className="text-xl font-semibold text-gray-800 mb-4">Ressources Métiers</h2>
|
<h2 className="text-xl font-semibold text-gray-800 mb-4">Ressources Métiers</h2>
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
{mission.rocketChatChannelId && (
|
{mission.rocketChatChannelId && (() => {
|
||||||
<a
|
// Build RocketChat URL: parole.slm-lab.net/channel/[channelId]
|
||||||
href={mission.rocketChatChannelId}
|
// If it's already a full URL, use it; otherwise build from ID
|
||||||
target="_blank"
|
const rocketChatUrl = mission.rocketChatChannelId.startsWith('http')
|
||||||
rel="noopener noreferrer"
|
? mission.rocketChatChannelId
|
||||||
className="flex items-center gap-3 p-3 bg-blue-50 rounded-lg border border-blue-100 hover:bg-blue-100 transition-colors cursor-pointer"
|
: `https://parole.slm-lab.net/channel/${mission.rocketChatChannelId}`;
|
||||||
>
|
|
||||||
<div className="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center">
|
return (
|
||||||
<Users className="h-5 w-5 text-blue-600" />
|
<a
|
||||||
</div>
|
href={rocketChatUrl}
|
||||||
<div className="flex-1">
|
target="_blank"
|
||||||
<p className="font-medium text-gray-900">Espace de discussion</p>
|
rel="noopener noreferrer"
|
||||||
<p className="text-sm text-gray-500">RocketChat</p>
|
className="flex items-center gap-3 p-3 bg-blue-50 rounded-lg border border-blue-100 hover:bg-blue-100 transition-colors cursor-pointer"
|
||||||
</div>
|
>
|
||||||
</a>
|
<div className="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center">
|
||||||
)}
|
<Users className="h-5 w-5 text-blue-600" />
|
||||||
|
</div>
|
||||||
|
<div className="flex-1">
|
||||||
|
<p className="font-medium text-gray-900">Tenant de Parole</p>
|
||||||
|
<p className="text-sm text-gray-500">Espace de discussion</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
|
|
||||||
{mission.outlineCollectionId && (
|
{mission.outlineCollectionId && (() => {
|
||||||
<a
|
// Build Outline URL: chapitre.slm-lab.net/collection/[collectionId]
|
||||||
href={mission.outlineCollectionId}
|
// If it's already a full URL, use it; otherwise build from ID
|
||||||
target="_blank"
|
const outlineUrl = mission.outlineCollectionId.startsWith('http')
|
||||||
rel="noopener noreferrer"
|
? mission.outlineCollectionId
|
||||||
className="flex items-center gap-3 p-3 bg-purple-50 rounded-lg border border-purple-100 hover:bg-purple-100 transition-colors cursor-pointer"
|
: `https://chapitre.slm-lab.net/collection/${mission.outlineCollectionId}`;
|
||||||
>
|
|
||||||
<div className="w-10 h-10 bg-purple-100 rounded-full flex items-center justify-center">
|
return (
|
||||||
<FileText className="h-5 w-5 text-purple-600" />
|
<a
|
||||||
</div>
|
href={outlineUrl}
|
||||||
<div className="flex-1">
|
target="_blank"
|
||||||
<p className="font-medium text-gray-900">Espace de documentation</p>
|
rel="noopener noreferrer"
|
||||||
<p className="text-sm text-gray-500">Outline</p>
|
className="flex items-center gap-3 p-3 bg-purple-50 rounded-lg border border-purple-100 hover:bg-purple-100 transition-colors cursor-pointer"
|
||||||
</div>
|
>
|
||||||
</a>
|
<div className="w-10 h-10 bg-purple-100 rounded-full flex items-center justify-center">
|
||||||
)}
|
<FileText className="h-5 w-5 text-purple-600" />
|
||||||
|
</div>
|
||||||
|
<div className="flex-1">
|
||||||
|
<p className="font-medium text-gray-900">Tenant du Chapitre</p>
|
||||||
|
<p className="text-sm text-gray-500">Espace de documentation</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
|
|
||||||
{mission.giteaRepositoryUrl && (
|
{mission.giteaRepositoryUrl && (() => {
|
||||||
<a
|
// Gitea URL should already be a full URL, but handle both cases
|
||||||
href={mission.giteaRepositoryUrl}
|
const giteaUrl = mission.giteaRepositoryUrl.startsWith('http')
|
||||||
target="_blank"
|
? mission.giteaRepositoryUrl
|
||||||
rel="noopener noreferrer"
|
: `https://gite.slm-lab.net/${mission.giteaRepositoryUrl}`;
|
||||||
className="flex items-center gap-3 p-3 bg-green-50 rounded-lg border border-green-100 hover:bg-green-100 transition-colors cursor-pointer"
|
|
||||||
>
|
return (
|
||||||
<div className="w-10 h-10 bg-green-100 rounded-full flex items-center justify-center">
|
<a
|
||||||
<FileIcon className="h-5 w-5 text-green-600" />
|
href={giteaUrl}
|
||||||
</div>
|
target="_blank"
|
||||||
<div className="flex-1">
|
rel="noopener noreferrer"
|
||||||
<p className="font-medium text-gray-900">Espace pour les codes sources</p>
|
className="flex items-center gap-3 p-3 bg-green-50 rounded-lg border border-green-100 hover:bg-green-100 transition-colors cursor-pointer"
|
||||||
<p className="text-sm text-gray-500">Gitea</p>
|
>
|
||||||
</div>
|
<div className="w-10 h-10 bg-green-100 rounded-full flex items-center justify-center">
|
||||||
</a>
|
<FileIcon className="h-5 w-5 text-green-600" />
|
||||||
)}
|
</div>
|
||||||
|
<div className="flex-1">
|
||||||
|
<p className="font-medium text-gray-900">Tenant du Code</p>
|
||||||
|
<p className="text-sm text-gray-500">Espace pour les codes sources</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
|
|
||||||
{mission.leantimeProjectId && (
|
{mission.leantimeProjectId && (() => {
|
||||||
<a
|
// Build Leantime URL: agilite.slm-lab.net/projects/showProject/[projectId]
|
||||||
href={mission.leantimeProjectId.startsWith('http') ? mission.leantimeProjectId : `https://agilite.slm-lab.net/projects/showProject/${mission.leantimeProjectId}`}
|
// If it's already a full URL, use it; otherwise build from ID
|
||||||
target="_blank"
|
const leantimeUrl = mission.leantimeProjectId.startsWith('http')
|
||||||
rel="noopener noreferrer"
|
? mission.leantimeProjectId
|
||||||
className="flex items-center gap-3 p-3 bg-amber-50 rounded-lg border border-amber-100 hover:bg-amber-100 transition-colors cursor-pointer"
|
: `https://agilite.slm-lab.net/projects/showProject/${mission.leantimeProjectId}`;
|
||||||
>
|
|
||||||
<div className="w-10 h-10 bg-amber-100 rounded-full flex items-center justify-center">
|
return (
|
||||||
<Calendar className="h-5 w-5 text-amber-600" />
|
<a
|
||||||
</div>
|
href={leantimeUrl}
|
||||||
<div className="flex-1">
|
target="_blank"
|
||||||
<p className="font-medium text-gray-900">Espace d'organisation</p>
|
rel="noopener noreferrer"
|
||||||
<p className="text-sm text-gray-500">Leantime</p>
|
className="flex items-center gap-3 p-3 bg-amber-50 rounded-lg border border-amber-100 hover:bg-amber-100 transition-colors cursor-pointer"
|
||||||
</div>
|
>
|
||||||
</a>
|
<div className="w-10 h-10 bg-amber-100 rounded-full flex items-center justify-center">
|
||||||
)}
|
<Calendar className="h-5 w-5 text-amber-600" />
|
||||||
|
</div>
|
||||||
|
<div className="flex-1">
|
||||||
|
<p className="font-medium text-gray-900">Tenant des Devoirs</p>
|
||||||
|
<p className="text-sm text-gray-500">Espace d'organisation</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user