Multi-phase visual facelift (design tokens, dashboards, sidebar/navbar shell, per-page help guides, and a layout/content pass across every remaining page) plus backend fixes to the dashboard KPI stats: - Admin/Supervisor dashboard KPIs (revenue, donations, registrations, tickets sold) now use a rolling trailing-month window (today back one calendar month, e.g. 9 May - 8 June if today is 8 June) instead of calendar month-to-date, which under-counted for most of the month. The comparison window shifts the same way, so like is still compared with like. - Reports deep-links from those stat tiles now match the same window (range=trailing_month, replacing range=this_month). - Design tokens (brand-* Tailwind scale + shadcn CSS variables), a site-wide contextual help button, fixed dashboard sidebar/navbar, Admin/Supervisor/Staff/User dashboard rebuilds backed by a new GET /api/stats/overview endpoint, a dedicated Contact page, Site Settings restyle with WhatsApp config folded in, and an Account activity feed backed by a new SecurityEvent model. - Every remaining page (home, events, registration flow, auth, legal, payment results, and every Admin/Supervisor/Staff/User tool page) restyled onto the same design tokens, several with real layout upgrades (home hero, events list/detail, donate page, auth pages). - 20+ new dedicated help guides so the whole site has page-specific help content instead of falling back to a generic guide. - Assorted fixes surfaced along the way: donation-leg double-counting in payment stats, donations not counting toward revenue, refund netting in per-method report breakdowns, and donation over-allocation after a refund. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
98 lines
3.9 KiB
TypeScript
98 lines
3.9 KiB
TypeScript
import React from "react";
|
|
import { Building2, Palette, Bell, Mail, Scale, MessageCircle, LayoutDashboard } from "lucide-react";
|
|
import { GuideItem } from "@/components/shared/GuideItem";
|
|
import type { HelpContent } from "./types";
|
|
|
|
/** Help content for Site Settings (/dashboard/admin/settings), matching its six tabs. */
|
|
export const siteSettingsHelpContent: HelpContent = {
|
|
title: "Site Settings help",
|
|
subtitle: "Configure your organisation, branding, email, WhatsApp, 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'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>
|
|
</div>
|
|
</div>
|
|
),
|
|
},
|
|
{
|
|
key: "branding",
|
|
label: "Branding",
|
|
icon: Palette,
|
|
content: (
|
|
<div className="space-y-4">
|
|
<p>Your logo and accent color.</p>
|
|
<GuideItem icon={Palette} title="Accent color" tone="violet">
|
|
This only recolors the organisation name next to the logo in the top navigation bar. Every other button, link, and highlight across the site uses a fixed color scheme by design — changing this setting won't change anything else.
|
|
</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'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't work.
|
|
</GuideItem>
|
|
</div>
|
|
</div>
|
|
),
|
|
},
|
|
],
|
|
};
|