- Schedule columns default to labels A–F (localStorage, per-browser, click to rename) - Settings → Advanced → Office Hours: configure Doctors (A-C) and Hygienists (D-F) AM/PM hours per weekday - Gray out schedule slots outside office hours; override dialog for manual exceptions - Override Office Hours toggle: select specific dates where all slots are open - Fix appointment move: send only real DB fields to avoid Zod strict-mode rejection of computed fields (hasProcedures, hasClaimWithNumber) - Fix backend PUT /appointments: safe error logging to prevent Prisma error crashing Node inspect - Add OfficeHours Prisma model and GET/PUT /api/office-hours route Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
2.7 KiB
TypeScript
24 lines
2.7 KiB
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
import { OfficeHoursCreateWithoutUserInputObjectSchema as OfficeHoursCreateWithoutUserInputObjectSchema } from './OfficeHoursCreateWithoutUserInput.schema';
|
|
import { OfficeHoursUncheckedCreateWithoutUserInputObjectSchema as OfficeHoursUncheckedCreateWithoutUserInputObjectSchema } from './OfficeHoursUncheckedCreateWithoutUserInput.schema';
|
|
import { OfficeHoursCreateOrConnectWithoutUserInputObjectSchema as OfficeHoursCreateOrConnectWithoutUserInputObjectSchema } from './OfficeHoursCreateOrConnectWithoutUserInput.schema';
|
|
import { OfficeHoursUpsertWithoutUserInputObjectSchema as OfficeHoursUpsertWithoutUserInputObjectSchema } from './OfficeHoursUpsertWithoutUserInput.schema';
|
|
import { OfficeHoursWhereInputObjectSchema as OfficeHoursWhereInputObjectSchema } from './OfficeHoursWhereInput.schema';
|
|
import { OfficeHoursWhereUniqueInputObjectSchema as OfficeHoursWhereUniqueInputObjectSchema } from './OfficeHoursWhereUniqueInput.schema';
|
|
import { OfficeHoursUpdateToOneWithWhereWithoutUserInputObjectSchema as OfficeHoursUpdateToOneWithWhereWithoutUserInputObjectSchema } from './OfficeHoursUpdateToOneWithWhereWithoutUserInput.schema';
|
|
import { OfficeHoursUpdateWithoutUserInputObjectSchema as OfficeHoursUpdateWithoutUserInputObjectSchema } from './OfficeHoursUpdateWithoutUserInput.schema';
|
|
import { OfficeHoursUncheckedUpdateWithoutUserInputObjectSchema as OfficeHoursUncheckedUpdateWithoutUserInputObjectSchema } from './OfficeHoursUncheckedUpdateWithoutUserInput.schema'
|
|
|
|
const makeSchema = () => z.object({
|
|
create: z.union([z.lazy(() => OfficeHoursCreateWithoutUserInputObjectSchema), z.lazy(() => OfficeHoursUncheckedCreateWithoutUserInputObjectSchema)]).optional(),
|
|
connectOrCreate: z.lazy(() => OfficeHoursCreateOrConnectWithoutUserInputObjectSchema).optional(),
|
|
upsert: z.lazy(() => OfficeHoursUpsertWithoutUserInputObjectSchema).optional(),
|
|
disconnect: z.union([z.boolean(), z.lazy(() => OfficeHoursWhereInputObjectSchema)]).optional(),
|
|
delete: z.union([z.boolean(), z.lazy(() => OfficeHoursWhereInputObjectSchema)]).optional(),
|
|
connect: z.lazy(() => OfficeHoursWhereUniqueInputObjectSchema).optional(),
|
|
update: z.union([z.lazy(() => OfficeHoursUpdateToOneWithWhereWithoutUserInputObjectSchema), z.lazy(() => OfficeHoursUpdateWithoutUserInputObjectSchema), z.lazy(() => OfficeHoursUncheckedUpdateWithoutUserInputObjectSchema)]).optional()
|
|
}).strict();
|
|
export const OfficeHoursUpdateOneWithoutUserNestedInputObjectSchema: z.ZodType<Prisma.OfficeHoursUpdateOneWithoutUserNestedInput> = makeSchema() as unknown as z.ZodType<Prisma.OfficeHoursUpdateOneWithoutUserNestedInput>;
|
|
export const OfficeHoursUpdateOneWithoutUserNestedInputObjectZodSchema = makeSchema();
|