Ignore class attendance buttons if no change
This commit is contained in:
parent
b45f86e0cc
commit
6603eb56ac
|
@ -72,6 +72,7 @@ function AttendanceRow(props) {
|
|||
|
||||
const handleMark = (newStatus) => {
|
||||
if (loading) return;
|
||||
if (student.attendance_status == newStatus) return;
|
||||
setLoading(newStatus);
|
||||
const data = { ...student, attendance_status: newStatus };
|
||||
requester('/training/'+student.id+'/', 'PATCH', token, data)
|
||||
|
|
Loading…
Reference in New Issue
Block a user