Christmas gifts and timed gift e-mails
- Gifts bought 15 Nov - 6 Jan get a Christmas card ("Boldog karácsonyt és
csillagos 2027-et!", snowflakes) and a Christmas e-mail subject.
- The buyer can time the gift e-mail (e.g. Christmas morning); "Küldés most"
replaces a waiting one, a refund takes it back.
- Admin: timed e-mails by hour (waiting / sent / failed), e-mail state per gift.
- /karacsony landing page; seasonal hints on /csomagok and /ajandek.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -44,13 +44,20 @@ export function PaymentReturn() {
|
||||
const r = await api<{
|
||||
status: string;
|
||||
name: string | null;
|
||||
gift: { id: string; recipient_name: string | null; recipient_email: string | null } | null;
|
||||
gift: {
|
||||
id: string;
|
||||
recipient_name: string | null;
|
||||
recipient_email: string | null;
|
||||
send_at: string | null;
|
||||
} | null;
|
||||
}>(`/payments/checkout/${encodeURIComponent(value)}`);
|
||||
if (stopped) return;
|
||||
if (r.status === "paid") {
|
||||
const text = !r.gift
|
||||
? `Köszönjük! Jóváírtuk: ${r.name ?? "a csomagod"}.`
|
||||
: r.gift.recipient_email
|
||||
: r.gift.recipient_email && r.gift.send_at
|
||||
? `Köszönjük! Az ajándékot ${new Date(r.gift.send_at).toLocaleString("hu-HU", { month: "long", day: "numeric", hour: "numeric", minute: "2-digit" })}-kor küldjük el ide: ${r.gift.recipient_email}.`
|
||||
: r.gift.recipient_email
|
||||
? `Köszönjük! Az ajándékot elküldtük ide: ${r.gift.recipient_email}. Az utalványt lent le is töltheted.`
|
||||
: "Köszönjük! Az ajándékutalvány elkészült: lent letöltheted, és átadhatod.";
|
||||
setNotice({ kind: "ok", text });
|
||||
|
||||
Reference in New Issue
Block a user