parent
487a4153e4
commit
b2bc6500a3
|
@ -8,7 +8,7 @@ import {
|
|||
_EventTypeModel,
|
||||
} from "@calcom/prisma/zod";
|
||||
import { stringOrNumber } from "@calcom/prisma/zod-utils";
|
||||
import { createEventTypeInput } from "@calcom/prisma/zod-utils";
|
||||
import { createEventTypeInput } from "@calcom/prisma/zod/eventtypeCustom";
|
||||
|
||||
import { createProtectedRouter } from "@server/createRouter";
|
||||
import { viewerRouter } from "@server/routers/viewer";
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
"lint": "turbo run lint",
|
||||
"pre-commit": "lint-staged",
|
||||
"prepare": "husky install",
|
||||
"postinstall": "yarn workspace @calcom/prisma generate-schemas",
|
||||
"start": "turbo run start --scope=\"@calcom/web\"",
|
||||
"test": "turbo run test",
|
||||
"test-playwright": "yarn playwright test",
|
||||
|
|
|
@ -3,8 +3,6 @@ import { z } from "zod";
|
|||
import { LocationType } from "@calcom/lib/location";
|
||||
import { slugify } from "@calcom/lib/slugify";
|
||||
|
||||
import { _EventTypeModel } from "./zod/eventtype";
|
||||
|
||||
export const eventTypeLocations = z.array(
|
||||
z.object({ type: z.nativeEnum(LocationType), address: z.string().optional() })
|
||||
);
|
||||
|
@ -12,19 +10,3 @@ export const eventTypeLocations = z.array(
|
|||
export const eventTypeSlug = z.string().transform((val) => slugify(val.trim()));
|
||||
export const stringToDate = z.string().transform((a) => new Date(a));
|
||||
export const stringOrNumber = z.union([z.string().transform((v) => parseInt(v, 10)), z.number().int()]);
|
||||
|
||||
const createEventTypeBaseInput = _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",
|
||||
});
|
||||
|
||||
export const createEventTypeInput = createEventTypeBaseInput;
|
||||
|
|
|
@ -54,9 +54,6 @@
|
|||
],
|
||||
"outputs": [".next/**"]
|
||||
},
|
||||
"@calcom/web#dev": {
|
||||
"dependsOn": ["@calcom/prisma#build"]
|
||||
},
|
||||
"@calcom/web#dx": {
|
||||
"dependsOn": ["@calcom/prisma#dx"]
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue