feat: Implement initial with admin and mobile clients, authentication, data models, and lead generation scripts.

This commit is contained in:
2026-02-19 16:18:34 +01:00
parent c53a71a5f9
commit 5e2d5fb3ae
32 changed files with 2283 additions and 420 deletions

View File

@@ -124,6 +124,13 @@ export const membersRouter = router({
where: { id: input.id, orgId: ctx.orgId },
data: input.data,
})
// Keep user.name in sync when member name changes
if (input.data.name) {
const m = await ctx.prisma.member.findFirst({ where: { id: input.id }, select: { userId: true } })
if (m?.userId) {
await ctx.prisma.user.update({ where: { id: m.userId }, data: { name: input.data.name } })
}
}
return member
}),