feat: checkbox to count managed events for team-wide limits (#16923)

Co-authored-by: CarinaWolli <[email protected]>
This commit is contained in:
Carina WollendorferandCarinaWolli authored and GitHub committed 2024-10-07 11:36:50 -04:00
1 parent 0d757039f7
commit b5fa43f086
17 files changed
+266 -61

No files matched your search

@@ -182,6 +182,7 @@ export async function getEventType(
select: {
id: true,
bookingLimits: true,
includeManagedEventsInLimits: true,
},
},
parent: {
@@ -190,6 +191,7 @@ export async function getEventType(
select: {
id: true,
bookingLimits: true,
includeManagedEventsInLimits: true,
},
},
},
@@ -65,6 +65,7 @@ export const updateHandler = async ({ ctx, input }: UpdateOptions) => {
darkBrandColor: input.darkBrandColor,
theme: input.theme,
bookingLimits: input.bookingLimits ?? undefined,
includeManagedEventsInLimits: input.includeManagedEventsInLimits ?? undefined,
};
if (input.logo && input.logo.startsWith("data:image/png;base64,")) {
@@ -147,6 +148,7 @@ export const updateHandler = async ({ ctx, input }: UpdateOptions) => {
brandColor: updatedTeam.brandColor,
darkBrandColor: updatedTeam.darkBrandColor,
bookingLimits: updatedTeam.bookingLimits as IntervalLimit,
includeManagedEventsInLimits: updatedTeam.includeManagedEventsInLimits,
};
};
@@ -24,6 +24,7 @@ export const ZUpdateInputSchema = z.object({
darkBrandColor: z.string().optional(),
theme: z.string().optional().nullable(),
bookingLimits: intervalLimitsType.optional(),
includeManagedEventsInLimits: z.boolean().optional(),
});
export type TUpdateInputSchema = z.infer<typeof ZUpdateInputSchema>;