From e90a41278c215786075f1654cddee0ad3d29aa93 Mon Sep 17 00:00:00 2001 From: "MSI\\derek" Date: Mon, 13 May 2024 13:55:24 +0800 Subject: [PATCH] update --- src/app/api/staff/actions.ts | 2 ++ src/components/CreateStaffForm/CreateStaffForm.tsx | 1 + 2 files changed, 3 insertions(+) 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(),