Skip to content

Commit

Permalink
feat: exclude attendance when checked all
Browse files Browse the repository at this point in the history
  • Loading branch information
WONYOUNG-HC committed Jan 31, 2025
1 parent b1f1187 commit ea2aa2e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ const AttendanceReportExcelExportModal = ({
}
} else {
if (checkedAttendances.some((a) => a.sessionId === ALL_SESSION_ID)) {
setCheckedAttendances([attendance]);
setCheckedAttendances(
checkedAttendances.filter(
(a) => a.sessionId !== ALL_SESSION_ID && a.sessionId !== attendance.sessionId,
),
);
} else {
if (checkedAttendances.some((a) => a.sessionId === attendance.sessionId)) {
setCheckedAttendances(
Expand Down

0 comments on commit ea2aa2e

Please sign in to comment.