Skip to content

Commit

Permalink
fix :: "출결 상태 변경시간이 아닙니다" 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
inung1004 committed Nov 29, 2023
1 parent f48554a commit 6a9db3e
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions src/components/attendance/StudentState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,30 +92,26 @@ const StudentState = (props: AttendanceStatusListDto) => {
});

const onClickPatchStudentState = async () => {
if (getNowPeriod() === "출결상태 변경 시간이 아닙니다.") {
toast.error("지금 시간에는 학생 상태 변경을 할 수 없습니다.");
if (type === "ATTENDANCE") {
mutate({
user_id: student_id,
period: period,
status: "HOME",
});
} else if (type === "HOME") {
mutate({
user_id: student_id,
period: period,
status: "DISALLOWED",
});
} else if (type === "MOVEMENT") {
toast.error("이동은 상태를 변경할 수 없습니다.", { duration: 1000 });
} else {
if (type === "ATTENDANCE") {
mutate({
user_id: student_id,
period: period,
status: "HOME",
});
} else if (type === "HOME") {
mutate({
user_id: student_id,
period: period,
status: "DISALLOWED",
});
} else if (type === "MOVEMENT") {
toast.error("이동은 상태를 변경할 수 없습니다.", { duration: 1000 });
} else {
mutate({
user_id: student_id,
period: period,
status: "ATTENDANCE",
});
}
mutate({
user_id: student_id,
period: period,
status: "ATTENDANCE",
});
}
};

Expand Down

0 comments on commit 6a9db3e

Please sign in to comment.