fix(personal-item): 个人事项&任务添加type类型字段

This commit is contained in:
caozehui
2026-05-21 14:06:05 +08:00
parent fe29fde564
commit 28d597d91e
11 changed files with 151 additions and 15 deletions

View File

@@ -133,10 +133,14 @@ export type ProjectTaskResponse = Omit<
totalSpentHours?: number | null;
};
export type TaskWorklogResponse = Omit<Api.Project.TaskWorklog, 'id' | 'taskId' | 'userId' | 'attachments'> & {
export type TaskWorklogResponse = Omit<
Api.Project.TaskWorklog,
'id' | 'taskId' | 'userId' | 'difficulty' | 'attachments'
> & {
id: StringIdResponse;
taskId: StringIdResponse;
userId: StringIdResponse;
difficulty?: string | null;
attachments?: AttachmentItemResponse[] | null;
};
@@ -290,6 +294,7 @@ export function normalizeProjectTask(response: ProjectTaskResponse): Api.Project
projectId: normalizeStringId(response.projectId),
executionId: normalizeStringId(response.executionId),
parentTaskId: normalizeNullableStringId(response.parentTaskId),
type: response.type ?? '',
ownerId: normalizeStringId(response.ownerId),
ownerNickname: response.ownerNickname ?? null,
statusName: response.statusName ?? null,
@@ -322,6 +327,7 @@ export function normalizeTaskWorklog(response: TaskWorklogResponse): Api.Project
userId: normalizeStringId(response.userId),
userNickname: response.userNickname ?? null,
workContent: response.workContent ?? null,
difficulty: response.difficulty ?? '',
attachments: normalizeAttachments(response.attachments),
progressRate: typeof response.progressRate === 'number' ? response.progressRate : 0
};