Files
calendar/packages/trpc/server/routers/viewer/ooo/outOfOfficeCreateOrUpdate.schema.ts
Dhairyashil ShindeandGitHub 26b4385679 feat: Add public OOO notes display on booking pages (#25471)
* feat: ooo message on booking page

* make ooo days selectable even when no redirect booking

* handle long notes

* remove unused i18n key

* Private notes stay private on the server, No accidental data leaks through client-side payloads

* address cubics comments

* fix: replace toggle with checkbox for OOO note visibility

- Replace Switch with Checkbox for "show note publicly" option
- Remove "OOO Message:" prefix from displayed notes on booking page
- Update i18n text to "Show note on public booking page"
- Remove unused ooo_message i18n key

* fix the accessibility issue by using proper htmlFor and id association

* only allow selecting OOO dates when the note is public
2025-12-11 11:31:59 +00:00

19 lines
513 B
TypeScript

import { z } from "zod";
export const ZOutOfOfficeInputSchema = z.object({
uuid: z.string().nullish(),
forUserId: z.number().nullish(),
dateRange: z.object({
startDate: z.date(),
endDate: z.date(),
}),
startDateOffset: z.number(),
endDateOffset: z.number(),
toTeamUserId: z.number().nullable(),
reasonId: z.number(),
notes: z.string().nullable().optional(),
showNotePublicly: z.boolean().optional(),
});
export type TOutOfOfficeInputSchema = z.infer<typeof ZOutOfOfficeInputSchema>;