feat: add Lab RX feature with template management and auto-seed defaults
- New lab_rx_template table with sortOrder and Prisma migrations - Backend CRUD + reorder routes at /api/lab-rx/templates - Auto-seeds 3 Highland Dental Studio defaults on first use per user - LabRxModal: template picker, inline rename, up/down reorder, full template form with sections (Template Name / Lab Info / Case Details) - RX popup: Tooth Number, Shade, Due Date, Doctor (from NPI providers), Instructions pre-filled with "Please make / Thank you!", print output - lab-rx-templates.ts config file for future git-managed additions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import * as z from 'zod';
|
||||
import type { Prisma } from '../../../generated/prisma';
|
||||
import { IntFilterObjectSchema as IntFilterObjectSchema } from './IntFilter.schema';
|
||||
import { StringFilterObjectSchema as StringFilterObjectSchema } from './StringFilter.schema';
|
||||
import { StringNullableFilterObjectSchema as StringNullableFilterObjectSchema } from './StringNullableFilter.schema';
|
||||
import { DateTimeFilterObjectSchema as DateTimeFilterObjectSchema } from './DateTimeFilter.schema';
|
||||
import { UserScalarRelationFilterObjectSchema as UserScalarRelationFilterObjectSchema } from './UserScalarRelationFilter.schema';
|
||||
import { UserWhereInputObjectSchema as UserWhereInputObjectSchema } from './UserWhereInput.schema'
|
||||
|
||||
const labrxtemplatewhereinputSchema = z.object({
|
||||
AND: z.union([z.lazy(() => LabRxTemplateWhereInputObjectSchema), z.lazy(() => LabRxTemplateWhereInputObjectSchema).array()]).optional(),
|
||||
OR: z.lazy(() => LabRxTemplateWhereInputObjectSchema).array().optional(),
|
||||
NOT: z.union([z.lazy(() => LabRxTemplateWhereInputObjectSchema), z.lazy(() => LabRxTemplateWhereInputObjectSchema).array()]).optional(),
|
||||
id: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||
userId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||
name: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
||||
labName: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
labPhone: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
labFax: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
labAddress: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
labAccount: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
caseType: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
material: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
instructions: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
doctorName: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
sortOrder: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||
createdAt: z.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()]).optional(),
|
||||
updatedAt: z.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()]).optional(),
|
||||
user: z.union([z.lazy(() => UserScalarRelationFilterObjectSchema), z.lazy(() => UserWhereInputObjectSchema)]).optional()
|
||||
}).strict();
|
||||
export const LabRxTemplateWhereInputObjectSchema: z.ZodType<Prisma.LabRxTemplateWhereInput> = labrxtemplatewhereinputSchema as unknown as z.ZodType<Prisma.LabRxTemplateWhereInput>;
|
||||
export const LabRxTemplateWhereInputObjectZodSchema = labrxtemplatewhereinputSchema;
|
||||
Reference in New Issue
Block a user