Fix adding group

This commit is contained in:
adam-skowronek 2022-11-17 21:49:55 +01:00
parent 2120ab9690
commit 9c7ae692f5
3 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ export const getGroups = (
)
export const createGroup = (year_group_id: number, payload: CreateGroup) =>
axiosInstance.post(`coordinator/groups/${year_group_id}`, payload)
axiosInstance.post(`coordinator/groups/${year_group_id}/`, payload)
export const deleteGroup = (id: number) =>
axiosInstance.delete(`coordinator/groups/${id}/`)

View File

@ -33,7 +33,7 @@ const AddGroup = () => {
onSuccess: (data) => {
setStudentOptions(
data?.data.students
.filter((st) => st.group === null)
// .filter((st) => st.group === null)
.map(({ first_name, last_name, index }) => {
return {
value: index,
@ -51,7 +51,7 @@ const AddGroup = () => {
onSuccess: (data) => {
setSupervisorOptions(
data?.data.project_supervisors
.filter((ld) => ld.count_groups < ld.limit_group)
// .filter((ld) => ld.count_groups < ld.limit_group)
.map(({ id, first_name, last_name }) => ({
value: id,
label: `${first_name} ${last_name}`,

View File

@ -36,7 +36,7 @@ const EditSchedule = ({
onSuccess: (data) => {
setCommitteeOptions(
data?.data.project_supervisors
.filter((ld) => ld.count_groups < ld.limit_group)
// .filter((ld) => ld.count_groups < ld.limit_group)
.map(({ id, first_name, last_name }) => ({
value: id,
label: `${first_name} ${last_name}`,