@@ -73,9 +73,11 @@ const schema = z.object({
|
|||||||
timeEstimate: z.string().nullable(),
|
timeEstimate: z.string().nullable(),
|
||||||
assignedToId: z.string(),
|
assignedToId: z.string(),
|
||||||
measureId: z.string(),
|
measureId: z.string(),
|
||||||
deadline: z.date({
|
deadline: z
|
||||||
coerce: true,
|
.date({
|
||||||
}),
|
coerce: true,
|
||||||
|
})
|
||||||
|
.nullable(),
|
||||||
});
|
});
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -110,7 +112,7 @@ export default function TaskFormDialog(props: Props) {
|
|||||||
timeEstimate: task?.timeEstimate ?? "",
|
timeEstimate: task?.timeEstimate ?? "",
|
||||||
assignedToId: task?.assignedTo?.id ?? "",
|
assignedToId: task?.assignedTo?.id ?? "",
|
||||||
measureId: task?.measure?.id ?? props.measureId ?? "",
|
measureId: task?.measure?.id ?? props.measureId ?? "",
|
||||||
deadline: task?.deadline.split("T")[0] ?? new Date(),
|
deadline: task?.deadline?.split("T")[0] ?? null,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -136,7 +138,7 @@ export default function TaskFormDialog(props: Props) {
|
|||||||
name: data.name,
|
name: data.name,
|
||||||
description: data.description,
|
description: data.description,
|
||||||
timeEstimate: data.timeEstimate || null,
|
timeEstimate: data.timeEstimate || null,
|
||||||
deadline: data.deadline,
|
deadline: data.deadline || null,
|
||||||
assignedToId: data.assignedToId,
|
assignedToId: data.assignedToId,
|
||||||
measureId: data.measureId,
|
measureId: data.measureId,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user