harden(plan): 92-day range cap + dedup user_ids on bulk create

This commit is contained in:
BOHA
2026-06-08 12:17:51 +02:00
parent 13d1fc2be3
commit 2610301258
3 changed files with 23 additions and 1 deletions

View File

@@ -88,7 +88,8 @@ export const BulkPlanEntrySchema = z
.object({
user_ids: z
.array(intFromForm)
.min(1, "Vyberte alespoň jednoho zaměstnance"),
.min(1, "Vyberte alespoň jednoho zaměstnance")
.transform((ids) => [...new Set(ids)]),
date_from: isoDate,
date_to: isoDate,
include_weekends: z