Update color, add refetch after edit students
This commit is contained in:
parent
59c3026602
commit
d286e93755
@ -4,7 +4,7 @@ import TopBar from '../../components/TopBar'
|
|||||||
const Coordinator = () => {
|
const Coordinator = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<TopBar
|
<TopBar
|
||||||
routes={[
|
routes={[
|
||||||
{ name: 'Home', path: '/coordinator/' },
|
{ name: 'Home', path: '/coordinator/' },
|
||||||
{ name: 'Grupy', path: '/coordinator/groups' },
|
{ name: 'Grupy', path: '/coordinator/groups' },
|
||||||
@ -13,7 +13,7 @@ const Coordinator = () => {
|
|||||||
{ name: 'Harmonogram', path: '/coordinator/schedule' },
|
{ name: 'Harmonogram', path: '/coordinator/schedule' },
|
||||||
{ name: 'Dostępność', path: '/coordinator/supervisors_availability' },
|
{ name: 'Dostępność', path: '/coordinator/supervisors_availability' },
|
||||||
]}
|
]}
|
||||||
color="bg-violet-400"
|
color="bg-[#9ae9cc]"
|
||||||
/>
|
/>
|
||||||
<div className="m-10">
|
<div className="m-10">
|
||||||
<Outlet />
|
<Outlet />
|
||||||
|
@ -25,7 +25,7 @@ const Group = () => {
|
|||||||
const [yearGroupId] = useLocalStorageState('yearGroupId')
|
const [yearGroupId] = useLocalStorageState('yearGroupId')
|
||||||
|
|
||||||
const [studentOptions, setStudentOptions] = useState<SelectValue[]>([])
|
const [studentOptions, setStudentOptions] = useState<SelectValue[]>([])
|
||||||
const { isLoading: areStudentsLoading } = useQuery(
|
const { isLoading: areStudentsLoading, refetch: refetchStudents } = useQuery(
|
||||||
'students',
|
'students',
|
||||||
() => getStudents({ year_group_id: Number(yearGroupId), per_page: 1000 }),
|
() => getStudents({ year_group_id: Number(yearGroupId), per_page: 1000 }),
|
||||||
{
|
{
|
||||||
@ -51,6 +51,7 @@ const Group = () => {
|
|||||||
{
|
{
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
refetch()
|
refetch()
|
||||||
|
refetchStudents()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user