staff.ts 387 Bytes
import { request } from "./client";

export interface StaffSearchVO {
  iIncrement: number;
  sStaffNo: string;
  sStaffName: string;
  sDepartment: string | null;
}

export function searchStaff(keyword?: string, limit = 20): Promise<StaffSearchVO[]> {
  return request<StaffSearchVO[]>({
    url: "/usr/staffs",
    method: "GET",
    params: { keyword: keyword ?? "", limit },
  });
}