@flowselections/scan-module 1.0.19 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/components/ScanModulePage.js +6 -6
- package/dist-lib/components/scanners/EindcontroleScanner.d.ts.map +1 -1
- package/dist-lib/components/scanners/EindcontroleScanner.js +69 -9
- package/dist-lib/components/scanners/KarHistorie.js +1 -1
- package/dist-lib/components/scanners/KarIndelingScanner.js +4 -4
- package/dist-lib/components/scanners/KarScannerPage.d.ts +1 -1
- package/dist-lib/components/scanners/KarScannerPage.js +6 -6
- package/dist-lib/components/scanners/PublicScannerPage.js +3 -3
- package/dist-lib/components/scanners/ScanInput.d.ts +1 -1
- package/dist-lib/components/scanners/ScanInput.js +2 -2
- package/dist-lib/components/scanners/ScanMonitoring.js +1 -1
- package/dist-lib/components/scanners/ScannerBySlug.js +4 -4
- package/dist-lib/components/scanners/SplitsFustenScherm.d.ts +1 -1
- package/dist-lib/components/scanners/StationNaamVeld.js +1 -1
- package/dist-lib/components/scanners/TaalTegels.js +1 -1
- package/dist-lib/hooks/useKarIndeling.d.ts +2 -2
- package/dist-lib/hooks/useKarIndeling.js +4 -4
- package/dist-lib/hooks/useKarScanner.js +2 -2
- package/dist-lib/hooks/usePrinters.d.ts +1 -1
- package/dist-lib/hooks/usePrinters.js +1 -1
- package/dist-lib/hooks/useScanEngine.js +2 -2
- package/dist-lib/hooks/useScanModuleData.js +1 -1
- package/dist-lib/hooks/useScanStats.js +1 -1
- package/dist-lib/hooks/useScanners.js +2 -2
- package/dist-lib/index.d.ts +26 -26
- package/dist-lib/index.js +26 -26
- package/dist-lib/integrations/supabase/auth-attacher.js +1 -1
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +469 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/pakbonScan.js +2 -2
- package/dist-lib/lib/shellHost.functions.d.ts +1 -1
- package/dist-lib/lib/shellHost.functions.js +1 -1
- package/dist-lib/lib/veilingbonPrint.js +1 -1
- package/package.json +2 -2
|
@@ -9,12 +9,12 @@ import { createContext, useContext, useEffect, useState } from "react";
|
|
|
9
9
|
import { Badge, Button, Card, CardContent, CardHeader, CardTitle, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Input, Label, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, cn, toast, } from "@flowselections/core";
|
|
10
10
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@flowselections/core";
|
|
11
11
|
import { Check, Copy, ExternalLink, Loader2, Pencil, Plus, Printer, ScanLine, Trash2, } from "lucide-react";
|
|
12
|
-
import { useScanners, slugify, } from "../hooks/useScanners";
|
|
13
|
-
import { usePrinters } from "../hooks/usePrinters";
|
|
14
|
-
import { SCANNER_TYPES, STANDAARD_SCANNER_TYPE, scannerType, normaliseerScannerType, } from "../lib/scannerTypes";
|
|
15
|
-
import { KarHistorie } from "./scanners/KarHistorie";
|
|
16
|
-
import { ScanMonitoring } from "./scanners/ScanMonitoring";
|
|
17
|
-
import { haalShellHost } from "../lib/shellHost.functions";
|
|
12
|
+
import { useScanners, slugify, } from "../hooks/useScanners.js";
|
|
13
|
+
import { usePrinters } from "../hooks/usePrinters.js";
|
|
14
|
+
import { SCANNER_TYPES, STANDAARD_SCANNER_TYPE, scannerType, normaliseerScannerType, } from "../lib/scannerTypes.js";
|
|
15
|
+
import { KarHistorie } from "./scanners/KarHistorie.js";
|
|
16
|
+
import { ScanMonitoring } from "./scanners/ScanMonitoring.js";
|
|
17
|
+
import { haalShellHost } from "../lib/shellHost.functions.js";
|
|
18
18
|
const GEEN_PRINTER = "geen";
|
|
19
19
|
// De publieke basis-URL komt van central-auth (GET /api/shell-host): één bron
|
|
20
20
|
// per tenant. FAIL-CLOSED: lukt dat niet, dan bouwen we géén link — een link
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EindcontroleScanner.d.ts","sourceRoot":"","sources":["../../../src/components/scanners/EindcontroleScanner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EindcontroleScanner.d.ts","sourceRoot":"","sources":["../../../src/components/scanners/EindcontroleScanner.tsx"],"names":[],"mappings":"AAwGA,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,SAAS,GACV,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,+BA2hBA"}
|
|
@@ -8,13 +8,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
// ============================================================================
|
|
9
9
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
10
10
|
import { Badge, Button, Card, CardContent, toast } from "@flowselections/core";
|
|
11
|
-
import { supabase } from "../../integrations/supabase/client";
|
|
11
|
+
import { supabase } from "../../integrations/supabase/client.js";
|
|
12
12
|
import { AlertTriangle, CheckCircle2, ClipboardCheck, Clock, Loader2, RefreshCw, XCircle } from "lucide-react";
|
|
13
|
-
import { formatDag } from "../../lib/datum";
|
|
14
|
-
import { ScanInput } from "./ScanInput";
|
|
15
|
-
import { StationNaamVeld } from "./StationNaamVeld";
|
|
16
|
-
import { playFeedback } from "../../hooks/useScanEngine";
|
|
17
|
-
import { engineMelding, engineOrders, isTechnischeFout, isVerouderdePakbon, isTechnischeMelding, vriendelijkeScanFout, logScan, magProductLookup, normaliseerScanCode, pakbonBarcodeUit, resolvePakbonScan, } from "../../lib/pakbonScan";
|
|
13
|
+
import { formatDag } from "../../lib/datum.js";
|
|
14
|
+
import { ScanInput } from "./ScanInput.js";
|
|
15
|
+
import { StationNaamVeld } from "./StationNaamVeld.js";
|
|
16
|
+
import { playFeedback } from "../../hooks/useScanEngine.js";
|
|
17
|
+
import { engineMelding, engineOrders, isTechnischeFout, isVerouderdePakbon, isTechnischeMelding, vriendelijkeScanFout, logScan, magProductLookup, normaliseerScanCode, pakbonBarcodeUit, resolvePakbonScan, } from "../../lib/pakbonScan.js";
|
|
18
18
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
19
19
|
const db = supabase;
|
|
20
20
|
function voortgangTekst(v) {
|
|
@@ -53,6 +53,8 @@ export function EindcontroleScanner({ naam, scannerId, }) {
|
|
|
53
53
|
const [verouderdMelding, setVerouderdMelding] = useState(null);
|
|
54
54
|
// Technische fout (timeout/netwerk): neutraal, nooit de herprint-knop.
|
|
55
55
|
const [techFout, setTechFout] = useState(null);
|
|
56
|
+
// Pakbon van de kar nog niet geprint: vraag Afmelden / Annuleren.
|
|
57
|
+
const [nietGeprint, setNietGeprint] = useState(null);
|
|
56
58
|
const bezigRef = useRef(false);
|
|
57
59
|
const laadOpenstaand = useCallback(async () => {
|
|
58
60
|
try {
|
|
@@ -86,7 +88,7 @@ export function EindcontroleScanner({ naam, scannerId, }) {
|
|
|
86
88
|
setEngine(null);
|
|
87
89
|
setVerouderdMelding(null);
|
|
88
90
|
}, []);
|
|
89
|
-
const scan = useCallback(async (barcode) => {
|
|
91
|
+
const scan = useCallback(async (barcode, bevestigNietGeprint = false) => {
|
|
90
92
|
const rauw = (barcode ?? "").trim();
|
|
91
93
|
const code = pakbonBarcodeUit(rauw) ?? normaliseerScanCode(rauw);
|
|
92
94
|
if (!code || bezigRef.current)
|
|
@@ -96,6 +98,7 @@ export function EindcontroleScanner({ naam, scannerId, }) {
|
|
|
96
98
|
setEngine(null);
|
|
97
99
|
setVerouderdMelding(null);
|
|
98
100
|
setTechFout(null);
|
|
101
|
+
setNietGeprint(null);
|
|
99
102
|
// 1. Pakbonformaat? Dan is de Logistiek Engine leidend. Hoort de pakbon
|
|
100
103
|
// bij een kar die opnieuw is ingedeeld, dan stoppen we hier met een
|
|
101
104
|
// duidelijke melding en een herstelknop.
|
|
@@ -126,6 +129,7 @@ export function EindcontroleScanner({ naam, scannerId, }) {
|
|
|
126
129
|
const { data, error } = await db.rpc("scan_eindcontrole", {
|
|
127
130
|
p_barcode: code,
|
|
128
131
|
p_scanner_id: scannerId,
|
|
132
|
+
p_bevestig_niet_geprint: bevestigNietGeprint,
|
|
129
133
|
});
|
|
130
134
|
setBezig(false);
|
|
131
135
|
bezigRef.current = false;
|
|
@@ -145,6 +149,21 @@ export function EindcontroleScanner({ naam, scannerId, }) {
|
|
|
145
149
|
toast.error(tekst);
|
|
146
150
|
return;
|
|
147
151
|
}
|
|
152
|
+
// Pakbon van deze kar nog niet geprint: eerst vragen, niets afmelden.
|
|
153
|
+
if (!res0.ok && res0.errorCode === "niet_geprint") {
|
|
154
|
+
const c = res0.cart ?? {};
|
|
155
|
+
setResultaat(null);
|
|
156
|
+
setNietGeprint({
|
|
157
|
+
code,
|
|
158
|
+
rauw,
|
|
159
|
+
orderNumber: res0.order?.orderNumber ?? null,
|
|
160
|
+
klant: res0.order?.customerName ?? null,
|
|
161
|
+
karLabel: c.cartLabel ?? (c.cartIndex ? `Kar ${c.cartIndex} van ${c.cartTotal ?? "?"}` : null),
|
|
162
|
+
});
|
|
163
|
+
playFeedback("error");
|
|
164
|
+
void logScan(rauw, "pakbon_niet_geprint", "Waarschuwing getoond", scannerId);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
148
167
|
let uitkomst;
|
|
149
168
|
{
|
|
150
169
|
const res = res0;
|
|
@@ -206,6 +225,8 @@ export function EindcontroleScanner({ naam, scannerId, }) {
|
|
|
206
225
|
}
|
|
207
226
|
}
|
|
208
227
|
}
|
|
228
|
+
if (uitkomst.ok && bevestigNietGeprint)
|
|
229
|
+
uitkomst.zonderPakbon = true;
|
|
209
230
|
playFeedback(uitkomst.ok || uitkomst.alAfgehandeld ? "ok" : "error");
|
|
210
231
|
if (uitkomst.ok)
|
|
211
232
|
toast.success(uitkomst.melding);
|
|
@@ -217,6 +238,35 @@ export function EindcontroleScanner({ naam, scannerId, }) {
|
|
|
217
238
|
setHistorie((vorig) => [uitkomst, ...vorig].slice(0, 10));
|
|
218
239
|
void laadOpenstaand();
|
|
219
240
|
}, [scannerId, laadOpenstaand]);
|
|
241
|
+
/** Pakbon niet geprint: toch afmelden (keuze wordt vastgelegd). */
|
|
242
|
+
const tochAfmelden = useCallback(() => {
|
|
243
|
+
if (!nietGeprint)
|
|
244
|
+
return;
|
|
245
|
+
const { rauw } = nietGeprint;
|
|
246
|
+
void logScan(rauw, "afgemeld_zonder_print", "Gekozen: Afmelden", scannerId);
|
|
247
|
+
setNietGeprint(null);
|
|
248
|
+
void scan(rauw, true);
|
|
249
|
+
}, [nietGeprint, scannerId, scan]);
|
|
250
|
+
/** Pakbon niet geprint: niet afmelden (keuze wordt vastgelegd). */
|
|
251
|
+
const annuleerNietGeprint = useCallback(() => {
|
|
252
|
+
if (!nietGeprint)
|
|
253
|
+
return;
|
|
254
|
+
const n = nietGeprint;
|
|
255
|
+
void logScan(n.rauw, "geannuleerd_niet_geprint", "Gekozen: Annuleren", scannerId);
|
|
256
|
+
setHistorie((vorig) => [
|
|
257
|
+
{
|
|
258
|
+
ok: false,
|
|
259
|
+
melding: "Niet afgemeld: pakbon nog niet geprint",
|
|
260
|
+
code: n.rauw,
|
|
261
|
+
orderNumber: n.orderNumber,
|
|
262
|
+
klant: n.klant,
|
|
263
|
+
karLabel: n.karLabel,
|
|
264
|
+
nietGeprint: true,
|
|
265
|
+
},
|
|
266
|
+
...vorig,
|
|
267
|
+
].slice(0, 10));
|
|
268
|
+
setNietGeprint(null);
|
|
269
|
+
}, [nietGeprint, scannerId]);
|
|
220
270
|
/** Oude pakbonnen van deze order weghalen en nieuwe uitprinten. */
|
|
221
271
|
const pakbonOpnieuw = useCallback(async () => {
|
|
222
272
|
const code = engine?.code ?? "";
|
|
@@ -247,7 +297,7 @@ export function EindcontroleScanner({ naam, scannerId, }) {
|
|
|
247
297
|
const actueel = openstaand.filter((p) => !p.ouder);
|
|
248
298
|
const ouder = openstaand.filter((p) => p.ouder);
|
|
249
299
|
const pakbonKnop = (p) => (_jsxs("button", { type: "button", disabled: bezig, onClick: () => void scan(p.barcode), className: "w-full rounded-xl border p-3 text-left transition hover:border-primary disabled:opacity-50", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "truncate font-bold", children: p.order_number ?? "Order onbekend" }), _jsx(Badge, { variant: p.soort === "hele_kar" ? "default" : "secondary", children: p.soort === "hele_kar" ? "Hele kar" : "Deelkar" })] }), _jsxs("p", { className: "mt-1 truncate text-sm text-muted-foreground", children: [p.klant_naam ?? "Klant onbekend", formatDag(p.leverdag) ? ` · Leverdag ${formatDag(p.leverdag)}` : ""] }), p.klant_bedrijf ? (_jsx("p", { className: "truncate text-xs text-muted-foreground", children: p.klant_bedrijf })) : null, _jsxs("p", { className: "mt-1 truncate font-mono text-xs text-muted-foreground", children: [p.barcode, p.cart_index != null ? ` · Kar ${p.cart_index} van ${p.cart_total ?? "?"}` : ""] })] }, p.cart_id ?? p.barcode));
|
|
250
|
-
return (_jsxs("main", { className: "mx-auto max-w-2xl space-y-4 p-4", children: [_jsxs("header", { className: "flex items-center gap-3", children: [_jsx("span", { className: "grid h-11 w-11 shrink-0 place-items-center rounded-xl bg-primary/10 text-primary", children: _jsx(ClipboardCheck, { className: "h-6 w-6" }) }), _jsxs("div", { className: "min-w-0", children: [_jsx("h1", { className: "truncate text-lg font-black", children: naam ?? "Eindcontrole scanner" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "Scan de pakbon van de kar" })] })] }), _jsx(StationNaamVeld, {}), _jsx(ScanInput, { onScan: (code) => void scan(code), variant: "zone", disabled: bezig, label: "Scan de pakbon", placeholder: "Barcode pakbon" }), bezig ? (_jsx("div", { className: "grid place-items-center py-6", children: _jsx(Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })) : null, techFout ? (_jsx(Card, { children: _jsxs(CardContent, { className: "space-y-3 py-6", children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-5 w-5 shrink-0 text-muted-foreground" }), _jsx("p", { className: "text-sm font-semibold", children: techFout.melding })] }), _jsxs(Button, { className: "h-14 w-full text-base font-bold", disabled: bezig, onClick: () => void scan(techFout.code), children: [_jsx(RefreshCw, { className: "mr-2 h-5 w-5" }), "Opnieuw proberen"] }), _jsx(Button, { variant: "ghost", className: "h-11 w-full", onClick: () => setTechFout(null), children: "Sluiten" })] }) })) : null, verouderdMelding ? (_jsx(Card, { className: "border-destructive", children: _jsxs(CardContent, { className: "space-y-3 py-6", children: [_jsxs("div", { className: "flex items-start gap-2 text-destructive", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-5 w-5 shrink-0" }), _jsx("p", { className: "text-sm font-semibold", children: verouderdMelding })] }), verouderdeOrders.length > 0 ? (_jsx("div", { className: "space-y-1 rounded-xl border p-3 text-sm", children: verouderdeOrders.map((o, i) => (_jsxs("p", { className: "truncate", children: [_jsx("span", { className: "font-bold", children: o.orderNumber ?? "Order onbekend" }), o.customerName ? ` · ${o.customerName}` : ""] }, `${o.orderNumber ?? i}`))) })) : null, _jsx("p", { className: "text-xs text-muted-foreground", children: "Deze pakbon hoort bij een kar die opnieuw is ingedeeld. Print de pakbonnen opnieuw en scan daarna de nieuwe pakbon." }), _jsxs(Button, { className: "h-14 w-full text-base font-bold", disabled: bezig, onClick: () => void pakbonOpnieuw(), children: [bezig ? (_jsx(Loader2, { className: "mr-2 h-5 w-5 animate-spin" })) : (_jsx(RefreshCw, { className: "mr-2 h-5 w-5" })), "Oude pakbonnen verwijderen en nieuwe printen"] }), _jsx(Button, { variant: "ghost", className: "h-11 w-full", onClick: sluitVerouderd, children: "Sluiten" })] }) })) : null, resultaat ? (_jsx(Card, { className: resultaat.ok
|
|
300
|
+
return (_jsxs("main", { className: "mx-auto max-w-2xl space-y-4 p-4", children: [_jsxs("header", { className: "flex items-center gap-3", children: [_jsx("span", { className: "grid h-11 w-11 shrink-0 place-items-center rounded-xl bg-primary/10 text-primary", children: _jsx(ClipboardCheck, { className: "h-6 w-6" }) }), _jsxs("div", { className: "min-w-0", children: [_jsx("h1", { className: "truncate text-lg font-black", children: naam ?? "Eindcontrole scanner" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "Scan de pakbon van de kar" })] })] }), _jsx(StationNaamVeld, {}), _jsx(ScanInput, { onScan: (code) => void scan(code), variant: "zone", disabled: bezig, label: "Scan de pakbon", placeholder: "Barcode pakbon" }), bezig ? (_jsx("div", { className: "grid place-items-center py-6", children: _jsx(Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })) : null, nietGeprint ? (_jsx(Card, { className: "border-warning bg-warning-soft", children: _jsxs(CardContent, { className: "space-y-3 py-6", children: [_jsxs("div", { className: "flex items-start gap-2 text-warning-soft-foreground", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-5 w-5 shrink-0" }), _jsx("p", { className: "text-sm font-semibold", children: "Let op: de pakbon van deze kar is nog niet geprint. Toch afmelden?" })] }), _jsxs("div", { className: "rounded-xl border p-3 text-sm", children: [_jsx("p", { className: "truncate font-bold", children: nietGeprint.karLabel ?? "Kar" }), _jsxs("p", { className: "truncate text-muted-foreground", children: [nietGeprint.orderNumber ? `Order ${nietGeprint.orderNumber}` : "", nietGeprint.klant ? ` · ${nietGeprint.klant}` : ""] }), _jsx("p", { className: "break-all font-mono text-xs text-muted-foreground", children: nietGeprint.rauw })] }), _jsx(Button, { className: "h-14 w-full text-base font-bold", disabled: bezig, onClick: tochAfmelden, children: "Afmelden" }), _jsx(Button, { variant: "outline", className: "h-12 w-full", disabled: bezig, onClick: annuleerNietGeprint, children: "Annuleren" })] }) })) : null, techFout ? (_jsx(Card, { children: _jsxs(CardContent, { className: "space-y-3 py-6", children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-5 w-5 shrink-0 text-muted-foreground" }), _jsx("p", { className: "text-sm font-semibold", children: techFout.melding })] }), _jsxs(Button, { className: "h-14 w-full text-base font-bold", disabled: bezig, onClick: () => void scan(techFout.code), children: [_jsx(RefreshCw, { className: "mr-2 h-5 w-5" }), "Opnieuw proberen"] }), _jsx(Button, { variant: "ghost", className: "h-11 w-full", onClick: () => setTechFout(null), children: "Sluiten" })] }) })) : null, verouderdMelding ? (_jsx(Card, { className: "border-destructive", children: _jsxs(CardContent, { className: "space-y-3 py-6", children: [_jsxs("div", { className: "flex items-start gap-2 text-destructive", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-5 w-5 shrink-0" }), _jsx("p", { className: "text-sm font-semibold", children: verouderdMelding })] }), verouderdeOrders.length > 0 ? (_jsx("div", { className: "space-y-1 rounded-xl border p-3 text-sm", children: verouderdeOrders.map((o, i) => (_jsxs("p", { className: "truncate", children: [_jsx("span", { className: "font-bold", children: o.orderNumber ?? "Order onbekend" }), o.customerName ? ` · ${o.customerName}` : ""] }, `${o.orderNumber ?? i}`))) })) : null, _jsx("p", { className: "text-xs text-muted-foreground", children: "Deze pakbon hoort bij een kar die opnieuw is ingedeeld. Print de pakbonnen opnieuw en scan daarna de nieuwe pakbon." }), _jsxs(Button, { className: "h-14 w-full text-base font-bold", disabled: bezig, onClick: () => void pakbonOpnieuw(), children: [bezig ? (_jsx(Loader2, { className: "mr-2 h-5 w-5 animate-spin" })) : (_jsx(RefreshCw, { className: "mr-2 h-5 w-5" })), "Oude pakbonnen verwijderen en nieuwe printen"] }), _jsx(Button, { variant: "ghost", className: "h-11 w-full", onClick: sluitVerouderd, children: "Sluiten" })] }) })) : null, resultaat ? (_jsx(Card, { className: resultaat.ok
|
|
251
301
|
? "border-primary"
|
|
252
302
|
: resultaat.alAfgehandeld
|
|
253
303
|
? "border-warning bg-warning-soft"
|
|
@@ -255,7 +305,17 @@ export function EindcontroleScanner({ naam, scannerId, }) {
|
|
|
255
305
|
? "font-semibold text-primary"
|
|
256
306
|
: resultaat.alAfgehandeld
|
|
257
307
|
? "font-semibold text-warning-soft-foreground"
|
|
258
|
-
: "font-semibold text-destructive", children: resultaat.melding }), resultaat.voortgang ? (_jsx("p", { className: "text-sm font-semibold", children: resultaat.voortgang })) : null, _jsx(Button, { variant: "outline", className: "h-11", onClick: () => setResultaat(null), children: "Volgende kar" })] }) })) : null, historie.length > 0 ? (_jsxs("div", { className: "space-y-2", children: [_jsx("p", { className: "text-xs font-semibold uppercase text-muted-foreground", children: "Laatste scans" }), historie.map((h, i) => (_jsxs("div", { className: "flex items-center gap-2 rounded-lg border p-2 text-sm", children: [_jsx(Badge, { variant: h.ok ? "default" : "secondary", className: h.alAfgehandeld
|
|
308
|
+
: "font-semibold text-destructive", children: resultaat.melding }), resultaat.voortgang ? (_jsx("p", { className: "text-sm font-semibold", children: resultaat.voortgang })) : null, _jsx(Button, { variant: "outline", className: "h-11", onClick: () => setResultaat(null), children: "Volgende kar" })] }) })) : null, historie.length > 0 ? (_jsxs("div", { className: "space-y-2", children: [_jsx("p", { className: "text-xs font-semibold uppercase text-muted-foreground", children: "Laatste scans" }), historie.map((h, i) => (_jsxs("div", { className: "flex items-center gap-2 rounded-lg border p-2 text-sm", children: [_jsx(Badge, { variant: h.ok ? "default" : "secondary", className: h.alAfgehandeld || h.nietGeprint || h.zonderPakbon
|
|
309
|
+
? "bg-warning-soft text-warning-soft-foreground"
|
|
310
|
+
: undefined, children: h.zonderPakbon
|
|
311
|
+
? "Afgemeld zonder pakbon"
|
|
312
|
+
: h.ok
|
|
313
|
+
? "OK"
|
|
314
|
+
: h.nietGeprint
|
|
315
|
+
? "Niet geprint"
|
|
316
|
+
: h.alAfgehandeld
|
|
317
|
+
? "Al afgehandeld"
|
|
318
|
+
: "Let op" }), _jsx("span", { className: "truncate", children: h.onbekend || h.alAfgehandeld || h.nietGeprint || h.zonderPakbon
|
|
259
319
|
? h.code
|
|
260
320
|
: `${h.karLabel ?? "Kar"}${h.orderNumber ? ` · ${h.orderNumber}` : ""}` })] }, i)))] })) : null, _jsxs("section", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("h2", { className: "text-sm font-semibold uppercase text-muted-foreground", children: "Openstaande pakbonnen" }), _jsx(Badge, { variant: "secondary", className: "shrink-0 tabular-nums", children: actueel.length })] }), laden ? (_jsx("div", { className: "grid place-items-center py-8", children: _jsx(Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })) : openstaand.length === 0 ? (_jsx(Card, { children: _jsx(CardContent, { className: "py-8 text-center text-sm text-muted-foreground", children: "Geen openstaande pakbonnen. Alles is afgehandeld." }) })) : (_jsxs("div", { className: "space-y-2", children: [actueel.map(pakbonKnop), ouder.length > 0 ? (_jsxs("details", { className: "rounded-xl border p-2", children: [_jsxs("summary", { className: "cursor-pointer select-none p-1 text-sm font-semibold text-muted-foreground", children: ["Ouder (", ouder.length, ") \u2014 leverdag meer dan 2 dagen voorbij"] }), _jsx("div", { className: "mt-2 space-y-2", children: ouder.map(pakbonKnop) })] })) : null] }))] })] }));
|
|
261
321
|
}
|
|
@@ -4,7 +4,7 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
// ============================================================================
|
|
5
5
|
import { useCallback, useEffect, useState } from "react";
|
|
6
6
|
import { Badge, Button, Card, CardContent, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, toast } from "@flowselections/core";
|
|
7
|
-
import { supabase } from "../../integrations/supabase/client";
|
|
7
|
+
import { supabase } from "../../integrations/supabase/client.js";
|
|
8
8
|
import { RefreshCw } from "lucide-react";
|
|
9
9
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
10
10
|
const db = supabase;
|
|
@@ -8,10 +8,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
8
8
|
// ============================================================================
|
|
9
9
|
import { Badge, Button, Card, CardContent, cn } from "@flowselections/core";
|
|
10
10
|
import { AlertTriangle, ArrowLeft, CheckCircle2, Combine, LayoutGrid, Loader2, PackageCheck, Printer, RefreshCw, Scissors, } from "lucide-react";
|
|
11
|
-
import { ScanInput } from "./ScanInput";
|
|
12
|
-
import { StationNaamVeld } from "./StationNaamVeld";
|
|
13
|
-
import { SplitsFustenScherm } from "./SplitsFustenScherm";
|
|
14
|
-
import { useKarIndeling } from "../../hooks/useKarIndeling";
|
|
11
|
+
import { ScanInput } from "./ScanInput.js";
|
|
12
|
+
import { StationNaamVeld } from "./StationNaamVeld.js";
|
|
13
|
+
import { SplitsFustenScherm } from "./SplitsFustenScherm.js";
|
|
14
|
+
import { useKarIndeling } from "../../hooks/useKarIndeling.js";
|
|
15
15
|
function SoortBadge({ soort }) {
|
|
16
16
|
const heel = soort === "hele_kar";
|
|
17
17
|
return (_jsx(Badge, { variant: heel ? "default" : "secondary", children: heel ? "Hele kar" : "Deelkar" }));
|
|
@@ -10,12 +10,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
11
11
|
import { Badge, Button, Card, CardContent, CardHeader, CardTitle, Input, cn, toast, } from "@flowselections/core";
|
|
12
12
|
import { ArrowLeft, Boxes, Check, CheckCircle2, ClipboardList, Loader2, Lock, Package, Printer, RefreshCw, Search, Send, Trash2, } from "lucide-react";
|
|
13
|
-
import { useKarScanner } from "../../hooks/useKarScanner";
|
|
14
|
-
import { playFeedback } from "../../hooks/useScanEngine";
|
|
15
|
-
import { ScanInput } from "./ScanInput";
|
|
16
|
-
import { Veilingbrief } from "./Veilingbrief";
|
|
17
|
-
import { createScanT } from "../../lib/scanI18n";
|
|
18
|
-
import { VEILINGBON_PAPIERFORMAAT, isDubbeleAanvraag, printVeilingbon, printerVoorWerkplek, veilingbonHtml, volgJobStatus, } from "../../lib/veilingbonPrint";
|
|
13
|
+
import { useKarScanner } from "../../hooks/useKarScanner.js";
|
|
14
|
+
import { playFeedback } from "../../hooks/useScanEngine.js";
|
|
15
|
+
import { ScanInput } from "./ScanInput.js";
|
|
16
|
+
import { Veilingbrief } from "./Veilingbrief.js";
|
|
17
|
+
import { createScanT } from "../../lib/scanI18n.js";
|
|
18
|
+
import { VEILINGBON_PAPIERFORMAAT, isDubbeleAanvraag, printVeilingbon, printerVoorWerkplek, veilingbonHtml, volgJobStatus, } from "../../lib/veilingbonPrint.js";
|
|
19
19
|
export function KarScannerPage({ medewerkerNaam, maxProducten = null, werkplek = null, t: tProp, } = {}) {
|
|
20
20
|
const t = tProp ?? createScanT("nl");
|
|
21
21
|
const s = useKarScanner({ medewerkerNaam, maxProducten });
|
|
@@ -8,9 +8,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
import { useEffect, useMemo, useState } from "react";
|
|
9
9
|
import { Button, Card, CardContent, Input, Label, toast } from "@flowselections/core";
|
|
10
10
|
import { Globe, LogOut, ScanLine } from "lucide-react";
|
|
11
|
-
import { KarScannerPage } from "./KarScannerPage";
|
|
12
|
-
import { TaalTegels } from "./TaalTegels";
|
|
13
|
-
import { createScanT, scanTaalSleutel } from "../../lib/scanI18n";
|
|
11
|
+
import { KarScannerPage } from "./KarScannerPage.js";
|
|
12
|
+
import { TaalTegels } from "./TaalTegels.js";
|
|
13
|
+
import { createScanT, scanTaalSleutel } from "../../lib/scanI18n.js";
|
|
14
14
|
function opslagSleutel(slug) {
|
|
15
15
|
return `scan-medewerker-${slug ?? "algemeen"}`;
|
|
16
16
|
}
|
|
@@ -8,8 +8,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
8
8
|
import { useEffect, useRef, useState } from "react";
|
|
9
9
|
import { Button, Input, cn } from "@flowselections/core";
|
|
10
10
|
import { Camera, CameraOff, ScanLine, CornerDownLeft } from "lucide-react";
|
|
11
|
-
import { useScanEngine } from "../../hooks/useScanEngine";
|
|
12
|
-
import { createScanT } from "../../lib/scanI18n";
|
|
11
|
+
import { useScanEngine } from "../../hooks/useScanEngine.js";
|
|
12
|
+
import { createScanT } from "../../lib/scanI18n.js";
|
|
13
13
|
export function ScanInput({ onScan, placeholder, label, disabled, autoStart, variant = "compact", t: tProp, }) {
|
|
14
14
|
const t = tProp ?? createScanT("nl");
|
|
15
15
|
const [manual, setManual] = useState("");
|
|
@@ -4,7 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
// ============================================================================
|
|
5
5
|
import { Badge, Button, Card, CardContent, CardHeader, CardTitle, } from "@flowselections/core";
|
|
6
6
|
import { AlertTriangle, Clock, Package, RefreshCw, ScanLine, Truck } from "lucide-react";
|
|
7
|
-
import { useScanStats } from "../../hooks/useScanStats";
|
|
7
|
+
import { useScanStats } from "../../hooks/useScanStats.js";
|
|
8
8
|
function Tegel({ titel, waarde, hulp, icoon: Icoon, toon, }) {
|
|
9
9
|
return (_jsxs(Card, { children: [_jsxs(CardHeader, { className: "grid grid-cols-[auto_minmax(0,1fr)] items-center gap-3 pb-2", children: [_jsx("span", { className: toon === "waarschuwing"
|
|
10
10
|
? "grid h-10 w-10 shrink-0 place-items-center rounded-xl bg-destructive/10 text-destructive"
|
|
@@ -10,11 +10,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
// ============================================================================
|
|
11
11
|
import { Component, useEffect, useState } from "react";
|
|
12
12
|
import { useParams } from "@tanstack/react-router";
|
|
13
|
-
import { supabase } from "../../integrations/supabase/client";
|
|
13
|
+
import { supabase } from "../../integrations/supabase/client.js";
|
|
14
14
|
import { Loader2 } from "lucide-react";
|
|
15
|
-
import { KarIndelingScanner } from "./KarIndelingScanner";
|
|
16
|
-
import { EindcontroleScanner } from "./EindcontroleScanner";
|
|
17
|
-
import { normaliseerScannerType } from "../../lib/scannerTypes";
|
|
15
|
+
import { KarIndelingScanner } from "./KarIndelingScanner.js";
|
|
16
|
+
import { EindcontroleScanner } from "./EindcontroleScanner.js";
|
|
17
|
+
import { normaliseerScannerType } from "../../lib/scannerTypes.js";
|
|
18
18
|
function Melding({ titel, tekst }) {
|
|
19
19
|
return (_jsx("div", { className: "grid min-h-screen place-items-center bg-background p-6 text-center", children: _jsxs("div", { className: "max-w-sm", children: [_jsx("h1", { className: "text-xl font-black", children: titel }), _jsx("p", { className: "mt-2 break-words text-sm text-muted-foreground", children: tekst })] }) }));
|
|
20
20
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { Input } from "@flowselections/core";
|
|
4
4
|
import { UserRound } from "lucide-react";
|
|
5
|
-
import { leesStationNaam, zetStationNaam } from "../../lib/stationNaam";
|
|
5
|
+
import { leesStationNaam, zetStationNaam } from "../../lib/stationNaam.js";
|
|
6
6
|
/** Klein veld: wie/welk station scant. Wordt op dit apparaat onthouden. */
|
|
7
7
|
export function StationNaamVeld() {
|
|
8
8
|
const [naam, setNaam] = useState("");
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
// src/components/scanners/TaalTegels.tsx — TAALKEUZE MET VLAGTEGELS
|
|
4
4
|
// ============================================================================
|
|
5
5
|
import { Card, cn } from "@flowselections/core";
|
|
6
|
-
import { SCAN_LANGUAGES } from "../../lib/scanI18n";
|
|
6
|
+
import { SCAN_LANGUAGES } from "../../lib/scanI18n.js";
|
|
7
7
|
export function TaalTegels({ onSelect, selected }) {
|
|
8
8
|
return (_jsx("div", { className: "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4", children: SCAN_LANGUAGES.map((l) => (_jsxs(Card, { role: "button", tabIndex: 0, onClick: () => onSelect(l.code), onKeyDown: (e) => {
|
|
9
9
|
if (e.key === "Enter" || e.key === " ")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PakbonResolve } from "../lib/pakbonScan";
|
|
1
|
+
import { type PakbonResolve } from "../lib/pakbonScan.js";
|
|
2
2
|
export interface FustRegel {
|
|
3
3
|
artikelnummer?: string | null;
|
|
4
4
|
artikelnaam?: string | null;
|
|
@@ -77,7 +77,7 @@ export declare function useKarIndeling(opties: {
|
|
|
77
77
|
melding: string | null;
|
|
78
78
|
gelezenCode: string | null;
|
|
79
79
|
engine: PakbonResolve | null;
|
|
80
|
-
engineOrders: import("
|
|
80
|
+
engineOrders: import("../index.js").EngineOrder[];
|
|
81
81
|
scan: (barcode: string) => Promise<void>;
|
|
82
82
|
terugNaarStart: () => void;
|
|
83
83
|
pakbonOpnieuw: () => Promise<void>;
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
// ============================================================================
|
|
8
8
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
9
9
|
import { toast } from "@flowselections/core";
|
|
10
|
-
import { supabase } from "../integrations/supabase/client";
|
|
11
|
-
import { leesStationNaam } from "../lib/stationNaam";
|
|
12
|
-
import { printRestpakbon } from "../lib/veilingbonPrint";
|
|
13
|
-
import { engineMelding, engineOrders, isVerouderdePakbon, isTechnischeFout, logScan, magProductLookup, normaliseerScanCode, pakbonBarcodeUit, resolvePakbonScan, } from "../lib/pakbonScan";
|
|
10
|
+
import { supabase } from "../integrations/supabase/client.js";
|
|
11
|
+
import { leesStationNaam } from "../lib/stationNaam.js";
|
|
12
|
+
import { printRestpakbon } from "../lib/veilingbonPrint.js";
|
|
13
|
+
import { engineMelding, engineOrders, isVerouderdePakbon, isTechnischeFout, logScan, magProductLookup, normaliseerScanCode, pakbonBarcodeUit, resolvePakbonScan, } from "../lib/pakbonScan.js";
|
|
14
14
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
15
15
|
const db = supabase;
|
|
16
16
|
function lijst(waarde) {
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
// ============================================================================
|
|
8
8
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
9
9
|
import { toast, useAuth } from "@flowselections/core";
|
|
10
|
-
import { supabase } from "../integrations/supabase/client";
|
|
11
|
-
import { engineMelding, engineOrders, isVerouderdePakbon, isTechnischeFout, magProductLookup, resolvePakbonScan, } from "../lib/pakbonScan";
|
|
10
|
+
import { supabase } from "../integrations/supabase/client.js";
|
|
11
|
+
import { engineMelding, engineOrders, isVerouderdePakbon, isTechnischeFout, magProductLookup, resolvePakbonScan, } from "../lib/pakbonScan.js";
|
|
12
12
|
// De gegenereerde Supabase-types kennen de nieuwe scan-tabellen nog niet.
|
|
13
13
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
14
14
|
const db = supabase;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// beheert zelf geen printers en schrijft nooit in de printwachtrij.
|
|
6
6
|
// ============================================================================
|
|
7
7
|
import { useEffect, useState } from "react";
|
|
8
|
-
import { beschikbarePrinters } from "../lib/veilingbonPrint";
|
|
8
|
+
import { beschikbarePrinters } from "../lib/veilingbonPrint.js";
|
|
9
9
|
export function usePrinters() {
|
|
10
10
|
const [printers, setPrinters] = useState([]);
|
|
11
11
|
const [laden, setLaden] = useState(true);
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
// Ondersteunt zowel barcodes als QR-codes en voorkomt dubbele triggers.
|
|
9
9
|
// ============================================================================
|
|
10
10
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
11
|
-
import { codeUitTekst, knipStrook, tekstLezer } from "../lib/tekstScan";
|
|
12
|
-
import { logScan } from "../lib/pakbonScan";
|
|
11
|
+
import { codeUitTekst, knipStrook, tekstLezer } from "../lib/tekstScan.js";
|
|
12
|
+
import { logScan } from "../lib/pakbonScan.js";
|
|
13
13
|
// Onze pakbonnen dragen alleen Code 128 (en soms een QR). Minder formaten =
|
|
14
14
|
// de camera gokt niet naar een andere soort en leest daardoor betrouwbaarder.
|
|
15
15
|
const FORMATS = ["code_128", "qr_code"];
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// ============================================================================
|
|
14
14
|
import { useState, useEffect, useCallback } from "react";
|
|
15
15
|
import { toast } from "@flowselections/core";
|
|
16
|
-
import { supabase } from "../integrations/supabase/client";
|
|
16
|
+
import { supabase } from "../integrations/supabase/client.js";
|
|
17
17
|
export function useScanModuleData() {
|
|
18
18
|
const [items, setItems] = useState([]);
|
|
19
19
|
const [loading, setLoading] = useState(true);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// Haalt dagcijfers op via de database-functie scan_dashboard_stats.
|
|
5
5
|
// ============================================================================
|
|
6
6
|
import { useCallback, useEffect, useState } from "react";
|
|
7
|
-
import { supabase } from "../integrations/supabase/client";
|
|
7
|
+
import { supabase } from "../integrations/supabase/client.js";
|
|
8
8
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9
9
|
const db = supabase;
|
|
10
10
|
const LEEG = {
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
// ============================================================================
|
|
8
8
|
import { useCallback, useEffect, useState } from "react";
|
|
9
9
|
import { toast } from "@flowselections/core";
|
|
10
|
-
import { supabase } from "../integrations/supabase/client";
|
|
11
|
-
import { STANDAARD_SCANNER_TYPE } from "../lib/scannerTypes";
|
|
10
|
+
import { supabase } from "../integrations/supabase/client.js";
|
|
11
|
+
import { STANDAARD_SCANNER_TYPE } from "../lib/scannerTypes.js";
|
|
12
12
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
13
13
|
const db = supabase;
|
|
14
14
|
export function slugify(waarde) {
|
package/dist-lib/index.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import type { FlowModule } from "@flowselections/core";
|
|
2
|
-
export * from './_core-safelist';
|
|
3
|
-
export { ScanModulePage } from './components/ScanModulePage';
|
|
4
|
-
export { ScanModuleLogo } from './components/ScanModuleLogo';
|
|
5
|
-
export { KarScannerPage } from './components/scanners/KarScannerPage';
|
|
6
|
-
export { PublicScannerPage } from './components/scanners/PublicScannerPage';
|
|
7
|
-
export { ScannerBySlug } from './components/scanners/ScannerBySlug';
|
|
8
|
-
export { KarHistorie } from './components/scanners/KarHistorie';
|
|
9
|
-
export { Veilingbrief } from './components/scanners/Veilingbrief';
|
|
10
|
-
export { ScanInput } from './components/scanners/ScanInput';
|
|
11
|
-
export { ScanMonitoring } from './components/scanners/ScanMonitoring';
|
|
12
|
-
export { useScanEngine, playFeedback } from './hooks/useScanEngine';
|
|
13
|
-
export { useKarScanner } from './hooks/useKarScanner';
|
|
14
|
-
export { SCANNERS, type ScannerDefinition } from './lib/scanners';
|
|
15
|
-
export { useScanners, slugify, type ScannerRecord } from './hooks/useScanners';
|
|
16
|
-
export { KarIndelingScanner } from './components/scanners/KarIndelingScanner';
|
|
17
|
-
export { EindcontroleScanner } from './components/scanners/EindcontroleScanner';
|
|
18
|
-
export { SplitsFustenScherm } from './components/scanners/SplitsFustenScherm';
|
|
19
|
-
export { useKarIndeling } from './hooks/useKarIndeling';
|
|
20
|
-
export { usePrinters, type PrinterKeuze } from './hooks/usePrinters';
|
|
21
|
-
export { SCANNER_TYPES, STANDAARD_SCANNER_TYPE, scannerType, normaliseerScannerType, type ScannerTypeId, type ScannerTypeDefinitie, } from './lib/scannerTypes';
|
|
22
|
-
export { printRestpakbon, beschikbarePrinters } from './lib/veilingbonPrint';
|
|
23
|
-
export { PAKBON_BARCODE, isPakbonBarcode, resolvePakbonScan, magProductLookup, isVerouderdePakbon, isTechnischeFout, isTechnischeMelding, vriendelijkeScanFout, engineOrders, engineMelding, } from './lib/pakbonScan';
|
|
24
|
-
export type { PakbonResolve, EngineOrder } from './lib/pakbonScan';
|
|
25
|
-
export { TaalTegels } from './components/scanners/TaalTegels';
|
|
26
|
-
export { SCAN_LANGUAGES, createScanT, scanTaalSleutel, type ScanLanguage, type ScanT, } from './lib/scanI18n';
|
|
2
|
+
export * from './_core-safelist.js';
|
|
3
|
+
export { ScanModulePage } from './components/ScanModulePage.js';
|
|
4
|
+
export { ScanModuleLogo } from './components/ScanModuleLogo.js';
|
|
5
|
+
export { KarScannerPage } from './components/scanners/KarScannerPage.js';
|
|
6
|
+
export { PublicScannerPage } from './components/scanners/PublicScannerPage.js';
|
|
7
|
+
export { ScannerBySlug } from './components/scanners/ScannerBySlug.js';
|
|
8
|
+
export { KarHistorie } from './components/scanners/KarHistorie.js';
|
|
9
|
+
export { Veilingbrief } from './components/scanners/Veilingbrief.js';
|
|
10
|
+
export { ScanInput } from './components/scanners/ScanInput.js';
|
|
11
|
+
export { ScanMonitoring } from './components/scanners/ScanMonitoring.js';
|
|
12
|
+
export { useScanEngine, playFeedback } from './hooks/useScanEngine.js';
|
|
13
|
+
export { useKarScanner } from './hooks/useKarScanner.js';
|
|
14
|
+
export { SCANNERS, type ScannerDefinition } from './lib/scanners.js';
|
|
15
|
+
export { useScanners, slugify, type ScannerRecord } from './hooks/useScanners.js';
|
|
16
|
+
export { KarIndelingScanner } from './components/scanners/KarIndelingScanner.js';
|
|
17
|
+
export { EindcontroleScanner } from './components/scanners/EindcontroleScanner.js';
|
|
18
|
+
export { SplitsFustenScherm } from './components/scanners/SplitsFustenScherm.js';
|
|
19
|
+
export { useKarIndeling } from './hooks/useKarIndeling.js';
|
|
20
|
+
export { usePrinters, type PrinterKeuze } from './hooks/usePrinters.js';
|
|
21
|
+
export { SCANNER_TYPES, STANDAARD_SCANNER_TYPE, scannerType, normaliseerScannerType, type ScannerTypeId, type ScannerTypeDefinitie, } from './lib/scannerTypes.js';
|
|
22
|
+
export { printRestpakbon, beschikbarePrinters } from './lib/veilingbonPrint.js';
|
|
23
|
+
export { PAKBON_BARCODE, isPakbonBarcode, resolvePakbonScan, magProductLookup, isVerouderdePakbon, isTechnischeFout, isTechnischeMelding, vriendelijkeScanFout, engineOrders, engineMelding, } from './lib/pakbonScan.js';
|
|
24
|
+
export type { PakbonResolve, EngineOrder } from './lib/pakbonScan.js';
|
|
25
|
+
export { TaalTegels } from './components/scanners/TaalTegels.js';
|
|
26
|
+
export { SCAN_LANGUAGES, createScanT, scanTaalSleutel, type ScanLanguage, type ScanT, } from './lib/scanI18n.js';
|
|
27
27
|
export declare const scanModule: FlowModule;
|
|
28
|
-
export { StationNaamVeld } from "./components/scanners/StationNaamVeld";
|
|
28
|
+
export { StationNaamVeld } from "./components/scanners/StationNaamVeld.js";
|
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
package/dist-lib/index.js
CHANGED
|
@@ -14,32 +14,32 @@
|
|
|
14
14
|
// 4. Done! You don't need to touch any other file for registration.
|
|
15
15
|
// ============================================================================
|
|
16
16
|
import { ScanLine } from "lucide-react";
|
|
17
|
-
export * from './_core-safelist';
|
|
18
|
-
export { ScanModulePage } from './components/ScanModulePage';
|
|
19
|
-
export { ScanModuleLogo } from './components/ScanModuleLogo';
|
|
20
|
-
export { KarScannerPage } from './components/scanners/KarScannerPage';
|
|
21
|
-
export { PublicScannerPage } from './components/scanners/PublicScannerPage';
|
|
22
|
-
export { ScannerBySlug } from './components/scanners/ScannerBySlug';
|
|
23
|
-
export { KarHistorie } from './components/scanners/KarHistorie';
|
|
24
|
-
export { Veilingbrief } from './components/scanners/Veilingbrief';
|
|
25
|
-
export { ScanInput } from './components/scanners/ScanInput';
|
|
26
|
-
export { ScanMonitoring } from './components/scanners/ScanMonitoring';
|
|
27
|
-
export { useScanEngine, playFeedback } from './hooks/useScanEngine';
|
|
28
|
-
export { useKarScanner } from './hooks/useKarScanner';
|
|
29
|
-
export { SCANNERS } from './lib/scanners';
|
|
30
|
-
export { useScanners, slugify } from './hooks/useScanners';
|
|
31
|
-
export { KarIndelingScanner } from './components/scanners/KarIndelingScanner';
|
|
32
|
-
export { EindcontroleScanner } from './components/scanners/EindcontroleScanner';
|
|
33
|
-
export { SplitsFustenScherm } from './components/scanners/SplitsFustenScherm';
|
|
34
|
-
export { useKarIndeling } from './hooks/useKarIndeling';
|
|
35
|
-
export { usePrinters } from './hooks/usePrinters';
|
|
36
|
-
export { SCANNER_TYPES, STANDAARD_SCANNER_TYPE, scannerType, normaliseerScannerType, } from './lib/scannerTypes';
|
|
37
|
-
export { printRestpakbon, beschikbarePrinters } from './lib/veilingbonPrint';
|
|
38
|
-
export { PAKBON_BARCODE, isPakbonBarcode, resolvePakbonScan, magProductLookup, isVerouderdePakbon, isTechnischeFout, isTechnischeMelding, vriendelijkeScanFout, engineOrders, engineMelding, } from './lib/pakbonScan';
|
|
39
|
-
export { TaalTegels } from './components/scanners/TaalTegels';
|
|
40
|
-
export { SCAN_LANGUAGES, createScanT, scanTaalSleutel, } from './lib/scanI18n';
|
|
17
|
+
export * from './_core-safelist.js';
|
|
18
|
+
export { ScanModulePage } from './components/ScanModulePage.js';
|
|
19
|
+
export { ScanModuleLogo } from './components/ScanModuleLogo.js';
|
|
20
|
+
export { KarScannerPage } from './components/scanners/KarScannerPage.js';
|
|
21
|
+
export { PublicScannerPage } from './components/scanners/PublicScannerPage.js';
|
|
22
|
+
export { ScannerBySlug } from './components/scanners/ScannerBySlug.js';
|
|
23
|
+
export { KarHistorie } from './components/scanners/KarHistorie.js';
|
|
24
|
+
export { Veilingbrief } from './components/scanners/Veilingbrief.js';
|
|
25
|
+
export { ScanInput } from './components/scanners/ScanInput.js';
|
|
26
|
+
export { ScanMonitoring } from './components/scanners/ScanMonitoring.js';
|
|
27
|
+
export { useScanEngine, playFeedback } from './hooks/useScanEngine.js';
|
|
28
|
+
export { useKarScanner } from './hooks/useKarScanner.js';
|
|
29
|
+
export { SCANNERS } from './lib/scanners.js';
|
|
30
|
+
export { useScanners, slugify } from './hooks/useScanners.js';
|
|
31
|
+
export { KarIndelingScanner } from './components/scanners/KarIndelingScanner.js';
|
|
32
|
+
export { EindcontroleScanner } from './components/scanners/EindcontroleScanner.js';
|
|
33
|
+
export { SplitsFustenScherm } from './components/scanners/SplitsFustenScherm.js';
|
|
34
|
+
export { useKarIndeling } from './hooks/useKarIndeling.js';
|
|
35
|
+
export { usePrinters } from './hooks/usePrinters.js';
|
|
36
|
+
export { SCANNER_TYPES, STANDAARD_SCANNER_TYPE, scannerType, normaliseerScannerType, } from './lib/scannerTypes.js';
|
|
37
|
+
export { printRestpakbon, beschikbarePrinters } from './lib/veilingbonPrint.js';
|
|
38
|
+
export { PAKBON_BARCODE, isPakbonBarcode, resolvePakbonScan, magProductLookup, isVerouderdePakbon, isTechnischeFout, isTechnischeMelding, vriendelijkeScanFout, engineOrders, engineMelding, } from './lib/pakbonScan.js';
|
|
39
|
+
export { TaalTegels } from './components/scanners/TaalTegels.js';
|
|
40
|
+
export { SCAN_LANGUAGES, createScanT, scanTaalSleutel, } from './lib/scanI18n.js';
|
|
41
41
|
// Import your settings cards here (delete if you have none)
|
|
42
|
-
// import { ScanModuleSettingsCard } from "./components/settings/ScanModuleSettingsCard";
|
|
42
|
+
// import { ScanModuleSettingsCard } from "./components/settings/ScanModuleSettingsCard.js";
|
|
43
43
|
export const scanModule = {
|
|
44
44
|
// ─── Identity ─────────────────────────────────────────────────────────────
|
|
45
45
|
// id: unique, lowercase, snake_case. Never change this after going live.
|
|
@@ -62,4 +62,4 @@ export const scanModule = {
|
|
|
62
62
|
// { component: ScanModuleSettingsCard, order: 10 },
|
|
63
63
|
],
|
|
64
64
|
};
|
|
65
|
-
export { StationNaamVeld } from "./components/scanners/StationNaamVeld";
|
|
65
|
+
export { StationNaamVeld } from "./components/scanners/StationNaamVeld.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// This file is automatically generated. Do not edit it directly.
|
|
2
2
|
import { createMiddleware } from '@tanstack/react-start';
|
|
3
|
-
import { supabase } from './client';
|
|
3
|
+
import { supabase } from './client.js';
|
|
4
4
|
// Must be registered as a global `functionMiddleware` in `src/start.ts`; otherwise
|
|
5
5
|
// the browser never attaches the bearer token to serverFn RPCs.
|
|
6
6
|
export const attachSupabaseAuth = createMiddleware({ type: 'function' }).client(async ({ next }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SupabaseClient } from '@supabase/supabase-js';
|
|
2
|
-
import type { Database } from './types';
|
|
2
|
+
import type { Database } from './types.js';
|
|
3
3
|
export interface AuthedSupabaseClient extends SupabaseClient<Database> {
|
|
4
4
|
}
|
|
5
5
|
export declare const requireSupabaseAuth: import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
|