locationAction: fixed optional form fields

This commit is contained in:
2025-08-11 13:57:07 +02:00
parent 21da2f0d49
commit aab0afd045

View File

@@ -27,8 +27,8 @@ const FormSchema = (t:IntlTemplateFn) => z.object({
_id: z.string(), _id: z.string(),
locationName: z.coerce.string().min(1, t("location-name-required")), locationName: z.coerce.string().min(1, t("location-name-required")),
locationNotes: z.string(), locationNotes: z.string(),
addToSubsequentMonths: z.boolean().optional(), addToSubsequentMonths: z.boolean().optional().nullable(),
updateScope: z.enum(["current", "subsequent", "all"]).optional(), updateScope: z.enum(["current", "subsequent", "all"]).optional().nullable(),
}) })
// dont include the _id field in the response // dont include the _id field in the response
.omit({ _id: true }); .omit({ _id: true });