feat: total members on direction line manage
This commit is contained in:
@@ -15,6 +15,11 @@ interface TreeCategoryHeaderProps {
|
||||
onDelete?: () => void;
|
||||
canDelete?: boolean;
|
||||
isDirection?: boolean; // Pour différencier les directions des catégories de skills
|
||||
directionStats?: {
|
||||
direction: string;
|
||||
totalMembers: number;
|
||||
hasMembers: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export function TreeCategoryHeader({
|
||||
@@ -28,6 +33,7 @@ export function TreeCategoryHeader({
|
||||
onDelete,
|
||||
canDelete = true,
|
||||
isDirection = false,
|
||||
directionStats,
|
||||
}: TreeCategoryHeaderProps) {
|
||||
return (
|
||||
<div>
|
||||
@@ -47,6 +53,15 @@ export function TreeCategoryHeader({
|
||||
{icon}
|
||||
<h3 className="text-base font-semibold text-white">{category}</h3>
|
||||
<div className="flex items-center gap-2 ml-auto">
|
||||
{isDirection && directionStats && directionStats.hasMembers && (
|
||||
<Badge
|
||||
variant="secondary"
|
||||
className="text-xs px-2 py-0.5 bg-blue-500/20 text-blue-300 border-blue-500/30"
|
||||
>
|
||||
{directionStats.totalMembers} membre
|
||||
{directionStats.totalMembers > 1 ? "s" : ""}
|
||||
</Badge>
|
||||
)}
|
||||
<Badge variant="outline" className="text-xs px-2 py-0.5">
|
||||
{itemCount} {itemLabel}
|
||||
{itemCount > 1 ? "s" : ""}
|
||||
|
||||
Reference in New Issue
Block a user