diff options
| author | Sebastien Castiel <sebastien@castiel.me> | 2024-01-28 18:51:29 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-28 18:51:29 -0500 |
| commit | d43e731fe191d7e35d96847fe095c94555dd8ca6 (patch) | |
| tree | b8bc3f99770a47ec0343f642ca04e727f7abd716 /src/lib/schemas.ts | |
| parent | 11d2e298e8cc5cac07aa2c60e194bf4460cefb21 (diff) | |
Attach documents to expenses (#64)
* Upload documents to receipts
* Improve documents
* Make the feature opt-in
* Fix file name issue
Diffstat (limited to 'src/lib/schemas.ts')
| -rw-r--r-- | src/lib/schemas.ts | 10 |
1 files changed, 10 insertions, 0 deletions
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 |
