diff --git a/src/app/admin/results/[thesisId]/AdminReviewContent.tsx b/src/app/admin/results/[thesisId]/AdminReviewContent.tsx index e6a41697..92c3bd32 100644 --- a/src/app/admin/results/[thesisId]/AdminReviewContent.tsx +++ b/src/app/admin/results/[thesisId]/AdminReviewContent.tsx @@ -171,9 +171,10 @@ function ModalContent({ open, setOpen, data, current }: ModalProps) { } if ( - commentType === undefined || - (commentType === "심사 의견" && (comment === undefined || !comment)) || - (commentType === "심사 의견 파일" && fileUUID === undefined) + data.stage !== "REVISION" && + (commentType === undefined || + (commentType === "심사 의견" && (comment === undefined || !comment)) || + (commentType === "심사 의견 파일" && fileUUID === undefined)) ) { showNotificationError({ message: "심사 의견이나 심사 의견 파일을 첨부해주세요." }); return; diff --git a/src/app/admin/reviews/[thesisId]/AdminReviewListContent.tsx b/src/app/admin/reviews/[thesisId]/AdminReviewListContent.tsx index 4c7110dc..182f3596 100644 --- a/src/app/admin/reviews/[thesisId]/AdminReviewListContent.tsx +++ b/src/app/admin/reviews/[thesisId]/AdminReviewListContent.tsx @@ -91,7 +91,6 @@ function ModalContent({ open, setOpen, data, current }: ModalProps) { task.onComplete(() => setLoading(false)); let fileUUID; - if (reviewFile && commentType === "심사 의견 파일") { fileUUID = (await uploadFile(reviewFile)).uuid; } else if (current.file) { @@ -104,9 +103,10 @@ function ModalContent({ open, setOpen, data, current }: ModalProps) { } if ( - commentType === undefined || - (commentType === "심사 의견" && (comment === undefined || !comment)) || - (commentType === "심사 의견 파일" && fileUUID === undefined) + data.stage !== "REVISION" && + (commentType === undefined || + (commentType === "심사 의견" && (comment === undefined || !comment)) || + (commentType === "심사 의견 파일" && fileUUID === undefined)) ) { showNotificationError({ message: "심사 의견이나 심사 의견 파일을 첨부해주세요." }); return; diff --git a/src/app/prof/final/[id]/ProfessorFinalForm.tsx b/src/app/prof/final/[id]/ProfessorFinalForm.tsx index 371227d3..4e444877 100644 --- a/src/app/prof/final/[id]/ProfessorFinalForm.tsx +++ b/src/app/prof/final/[id]/ProfessorFinalForm.tsx @@ -53,7 +53,7 @@ export function ProfessorFinalForm({ const { values } = form; const [showConfirmDialog, setShowConfirmDialog] = useState(false); const [currentState, setCurrentState] = useState(null); - const [commentType, setCommentType] = useState(); + const [commentType, setCommentType] = useState("심사 의견"); const handleSubmit = transactionTask(async (task, input: FormInput) => { setCurrentState("pending"); @@ -72,7 +72,7 @@ export function ProfessorFinalForm({ { contentStatus: input.status, ...(commentType === "심사 의견" ? { comment: input.comment } : {}), - ...(commentType === "심사 의견 파일" ? { fileUUID } : {}), + // ...(commentType === "심사 의견 파일" ? { fileUUID } : {}), } satisfies UpdateReviewRequestBody, { baseURL: process.env.NEXT_PUBLIC_REVIEW_API_ENDPOINT } ); @@ -103,7 +103,8 @@ export function ProfessorFinalForm({ ? values.commentFile !== null : !!values.commentFile; if (!values.comment && !hasCommentFile) { - showNotificationError({ message: "심사 의견이나 심사 의견 파일을 첨부해주세요." }); + // showNotificationError({ message: "심사 의견이나 심사 의견 파일을 첨부해주세요." }); + showNotificationError({ message: "종합 의견을 작성해주세요." }); return; } setShowConfirmDialog(true); diff --git a/src/app/student/achievement/register/page.tsx b/src/app/student/achievement/register/page.tsx index ac47c012..936edcc6 100644 --- a/src/app/student/achievement/register/page.tsx +++ b/src/app/student/achievement/register/page.tsx @@ -8,7 +8,7 @@ import AchievementRegisterSection from "@/components/pages/achievement/Achieveme async function StudentAchievementRegisterPage() { const { token } = await AuthSSR({ userType: "STUDENT" }); - const { within, start, end } = await checkPhase({ title: "논문 실적 제출", token }); + const { within, start, end } = await checkPhase({ title: "연구 실적 제출", token }); return within ? ( <> diff --git a/src/app/student/result/page.tsx b/src/app/student/result/page.tsx index 69f4bf5e..e2b07e64 100644 --- a/src/app/student/result/page.tsx +++ b/src/app/student/result/page.tsx @@ -29,7 +29,7 @@ export default async function StudentResultPage() { } const thesisRes: MyReviewResponse = user.currentPhase === "PRELIMINARY" ? pre! : main!; - + const thesisInfo: ThesisInfoData = { title: thesisRes.title, stage: thesisRes.stage, diff --git a/src/app/student/revision/page.tsx b/src/app/student/revision/page.tsx index 2518c8d0..868bbef6 100644 --- a/src/app/student/revision/page.tsx +++ b/src/app/student/revision/page.tsx @@ -1,5 +1,8 @@ import { AuthSSR } from "@/api/AuthSSR"; +import { UserResponse } from "@/api/_types/user"; import { checkPhase } from "@/api/_utils/checkPhase"; +import { API_ROUTES } from "@/api/apiRoute"; +import { fetcher } from "@/api/fetcher"; import { formatTime } from "@/components/common/Clock/date/format"; import PageHeader from "@/components/common/PageHeader"; import { Section } from "@/components/common/Section"; @@ -10,8 +13,9 @@ import { Stack } from "@mantine/core"; export default async function StudentRevisionPage() { const { token } = await AuthSSR({ userType: "STUDENT" }); const { within, start, end } = await checkPhase({ title: "수정 지시 사항 제출", token }); + const user = (await fetcher({ url: API_ROUTES.user.get(), token })) as UserResponse; - return within ? ( + return within && user.currentPhase === "REVISION" ? ( <> diff --git a/src/components/common/Table/_elements/TableData.tsx b/src/components/common/Table/_elements/TableData.tsx index b77ab702..8a09ca0f 100644 --- a/src/components/common/Table/_elements/TableData.tsx +++ b/src/components/common/Table/_elements/TableData.tsx @@ -10,10 +10,8 @@ function TableData({ children }: Props) { {children} diff --git a/src/components/pages/AdminExcelRegister/AdminExcelRegister.tsx b/src/components/pages/AdminExcelRegister/AdminExcelRegister.tsx index a9893364..13eb0c3c 100644 --- a/src/components/pages/AdminExcelRegister/AdminExcelRegister.tsx +++ b/src/components/pages/AdminExcelRegister/AdminExcelRegister.tsx @@ -22,6 +22,7 @@ interface Props { function AdminExcelRegister({ isProf = false }: Props) { const [file, setFile] = useState(null); + const [isSubmitting, setIsSubmitting] = useState(false); const handleExcelDownload = async () => { try { @@ -47,6 +48,7 @@ function AdminExcelRegister({ isProf = false }: Props) { const handleExcelUpload = async () => { try { + setIsSubmitting(true); if (file) { const formData = new FormData(); formData.append("file", file); @@ -69,6 +71,8 @@ function AdminExcelRegister({ isProf = false }: Props) { } } catch (error) { // clientAxios에서 오류 출력 + } finally { + setIsSubmitting(false); } }; return ( @@ -97,7 +101,7 @@ function AdminExcelRegister({ isProf = false }: Props) { + , ]} diff --git a/src/components/pages/review/Review/FinalReview.tsx b/src/components/pages/review/Review/FinalReview.tsx index c5581050..7ce7f2d4 100644 --- a/src/components/pages/review/Review/FinalReview.tsx +++ b/src/components/pages/review/Review/FinalReview.tsx @@ -24,7 +24,7 @@ export interface FinalReviewProps { previousCommentFile: ApiFile | undefined; currentState: null | "pending" | "submitted"; commentType?: string; - setCommentType: Dispatch>; + setCommentType: Dispatch>; } export function FinalReview({ @@ -55,14 +55,14 @@ export function FinalReview({ - + {/* */} - + {/* - + */} + + + + + );