feat: Set up initial monorepo structure for admin and mobile applications with core configurations and database integration.

This commit is contained in:
2026-02-20 12:58:54 +01:00
parent 5e2d5fb3ae
commit b7f8221095
52 changed files with 2200 additions and 175 deletions

View File

@@ -37,10 +37,10 @@ export const membersRouter = router({
}),
...(input.search && {
OR: [
{ name: { contains: input.search, mode: 'insensitive' } },
{ betrieb: { contains: input.search, mode: 'insensitive' } },
{ ort: { contains: input.search, mode: 'insensitive' } },
{ sparte: { contains: input.search, mode: 'insensitive' } },
{ name: { contains: input.search } },
{ betrieb: { contains: input.search } },
{ ort: { contains: input.search } },
{ sparte: { contains: input.search } },
],
}),
},

View File

@@ -128,6 +128,23 @@ export const stellenRouter = router({
return { success: true }
}),
/**
* Create Stelle on behalf of a member (admin only)
*/
createForMember: adminProcedure
.input(StelleInput.extend({ memberId: z.string() }))
.mutation(async ({ ctx, input }) => {
const { memberId, ...data } = input
// Verify member belongs to this org
await ctx.prisma.member.findFirstOrThrow({
where: { id: memberId, orgId: ctx.orgId },
})
const stelle = await ctx.prisma.stelle.create({
data: { orgId: ctx.orgId, memberId, ...data },
})
return stelle
}),
/**
* Deactivate Stelle (admin moderation)
*/