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

@@ -194,6 +194,7 @@ export const StudentPaymentReportSchema = z.object({
status: reportedPaymentStatusSchema,
createdAt: isoDateTimeSchema,
reviewedAt: isoDateTimeSchema.nullable(),
note: z.string().nullable(),
rejectionReason: z.string().nullable(),
fees: z.array(z.object({ id: z.string(), description: z.string().nullable(), dueDate: isoDateTimeSchema })),
});
@@ -216,6 +217,8 @@ export const StudentFeesDtoSchema = z.object({
export type StudentFeesDto = z.output<typeof StudentFeesDtoSchema>;
export const RECEIPT_MAX_MB = 10;
/** Max length of the optional note the student adds to a reported payment. */
export const REPORTED_PAYMENT_NOTE_MAX = 500;
export const RECEIPT_ACCEPT = 'image/jpeg,image/png,image/webp,image/heic,image/heif,application/pdf';
// — Teacher side: reported payments to verify —
@@ -228,6 +231,8 @@ export const ReportedPaymentDtoSchema = z.object({
createdAt: isoDateTimeSchema,
totalAmount: z.number(),
currency: z.string(),
/** Optional message from the student. */
note: z.string().nullable(),
fees: z.array(
z.object({
id: z.string(),