feat: add payment report notes
This commit is contained in:
@@ -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 })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user