feat: total members on direction line manage
This commit is contained in:
@@ -18,6 +18,11 @@ interface TeamsListProps {
|
||||
onDeleteDirection: (direction: string) => void;
|
||||
onViewMembers: (team: TeamType) => void;
|
||||
getTeamStats: (teamId: string) => TeamStats | undefined;
|
||||
getDirectionStats: (direction: string) => {
|
||||
direction: string;
|
||||
totalMembers: number;
|
||||
hasMembers: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export function TeamsList({
|
||||
@@ -29,6 +34,7 @@ export function TeamsList({
|
||||
onDeleteDirection,
|
||||
onViewMembers,
|
||||
getTeamStats,
|
||||
getDirectionStats,
|
||||
}: TeamsListProps) {
|
||||
return (
|
||||
<>
|
||||
@@ -46,6 +52,7 @@ export function TeamsList({
|
||||
onDelete={() => onDeleteDirection(direction)}
|
||||
canDelete={true}
|
||||
isDirection={true}
|
||||
directionStats={getDirectionStats(direction)}
|
||||
/>
|
||||
|
||||
{/* Liste des teams de la direction */}
|
||||
|
||||
@@ -45,6 +45,7 @@ export function TeamsManagementPage({
|
||||
setTeamFormData,
|
||||
resetForm,
|
||||
getTeamStats,
|
||||
getDirectionStats,
|
||||
handleCreateTeam,
|
||||
handleEditTeam,
|
||||
handleUpdateTeam,
|
||||
@@ -145,6 +146,7 @@ export function TeamsManagementPage({
|
||||
onDeleteDirection={handleDeleteDirection}
|
||||
onViewMembers={handleViewMembers}
|
||||
getTeamStats={getTeamStats}
|
||||
getDirectionStats={getDirectionStats}
|
||||
/>
|
||||
</TreeViewPage>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user