feat(org-unit): scope structural reads to resource overview

This commit is contained in:
2026-03-30 10:17:57 +02:00
parent 65fe7ce04f
commit 2b514ea962
4 changed files with 166 additions and 6 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ function buildTree(flatItems: FlatOrgUnit[], parentId: string | null = null): Or
}
export const orgUnitRouter = createTRPCRouter({
list: protectedProcedure
list: resourceOverviewProcedure
.input(
z.object({
level: z.number().int().min(5).max(7).optional(),
@@ -54,7 +54,7 @@ export const orgUnitRouter = createTRPCRouter({
});
}),
getTree: protectedProcedure
getTree: resourceOverviewProcedure
.input(z.object({ isActive: z.boolean().optional() }).optional())
.query(async ({ ctx, input }) => {
const all = await ctx.db.orgUnit.findMany({