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";
|
import { _EventTypeModel } from "../eventtype";
|
||||||
|
|
||||||
export const createEventTypeInput = _EventTypeModel
|
export const createEventTypeInput = _EventTypeModel
|
||||||
.pick({
|
.pick({
|
||||||
title: true,
|
title: true,
|
||||||
slug: true,
|
slug: true,
|
||||||
description: true,
|
description: true,
|
||||||
length: true,
|
length: true,
|
||||||
teamId: true,
|
teamId: true,
|
||||||
schedulingType: true,
|
schedulingType: true,
|
||||||
})
|
hidden: true,
|
||||||
.refine((data) => (data.teamId ? data.teamId && data.schedulingType : true), {
|
})
|
||||||
path: ["schedulingType"],
|
.partial({ hidden: true })
|
||||||
message: "You must select a scheduling type for team events",
|
.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