import React from "react";
import {
Home, Filter, ListFilter, Download, BarChart2, MessageCircleQuestion,
Calendar, CalendarClock, EyeOff, Printer, Mail, FileSpreadsheet, MessageCircle,
CreditCard, Gift, Clock, HandHeart, RefreshCw,
} from "lucide-react";
import { GuideItem } from "@/components/shared/GuideItem";
import type { HelpContent } from "./types";
const ADMIN_EMAIL = "admin@crosscode.co.za";
export const reportsHelpContent: HelpContent = {
title: "Reporting guide",
subtitle: "This guide explains how reports work and how to use the available filters.",
supportContact: { label: "Site administrator", email: ADMIN_EMAIL },
tabs: [
{
key: "overview",
label: "Overview",
icon: Home,
content: (
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. Tip: select several events in the Feedback summary to compare their ratings (e.g. Camp 2025 vs Camp 2026), or use Series: year on year to compare a whole series' registrations, income and attendance. The Registration funnel shows where people drop off between viewing an event and paying, by source and device. The source comes from short links and utm_source links, else the site the visitor came from (Facebook, Instagram, Google…). The event page's Share and Save QR buttons tag their links as "share" and "qr". WhatsApp doesn't say where a click came from, so add ?utm_source=whatsapp to links you post there, or they show as "direct". It counts only visitors who allowed cookies.
),
},
{
key: "universal",
label: "Universal filters",
icon: Filter,
content: (
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.
),
},
{
key: "specific",
label: "Report-specific filters",
icon: ListFilter,
content: (
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.
),
},
{
key: "exporting",
label: "Exporting reports",
icon: Download,
content: (
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).
),
},
{
key: "fields",
label: "Fields & metrics",
icon: BarChart2,
content: (
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.
),
},
{
key: "help",
label: "Need more help?",
icon: MessageCircleQuestion,
content: (
Still stuck? Reach out to the site administrator — they can check the underlying data with you or flag anything that looks wrong.
Financial figures matter — if a number in a report doesn't look right, it's always worth asking rather than assuming.
),
},
],
};