PC6 完善 PC 工作台与审批信息架构
这个提交包含在:
@@ -51,6 +51,7 @@ const BATCH_REJECT_BODY_SCHEMA = z.object({
|
||||
|
||||
const TASK_LIST_QUERY_SCHEMA = z.object({
|
||||
status: z.enum(["pending", "completed", "rejected", "cancelled", "skipped"]).optional(),
|
||||
entityType: z.enum(["reimbursement", "leave", "purchase_request", "travel_request"]).optional(),
|
||||
page: z.coerce.number().int().min(1).optional(),
|
||||
pageSize: z.coerce.number().int().min(1).max(100).optional(),
|
||||
});
|
||||
@@ -250,6 +251,7 @@ function parseTaskListQuery(query) {
|
||||
|
||||
return {
|
||||
status: parsed.data.status ?? "pending",
|
||||
entityType: parsed.data.entityType ?? null,
|
||||
page: parsed.data.page ?? 1,
|
||||
pageSize: parsed.data.pageSize ?? 20,
|
||||
};
|
||||
@@ -1543,6 +1545,9 @@ async function workflowRoutes(fastify) {
|
||||
const where = {
|
||||
status: query.status,
|
||||
OR: assigneeFilters,
|
||||
...(query.entityType
|
||||
? { workflow_instance: { is: { entity_type: query.entityType } } }
|
||||
: {}),
|
||||
};
|
||||
|
||||
const [tasks, total] = await Promise.all([
|
||||
@@ -2663,5 +2668,6 @@ module.exports.__testables = {
|
||||
buildWorkflowEntityMeta,
|
||||
handlePurchaseApprovalErpSync,
|
||||
listAllowedActionsForTask,
|
||||
parseTaskListQuery,
|
||||
resolveWorkflowOutcomeNotificationType,
|
||||
};
|
||||
|
||||
在新工单中引用
屏蔽一个用户