PC6 完善 PC 工作台与审批信息架构

这个提交包含在:
2026-05-12 02:34:15 +08:00
父节点 e7bf57380e
当前提交 aec660a8fe
共修改 13 个文件,包含 518 行新增和 74 行删除
@@ -1,7 +1,7 @@
const workflowRoutes = require("../../../src/routes/workflow");
describe("Workflow Route Permissions", () => {
const { listAllowedActionsForTask } = workflowRoutes.__testables;
const { listAllowedActionsForTask, parseTaskListQuery } = workflowRoutes.__testables;
it("allows leave approvers to act on leave tasks", () => {
const actions = listAllowedActionsForTask(
@@ -107,4 +107,17 @@ describe("Workflow Route Permissions", () => {
expect(actions).toEqual([]);
});
it("parses optional workflow entityType filter for PC approval center", () => {
expect(parseTaskListQuery({ status: "pending", entityType: "purchase_request", page: "2" })).toMatchObject({
status: "pending",
entityType: "purchase_request",
page: 2,
pageSize: 20,
});
});
it("rejects unsupported workflow entityType filters", () => {
expect(() => parseTaskListQuery({ entityType: "invoice_pool" })).toThrow("参数校验失败");
});
});