fix exam grading

This commit is contained in:
root
2026-06-04 13:25:41 -04:00
parent 1af02dadd3
commit ad7b13f4d8
17 changed files with 853 additions and 46 deletions
+43
View File
@@ -123,6 +123,49 @@ export async function fetchBelowSixty(searchParams: URLSearchParams): Promise<un
return apiFetch(`${BASE}/below-sixty${q(searchParams)}`)
}
export async function fetchBelowSixtyDecisions(
searchParams: URLSearchParams,
): Promise<unknown> {
return apiFetch(`${BASE}/below-sixty/decisions${q(searchParams)}`)
}
export async function postBelowSixtyDecision(body: Record<string, unknown>): Promise<unknown> {
return apiFetch(`${BASE}/below-sixty/decisions`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body),
})
}
export async function fetchBelowSixtyDecisionDetails(
searchParams: URLSearchParams,
): Promise<unknown> {
return apiFetch(`${BASE}/below-sixty/decisions/details${q(searchParams)}`)
}
export async function fetchBelowSixtyDecisionEmailEditor(
searchParams: URLSearchParams,
): Promise<{
student_id?: number
student_name?: string
school_year?: string
semester?: string
decision?: string
subject?: string
html?: string
year_score?: number | string | null
}> {
return apiFetch(`${BASE}/below-sixty/decisions/email${q(searchParams)}`)
}
export async function postBelowSixtyDecisionEmail(body: Record<string, unknown>): Promise<unknown> {
return apiFetch(`${BASE}/below-sixty/decisions/email`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body),
})
}
export async function fetchBelowSixtyEmailEditor(searchParams: URLSearchParams): Promise<{
studentId?: number
studentName?: string