Add offline ticket scanning
Staff can lock a section (or the whole event) to their device, download its tickets and keep scanning with no connection. Scans are queued in IndexedDB and synced idempotently when back online; conflicts go into a sync report for supervisors, who can also force-release a lost device. The server now validates scan sections and refuses scans in a scope locked to another device. Adds a web app manifest and a service worker for the scanner page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import React from "react";
|
||||
import { WifiOff, Unlock, CheckCircle2, Lock } from "lucide-react";
|
||||
import { GuideItem } from "@/components/shared/GuideItem";
|
||||
import type { HelpContent } from "./types";
|
||||
|
||||
/** Help content for /dashboard/supervisor/offline-scans. */
|
||||
export const supervisorOfflineScansHelpContent: HelpContent = {
|
||||
title: "Offline scanning",
|
||||
subtitle: "Devices scanning without a connection, and what they synced.",
|
||||
tabs: [
|
||||
{
|
||||
key: "page",
|
||||
label: "This page",
|
||||
icon: WifiOff,
|
||||
content: (
|
||||
<div className="space-y-4">
|
||||
<div className="space-y-4">
|
||||
<GuideItem icon={Lock} title="Locked sections" tone="brand">
|
||||
Each section (or the whole event) in offline mode is locked to one device, so two devices can never check in the same ticket while offline. You can see who holds each lock, when their ticket list was downloaded, and when they last synced.
|
||||
</GuideItem>
|
||||
<GuideItem icon={Unlock} title="Force release" tone="amber">
|
||||
For a lost or flat device. The section is unlocked straight away. If the device reconnects later, its offline scans still sync and are flagged here.
|
||||
</GuideItem>
|
||||
<GuideItem icon={CheckCircle2} title="Sync reports" tone="rose">
|
||||
Scans that need a person to look: tickets not found (e.g. transferred), cancelled registrations, tickets already used up, scans outside the locked section, or check-ins without parental consent. Mark each report reviewed once it's been dealt with.
|
||||
</GuideItem>
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user