feat(P17A-3,P17A-4): 实现采购申请接口附件与前端入口
这个提交包含在:
@@ -29,6 +29,19 @@ describe("Workflow Route Permissions", () => {
|
||||
expect(actions).toEqual([]);
|
||||
});
|
||||
|
||||
it("allows procurement approvers to act on purchase tasks", () => {
|
||||
const actions = listAllowedActionsForTask(
|
||||
{ employee: { permissionCodes: ["procurement.approve"] } },
|
||||
{
|
||||
status: "pending",
|
||||
workflow_instance: { entity_type: "purchase_request" },
|
||||
},
|
||||
true,
|
||||
);
|
||||
|
||||
expect(actions).toEqual(["approve", "reject", "return"]);
|
||||
});
|
||||
|
||||
it("keeps transfer action limited to reimbursement tasks", () => {
|
||||
const reimbursementActions = listAllowedActionsForTask(
|
||||
{ employee: { permissionCodes: ["expense.approve", "expense.transfer"] } },
|
||||
|
||||
在新工单中引用
屏蔽一个用户