diff --git a/frontend/src/views/coordinator/Students.tsx b/frontend/src/views/coordinator/Students.tsx index d5c52f2..a0d6d96 100644 --- a/frontend/src/views/coordinator/Students.tsx +++ b/frontend/src/views/coordinator/Students.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import React, { useState } from 'react' import { useMutation, useQuery } from 'react-query' import { getStudents, uploadStudents } from '../../api/students' @@ -30,28 +30,44 @@ const Students = () => { mutateUpload(payload) } + const [state, setState] = useState({ + showGroupless: false + }); + if (isStudentsLoading) { return
Ɓadowanie
} return (
- - - +
+ + + + +
@@ -65,7 +81,9 @@ const Students = () => { - {students?.data?.students?.map( + {students?.data?.students?.filter( + (st) => (st.group === null || !state.showGroupless) + ).map( ({ first_name, last_name, index, group, mode }) => (