feat(join): A4 — Join household (accept invite) #61

Merged
marcel merged 24 commits from feat/issue-21-join-household into master 2026-04-19 14:29:14 +02:00
Showing only changes of commit c40b0fe095 - Show all commits

View File

@@ -59,6 +59,16 @@
} }
} }
async function handleInviteClick() {
if (!activeInvite) {
const res = await fetch('/members/invites', { method: 'POST' });
if (res.ok) {
activeInvite = await res.json();
}
}
showInvitePanel = !showInvitePanel;
}
async function handleRegenerate() { async function handleRegenerate() {
const res = await fetch('/members/invites', { method: 'POST' }); const res = await fetch('/members/invites', { method: 'POST' });
if (res.ok) { if (res.ok) {
@@ -80,7 +90,7 @@
showInviteCard={isPlanner} showInviteCard={isPlanner}
onremove={handleRemove} onremove={handleRemove}
onrolechange={handleRoleChange} onrolechange={handleRoleChange}
oninviteclick={() => (showInvitePanel = !showInvitePanel)} oninviteclick={handleInviteClick}
/> />
{#if showInvitePanel && isPlanner && activeInvite} {#if showInvitePanel && isPlanner && activeInvite}