完成五人团队正式内用最小收口(07-18-small-team-internal-readiness)
这个提交包含在:
@@ -206,4 +206,25 @@ describe("workspace small-team navigation defaults", () => {
|
||||
expect(mainLabels).not.toContain("AP 运营");
|
||||
expect(mainLabels).not.toContain("付款批次");
|
||||
});
|
||||
|
||||
it("shows payment review navigation to manager reviewers without granting finance-only invoice tools", async () => {
|
||||
const manager = {
|
||||
id: "manager-reviewer-1",
|
||||
department_id: "dept-1",
|
||||
roleCodes: ["manager"],
|
||||
permissionCodes: resolvePermissionsForRoles(["manager"]),
|
||||
};
|
||||
|
||||
const navigation = await getSystemNavigation({
|
||||
prisma: buildPrisma(["payment_batch_v1"]),
|
||||
config: { ...buildConfig(), paymentBatchEnabled: true },
|
||||
employee: manager,
|
||||
hasPermission: (candidate, permissionCode) => hasPermission(candidate.permissionCodes, permissionCode),
|
||||
});
|
||||
|
||||
const mainLabels = navigation.sections.main.map((item) => item.label);
|
||||
expect(mainLabels).toContain("付款");
|
||||
expect(mainLabels).toContain("应付账款");
|
||||
expect(mainLabels).not.toContain("票据");
|
||||
});
|
||||
});
|
||||
|
||||
在新工单中引用
屏蔽一个用户