Files
sorsfonalak/services/frontend/src/app/szemelyek/uj/page.tsx
T
fecoandClaude Opus 5.5 8e1205359d
CI / test (push) Successful in 1m35s
CI / build (push) Successful in 8m7s
CI / deploy (push) Skipped
Inviting shown but off until launch; waitlist confirmation; waitlist invites with a package
USER_INVITES (default false) keeps users from inviting others until the
launch: the 'Meghívom' option and a 'Hívd meg, akit szeretsz' card on the
persons page are shown, disabled, with 'Hamarosan'; the backend refuses
with invites_disabled (admins may always).

Joining the waitlist sends one confirmation e-mail (waitlist_joined) with a
link that takes the address off the list and opts it out; at most 10 per
address in 15 minutes. Admins can pick a package for waitlist invitations,
like on the invitation form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
2026-11-19 11:07:13 +00:00

42 lines
1.5 KiB
TypeScript

import type { Metadata } from "next";
import { PersonPacks } from "@/components/PersonPacks";
import { backendGet, requireMe } from "@/lib/server";
import type { PublicConfig } from "@/lib/types";
import { NewPersonChooser } from "./NewPersonChooser";
export const metadata: Metadata = { title: "Új személy" };
export default async function NewPersonPage() {
const me = await requireMe("/szemelyek/uj");
const config = await backendGet<PublicConfig>("/v1/config");
const slots = me.persons;
return (
<main className="page">
<div className="page-head">
<h1>Új személy</h1>
<p className="muted">
Társad, családtagod, barátod: megadhatod a születési adatait, vagy meghívhatod, hogy ő adja meg, és megnézzétek,
mennyire illetek össze.
{!slots.unlimited && slots.left !== null && slots.left > 0 && ` Még ${slots.left} személyt vehetsz fel.`}
</p>
</div>
<section className="card" aria-label="Új személy">
<NewPersonChooser
canAdd={slots.left !== 0}
hasOwnChart={me.primary_chart_id !== null}
invitesOpen={(config?.user_invites ?? false) || me.user.roles.includes("admin")}
full={
<>
<p className="muted">Elfogytak a helyeid. Újabb személyhez válassz csomagot, vagy hívd meg.</p>
<PersonPacks canPay={config?.mock_payments ?? false} />
</>
}
/>
</section>
</main>
);
}