Mission Refactor Big
This commit is contained in:
parent
65fbac941e
commit
0cf5035a3e
@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { Search } from "lucide-react";
|
import { Search, Lock } from "lucide-react";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
@ -35,6 +35,8 @@ interface Mission {
|
|||||||
creator: User;
|
creator: User;
|
||||||
missionUsers: MissionUser[];
|
missionUsers: MissionUser[];
|
||||||
intention?: string;
|
intention?: string;
|
||||||
|
isClosed?: boolean;
|
||||||
|
closedAt?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function MissionsPage() {
|
export default function MissionsPage() {
|
||||||
@ -195,7 +197,14 @@ export default function MissionsPage() {
|
|||||||
const niveauColor = getNiveauBadgeColor(mission.niveau);
|
const niveauColor = getNiveauBadgeColor(mission.niveau);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={mission.id} className="bg-white shadow-sm hover:shadow-md transition-shadow duration-200 border border-gray-200 overflow-hidden h-full rounded-lg flex flex-col">
|
<div key={mission.id} className={`bg-white shadow-sm hover:shadow-md transition-shadow duration-200 border overflow-hidden h-full rounded-lg flex flex-col relative ${mission.isClosed ? 'border-amber-300' : 'border-gray-200'}`}>
|
||||||
|
{/* Closed Badge */}
|
||||||
|
{mission.isClosed && (
|
||||||
|
<div className="absolute top-0 right-0 bg-amber-500 text-white text-xs font-medium px-3 py-1 rounded-bl-lg flex items-center gap-1 z-10">
|
||||||
|
<Lock className="h-3 w-3" />
|
||||||
|
Clôturée
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{/* Card Header with Name and Level */}
|
{/* Card Header with Name and Level */}
|
||||||
<div className="px-5 pt-4 pb-3 flex justify-between items-center border-b border-gray-100">
|
<div className="px-5 pt-4 pb-3 flex justify-between items-center border-b border-gray-100">
|
||||||
<h2 className="text-base font-medium text-gray-900 line-clamp-2 flex-1">{mission.name}</h2>
|
<h2 className="text-base font-medium text-gray-900 line-clamp-2 flex-1">{mission.name}</h2>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user