feat: Set up initial monorepo structure for admin and mobile applications with core configurations and database integration.
This commit is contained in:
@@ -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 } },
|
||||
],
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -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)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user