refactor: use z.input instead of z.infer for form types in assignment schemas

This commit is contained in:
2026-05-12 00:47:52 +02:00
parent 6f16d26a8e
commit bb0948f590
+2 -2
View File
@@ -25,7 +25,7 @@ export const createAssignmentSchema = assignmentSchema.omit({
id: true, id: true,
returnDate: true, returnDate: true,
}) })
export type CreateAssignmentFormType = z.infer<typeof createAssignmentSchema> export type CreateAssignmentFormType = z.input<typeof createAssignmentSchema>
export const updateAssignmentSchema = assignmentSchema export const updateAssignmentSchema = assignmentSchema
.omit({ .omit({
@@ -41,7 +41,7 @@ export const updateAssignmentSchema = assignmentSchema
} }
}) })
export type UpdateAssignmentFormType = z.infer<typeof updateAssignmentSchema> export type UpdateAssignmentFormType = z.input<typeof updateAssignmentSchema>
export const returnAssignmentSchema = z.object({ export const returnAssignmentSchema = z.object({
id: z.string().min(1, { id: z.string().min(1, {