feat: add payment report notes

This commit is contained in:
Jose Selesan
2026-10-28 16:45:55 -03:00
parent b22b6da2e1
commit b6f22ae67d
13 changed files with 64 additions and 6 deletions

View File

@@ -507,10 +507,11 @@ export const cancelStudentAbsence = (noticeId: string) =>
export const getStudentFees = (attendeeId: string) =>
apiFetch<StudentFeesDto>(`${STUDENT_API}/fees?attendeeId=${encodeURIComponent(attendeeId)}`)
export const reportStudentPayment = (payload: { attendeeId: string; paymentIds: string[]; file: File }) => {
export const reportStudentPayment = (payload: { attendeeId: string; paymentIds: string[]; note?: string | null; file: File }) => {
const form = new FormData()
form.set('attendeeId', payload.attendeeId)
for (const id of payload.paymentIds) form.append('paymentIds', id)
if (payload.note) form.set('note', payload.note)
form.set('file', payload.file)
return apiFetch<{ id: string }>(`${STUDENT_API}/payment-reports`, { method: 'POST', body: form })
}