Unify admin ticket creation into one modal with first-class payment status.
- Replace the three Attendees-tab modals (Manual Ticket / Add at Door / Invite Guest) with a single Add Ticket modal: Paid/Unpaid/Guest segmented control, shared fields, "Check in now" for all types, and a live "what happens" preview, backed by one POST /api/tickets/admin/add. - Add tickets.payment_status (paid | unpaid | comp) with a backfill migration; keep it in sync on every payment-settlement path (mark-paid, admin approval, Lightning, free bookings, hold recovery). - Show Paid/Unpaid/Comp badges in the attendee list, count only paid tickets toward revenue, let unpaid tickets be resolved via Mark Paid, and flag unpaid tickets with their balance due in the door scanner. - Replace the per-page useStatsPrivacy hook with an admin-wide PrivacyContext + SensitiveValue mask, toggled from the admin layout. - Add server-side pagination with page-size options to the users page. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
e38d14970d
commit
9b2668f498
@@ -18,7 +18,7 @@ import {
|
||||
VideoCameraIcon,
|
||||
} from '@heroicons/react/24/outline';
|
||||
import toast from 'react-hot-toast';
|
||||
import { parseDate, EVENT_TIMEZONE } from '@/lib/utils';
|
||||
import { parseDate, formatCurrency, EVENT_TIMEZONE } from '@/lib/utils';
|
||||
import clsx from 'clsx';
|
||||
|
||||
// ─── Types ───────────────────────────────────────────────────
|
||||
@@ -273,6 +273,17 @@ function ValidTicketScreen({
|
||||
{validation.ticket?.attendeeEmail && (
|
||||
<p className="text-emerald-100 text-lg mb-4">{validation.ticket.attendeeEmail}</p>
|
||||
)}
|
||||
{/* Unpaid tickets are valid for entry but the balance is collected at the door */}
|
||||
{validation.ticket?.paymentStatus === 'unpaid' && (
|
||||
<div className="bg-orange-500 rounded-2xl px-6 py-3 w-full max-w-sm text-center mb-3">
|
||||
<p className="font-bold text-lg">UNPAID — collect payment</p>
|
||||
{!!validation.ticket.amountDue && (
|
||||
<p className="text-orange-100 text-sm">
|
||||
Balance due: {formatCurrency(validation.ticket.amountDue)}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
<div className="bg-white/15 rounded-2xl px-6 py-4 w-full max-w-sm space-y-2 text-center">
|
||||
{validation.event && (
|
||||
<p className="font-semibold text-lg">{validation.event.title}</p>
|
||||
|
||||
Reference in New Issue
Block a user