user nouveau onglet
This commit is contained in:
@@ -58,7 +58,7 @@ export default function CoursDetailPage() {
|
|||||||
if (result.data) {
|
if (result.data) {
|
||||||
// Filtrer les étudiants pour ce référent et ce cours
|
// Filtrer les étudiants pour ce référent et ce cours
|
||||||
const filtered = result.data.filter(
|
const filtered = result.data.filter(
|
||||||
(user: any) =>
|
(user: { referent?: string; cours?: string }) =>
|
||||||
user.referent === referent && user.cours === cours
|
user.referent === referent && user.cours === cours
|
||||||
);
|
);
|
||||||
setStudents(filtered);
|
setStudents(filtered);
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { Badge } from "@/components/ui/badge";
|
|
||||||
import { Button } from "@/components/ui/button";
|
|
||||||
import { GraduationCap, Users, ChevronRight } from "lucide-react";
|
import { GraduationCap, Users, ChevronRight } from "lucide-react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
@@ -37,7 +35,7 @@ export default function ReferentsPage() {
|
|||||||
// Grouper par référent
|
// Grouper par référent
|
||||||
const referentsMap = new Map<string, ReferentData>();
|
const referentsMap = new Map<string, ReferentData>();
|
||||||
|
|
||||||
result.data.forEach((user: any) => {
|
result.data.forEach((user: { referent?: string; cours?: string }) => {
|
||||||
if (user.referent) {
|
if (user.referent) {
|
||||||
if (!referentsMap.has(user.referent)) {
|
if (!referentsMap.has(user.referent)) {
|
||||||
referentsMap.set(user.referent, {
|
referentsMap.set(user.referent, {
|
||||||
|
|||||||
Reference in New Issue
Block a user