feat(ST-507): add email input to settings and surface in user menu
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5ed3645ecb
commit
0dc907b75c
5 changed files with 29 additions and 10 deletions
|
|
@ -17,7 +17,7 @@ export default async function AppLayout({ children }: { children: React.ReactNod
|
|||
const [user, userRoles] = await Promise.all([
|
||||
prisma.user.findUnique({
|
||||
where: { id: session.userId },
|
||||
select: { username: true, bio: true },
|
||||
select: { username: true, email: true },
|
||||
}),
|
||||
prisma.userRole.findMany({
|
||||
where: { user_id: session.userId },
|
||||
|
|
@ -40,7 +40,7 @@ export default async function AppLayout({ children }: { children: React.ReactNod
|
|||
roles={roles}
|
||||
userId={session.userId}
|
||||
username={user.username}
|
||||
bio={user.bio}
|
||||
email={user.email}
|
||||
/>
|
||||
<MinWidthBanner />
|
||||
<main id="main-content" className="flex-1 flex flex-col overflow-y-auto min-h-0">
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export default async function SettingsPage() {
|
|||
const [user, userRoles, ownedProducts, memberships] = await Promise.all([
|
||||
prisma.user.findUnique({
|
||||
where: { id: session.userId },
|
||||
select: { username: true, bio: true, bio_detail: true, avatar_data: true, updated_at: true },
|
||||
select: { username: true, email: true, bio: true, bio_detail: true, avatar_data: true, updated_at: true },
|
||||
}),
|
||||
prisma.userRole.findMany({ where: { user_id: session.userId } }),
|
||||
prisma.product.findMany({
|
||||
|
|
@ -58,6 +58,7 @@ export default async function SettingsPage() {
|
|||
<p className="text-sm text-muted-foreground">Niet beschikbaar in demo-modus.</p>
|
||||
) : (
|
||||
<ProfileEditor
|
||||
email={user?.email ?? null}
|
||||
bio={user?.bio ?? null}
|
||||
bioDetail={user?.bio_detail ?? null}
|
||||
hasAvatar={!!user?.avatar_data}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue