From d43e731fe191d7e35d96847fe095c94555dd8ca6 Mon Sep 17 00:00:00 2001 From: Sebastien Castiel Date: Sun, 28 Jan 2024 18:51:29 -0500 Subject: Attach documents to expenses (#64) * Upload documents to receipts * Improve documents * Make the feature opt-in * Fix file name issue --- src/lib/schemas.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/lib/schemas.ts') diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index be90481..981cea3 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -105,6 +105,16 @@ export const expenseFormSchema = z ) .default('EVENLY'), isReimbursement: z.boolean(), + documents: z + .array( + z.object({ + id: z.string(), + url: z.string().url(), + width: z.number().int().min(1), + height: z.number().int().min(1), + }), + ) + .default([]), }) .superRefine((expense, ctx) => { let sum = 0 -- cgit v1.3