diff --git a/src/apis/outAccept/outAccept.ts b/src/apis/outAccept/outAccept.ts index 2bb84fa..717d218 100644 --- a/src/apis/outAccept/outAccept.ts +++ b/src/apis/outAccept/outAccept.ts @@ -57,6 +57,7 @@ export const useOutAccept = () => { mutationFn: async (param) => { try { const response = await instance.patch(`${param.type}/status`, { + type: param.type, status: param.status, ids: param.ids, }); diff --git a/src/apis/outList/list.ts b/src/apis/outList/list.ts index dcd3838..b5c8e68 100644 --- a/src/apis/outList/list.ts +++ b/src/apis/outList/list.ts @@ -2,12 +2,10 @@ import apiError from "@/hook/apiError"; import { instance } from ".."; import { useMutation, useQueries, useQuery } from "@tanstack/react-query"; -interface UuidProp { - id: string[]; -} interface applicationOK { id: string; username: string; + user_id: string; start_time: string; end_time: string; grade: number; @@ -55,7 +53,7 @@ interface ReturnHomeData { } interface earlyReturnHome { - id: string; + user_id: string; username: string; start_time: string; grade: number; diff --git a/src/apis/type.ts b/src/apis/type.ts index 9895c10..32f24f8 100644 --- a/src/apis/type.ts +++ b/src/apis/type.ts @@ -70,7 +70,7 @@ export interface changeClass { } export interface FloorClass { - id: string; + user_id: string; class_num: number; classroom_name: string; end_period: number; diff --git a/src/app/classChange/page.tsx b/src/app/classChange/page.tsx index 5309b50..c8fad11 100644 --- a/src/app/classChange/page.tsx +++ b/src/app/classChange/page.tsx @@ -12,7 +12,7 @@ import Modal from "../components/common/modal/page"; import useAcceptListSelection from "@/hook/hook"; interface FloorClass { - id: string; + user_id: string; class_num: number; classroom_name: string; end_period: number; @@ -154,7 +154,7 @@ const ClassChange = () => { handleAcceptListClick(item.id, item.username)} + onClick={() => handleAcceptListClick(item.user_id, item.username)} prevClass={item.move} nextClass={`${item.classroom_name}`} student={getStudentString(item)} diff --git a/src/app/outAccept/page.tsx b/src/app/outAccept/page.tsx index 7193ff3..35ca725 100644 --- a/src/app/outAccept/page.tsx +++ b/src/app/outAccept/page.tsx @@ -261,7 +261,7 @@ const OutAccept = () => { {data.map((dataItem, index) => ( - handleAcceptListClick(dataItem.id, dataItem.username) + handleAcceptListClick(dataItem.user_id, dataItem.username) } key={index} time={`${dataItem.start_time} ~`}