diff --git a/src/apis/afterManage/index.ts b/src/apis/afterManage/index.ts index 0546f22..e4dd565 100644 --- a/src/apis/afterManage/index.ts +++ b/src/apis/afterManage/index.ts @@ -13,7 +13,7 @@ export const After = (param: Type) => { grade: param.grade, class_num: param.class_num, num: param.num, - name: param.name, + user_name: param.user_name, }); } catch (error) { handleError(error); diff --git a/src/apis/changeClass/index.ts b/src/apis/changeClass/index.ts index f314496..e1eabc2 100644 --- a/src/apis/changeClass/index.ts +++ b/src/apis/changeClass/index.ts @@ -58,7 +58,7 @@ export const AcceptClass = () => { try { await instance.patch(`/class-room/status`, { status: param.status, - ids: param.id, + id_list: param.id, }); } catch (error) { handleError(error); diff --git a/src/apis/outAccept/outAccept.ts b/src/apis/outAccept/outAccept.ts index 5fb59a3..6c1ef82 100644 --- a/src/apis/outAccept/outAccept.ts +++ b/src/apis/outAccept/outAccept.ts @@ -11,13 +11,13 @@ interface applicationDataProp { reason: string; start: string; user_id: string; - username: string; + user_name: string; } interface accept { type: "application" | "early-return"; status: "OK" | "NO"; - ids: string[]; + id_list: string[]; } type RequestType = { @@ -59,7 +59,7 @@ export const useOutAccept = () => { try { const response = await instance.patch(`${param.type}/status`, { status: param.status, - ids: param.ids, + id_list: param.id_list, }); return response.data; } catch (error) { diff --git a/src/apis/outList/list.ts b/src/apis/outList/list.ts index 3de10d7..08d63b8 100644 --- a/src/apis/outList/list.ts +++ b/src/apis/outList/list.ts @@ -4,7 +4,7 @@ import { useMutation, useQueries, useQuery } from "@tanstack/react-query"; interface applicationOK { id: string; - username: string; + user_name: string; user_id: string; start: string; end: string; @@ -17,7 +17,7 @@ interface applicationOK { interface OutListData { id: string; user_id: string; - username: string; + user_name: string; start: string; end: string; grade: number; @@ -36,7 +36,7 @@ interface previousStudent { reason: string; start: string; end: string; - username: string; + user_name: string; date: string; type: "APPLICATION" | "EARLY_RETURN"; } @@ -44,7 +44,7 @@ interface previousStudent { interface ReturnHomeData { id: string; user_id: string; - username: string; + user_name: string; start: string; grade: number; class_num: number; @@ -54,7 +54,7 @@ interface ReturnHomeData { interface earlyReturnHome { user_id: string; - username: string; + user_name: string; start: string; grade: number; class_num: number; @@ -98,7 +98,7 @@ export const GetPreviousList = () => { try { const response = await instance.get(`/story/query`, { params: { - name: requestParam.name, + user_name: requestParam.name, }, }); return response.data; diff --git a/src/apis/previousList/index.ts b/src/apis/previousList/index.ts index 97f770a..70c43c5 100644 --- a/src/apis/previousList/index.ts +++ b/src/apis/previousList/index.ts @@ -3,7 +3,7 @@ import { instance } from ".."; import { useMutation } from "@tanstack/react-query"; export interface PreviousType { - username: string; + user_name: string; application_story: { reason: string; start_time: string; @@ -15,7 +15,7 @@ export interface PreviousType { interface GetCntType { id: string; - name: string; + user_name: string; grade: number; class_num: number; num: number; diff --git a/src/apis/selfStudy/index.ts b/src/apis/selfStudy/index.ts index 2b2c9d9..9d7d21d 100644 --- a/src/apis/selfStudy/index.ts +++ b/src/apis/selfStudy/index.ts @@ -4,7 +4,7 @@ import apiError from "@/hook/apiError"; interface ClassCheck { id: string; - username: string; + user_name: string; grade: number; class_num: number; num: number; diff --git a/src/apis/type.ts b/src/apis/type.ts index 32f24f8..c6a28b0 100644 --- a/src/apis/type.ts +++ b/src/apis/type.ts @@ -13,7 +13,7 @@ export interface Type { grade: number; class_num: number; num: number; - name: string; + user_name: string; } export interface ChangeStatus { @@ -26,7 +26,7 @@ export interface AfterStudent { grade: number; class_num: number; num: number; - name: string; + user_name: string; status1: string; status2: string; status3: string; @@ -34,7 +34,7 @@ export interface AfterStudent { export interface ClubList { id: string; - username: string; + user_name: string; grade: number; class_num: number; num: number; @@ -46,7 +46,7 @@ export interface ClubList { } export interface Students { - name: string; + user_name: string; grade: number; class_num: number; num: number; @@ -66,7 +66,7 @@ export interface changeClass { move: string; num: number; start_period: number; - username: string; + user_name: string; } export interface FloorClass { @@ -78,7 +78,7 @@ export interface FloorClass { move: string; num: number; start_period: number; - username: string; + user_name: string; } export interface postTeacherProp { @@ -94,7 +94,7 @@ export interface data { export interface Student { user_id: string; - name: string; + user_name: string; grade: number; class_num: number; num: number; diff --git a/src/apis/weekendMeal/index.ts b/src/apis/weekendMeal/index.ts index c8ab148..be514dd 100644 --- a/src/apis/weekendMeal/index.ts +++ b/src/apis/weekendMeal/index.ts @@ -9,7 +9,7 @@ interface ChangeStateParams { interface mealcheckProp { id: string; - name: string; + user_name: string; status: "OK" | "NO"; grade: number; class_num: number; @@ -18,7 +18,7 @@ interface mealcheckProp { interface notCheckMeal { id: string; - name: string; + user_name: string; status: "QUIET"; grade: number; class_num: number; diff --git a/src/app/WeekendMeals/all/page.tsx b/src/app/WeekendMeals/all/page.tsx index fcb0f5b..0d7ae71 100644 --- a/src/app/WeekendMeals/all/page.tsx +++ b/src/app/WeekendMeals/all/page.tsx @@ -9,7 +9,7 @@ import { useRouter } from "next/navigation"; interface StudentStatus { id: string; - name: string; + user_name: string; status: "OK" | "NO" | "QUIET"; grade: number; class_num: number; @@ -54,7 +54,7 @@ const AllWeekendMeal = () => { ))} diff --git a/src/app/WeekendMeals/page.tsx b/src/app/WeekendMeals/page.tsx index db09d9a..7d9ad48 100644 --- a/src/app/WeekendMeals/page.tsx +++ b/src/app/WeekendMeals/page.tsx @@ -111,7 +111,7 @@ const WeekendMeals: NextPage = () => { Change(selectedOption, item.id) @@ -133,7 +133,7 @@ const WeekendMeals: NextPage = () => { Change(selectedOption, item.id) diff --git a/src/app/afterManage/page.tsx b/src/app/afterManage/page.tsx index 068bb10..ca8d2f7 100644 --- a/src/app/afterManage/page.tsx +++ b/src/app/afterManage/page.tsx @@ -293,7 +293,7 @@ const AfterManage = () => { state5={item.status10} friday={true} onClick={() => - handleAcceptListClick(item.id, item.username) + handleAcceptListClick(item.id, item.user_name) } /> ); @@ -309,7 +309,7 @@ const AfterManage = () => { state4={item.status9} state5={item.status10} onClick={() => - handleAcceptListClick(item.id, item.username) + handleAcceptListClick(item.id, item.user_name) } /> ); @@ -330,7 +330,7 @@ const AfterManage = () => { state5={item.status10} friday={true} onClick={() => - handleAcceptListClick(item.id, item.username) + handleAcceptListClick(item.id, item.user_name) } type="NO" /> @@ -347,7 +347,7 @@ const AfterManage = () => { state4={item.status9} state5={item.status10} onClick={() => - handleAcceptListClick(item.id, item.username) + handleAcceptListClick(item.id, item.user_name) } type="NO" /> @@ -379,7 +379,7 @@ const AfterManage = () => { className="flex w-32 bg-white h-14 items-center justify-center rounded-lg text-label1" key={index} > - {setStudentNum(item)} {item.name} + {setStudentNum(item)} {item.user_name} ))} @@ -397,7 +397,7 @@ const AfterManage = () => { state4={item.status2} state5={item.status3} onClick={() => - handleAcceptListClick(item.id, item.name) + handleAcceptListClick(item.id, item.user_name) } createRoom={true} /> @@ -415,7 +415,7 @@ const AfterManage = () => {
창조실
{dataList?.map((item, index) => ( - + ))}
diff --git a/src/app/classChange/ok/page.tsx b/src/app/classChange/ok/page.tsx index 974e6c1..183b7bd 100644 --- a/src/app/classChange/ok/page.tsx +++ b/src/app/classChange/ok/page.tsx @@ -19,7 +19,7 @@ interface changeClass { move: string; num: number; start_period: number; - username: string; + user_name: string; } const ClassChangeOk = () => { diff --git a/src/app/classChange/page.tsx b/src/app/classChange/page.tsx index c8fad11..05ee4fa 100644 --- a/src/app/classChange/page.tsx +++ b/src/app/classChange/page.tsx @@ -20,7 +20,7 @@ interface FloorClass { move: string; num: number; start_period: number; - username: string; + user_name: string; } const ClassChange = () => { @@ -154,7 +154,7 @@ const ClassChange = () => { handleAcceptListClick(item.user_id, item.username)} + onClick={() => handleAcceptListClick(item.user_id, item.user_name)} prevClass={item.move} nextClass={`${item.classroom_name}`} student={getStudentString(item)} diff --git a/src/app/components/common/list/before/index.tsx b/src/app/components/common/list/before/index.tsx index ef8ecd4..35a968a 100644 --- a/src/app/components/common/list/before/index.tsx +++ b/src/app/components/common/list/before/index.tsx @@ -9,13 +9,13 @@ import OutBedge from "./badge"; interface getProp { id: string; - userName: string; + user_name: string; APPLICATION: number; EARLY_RETURN: number; } interface Type { - username: string; + user_name: string; application_story: { reason: string; start: string; @@ -27,7 +27,7 @@ interface Type { const PreviousList: React.FC = ({ id, - userName, + user_name, APPLICATION, EARLY_RETURN, }) => { @@ -76,7 +76,7 @@ const PreviousList: React.FC = ({ onClick={toggleDropdown} >
-
{userName}
+
{user_name}
diff --git a/src/app/outAccept/page.tsx b/src/app/outAccept/page.tsx index 1e279bc..b0b558d 100644 --- a/src/app/outAccept/page.tsx +++ b/src/app/outAccept/page.tsx @@ -67,7 +67,7 @@ const OutAccept = () => { { type: reqOption, status: "OK", - ids: selectedStudents, + id_list: selectedStudents, }, { onSuccess: () => { @@ -120,7 +120,7 @@ const OutAccept = () => { { type: reqOption, status: "NO", - ids: selectedStudents, + id_list: selectedStudents, }, { onSuccess: () => { @@ -188,7 +188,7 @@ const OutAccept = () => { {getClassMutate?.map((dataItem, index) => ( - handleAcceptListClick(dataItem.id, dataItem.username) + handleAcceptListClick(dataItem.id, dataItem.user_name) } key={index} time={`${dataItem.start} ~ ${dataItem.end}`} @@ -202,7 +202,7 @@ const OutAccept = () => { {getClassMutate?.map((dataItem, index) => ( - handleAcceptListClick(dataItem.id, dataItem.username) + handleAcceptListClick(dataItem.id, dataItem.user_name) } key={index} time={`${dataItem.start} ~`} diff --git a/src/app/outAccept/previous/page.tsx b/src/app/outAccept/previous/page.tsx index c10123b..a5696aa 100644 --- a/src/app/outAccept/previous/page.tsx +++ b/src/app/outAccept/previous/page.tsx @@ -11,7 +11,7 @@ import { useEffect, useState } from "react"; interface StudentData { id: string; - name: string; + user_name: string; grade: number; class_num: number; num: number; @@ -87,7 +87,7 @@ const Previous = () => { key={index} APPLICATION={item.application_cnt} EARLY_RETURN={item.early_return_cnt} - userName={`${setStudentNum(item)} ${item.name}`} + user_name={`${setStudentNum(item)} ${item.user_name}`} /> ))} diff --git a/src/app/outList/page.tsx b/src/app/outList/page.tsx index 44714cf..c501493 100644 --- a/src/app/outList/page.tsx +++ b/src/app/outList/page.tsx @@ -19,7 +19,7 @@ import useAcceptListSelection from "@/hook/hook"; interface applicationOK { id: string; - username: string; + user_name: string; start: string; end: string; grade: number; @@ -100,7 +100,7 @@ const OutList = () => {
{applicationList?.map((data, index) => ( handleAcceptListClick(data.id, data.username)} + onClick={() => handleAcceptListClick(data.id, data.user_name)} id={data.id} key={index} returnTime={data.end} diff --git a/src/app/outList/reason/page.tsx b/src/app/outList/reason/page.tsx index bdcc934..b5451c7 100644 --- a/src/app/outList/reason/page.tsx +++ b/src/app/outList/reason/page.tsx @@ -11,7 +11,7 @@ import { BackGround } from "@/app/components/common/background"; interface OutListData { id: string; user_id: string; - username: string; + user_name: string; start: string; end: string; grade: number; @@ -23,7 +23,7 @@ interface OutListData { interface HomeData { id: string; user_id: string; - username: string; + user_name: string; start: string; grade: number; class_num: number; diff --git a/src/app/selfStudyCheck/page.tsx b/src/app/selfStudyCheck/page.tsx index 81d85fd..5989852 100644 --- a/src/app/selfStudyCheck/page.tsx +++ b/src/app/selfStudyCheck/page.tsx @@ -10,19 +10,6 @@ import CheckList from "../components/common/list/after/check/page"; import Modal from "../components/common/modal/page"; import useAttendanceStore from "@/stores/useChangeStatus"; -interface ClassCheck { - id: string; - username: string; - grade: number; - class_num: number; - num: number; - status6: string; - status7: string; - status8: string; - status9: string; - status10: string; -} - interface ChangeStatus { user_id: string; status_list: string[]; @@ -186,7 +173,7 @@ const SelfStudyCheck = () => { state4={item.status9} state5={item.status10} onClick={() => - handleAcceptListClick(item.id, item.username) + handleAcceptListClick(item.id, item.user_name) } type="NO" /> diff --git a/src/utils/until.ts b/src/utils/until.ts index ee543ed..dbaf049 100644 --- a/src/utils/until.ts +++ b/src/utils/until.ts @@ -10,7 +10,7 @@ interface Student { grade: number; class_num: number; num: number; - username: string; + user_name: string; } interface studentNum { @@ -23,10 +23,10 @@ export const getStudentString = ({ grade, class_num, num, - username, + user_name, }: Student) => { const change = num.toString().length === 1 ? `0${num}` : `${num}`; - return `${grade}${class_num}${change} ${username}`; + return `${grade}${class_num}${change} ${user_name}`; }; export const setStudentNum = ({ grade, class_num, num }: studentNum) => {