This commit is contained in:
2026-06-30 16:11:12 +07:00
parent 74b540cac2
commit 3e53cb6664
5 changed files with 259 additions and 42 deletions

View File

@@ -649,6 +649,21 @@ export const apiUpdateAttendanceStatus = async (
return res.json();
};
export const apiUpdateAttendanceBulkStatus = async (
rkId: number,
payload: { date: string; period: number; studentRkIds: number[]; status: number }
) => {
const res = await staffFetch(`/classes/${rkId}/attendance/bulk-status`, {
method: 'PUT',
body: JSON.stringify(payload),
});
if (!res.ok) {
const err = await res.json().catch(() => ({}));
throw new Error(err.error || 'Failed to update attendance status');
}
return res.json();
};
export const apiPushAttendanceQLDT = async (rkId: number, date: string, period: number) => {
const res = await staffFetch(`/classes/${rkId}/attendance/push-qldt`, {
method: 'POST',