missions button
This commit is contained in:
parent
baa641f521
commit
9ffe01db4f
@ -285,14 +285,30 @@ export function MissionsAdminPanel() {
|
|||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const members = await fetchGroupMembers(groupId);
|
const members = await fetchGroupMembers(groupId);
|
||||||
// Here you would typically open a dialog to show members
|
|
||||||
// For this implementation, we'll just show a toast with the count
|
// Update the users list with the group members and switch to users tab
|
||||||
toast({
|
if (Array.isArray(members) && members.length > 0) {
|
||||||
title: `Membres de ${groupName}`,
|
setUsers(members);
|
||||||
description: `${members.length} membres trouvés dans ce groupe`,
|
setSelectedTab('users');
|
||||||
});
|
setSearchTerm(''); // Clear any existing search
|
||||||
|
|
||||||
|
toast({
|
||||||
|
title: `Membres de ${groupName}`,
|
||||||
|
description: `${members.length} membres trouvés et affichés ci-dessous`,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
toast({
|
||||||
|
title: `Membres de ${groupName}`,
|
||||||
|
description: "Aucun membre trouvé dans ce groupe",
|
||||||
|
});
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error handling group members:", error);
|
console.error("Error handling group members:", error);
|
||||||
|
toast({
|
||||||
|
title: "Erreur",
|
||||||
|
description: "Erreur lors de l'affichage des membres du groupe",
|
||||||
|
variant: "destructive",
|
||||||
|
});
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user