完成五人团队正式内用最小收口(07-18-small-team-internal-readiness)
这个提交包含在:
@@ -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 }),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户