missions s3

This commit is contained in:
alma 2025-05-06 13:30:16 +02:00
parent 4e1d0d0101
commit 789e891093

View File

@ -210,8 +210,8 @@ export default function MissionsPage() {
</div>
{/* Centered Logo */}
<div className="flex justify-center items-center p-4 flex-grow">
<div className="w-32 h-32 relative">
<div className="flex justify-center items-center p-6 flex-grow">
<div className="w-40 h-40 relative">
{mission.logo ? (
<img
src={mission.logo || ''}
@ -231,44 +231,44 @@ export default function MissionsPage() {
/>
) : null}
<div
className={`logo-fallback w-full h-full flex items-center justify-center bg-gray-100 rounded-md border border-gray-200 text-gray-500 text-2xl font-medium ${mission.logo ? 'hidden' : ''}`}
className={`logo-fallback w-full h-full flex items-center justify-center bg-gray-100 rounded-md border border-gray-200 text-gray-500 text-3xl font-medium ${mission.logo ? 'hidden' : ''}`}
>
{mission.name.slice(0, 2).toUpperCase()}
</div>
</div>
</div>
{/* Card Content */}
{/* Card Content - Only Services section */}
<div className="px-5 pb-3">
<div className="flex flex-col space-y-2">
<div className="flex items-center text-sm text-gray-600">
<span className="font-medium mr-2">Type:</span>
{getMissionTypeLabel(mission.missionType)}
</div>
<div className="flex items-center text-sm text-gray-600">
<span className="font-medium mr-2">Durée:</span>
{getDuration(mission.projection)}
</div>
<div className="flex items-center text-sm text-gray-600">
<span className="font-medium mr-2">Participation:</span>
{getParticipationLabel(mission.participation)}
</div>
{mission.services && mission.services.length > 0 && (
<div className="mt-1">
<span className="text-sm font-medium text-gray-700 block mb-1">Services:</span>
<div className="flex flex-wrap gap-1.5">
{mission.services.map(service => (
<span key={service} className="bg-blue-50 text-blue-700 px-2 py-1 rounded-md text-xs font-medium">
{service}
</span>
))}
</div>
{mission.services && mission.services.length > 0 && (
<div>
<span className="text-sm font-medium text-gray-700 block mb-1">Services:</span>
<div className="flex flex-wrap gap-1.5">
{mission.services.map(service => (
<span key={service} className="bg-blue-50 text-blue-700 px-2 py-1 rounded-md text-xs font-medium">
{service}
</span>
))}
</div>
)}
</div>
</div>
)}
{/* ODD scope icon - moved here and enlarged */}
{oddInfo.number && (
<div className="flex justify-center mt-4">
<div className="flex items-center justify-center bg-gray-100 p-2 rounded-md">
<img
src={oddInfo.iconPath}
alt={oddInfo.label}
className="w-10 h-10"
onError={(e) => {
// Fallback if image fails to load
(e.target as HTMLImageElement).style.display = 'none';
}}
/>
</div>
</div>
)}
</div>
{/* Card Footer */}
@ -277,28 +277,11 @@ export default function MissionsPage() {
Créée le {formatDate(mission.createdAt)}
</span>
<div className="flex items-center gap-2">
{/* ODD scope icon */}
{oddInfo.number && (
<div className="flex items-center bg-gray-100 px-2 py-1 rounded-md">
<img
src={oddInfo.iconPath}
alt={oddInfo.label}
className="w-7 h-7"
onError={(e) => {
// Fallback if image fails to load
(e.target as HTMLImageElement).style.display = 'none';
}}
/>
</div>
)}
<Link href={`/missions/${mission.id}`}>
<Button className="bg-black hover:bg-gray-800 text-white text-xs px-3 py-1 h-7 rounded-md">
Voir détails
</Button>
</Link>
</div>
<Link href={`/missions/${mission.id}`}>
<Button className="bg-black hover:bg-gray-800 text-white text-xs px-3 py-1 h-7 rounded-md">
Voir détails
</Button>
</Link>
</div>
</div>
);