diff --git a/src/app/api/staff/actions.ts b/src/app/api/staff/actions.ts index b1559de..a5e88d4 100644 --- a/src/app/api/staff/actions.ts +++ b/src/app/api/staff/actions.ts @@ -32,6 +32,8 @@ export interface CreateStaffInputs { departDate?: string | null; departReason?: string | null; remark?: string | null; + staffId: string | null; + skillSetId?: number[] | number | null | undefined } export interface records { diff --git a/src/components/CreateStaffForm/CreateStaffForm.tsx b/src/components/CreateStaffForm/CreateStaffForm.tsx index 31eb1fc..3ec7ca2 100644 --- a/src/components/CreateStaffForm/CreateStaffForm.tsx +++ b/src/components/CreateStaffForm/CreateStaffForm.tsx @@ -67,6 +67,7 @@ const CreateStaffForm: React.FC = ({ Title, fieldLists }) => { } const postData = { ...data, + skillSetId: typeof data.skillSetId === "number" ? [data.skillSetId] : data.skillSetId, emergContactPhone: data.emergContactPhone.toString(), phone1: data.phone1.toString(), phone2: data.phone2.toString(),