Promo codes; purchases off in production
CI / test (push) Successful in 1m11s
CI / build (push) Successful in 5m38s
CI / deploy (push) Skipped

Admins make promo codes for a package (Admin → Promókódok: batch, note, copy
all), list them filtered (unused by default, used, revoked; by package; by
code, note or redeemer) and withdraw unused ones. A logged-in user redeems a
code once (header link, /bevaltas?kod=... prefilled, packages page, and the
analysis and question offers point there) and gets the package as an order
with source 'promo'. Failed redemptions are rate limited.

Production purchases are off: MOCK_PAYMENTS now defaults to false in the
deploy compose, so package cards say 'Hamarosan'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-19 09:45:42 +00:00
co-authored by Claude Opus 5.5
parent 19df36369c
commit 054fb930f5
19 changed files with 863 additions and 5 deletions
+21
View File
@@ -722,3 +722,24 @@ a.pair-row:hover strong { color: var(--gold); }
.share-cta { gap: 12px; }
.share-cta h2 { font-size: 24px; }
.share-cta .btn { align-self: flex-start; }
/* Promo codes: redeeming (header, packages page, /bevaltas) and the admin page */
.redeem-link { color: var(--ink-2); font-size: 13px; text-decoration: none; white-space: nowrap; }
.redeem-link:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.redeem { display: flex; flex-direction: column; gap: 8px; }
.redeem-row { display: flex; gap: 8px; flex-wrap: wrap; }
.redeem-input { flex: 1 1 220px; width: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1.5px; text-transform: uppercase; }
.redeem-card { gap: 10px; border-color: rgba(217, 180, 106, 0.35); }
.redeem-card h2 { font-size: 24px; }
.promo-form { display: grid; grid-template-columns: minmax(0, 1.4fr) 110px minmax(0, 2fr) auto; gap: 12px; align-items: end; }
.promo-made { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.promo-codes { min-height: 0; padding: 10px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.6; resize: vertical; }
.promo-code { font-size: 14px; letter-spacing: 1px; white-space: nowrap; }
.promo-table td { vertical-align: top; }
.promo-table td .hint { display: block; }
.promo-open { color: var(--ok); }
@media (max-width: 760px) {
.promo-form { grid-template-columns: minmax(0, 1fr) 100px; }
.promo-form .promo-note, .promo-form .btn { grid-column: 1 / -1; }
}
@media (max-width: 640px) { .who { flex-wrap: wrap; gap: 8px 12px; } }