diff --git a/app/mission-tab/[missionId]/page.tsx b/app/mission-tab/[missionId]/page.tsx index d175aa9c..eecf8415 100644 --- a/app/mission-tab/[missionId]/page.tsx +++ b/app/mission-tab/[missionId]/page.tsx @@ -138,7 +138,7 @@ export default function MissionTabDetailPage() { // Loading state if (loading) { return ( -
+
); @@ -147,7 +147,7 @@ export default function MissionTabDetailPage() { // Error state if mission not found if (!mission) { return ( -
+

Mission non trouvée

Cette mission n'existe pas ou a été supprimée.

@@ -165,225 +165,197 @@ export default function MissionTabDetailPage() { const oddInfo = getODDInfo(mission.oddScope); return ( -
-
- {/* Back Button */} -
- -
+
+ {/* Back Button */} +
+ +
- {/* Page Title */} -
-

Détails de la Mission

-
-
- - {/* Header */} -
-
-
-

{mission.name}

-
-
- - {formatDate(mission.createdAt)} -
-
- - {Math.floor(Math.random() * 100) + 1} Views -
+ {/* Header */} +
+
+
+

{mission.name}

+
+
+ + {formatDate(mission.createdAt)} +
+
+ + {Math.floor(Math.random() * 100) + 1} Views
+
+ + {/* Display logo instead of Participate button */} +
+ {mission.logoUrl ? ( + {mission.name} { + console.log("Logo failed to load:", mission.logoUrl); + // Show placeholder on error + (e.currentTarget as HTMLImageElement).style.display = 'none'; + const parent = e.currentTarget.parentElement; + if (parent) { + parent.classList.add('bg-gray-100'); + parent.classList.add('flex'); + parent.classList.add('items-center'); + parent.classList.add('justify-center'); + parent.innerHTML = `${mission.name.slice(0, 2).toUpperCase()}`; + } + }} + /> + ) : ( +
+ {mission.name.slice(0, 2).toUpperCase()} +
+ )} +
+
+
+ + {/* Mission Details Content */} +
+ {/* Left Column - Details and Metadata */} +
+ {/* Mission Information */} +
+

À propos de la mission

- {/* Display logo */} -
- {mission.logoUrl ? ( - {mission.name} { - console.log("Logo failed to load:", mission.logoUrl); - // Show placeholder on error - (e.currentTarget as HTMLImageElement).style.display = 'none'; - const parent = e.currentTarget.parentElement; - if (parent) { - parent.classList.add('bg-gray-100'); - parent.classList.add('flex'); - parent.classList.add('items-center'); - parent.classList.add('justify-center'); - parent.innerHTML = `${mission.name.slice(0, 2).toUpperCase()}`; - } - }} - /> - ) : ( -
- {mission.name.slice(0, 2).toUpperCase()} + {/* Mission Badge Row */} +
+ {oddInfo.number && ( +
+ {oddInfo.label} { + (e.target as HTMLImageElement).style.display = 'none'; + }} + /> + {oddInfo.label}
)} -
-
-
- - {/* Info Grid */} -
-
-
- -
-
-

Type de mission

-

{getMissionTypeLabel(mission.missionType)}

-
-
- -
-
- -
-
-

Donneur d'ordre

-

{mission.donneurDOrdre || "Non spécifié"}

-
-
- -
-
- -
-
-

Durée

-

{getDurationLabel(mission.projection)}

-
-
- -
-
- -
-
-

Niveau

-

{getNiveauLabel(mission.niveau)}

-
-
- -
-
- -
-
-

Participation

-

{mission.participation || "Non spécifié"}

-
-
- - {oddInfo.number && ( -
-
- {oddInfo.label} +
+ + {getMissionTypeLabel(mission.missionType)}
-
-

Objectif

-

Développement durable

+
+ + {getDurationLabel(mission.projection)} +
+
+ + Niveau: {getNiveauLabel(mission.niveau)} +
+
+ + {/* Mission Description */} + {mission.intention && ( +
+

Description

+

{mission.intention}

+
+ )} + + {/* Mission Creator */} +
+

Mission créée par

+
+
+ + {mission.creator.email.substring(0, 2).toUpperCase()} + +
+
+

{mission.creator.email}

+

{formatDate(mission.createdAt)}

+
+
+
+
+ + {/* Attachments Section */} + {mission.attachments && mission.attachments.length > 0 && ( +
+

Fichiers joints

+
+ {mission.attachments.map((attachment) => ( +
+
+
+ +
+
+

{attachment.filename}

+

+ {(attachment.fileSize / 1024).toFixed(1)} KB • {attachment.fileType} +

+
+
+ + Télécharger + +
+ ))}
)}
- - {/* Project Description */} -
-

Description de la mission

-
- {mission.intention || "Aucune description disponible pour cette mission."} -
-
- - {/* Attachments Section */} - {mission.attachments && mission.attachments.length > 0 && ( -
-

Documents

-
- {mission.attachments.map((attachment) => ( - -
- + + {/* Right Column - Services and Profils */} + - )} - - {/* Skills Required Section */} - {mission.profils && mission.profils.length > 0 && ( -
-

Profils recherchés

-
- {mission.profils.map((profil, index) => ( - - {profil} - - ))} -
-
- )} - - {/* Services Section */} - {mission.services && mission.services.length > 0 && ( -
-

Services

-
- {mission.services.map((service, index) => ( - - {service} - - ))} -
-
- )} - - {/* Actions Footer */} -
- + )} - + {/* Profils Requis Section */} + {mission.profils && mission.profils.length > 0 && ( +
+

Profils requis

+
+ {mission.profils.map((profil, index) => ( +
+ + {profil} +
+ ))} +
+
+ )}
diff --git a/app/mission-tab/page.tsx b/app/mission-tab/page.tsx index 101d3934..442e933f 100644 --- a/app/mission-tab/page.tsx +++ b/app/mission-tab/page.tsx @@ -125,17 +125,16 @@ export default function MissionTabPage() { }; return ( -
+
{/* Page Title */} -
-

Le Tableau des Missions

-
+
+

Le Tableau des Missions

{/* Search Header */} -
+
-

Toutes les missions disponibles

+

Toutes les missions disponibles

{/* Missions Grid */} -
+
{loading ? (
) : filteredMissions.length > 0 ? ( -
+
{filteredMissions.map((mission) => { const oddInfo = getODDInfo(mission); const niveauColor = getNiveauBadgeColor(mission.niveau); @@ -256,14 +255,11 @@ export default function MissionTabPage() { })}
) : ( -
-
- +
+
+

Aucune mission trouvée

+

Modifiez vos critères de recherche ou réessayez plus tard.

-

Aucune mission trouvée

-

- Essayez de modifier vos critères de recherche. -

)}