diff --git a/apps/admin/app/students/@modal/_components/OutstandingModalButton.tsx b/apps/admin/app/students/@modal/_components/OutstandingModalButton.tsx
index 5376f054..007f3682 100644
--- a/apps/admin/app/students/@modal/_components/OutstandingModalButton.tsx
+++ b/apps/admin/app/students/@modal/_components/OutstandingModalButton.tsx
@@ -37,6 +37,14 @@ const OutstandingModalButton = () => {
},
};
+ const handleClickCloseModal = () => {
+ setSelectedStudents({
+ students: new Set(),
+ firstStudentName: "",
+ });
+ onClose();
+ };
+
const handleClickOutstanding = async () => {
if (!study || !achievement || !type) return;
@@ -45,31 +53,25 @@ const OutstandingModalButton = () => {
const fetch = apiMap["COMPLETE"][type];
return fetch({
studyId: study.studyId,
- studentIds: students,
+ studentIds: Array.from(students),
});
}
const fetch = apiMap["ACHIEVEMENT"][type];
return fetch(study.studyId, {
- studentIds: students,
+ studentIds: Array.from(students),
achievementType: achievement as AchievementType,
});
};
const result = await fetchApi();
- if (result.success) {
- revalidateTagByName(tags.students);
- setEnabledOutstandingStudents({
- enabled: false,
- });
- }
- };
-
- const handleClickCloseModal = () => {
- setSelectedStudents({
- students: new Set(),
- firstStudentName: "",
+ revalidateTagByName(tags.students);
+ setEnabledOutstandingStudents({
+ enabled: false,
});
- onClose();
+
+ if (!result.success) {
+ handleClickCloseModal();
+ }
};
return enabled ? (
diff --git a/apps/admin/app/students/_components/StudentTable/StudentList.tsx b/apps/admin/app/students/_components/StudentTable/StudentList.tsx
index 4074a1b5..7bd9d04f 100644
--- a/apps/admin/app/students/_components/StudentTable/StudentList.tsx
+++ b/apps/admin/app/students/_components/StudentTable/StudentList.tsx
@@ -1,6 +1,8 @@
+import { styled } from "@styled-system/jsx";
import { Text } from "@wow-class/ui";
import { useAtom, useAtomValue } from "jotai";
import type { StudyStudentApiResponseDto } from "types/dtos/studyStudent";
+import Checkbox from "wowds-ui/Checkbox";
import Table from "wowds-ui/Table";
import {
@@ -36,9 +38,9 @@ const StudentList = ({
if (!studentList.length) return