fix/secret-premade-event-hidden (#1999)
* fix/secret-premade-event-hidden * fix/secret-premade-event-hidden: change hidden to partial in zod custom Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>pull/2007/head
parent
7826a34b00
commit
9851c8f526
|
@ -1,15 +1,17 @@
|
|||
import { _EventTypeModel } from "../eventtype";
|
||||
|
||||
export const createEventTypeInput = _EventTypeModel
|
||||
.pick({
|
||||
title: true,
|
||||
slug: true,
|
||||
description: true,
|
||||
length: true,
|
||||
teamId: true,
|
||||
schedulingType: true,
|
||||
})
|
||||
.refine((data) => (data.teamId ? data.teamId && data.schedulingType : true), {
|
||||
path: ["schedulingType"],
|
||||
message: "You must select a scheduling type for team events",
|
||||
});
|
||||
.pick({
|
||||
title: true,
|
||||
slug: true,
|
||||
description: true,
|
||||
length: true,
|
||||
teamId: true,
|
||||
schedulingType: true,
|
||||
hidden: true,
|
||||
})
|
||||
.partial({ hidden: true })
|
||||
.refine((data) => (data.teamId ? data.teamId && data.schedulingType : true), {
|
||||
path: ["schedulingType"],
|
||||
message: "You must select a scheduling type for team events",
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue