fix ui
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user