Files
crosscode-platform/apps/events/frontend/src/content/help/site-settings.tsx
T
joshuaandClaude Opus 5.5 716d47242a Events 2.4.0 frontend, deploy and docs: Linked products, linked events, seo
- Site settings → Linked products (Connect, Show events from, Publish my
  events), help, command palette.
- Events from linked products on /events, the home and campus pages, and
  /events/linked/<product>/<id> (markdown with HTML off, canonical to the
  origin, no JSON-LD, not in the sitemap).
- Event page JSON-LD from @crosscode/seo; lib/eventSchema.ts removed.
- Readiness check for linked products' sync; e2e spec with a fake
  Church Website (not run yet: needs the e2e Postgres).
- crosscode: install and build the shared packages Events uses first
  (an older tag still builds as before); scripts/tests/events.bats.
- Release notes, changelogs, handovers, hub-protocol.md, and the plan's
  "Changes while building".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 12:58:50 +02:00

249 lines
16 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import React from "react";
import { Building2, Palette, Bell, Mail, Scale, MessageCircle, LayoutDashboard, Timer, Play, CreditCard, ArrowUpDown, KeyRound, ArrowUpCircle, MapPinned, Archive, Users, BellOff, Megaphone, Webhook, Send, BookOpen, Link2 } from "lucide-react";
import { GuideItem } from "@/components/shared/GuideItem";
import type { HelpContent } from "./types";
/** Help content for Site Settings (/dashboard/admin/settings). */
export const siteSettingsHelpContent: HelpContent = {
title: "Site Settings help",
subtitle: "Configure your organisation, branding, email, WhatsApp, payments, and legal pages.",
quickLinks: [
{ label: "Back to Admin dashboard", href: "/dashboard/admin", icon: LayoutDashboard },
],
tabs: [
{
key: "organisation",
label: "Organisation",
icon: Building2,
content: (
<div className="space-y-4">
<p>Your organisation&apos;s name, tagline, and contact details.</p>
<div className="space-y-4">
<GuideItem icon={Building2} title="Contact email, phone, and address" tone="brand">
These feed the public Contact page directly — update them here and the Contact page updates automatically.
</GuideItem>
<GuideItem icon={Building2} title="Site URL" tone="gray">
The public URL of this site, used in email links like password resets and ticket delivery.
</GuideItem>
<GuideItem icon={Building2} title="Google Search Console verification" tone="gray">
Proves to Google that you own this site, so you can see search traffic and submit <code>/sitemap.xml</code> in Search Console. Add the site there as a URL-prefix property (e.g. <code>https://events.yourchurch.org/</code>), pick the <strong>HTML tag</strong> method, paste the tag here and save, then click Verify. Each site has its own code. Google finds your events without this; it only unlocks the Search Console reports.
</GuideItem>
</div>
</div>
),
},
{
key: "campuses",
label: "Campuses",
icon: MapPinned,
content: (
<div className="space-y-4">
<p>For a church with more than one campus. Off by default — a church with one campus never sees campus fields anywhere.</p>
<div className="space-y-4">
<GuideItem icon={MapPinned} title="Turning campuses on" tone="brand">
Tick <strong>Use campuses</strong>, then add each campus: its name, web address (its page is <code>/campus/…</code>), address, contact, colour and the default location for its events. The order you set is the order of every campus list.
</GuideItem>
<GuideItem icon={MapPinned} title="Events and the public site" tone="brand">
Each event belongs to one campus, or to <strong>All campuses</strong> for church-wide conferences and camps. The events page gets a campus filter (remembered per visitor, starting on their home campus); a campus shows its own events plus the church-wide ones.
</GuideItem>
<GuideItem icon={Users} title="People and messages" tone="gray">
People can choose a home campus on their profile. In Email and WhatsApp broadcasts, <strong>Everyone at a campus</strong> adds the people whose home campus it is — and, ticked, people who registered for its events in the last 12 months. News still only goes to people who opted in.
</GuideItem>
<GuideItem icon={Archive} title="Archiving, deleting, turning off" tone="amber">
A campus with events — or with staff limited to it — can&apos;t be deleted; archive it instead: it disappears from filters and new events, and its events keep it. Turning campuses off hides everything campus-related, and staff limits are ignored while off; nothing is deleted, and it all comes back when you turn them on again.
</GuideItem>
<GuideItem icon={Users} title="Staff for some campuses" tone="violet">
In Admin → Users, a supervisor or staff member can be limited to some campuses — they then only work with those campuses&apos; events and events for all campuses. See the Users help for what they can and can&apos;t do.
</GuideItem>
</div>
</div>
),
},
{
key: "branding",
label: "Branding",
icon: Palette,
content: (
<div className="space-y-4">
<p>Your logo and colours, with a live preview of the website and emails.</p>
<GuideItem icon={Palette} title="Primary colour" tone="violet">
Used for buttons, links and highlights across the site and in emails. Buttons have white text on it and links use it on white, so it must be dark enough to read. If it isn&apos;t (under 4.5:1 contrast), the preview shows a warning and a <strong>Use a darker shade</strong> button with the closest readable shade of your colour.
</GuideItem>
<GuideItem icon={Palette} title="Secondary and accent" tone="brand">
Light tints for backgrounds and hover states — they stay light whatever you pick.
</GuideItem>
</div>
),
},
{
key: "notifications",
label: "Notifications",
icon: Bell,
content: (
<div className="space-y-4">
<p>The email address(es) that get notified whenever someone registers for an event — separate multiple addresses with commas.</p>
</div>
),
},
{
key: "email",
label: "Email",
icon: Mail,
content: (
<div className="space-y-4">
<p>Outgoing SMTP settings used for tickets, payment confirmations, and account emails.</p>
<GuideItem icon={Mail} title="Leave blank for defaults" tone="gray">
If left blank, the server falls back to its own environment configuration. The SMTP password is stored encrypted.
</GuideItem>
</div>
),
},
{
key: "legal",
label: "Legal",
icon: Scale,
content: (
<div className="space-y-4">
<p>Details used to populate the site&apos;s Privacy Policy and Terms pages — operator name, information officer details, website URL, and effective date.</p>
</div>
),
},
{
key: "whatsapp",
label: "WhatsApp",
icon: MessageCircle,
content: (
<div className="space-y-4">
<p>Connects the site to a WhatsApp number (via WAWP) for sending tickets and notifications.</p>
<div className="space-y-4">
<GuideItem icon={MessageCircle} title="Three-step setup" tone="brand">
Enter your WAWP access token, set up a session instance (create new or enter an existing one), then scan the QR code (or use a phone pairing code) to link a WhatsApp number.
</GuideItem>
<GuideItem icon={MessageCircle} title="Session status" tone="green">
Once connected, the status card shows live connection health and auto-refreshes while reconnecting. If it fails, the system attempts to auto-recover and emails an admin alert if that doesn&apos;t work.
</GuideItem>
</div>
</div>
),
},
{
key: "payments",
label: "Payments",
icon: CreditCard,
content: (
<div className="space-y-4">
<p>Online payments: which providers people can pay with, and each provider&apos;s settings.</p>
<div className="space-y-4">
<GuideItem icon={ArrowUpDown} title="Providers and order" tone="brand">
Tick a provider to let people pay with it, and use the arrows to set the order. The first provider that&apos;s ticked and set up is the default. If none is, online payments are off and people pay at the door.
</GuideItem>
<GuideItem icon={KeyRound} title="Yoco" tone="green">
Shown while Yoco is ticked. Paste the secret key, then generate the webhook (or enter its secret) so payments are confirmed automatically. Secrets are stored encrypted and never shown in full.
</GuideItem>
<GuideItem icon={KeyRound} title="PayFast" tone="green">
Shown while PayFast is ticked. Enter the merchant ID, merchant key and salt passphrase from your PayFast dashboard (Settings), and choose Sandbox to test or Live for real payments. The passphrase must match the dashboard exactly — save, then use Test connection to check. When more than one provider is ticked, payers choose how to pay.
</GuideItem>
<GuideItem icon={CreditCard} title="Minimum and fees" tone="gray">
Online payments must be at least R15. Payments are recorded at the full amount paid; provider fees aren&apos;t deducted or added to the payer&apos;s total — deal with them at cashup.
</GuideItem>
</div>
</div>
),
},
{
key: "webhooks",
label: "Webhooks",
icon: Webhook,
content: (
<div className="space-y-4">
<p>Send what happens here to another system as it happens — for example to ChurchSuite, Planning Center or a Google Sheet through Zapier or Make.</p>
<div className="space-y-4">
<GuideItem icon={Webhook} title="Add a webhook" tone="brand">
&quot;+ Add webhook&quot;: a name, the https address the other system gave you, and what to send — registrations made, paid or cancelled, payments and refunds, check-ins, new accounts, published events. Copy the signing secret it shows (once) into the other system so it can check requests really come from you.
</GuideItem>
<GuideItem icon={Send} title="Test and delivery log" tone="green">
&quot;Send test&quot; sends a test message straight away. The delivery log shows everything sent in the last 30 days, what came back, and the full message. Anything that fails is tried again after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours; &quot;Resend&quot; tries again now.
</GuideItem>
<GuideItem icon={BookOpen} title="How webhooks work" tone="gray">
Open &quot;How webhooks work&quot; on the Webhooks tab for whoever sets up the receiving side: what is sent and when, the headers, how to check the signature (with Node.js and PHP examples), and an example message for every event type that you can copy. It opens by itself until you&apos;ve added a webhook.
</GuideItem>
<GuideItem icon={Scale} title="Privacy" tone="amber">
Webhooks send names, email addresses and phone numbers, so each webhook is added to your operator register (Admin → Privacy) — have an agreement with the service. Children&apos;s details from kids check-in are never sent. Switch a webhook off or delete it at any time.
</GuideItem>
</div>
</div>
),
},
{
key: "linked",
label: "Linked products",
icon: Link2,
content: (
<div className="space-y-4">
<p>Your church&apos;s other Cross Code products, such as the Church Website and the Church App. The Hub lists them here by itself (within 15 minutes of a new one being set up).</p>
<div className="space-y-4">
<GuideItem icon={Link2} title="Connect" tone="brand">
&quot;Connect&quot; sets up a secure link with that product, so your events can show there and theirs here. Either side can connect or disconnect; the other side shows who did it.
</GuideItem>
<GuideItem icon={Megaphone} title="Publish my events" tone="green">
On by default: your connected products can show your public events, as they appear on your events page, with a link back here to register. Hidden events, people&apos;s details and children&apos;s details are never shared. Registrations and payments always stay in Cross Events.
</GuideItem>
<GuideItem icon={Send} title="Show events from a product" tone="gray">
Tick it to show that product&apos;s events on your events pages, marked as coming from it. They&apos;re fetched every 15 minutes (straight away when they change), and can only be changed where they come from. If that product can&apos;t be reached, its last events keep showing and this tab says when it last synced.
</GuideItem>
</div>
</div>
),
},
{
key: "jobs",
label: "Background jobs",
icon: Timer,
content: (
<div className="space-y-4">
<p>Tasks the server runs on a schedule: the daily summary email, waitlist offers, feedback forms, session reminders and certificates, consent reminders, analytics, the nightly backup and temp-file cleanup.</p>
<div className="space-y-4">
<GuideItem icon={Timer} title="Schedule and history" tone="brand">
Each job shows when it runs and when it runs next. Click a job&apos;s last result to see its last 10 runs — when they started and finished, and what they did (or the error). A failed run is retried twice.
</GuideItem>
<GuideItem icon={Play} title="Run now" tone="green">
Runs a job straight away, e.g. to send a feedback form without waiting. It&apos;s recorded in the audit log.
</GuideItem>
</div>
<p className="text-xs text-gray-500">Jobs run once per schedule even when more than one server process is running. Schedules and on/off switches are set by the server&apos;s environment variables.</p>
</div>
),
},
{
key: "licence",
label: "Licence",
icon: KeyRound,
content: (
<div className="space-y-4">
<p>The site&apos;s licence and its connection to the Cross Events Hub. The site checks in every 15 minutes with its version, health and totals — never anyone&apos;s personal information.</p>
<div className="space-y-4">
<GuideItem icon={KeyRound} title="Connecting" tone="brand">
Enter the licence key you received (CEH-XXXX-XXXX-XXXX-XXXX). If the site moves to a new address, ask your provider to release the licence, then connect again.
</GuideItem>
<GuideItem icon={Timer} title="Grace period" tone="amber">
After the licence&apos;s end date everything keeps working for the grace period (usually 14 days); only site admins see a reminder.
</GuideItem>
<GuideItem icon={Scale} title="Read-only" tone="gray">
When a licence is suspended, revoked or past its grace period, nothing new can be added — no events, registrations or payments. Tickets for events people already paid for still scan, and all data can still be viewed and exported.
</GuideItem>
<GuideItem icon={ArrowUpCircle} title="Updates" tone="brand">
When a new version is out, the Version box shows what&apos;s new in it, so you can decide whether you want it. Press Request update and your provider updates the site for you — there&apos;s nothing to run yourself. Changed your mind? Withdraw request tells your provider not to. If a newer version comes out before your provider has updated the site, the page shows which version you asked for and offers &quot;Ask for … instead&quot;.
</GuideItem>
<GuideItem icon={BellOff} title="Not now" tone="gray">
Not now (on the Licence page or the update banner) hides the reminder until the next version comes out. Updates that fix a security problem or a serious bug can&apos;t be put off.
</GuideItem>
<GuideItem icon={Megaphone} title="Notices from your provider" tone="brand">
Your provider can post notices, such as planned maintenance. Site admins and supervisors see them as a banner at the top of the dashboard; close one with ×. Current notices are also listed on this page.
</GuideItem>
</div>
</div>
),
},
],
};