- 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>
23 lines
588 B
TypeScript
23 lines
588 B
TypeScript
'use client';
|
|
|
|
import { ReactNode } from 'react';
|
|
import { usePrivacy } from '@/context/PrivacyContext';
|
|
|
|
export const PRIVACY_MASK = '••••';
|
|
|
|
/**
|
|
* Renders its children normally, but shows a mask while privacy mode is on.
|
|
* Use for inline sensitive numbers that can't be hidden without breaking
|
|
* the surrounding row/badge.
|
|
*/
|
|
export default function SensitiveValue({
|
|
children,
|
|
className,
|
|
}: {
|
|
children: ReactNode;
|
|
className?: string;
|
|
}) {
|
|
const { privacyMode } = usePrivacy();
|
|
return <span className={className}>{privacyMode ? PRIVACY_MASK : children}</span>;
|
|
}
|