Skip to content

Commit

Permalink
feat: all checked attendance when click all check
Browse files Browse the repository at this point in the history
  • Loading branch information
WONYOUNG-HC committed Jan 31, 2025
1 parent 80871ea commit b1f1187
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ const AttendanceReportExcelExportModal = ({
*/
const handleCheckboxChange = (attendance: CotatoAttendanceWithSessionResponse) => {
if (attendance.sessionId === ALL_SESSION_ID) {
if (checkedAttendances.length === 1 && checkedAttendances[0].sessionId === ALL_SESSION_ID) {
if (checkedAttendances.some((a) => a.sessionId === ALL_SESSION_ID)) {
setCheckedAttendances([]);
} else {
setCheckedAttendances([attendance]);
setCheckedAttendances([...attendancesWithAll]);
}
} else {
if (checkedAttendances.some((a) => a.sessionId === ALL_SESSION_ID)) {
Expand Down

0 comments on commit b1f1187

Please sign in to comment.