完成五人团队正式内用最小收口(07-18-small-team-internal-readiness)

这个提交包含在:
2026-07-18 15:46:14 +08:00
父节点 58c8decef9
当前提交 5d0a5f9a38
共修改 134 个文件,包含 10790 行新增和 1413 行删除
+5 -4
查看文件
@@ -164,7 +164,7 @@ export type EmployeeContract = {
startDate: string | null;
endDate: string | null;
terminatedDate: string | null;
attachmentPath: string | null;
hasAttachment: boolean;
attachmentUrl: string | null;
status: EmployeeContractStatus;
createdAt: string | null;
@@ -285,6 +285,7 @@ export type FetchEmployeesParams = {
hireDateFrom?: string;
hireDateTo?: string;
employmentStatus?: EmployeeEmploymentStatus;
scope?: "directory" | "management";
};
export type BatchOperationResult = {
@@ -384,6 +385,7 @@ export async function fetchEmployees(params: FetchEmployeesParams) {
if (params.hireDateFrom) search.set("hireDateFrom", params.hireDateFrom);
if (params.hireDateTo) search.set("hireDateTo", params.hireDateTo);
if (params.employmentStatus) search.set("employmentStatus", params.employmentStatus);
if (params.scope) search.set("scope", params.scope);
return apiRequestData<EmployeeListResponse>(`/api/employees?${search.toString()}`);
}
@@ -547,7 +549,6 @@ export async function createEmployeeContract(
startDate: string;
endDate: string;
terminatedDate?: string | null;
attachmentPath?: string | null;
},
) {
return apiRequestData<EmployeeContract>(`/api/employees/${employeeId}/contracts`, {
@@ -565,7 +566,6 @@ export async function patchEmployeeContract(
startDate: string;
endDate: string;
terminatedDate: string | null;
attachmentPath: string | null;
}>,
) {
return apiRequestData<EmployeeContract>(`/api/employees/${employeeId}/contracts/${contractId}`, {
@@ -588,9 +588,10 @@ export async function downloadEmployeeContractAttachment(attachmentUrl: string):
return apiRequestBlob(attachmentUrl);
}
export async function deleteEmployeeContract(employeeId: string, contractId: string) {
export async function deleteEmployeeContract(employeeId: string, contractId: string, reason: string) {
return apiRequestData<{ contractId: string; deleted: boolean }>(`/api/employees/${employeeId}/contracts/${contractId}`, {
method: "DELETE",
body: JSON.stringify({ reason }),
});
}