This commit is contained in:
Chuck1sn
2025-05-14 10:16:48 +08:00
commit 3cd59337e7
220 changed files with 23768 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import client from "../../api/client";
import type { DepartmentUpsertModel } from "../../types/department";
export const useDepartmentUpsert = () => {
const upsertDepartment = async (department: DepartmentUpsertModel) => {
await client.POST("/department", {
body: {
id: department.id,
name: department.name,
parentId: department.parentId ?? undefined,
},
});
};
return {
upsertDepartment,
};
};