import Link from "next/link"; import type { ManualBase } from "@/components/ManualView"; import { MANUAL_REVIEWED, manual, tree } from "@/lib/manual"; /* The manual's front page: every section with every page and its one-line summary, so the whole * table of contents is readable without opening a thing, plus the questions people arrive with. */ const ASKED: [string, string][] = [ ["Load my staff list and catalogue", "reference/csv-templates"], ["Issue a set to a new starter", "counter/issue-a-garment"], ["Handle someone who asks for more than six sets", "people/entitlement-rule"], ["Raise an order to a supplier with their codes", "stock/order-list"], ["Receive a box that came short", "stock/receiving-and-back-orders"], ["Run a stocktake", "stock/stocktakes"], ["Give finance the month-end journal", "reports/journal-export"], ["Print a barcode for a garment that has none", "stock/barcodes"], ["Add a second admin", "account/users"], ["Export everything", "account/export-and-backup"], ]; export default function ManualHome({ base, title, lede, children }: { base: ManualBase; title: string; lede: string; children?: React.ReactNode }) { const sections = tree(); const known = new Set(manual().map((p) => `${p.section}/${p.slug}`)); const asked = ASKED.filter(([, h]) => known.has(h)); const pages = sections.reduce((n, s) => n + s.pages.length, 0); return (
{lede}
{s.blurb}