);
}
export const GUIDE_DISMISSED_KEY = "hope_events_reports_guide_dismissed";
const ADMIN_EMAIL = "admin@crosscode.co.za";
export default function ReportingGuideModal({ onClose }: { onClose: (dontShowAgain: boolean) => void }) {
const [tab, setTab] = useState("overview");
const [dontShowAgain, setDontShowAgain] = useState(false);
return (
// Above the site header (Navbar is `sticky top-0 z-50`) and above the report popup
// (z-[60]), since the guide can be opened while a report is showing.
onClose(dontShowAgain)} />
e.stopPropagation()}>
Reporting guide
This guide explains how reports work and how to use the available filters.
{tab === "overview" && (
Reports help you view key data about your events. You can filter the data, preview it on screen, and export or email it.
Apply universal filters (like events and date range) that affect all reports, and report-specific filters for more detailed results.
Preview your report, adjust filters, and choose how you want the data to appear.
Export your report to Excel, PDF, or send it by email or WhatsApp.
)}
{tab === "universal" && (
Universal filters live in the sidebar on the left and apply to whichever report you open — you only set them once, not per report.
Pick one or more events. Every report loads data for exactly these events.
Controls which events even appear in the Events list to pick from.
A preset (This month, Last month, This year) or a custom range. Only applies to reports that are inherently date-based (e.g. Payments between dates, Revenue reports, Cashup audit trail) — reports like Attendees or Ticket usage show a live snapshot and ignore the date range.
)}
{tab === "specific" && (
Some reports have extra options that only make sense for that report — these appear at the top of the report popup once it's open, separate from the universal filters.
Which single event to show (defaults to the first selected event) and whether to include cancelled registrations.
Whether to include cancelled registrations in the counts, and whether to count by number of registrations or by ticket quantity (so someone with 3 tickets counts as 3).
Adjust a report-specific filter, then use the "Refresh" button inside the popup to re-run the report without closing it.
)}
{tab === "exporting" && (
Every report can be exported straight from its popup:
Opens a print-ready PDF in a new tab; use your browser's print button from there.
Sends the PDF to your own account email.
Downloads a styled .xlsx workbook — colored header, key totals, and a chart section where available — matching the on-screen report.
Sends the PDF to your own account's WhatsApp number (needs a valid phone number on file).
)}
{tab === "fields" && (
A few terms come up across several financial reports and are easy to misread — here's what each one actually means:
Money the person paid themselves directly (cash/card/eft/online). Never includes money that reached their order via someone else's donation.
The portion of an order that was covered by an assigned donation. This is part of what's "settled" on the order, but it's the donor's money, not the registrant's — so it's broken out separately and attributed to the donor elsewhere in the report.
What's still owed on an order, after direct payments and any donation cover.
Real money already received as a donation that hasn't been applied to any order yet.
How much of a given donation has been assigned to orders (Used) versus what's still available to assign (Unused). A donation is never overwritten when assigned — the original donation record always keeps its full original amount.
)}
{tab === "help" && (
Still stuck? Reach out to the site administrator — they can check the underlying data with you or flag anything that looks wrong.