feat(staff column order in aptmpt page)
This commit is contained in:
@@ -110,6 +110,7 @@ model Staff {
|
||||
role String // e.g., "Dentist", "Hygienist", "Assistant"
|
||||
phone String?
|
||||
createdAt DateTime @default(now())
|
||||
displayOrder Int @default(0)
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
appointments Appointment[]
|
||||
claims Claim[] @relation("ClaimStaff")
|
||||
@@ -128,7 +129,6 @@ model NpiProvider {
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
|
||||
enum ProcedureSource {
|
||||
COMBO
|
||||
MANUAL
|
||||
|
||||
@@ -1,4 +1,44 @@
|
||||
import { StaffUncheckedCreateInputObjectSchema } from "@repo/db/usedSchemas";
|
||||
import {z} from "zod";
|
||||
import { z } from "zod";
|
||||
|
||||
export type Staff = z.infer<typeof StaffUncheckedCreateInputObjectSchema>;
|
||||
|
||||
export const staffCreateSchema = (
|
||||
StaffUncheckedCreateInputObjectSchema as unknown as z.ZodObject<any>
|
||||
).omit({
|
||||
id: true,
|
||||
createdAt: true,
|
||||
displayOrder: true,
|
||||
userId: true,
|
||||
});
|
||||
|
||||
export const staffUpdateSchema = (
|
||||
StaffUncheckedCreateInputObjectSchema as unknown as z.ZodObject<any>
|
||||
)
|
||||
.partial()
|
||||
.omit({
|
||||
id: true,
|
||||
createdAt: true,
|
||||
userId: true,
|
||||
});
|
||||
|
||||
export type StaffFormData = {
|
||||
name: string;
|
||||
email?: string;
|
||||
role: string;
|
||||
phone?: string;
|
||||
displayOrder?: number;
|
||||
};
|
||||
|
||||
export type StaffCreateInput = z.infer<
|
||||
typeof StaffUncheckedCreateInputObjectSchema
|
||||
>;
|
||||
|
||||
export type StaffCreateBody = Omit<
|
||||
StaffCreateInput,
|
||||
"id" | "createdAt" | "userId" | "displayOrder"
|
||||
>;
|
||||
|
||||
export type StaffUpdateInput = Partial<
|
||||
Omit<StaffCreateInput, "id" | "createdAt" | "userId">
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user