feat(staff column order in aptmpt page)

This commit is contained in:
2026-01-28 02:25:18 +05:30
parent b8df9459ca
commit 4594a264a1
7 changed files with 244 additions and 84 deletions

View File

@@ -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">
>;