Fix adding group
This commit is contained in:
parent
2120ab9690
commit
9c7ae692f5
@ -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}/`)
|
||||
|
@ -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}`,
|
||||
|
@ -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}`,
|
||||
|
Loading…
Reference in New Issue
Block a user