Added "approved by" system

This commit is contained in:
2026-01-16 16:26:20 -05:00
parent 1c1358f9d0
commit 19eb2be252
4 changed files with 56 additions and 23 deletions

View File

@@ -10,7 +10,7 @@ export const batchPromotionMemberSchema = z.object({
export const batchPromotionSchema = z.object({
promotions: z.array(batchPromotionMemberSchema, { message: "At least one promotion is required" }).nonempty({ message: "At least one promotion is required" }),
approver: z.number({ invalid_type_error: "Must select a member" }).int().positive()
})
.superRefine((data, ctx) => {
// optional: check for duplicate member_ids