@flowselections/pick-schermen-kwekers 1.0.82 → 1.0.87

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.
Files changed (45) hide show
  1. package/dist-lib/components/fs-ui/DataTable.js +2 -2
  2. package/dist-lib/components/fs-ui/TableSkeleton.js +1 -1
  3. package/dist-lib/components/pick/PickScherm.d.ts.map +1 -1
  4. package/dist-lib/components/pick/PickScherm.js +377 -159
  5. package/dist-lib/components/pick/werkvloer/Werkvloer.d.ts +52 -0
  6. package/dist-lib/components/pick/werkvloer/Werkvloer.d.ts.map +1 -0
  7. package/dist-lib/components/pick/werkvloer/Werkvloer.js +33 -0
  8. package/dist-lib/components/settings/ReferentiedataPickdocumentenCard.d.ts.map +1 -1
  9. package/dist-lib/components/settings/ReferentiedataPickdocumentenCard.js +10 -3
  10. package/dist-lib/hooks/usePickPrintStatus.d.ts +1 -1
  11. package/dist-lib/hooks/usePickPrintStatus.d.ts.map +1 -1
  12. package/dist-lib/hooks/usePickPrintStatus.js +4 -4
  13. package/dist-lib/hooks/useShippingNoteStatus.d.ts +1 -1
  14. package/dist-lib/hooks/useShippingNoteStatus.d.ts.map +1 -1
  15. package/dist-lib/hooks/useShippingNoteStatus.js +11 -9
  16. package/dist-lib/hooks/useWerkvloer.d.ts +20 -0
  17. package/dist-lib/hooks/useWerkvloer.d.ts.map +1 -0
  18. package/dist-lib/hooks/useWerkvloer.js +98 -0
  19. package/dist-lib/integrations/supabase/types.d.ts +69 -0
  20. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  21. package/dist-lib/lib/__tests__/pickPublicStatus.test.d.ts +2 -0
  22. package/dist-lib/lib/__tests__/pickPublicStatus.test.d.ts.map +1 -0
  23. package/dist-lib/lib/__tests__/pickPublicStatus.test.js +48 -0
  24. package/dist-lib/lib/labels.d.ts +2 -0
  25. package/dist-lib/lib/labels.d.ts.map +1 -1
  26. package/dist-lib/lib/labels.js +41 -0
  27. package/dist-lib/lib/pick142.d.ts.map +1 -1
  28. package/dist-lib/lib/pick142.js +7 -10
  29. package/dist-lib/lib/pick156.d.ts.map +1 -1
  30. package/dist-lib/lib/pick156.js +6 -20
  31. package/dist-lib/lib/pick159.js +1 -1
  32. package/dist-lib/lib/pickApi.d.ts +20 -0
  33. package/dist-lib/lib/pickApi.d.ts.map +1 -1
  34. package/dist-lib/lib/pickApi.js +27 -0
  35. package/dist-lib/lib/shippingNoteStatus.d.ts +1 -1
  36. package/dist-lib/lib/shippingNoteStatus.d.ts.map +1 -1
  37. package/dist-lib/lib/shippingNoteStatus.js +5 -2
  38. package/dist-lib/lib/werkvloer.d.ts +40 -0
  39. package/dist-lib/lib/werkvloer.d.ts.map +1 -0
  40. package/dist-lib/lib/werkvloer.js +121 -0
  41. package/dist-lib/lib/werkvloer.test.d.ts +2 -0
  42. package/dist-lib/lib/werkvloer.test.d.ts.map +1 -0
  43. package/dist-lib/lib/werkvloer.test.js +49 -0
  44. package/package.json +2 -2
  45. package/schema/pickschermen.sql +176 -0
@@ -0,0 +1,52 @@
1
+ import { type WerkvloerCard } from "../../../lib/werkvloer.js";
2
+ /** Inhoud van de vaste meldingsplek. */
3
+ export type Slot = {
4
+ kind: "none";
5
+ } | {
6
+ kind: "offline";
7
+ } | {
8
+ kind: "busy";
9
+ lines: string[];
10
+ } | {
11
+ kind: "success";
12
+ text: string;
13
+ } | {
14
+ kind: "error";
15
+ text: string;
16
+ } | {
17
+ kind: "info";
18
+ text: string;
19
+ };
20
+ /**
21
+ * Vaste meldingsplek: altijd even hoog, zodat de lijst eronder nooit
22
+ * verspringt als er een melding verschijnt of verdwijnt.
23
+ */
24
+ export declare function MeldingsPlek({ slot, onDismiss }: {
25
+ slot: Slot;
26
+ onDismiss: () => void;
27
+ }): import("react").JSX.Element;
28
+ export interface CardState {
29
+ /** Uitgeschakeld met deze tekst op de knop (bijv. "Wordt geprint"). */
30
+ disabledLabel: string | null;
31
+ /** Nog niet printklaar: reden + knop "Pakbon ophalen". */
32
+ notReadyReason: string | null;
33
+ /** Korte statusregel uit de Engine (printstatus, sticker, uitwijk). */
34
+ statusLine: string | null;
35
+ }
36
+ interface KaartProps {
37
+ card: WerkvloerCard;
38
+ state: CardState;
39
+ tz: string | null;
40
+ mode: "todo" | "printed";
41
+ leaving: boolean;
42
+ disabled: boolean;
43
+ showLead: boolean;
44
+ onPrint: (card: WerkvloerCard) => void;
45
+ onFetch: (card: WerkvloerCard) => void;
46
+ onPreview: (card: WerkvloerCard) => void;
47
+ onMarkPrinted: (card: WerkvloerCard) => void;
48
+ }
49
+ /** Eén order of gezamenlijke levering. Alleen opnieuw getekend als iets echt verandert. */
50
+ export declare const WerkvloerKaart: import("react").NamedExoticComponent<KaartProps>;
51
+ export {};
52
+ //# sourceMappingURL=Werkvloer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Werkvloer.d.ts","sourceRoot":"","sources":["../../../../src/components/pick/werkvloer/Werkvloer.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAoC,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE9F,wCAAwC;AACxC,MAAM,MAAM,IAAI,GACZ;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnC;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,IAAI,CAAA;CAAE,+BA6CtF;AAED,MAAM,WAAW,SAAS;IACxB,uEAAuE;IACvE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,0DAA0D;IAC1D,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,uEAAuE;IACvE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,aAAa,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CAC9C;AAED,2FAA2F;AAC3F,eAAO,MAAM,cAAc,kDA2DzB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { memo } from "react";
3
+ import { AlertTriangle, CheckCircle2, Loader2, MoreVertical, Printer, WifiOff, Zap } from "lucide-react";
4
+ import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@flowselections/core";
5
+ import { wv } from "../../../lib/labels.js";
6
+ import { cartsText, sinceLabel, timeLabel } from "../../../lib/werkvloer.js";
7
+ /**
8
+ * Vaste meldingsplek: altijd even hoog, zodat de lijst eronder nooit
9
+ * verspringt als er een melding verschijnt of verdwijnt.
10
+ */
11
+ export function MeldingsPlek({ slot, onDismiss }) {
12
+ const base = "flex min-h-[88px] w-full items-center gap-4 rounded-lg px-5 py-3 text-xl font-semibold transition-opacity duration-300";
13
+ if (slot.kind === "none")
14
+ return _jsx("div", { "aria-hidden": true, className: `${base} opacity-0` });
15
+ if (slot.kind === "offline")
16
+ return (_jsxs("div", { role: "alert", className: `${base} bg-destructive text-destructive-foreground`, children: [_jsx(WifiOff, { className: "h-8 w-8 shrink-0" }), _jsx("span", { children: wv("offline") })] }));
17
+ if (slot.kind === "busy")
18
+ return (_jsxs("div", { role: "status", "aria-live": "polite", className: `${base} border-2 border-primary bg-muted text-foreground`, children: [_jsx(Loader2, { className: "h-8 w-8 shrink-0 animate-spin" }), _jsxs("div", { className: "min-w-0", children: [_jsx("p", { children: wv("busy") }), slot.lines.length > 0 && (_jsx("ul", { className: "mt-1 space-y-0.5 text-lg font-normal", children: slot.lines.map((l) => (_jsx("li", { className: "truncate", children: l }, l))) }))] })] }));
19
+ const tone = slot.kind === "success"
20
+ ? "bg-primary text-primary-foreground"
21
+ : slot.kind === "error"
22
+ ? "bg-destructive text-destructive-foreground"
23
+ : "border-2 border-border bg-muted text-foreground";
24
+ const Icon = slot.kind === "success" ? CheckCircle2 : AlertTriangle;
25
+ return (_jsxs("button", { type: "button", role: slot.kind === "error" ? "alert" : "status", "aria-live": "polite", onClick: onDismiss, className: `${base} ${tone} text-left`, children: [_jsx(Icon, { className: "h-8 w-8 shrink-0" }), _jsx("span", { children: slot.text })] }));
26
+ }
27
+ /** Eén order of gezamenlijke levering. Alleen opnieuw getekend als iets echt verandert. */
28
+ export const WerkvloerKaart = memo(function WerkvloerKaart({ card, state, tz, mode, leaving, disabled, showLead, onPrint, onFetch, onPreview, onMarkPrinted, }) {
29
+ const when = mode === "printed" ? (timeLabel(card.printedAt, tz) ? `geprint ${timeLabel(card.printedAt, tz)}` : null) : sinceLabel(card.since, tz);
30
+ const carts = cartsText(card.carts);
31
+ const buttonLabel = state.disabledLabel ?? (state.notReadyReason ? wv("fetchData") : mode === "printed" ? wv("reprint") : wv("print"));
32
+ return (_jsxs("li", { className: `flex flex-col gap-3 rounded-xl border-2 bg-card p-4 text-card-foreground transition-opacity duration-300 animate-in fade-in sm:flex-row sm:items-center sm:gap-4 ${card.urgent && mode === "todo" ? "border-destructive" : "border-border"} ${leaving ? "pointer-events-none opacity-0" : "opacity-100"}`, children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-1", children: [_jsx("span", { className: "text-2xl font-bold tabular-nums text-foreground sm:text-3xl", children: card.orderNumbers.join(" + ") || "—" }), carts && _jsx("span", { className: "text-2xl font-bold tabular-nums text-foreground", children: carts }), card.urgent && mode === "todo" && (_jsxs("span", { className: "inline-flex items-center gap-1 rounded-md bg-destructive px-2 py-1 text-lg font-bold uppercase text-destructive-foreground", children: [_jsx(Zap, { className: "h-5 w-5" }), " ", wv("urgentBadge")] }))] }), _jsx("p", { className: "mt-1 truncate text-lg text-muted-foreground", children: [card.customer, when].filter(Boolean).join(" · ") }), (state.notReadyReason || state.statusLine) && (_jsx("p", { className: "mt-1 text-lg text-foreground", children: state.notReadyReason ?? state.statusLine }))] }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [showLead && mode === "todo" && (_jsx(Button, { variant: "outline", className: "h-16 px-4 text-lg", disabled: disabled, onClick: () => onMarkPrinted(card), children: wv("markPrinted") })), _jsxs(Button, { className: "h-16 min-w-[9rem] flex-1 px-6 text-xl sm:flex-none [&_svg]:!size-6", variant: state.notReadyReason ? "secondary" : mode === "printed" ? "outline" : "default", disabled: disabled || state.disabledLabel !== null, onClick: () => (state.notReadyReason ? onFetch(card) : onPrint(card)), children: [_jsx(Printer, { className: "mr-2 h-6 w-6" }), buttonLabel] }), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", className: "h-16 w-14 [&_svg]:!size-6", "aria-label": `${wv("more")} ${card.orderNumbers.join(" + ")}`, children: _jsx(MoreVertical, { className: "h-6 w-6" }) }) }), _jsx(DropdownMenuContent, { align: "end", children: _jsx(DropdownMenuItem, { className: "min-h-14 text-lg", onSelect: () => onPreview(card), children: wv("preview") }) })] })] })] }));
33
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"ReferentiedataPickdocumentenCard.d.ts","sourceRoot":"","sources":["../../../src/components/settings/ReferentiedataPickdocumentenCard.tsx"],"names":[],"mappings":"AAwEA,wBAAgB,gCAAgC,gCAyT/C"}
1
+ {"version":3,"file":"ReferentiedataPickdocumentenCard.d.ts","sourceRoot":"","sources":["../../../src/components/settings/ReferentiedataPickdocumentenCard.tsx"],"names":[],"mappings":"AA+EA,wBAAgB,gCAAgC,gCAqU/C"}
@@ -4,7 +4,10 @@ import { useMutation, useQueryClient } from "@tanstack/react-query";
4
4
  import { Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Input, Label, Switch, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, toast, } from "@flowselections/core";
5
5
  import { FileText, Loader2, Plus, RotateCcw } from "lucide-react";
6
6
  import { pickReferenceApi } from "../../lib/pickReferenceApi.js";
7
+ import { PillTabs } from "../fs-ui/PillTabs.js";
7
8
  import { usePickReferenceData, PICK_REFERENCE_QUERY_KEY } from "../../hooks/usePickReferenceData.js";
9
+ /** Tabelopmaak volgens Verkooporders: kop 40 px/11 px hoofdletters, rij 60 px, cellen 8 px links. */
10
+ const REF_TABLE = "w-full min-w-[900px] text-sm [&_thead_th]:h-10 [&_thead_th]:bg-card [&_thead_th]:px-2 [&_thead_th]:text-[11px] [&_thead_th]:font-semibold [&_thead_th]:uppercase [&_thead_th]:tracking-wide [&_thead_th]:text-muted-foreground [&_tbody_tr]:h-[60px] [&_tbody_td]:px-2 [&_tbody_td]:py-0 [&_tbody_td]:align-middle";
8
11
  function NumberCell({ value, onSave, }) {
9
12
  const [local, setLocal] = useState(String(value ?? 0));
10
13
  return (_jsx(Input, { className: "h-8 w-20", inputMode: "numeric", value: local, onChange: (e) => setLocal(e.target.value), onBlur: () => {
@@ -29,6 +32,7 @@ export function ReferentiedataPickdocumentenCard() {
29
32
  const { data, isLoading } = usePickReferenceData();
30
33
  const queryClient = useQueryClient();
31
34
  const [nieuw, setNieuw] = useState(null);
35
+ const [tab, setTab] = useState("types");
32
36
  const types = Array.isArray(data?.types) ? data.types : [];
33
37
  const statussen = Array.isArray(data?.statussen) ? data.statussen : [];
34
38
  const verplichteTypes = Array.isArray(data?.verplichte_types) ? data.verplichte_types : [];
@@ -74,11 +78,14 @@ export function ReferentiedataPickdocumentenCard() {
74
78
  },
75
79
  onError: (e) => toast.error(e instanceof Error ? e.message : "Herstellen mislukt."),
76
80
  });
77
- return (_jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FileText, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { children: "Referentiedata pickdocumenten" })] }), _jsx(CardDescription, { children: "De synchronisatie zoekt hardcoded op deze codes: zonder documenttype 'pakbon' komt er niets in de pickwachtrij. De kolom code is daarom niet te wijzigen." })] }), _jsxs(CardContent, { className: "space-y-8", children: [_jsx("div", { className: "flex flex-wrap gap-2", children: _jsxs(Button, { variant: "outline", onClick: () => seed.mutate(), disabled: seed.isPending, children: [seed.isPending ? (_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" })) : (_jsx(RotateCcw, { className: "mr-2 h-4 w-4" })), "Standaardwaarden herstellen"] }) }), isLoading ? (_jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin" }), " Laden..."] })) : (_jsxs(_Fragment, { children: [_jsxs("section", { className: "space-y-3", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsxs("h3", { className: "font-semibold text-foreground", children: ["Documenttypes (", types.length, ")"] }), _jsxs(Button, { variant: "ghost", size: "sm", onClick: () => setNieuw({ tabel: "types", code: "", naam: "" }), children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), " Type toevoegen"] })] }), _jsx("div", { className: "overflow-x-auto", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: "Code" }), _jsx(TableHead, { children: "Naam" }), _jsx(TableHead, { children: "Kleur" }), _jsx(TableHead, { children: "Icoon" }), _jsx(TableHead, { children: "Prioriteit" }), _jsx(TableHead, { children: "Sortering" }), _jsx(TableHead, { children: "Actief" })] }) }), _jsx(TableBody, { children: types.map((t) => {
81
+ return (_jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FileText, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { children: "Referentiedata pickdocumenten" })] }), _jsx(CardDescription, { children: "De synchronisatie zoekt hardcoded op deze codes: zonder documenttype 'pakbon' komt er niets in de pickwachtrij. De kolom code is daarom niet te wijzigen." })] }), _jsxs(CardContent, { className: "space-y-4", children: [_jsx("div", { className: "flex flex-wrap gap-2", children: _jsxs(Button, { variant: "outline", onClick: () => seed.mutate(), disabled: seed.isPending, children: [seed.isPending ? (_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" })) : (_jsx(RotateCcw, { className: "mr-2 h-4 w-4" })), "Standaardwaarden herstellen"] }) }), isLoading ? (_jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin" }), " Laden..."] })) : (_jsxs(_Fragment, { children: [_jsx(PillTabs, { label: "Referentiedata", value: tab, onChange: setTab, tabs: [
82
+ { id: "types", label: "Documentsoorten", count: types.length },
83
+ { id: "statussen", label: "Statussen", count: statussen.length },
84
+ ] }), tab === "types" && (_jsxs("section", { className: "space-y-3", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsxs("h3", { className: "font-semibold text-foreground", children: ["Documenttypes (", types.length, ")"] }), _jsxs(Button, { variant: "ghost", size: "sm", onClick: () => setNieuw({ tabel: "types", code: "", naam: "" }), children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), " Type toevoegen"] })] }), _jsx("div", { className: "overflow-x-auto", children: _jsxs(Table, { className: REF_TABLE, children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: "Code" }), _jsx(TableHead, { children: "Naam" }), _jsx(TableHead, { children: "Kleur" }), _jsx(TableHead, { children: "Icoon" }), _jsx(TableHead, { children: "Prioriteit" }), _jsx(TableHead, { children: "Sortering" }), _jsx(TableHead, { children: "Actief" })] }) }), _jsx(TableBody, { children: types.map((t) => {
78
85
  const verplicht = verplichteTypes.includes(t.code);
79
86
  return (_jsxs(TableRow, { children: [_jsx(TableCell, { className: "font-mono text-xs", children: t.code }), _jsx(TableCell, { children: _jsx(TextCell, { value: t.name, className: "w-40", onSave: (name) => saveType.mutate({ id: t.id, patch: { name } }) }) }), _jsx(TableCell, { children: _jsx(TextCell, { value: t.color ?? "", className: "w-28 font-mono text-xs", onSave: (color) => saveType.mutate({ id: t.id, patch: { color } }) }) }), _jsx(TableCell, { children: _jsx(TextCell, { value: t.icon ?? "", className: "w-32", onSave: (icon) => saveType.mutate({ id: t.id, patch: { icon } }) }) }), _jsx(TableCell, { children: _jsx(NumberCell, { value: t.priority, onSave: (priority) => saveType.mutate({ id: t.id, patch: { priority } }) }) }), _jsx(TableCell, { children: _jsx(NumberCell, { value: t.sort_order, onSave: (sort_order) => saveType.mutate({ id: t.id, patch: { sort_order } }) }) }), _jsx(TableCell, { children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Switch, { checked: t.active, disabled: verplicht && t.active, onCheckedChange: (active) => saveType.mutate({ id: t.id, patch: { active } }) }), verplicht && (_jsx("span", { className: "text-xs text-muted-foreground", children: "Verplicht \u2014 kan niet uit" }))] }) })] }, t.id));
80
- }) })] }) })] }), _jsxs("section", { className: "space-y-3", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsxs("h3", { className: "font-semibold text-foreground", children: ["Documentstatussen (", statussen.length, ")"] }), _jsxs(Button, { variant: "ghost", size: "sm", onClick: () => setNieuw({ tabel: "statussen", code: "", naam: "" }), children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), " Status toevoegen"] })] }), _jsx("div", { className: "overflow-x-auto", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: "Code" }), _jsx(TableHead, { children: "Naam" }), _jsx(TableHead, { children: "Kleur" }), _jsx(TableHead, { children: "Sortering" }), _jsx(TableHead, { children: "Open" }), _jsx(TableHead, { children: "Eindstatus" }), _jsx(TableHead, { children: "Actief" })] }) }), _jsx(TableBody, { children: statussen.map((s) => {
87
+ }) })] }) })] })), tab === "statussen" && (_jsxs("section", { className: "space-y-3", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsxs("h3", { className: "font-semibold text-foreground", children: ["Documentstatussen (", statussen.length, ")"] }), _jsxs(Button, { variant: "ghost", size: "sm", onClick: () => setNieuw({ tabel: "statussen", code: "", naam: "" }), children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), " Status toevoegen"] })] }), _jsx("div", { className: "overflow-x-auto", children: _jsxs(Table, { className: REF_TABLE, children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: "Code" }), _jsx(TableHead, { children: "Naam" }), _jsx(TableHead, { children: "Kleur" }), _jsx(TableHead, { children: "Sortering" }), _jsx(TableHead, { children: "Open" }), _jsx(TableHead, { children: "Eindstatus" }), _jsx(TableHead, { children: "Actief" })] }) }), _jsx(TableBody, { children: statussen.map((s) => {
81
88
  const verplicht = verplichteStatussen.includes(s.code);
82
89
  return (_jsxs(TableRow, { children: [_jsx(TableCell, { className: "font-mono text-xs", children: s.code }), _jsx(TableCell, { children: _jsx(TextCell, { value: s.name, className: "w-40", onSave: (name) => saveStatus.mutate({ id: s.id, patch: { name } }) }) }), _jsx(TableCell, { children: _jsx(TextCell, { value: s.color ?? "", className: "w-28 font-mono text-xs", onSave: (color) => saveStatus.mutate({ id: s.id, patch: { color } }) }) }), _jsx(TableCell, { children: _jsx(NumberCell, { value: s.sort_order, onSave: (sort_order) => saveStatus.mutate({ id: s.id, patch: { sort_order } }) }) }), _jsx(TableCell, { children: _jsx(Switch, { checked: s.is_open, onCheckedChange: (is_open) => saveStatus.mutate({ id: s.id, patch: { is_open } }) }) }), _jsx(TableCell, { children: _jsx(Switch, { checked: s.is_terminal, onCheckedChange: (is_terminal) => saveStatus.mutate({ id: s.id, patch: { is_terminal } }) }) }), _jsx(TableCell, { children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Switch, { checked: s.active, disabled: verplicht && s.active, onCheckedChange: (active) => saveStatus.mutate({ id: s.id, patch: { active } }) }), verplicht && (_jsx("span", { className: "text-xs text-muted-foreground", children: "Verplicht \u2014 kan niet uit" }))] }) })] }, s.id));
83
- }) })] }) })] })] })), nieuw && (_jsxs("div", { className: "space-y-3 rounded-md border p-4", children: [_jsxs("p", { className: "text-sm font-medium text-foreground", children: ["Nieuwe ", nieuw.tabel === "types" ? "documenttype" : "documentstatus"] }), _jsxs("div", { className: "grid gap-3 sm:grid-cols-2", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "ref-code", children: "Code" }), _jsx(Input, { id: "ref-code", value: nieuw.code, onChange: (e) => setNieuw({ ...nieuw, code: e.target.value }), placeholder: "bijv. wagenlijst" })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "ref-naam", children: "Naam" }), _jsx(Input, { id: "ref-naam", value: nieuw.naam, onChange: (e) => setNieuw({ ...nieuw, naam: e.target.value }) })] })] }), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(Button, { variant: "outline", onClick: () => setNieuw(null), children: "Annuleren" }), _jsxs(Button, { disabled: !nieuw.code.trim() || !nieuw.naam.trim() || addRow.isPending, onClick: () => addRow.mutate(nieuw), children: [addRow.isPending && _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), " Toevoegen"] })] })] }))] })] }));
90
+ }) })] }) })] }))] })), nieuw && (_jsxs("div", { className: "space-y-3 rounded-md border p-4", children: [_jsxs("p", { className: "text-sm font-medium text-foreground", children: ["Nieuwe ", nieuw.tabel === "types" ? "documenttype" : "documentstatus"] }), _jsxs("div", { className: "grid gap-3 sm:grid-cols-2", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "ref-code", children: "Code" }), _jsx(Input, { id: "ref-code", value: nieuw.code, onChange: (e) => setNieuw({ ...nieuw, code: e.target.value }), placeholder: "bijv. wagenlijst" })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "ref-naam", children: "Naam" }), _jsx(Input, { id: "ref-naam", value: nieuw.naam, onChange: (e) => setNieuw({ ...nieuw, naam: e.target.value }) })] })] }), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(Button, { variant: "outline", onClick: () => setNieuw(null), children: "Annuleren" }), _jsxs(Button, { disabled: !nieuw.code.trim() || !nieuw.naam.trim() || addRow.isPending, onClick: () => addRow.mutate(nieuw), children: [addRow.isPending && _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), " Toevoegen"] })] })] }))] })] }));
84
91
  }
@@ -1,7 +1,7 @@
1
1
  import { type PrintStatusResult } from "../lib/pickPrintStatus.js";
2
2
  /**
3
3
  * Eén aanroep voor alle zichtbare regels. Openbaar station (slug):
4
- * pickstation_print_status; ingelogd scherm: logistics_print_status direct.
4
+ * altijd pickstation_print_status, ook zonder gekoppeld apparaat.
5
5
  * Fout: "niet beschikbaar" met reden, nooit terugvallen op printed_at.
6
6
  */
7
7
  export declare function fetchPrintStatus(ids: string[], slug: string | null): Promise<PrintStatusResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"usePickPrintStatus.d.ts","sourceRoot":"","sources":["../../src/hooks/usePickPrintStatus.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgC,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAQ9F;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAgBrG;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,UAAO;;;;;EAkBpF"}
1
+ {"version":3,"file":"usePickPrintStatus.d.ts","sourceRoot":"","sources":["../../src/hooks/usePickPrintStatus.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgC,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAQ9F;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAerG;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,UAAO;;;;;EAkBpF"}
@@ -8,14 +8,14 @@ const db = keyedRpc(supabase);
8
8
  const MAX_IDS = 500;
9
9
  /**
10
10
  * Eén aanroep voor alle zichtbare regels. Openbaar station (slug):
11
- * pickstation_print_status; ingelogd scherm: logistics_print_status direct.
11
+ * altijd pickstation_print_status, ook zonder gekoppeld apparaat.
12
12
  * Fout: "niet beschikbaar" met reden, nooit terugvallen op printed_at.
13
13
  */
14
14
  export async function fetchPrintStatus(ids, slug) {
15
15
  const list = ids.slice(0, MAX_IDS);
16
- const { data, error } = await pickMeasure("printstatus", () => slug
17
- ? db.rpc("pickstation_print_status", { p_slug: slug, p_queue_item_ids: list })
18
- : db.rpc("logistics_print_status", { p_queue_item_ids: list }));
16
+ if (!slug?.trim())
17
+ return { beschikbaar: false, reden: "Het pickstation ontbreekt; open het scherm opnieuw.", byId: new Map() };
18
+ const { data, error } = await pickMeasure("printstatus", () => db.rpc("pickstation_print_status", { p_slug: slug, p_queue_item_ids: list }));
19
19
  if (error) {
20
20
  const missing = /could not find|does not exist|PGRST202/i.test(error.message);
21
21
  return {
@@ -11,7 +11,7 @@ export interface WatchedShippingNote {
11
11
  * wacht, geprint is of is mislukt. Uitsluitend lezen: er wordt nooit een nieuwe
12
12
  * aanvraag of printopdracht gemaakt.
13
13
  */
14
- export declare function useShippingNoteStatus(): {
14
+ export declare function useShippingNoteStatus(slug: string | null): {
15
15
  shippingNotes: WatchedShippingNote[];
16
16
  watchShippingNotes: (entries: {
17
17
  jobId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useShippingNoteStatus.d.ts","sourceRoot":"","sources":["../../src/hooks/useShippingNoteStatus.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,mBAAmB;IAClC,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,kBAAkB,CAAC;CAC3B;AAMD;;;;GAIG;AACH,wBAAgB,qBAAqB;;kCAYvB;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,EAAE;;mCA4C5B,OAAO,CAAC;QAC5D,EAAE,EAAE,OAAO,CAAC;QACZ,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KACxB,CAAC;EAuFH"}
1
+ {"version":3,"file":"useShippingNoteStatus.d.ts","sourceRoot":"","sources":["../../src/hooks/useShippingNoteStatus.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,mBAAmB;IAClC,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,kBAAkB,CAAC;CAC3B;AAMD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;;kCAY3C;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,EAAE;;mCA4C5B,OAAO,CAAC;QAC5D,EAAE,EAAE,OAAO,CAAC;QACZ,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KACxB,CAAC;EAyFH"}
@@ -8,7 +8,7 @@ const MAX_MS = 15 * 60 * 1000;
8
8
  * wacht, geprint is of is mislukt. Uitsluitend lezen: er wordt nooit een nieuwe
9
9
  * aanvraag of printopdracht gemaakt.
10
10
  */
11
- export function useShippingNoteStatus() {
11
+ export function useShippingNoteStatus(slug) {
12
12
  const [notes, setNotes] = useState([]);
13
13
  const notesRef = useRef([]);
14
14
  const startedAt = useRef({});
@@ -63,9 +63,10 @@ export function useShippingNoteStatus() {
63
63
  if (current.length > 0) {
64
64
  const results = await Promise.all(current.map(async (note) => {
65
65
  try {
66
- return { jobId: note.jobId, state: await readShippingNoteStatus(note.jobId, note.cartId) };
66
+ return { jobId: note.jobId, state: await readShippingNoteStatus(note.jobId, note.cartId, slug) };
67
67
  }
68
- catch {
68
+ catch (error) {
69
+ console.error("Pickstation: verzendbriefstatus kon niet worden gelezen", error);
69
70
  return null;
70
71
  }
71
72
  }));
@@ -73,11 +74,11 @@ export function useShippingNoteStatus() {
73
74
  .filter((r) => r !== null)
74
75
  .map((r) => [r.jobId, r.state]));
75
76
  if (byJob.size > 0) {
76
- apply(notesRef.current.map((note) => byJob.has(note.jobId) ? { ...note, state: byJob.get(note.jobId) } : note));
77
+ apply(notesRef.current.map((note) => byJob.get(note.jobId) ? { ...note, state: byJob.get(note.jobId) ?? note.state } : note));
77
78
  }
78
79
  }
79
80
  return result;
80
- }, [apply]);
81
+ }, [apply, slug]);
81
82
  const key = notes.map((note) => note.jobId).join(",");
82
83
  useEffect(() => {
83
84
  if (!key)
@@ -104,9 +105,10 @@ export function useShippingNoteStatus() {
104
105
  }
105
106
  const results = await Promise.all(pending.map(async (note) => {
106
107
  try {
107
- return { jobId: note.jobId, state: await readShippingNoteStatus(note.jobId, note.cartId) };
108
+ return { jobId: note.jobId, state: await readShippingNoteStatus(note.jobId, note.cartId, slug) };
108
109
  }
109
- catch {
110
+ catch (error) {
111
+ console.error("Pickstation: verzendbriefstatus kon niet worden gelezen", error);
110
112
  // Status tijdelijk niet leesbaar; volgende ronde volgt.
111
113
  return null;
112
114
  }
@@ -117,7 +119,7 @@ export function useShippingNoteStatus() {
117
119
  .map((r) => [r.jobId, r.state]));
118
120
  if (byJob.size === 0)
119
121
  return;
120
- const updated = notesRef.current.map((note) => byJob.has(note.jobId) ? { ...note, state: byJob.get(note.jobId) } : note);
122
+ const updated = notesRef.current.map((note) => byJob.get(note.jobId) ? { ...note, state: byJob.get(note.jobId) ?? note.state } : note);
121
123
  notesRef.current = updated;
122
124
  setNotes(updated);
123
125
  };
@@ -127,6 +129,6 @@ export function useShippingNoteStatus() {
127
129
  stopped = true;
128
130
  stop();
129
131
  };
130
- }, [key]);
132
+ }, [key, slug]);
131
133
  return { shippingNotes: notes, watchShippingNotes, clearShippingNotes, refreshShippingNotesNow };
132
134
  }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Houdt de getoonde lijst vast terwijl iemand het scherm aanraakt en tot 2 s
3
+ * daarna. Verdwenen kaarten blijven 300 ms staan (fade-out) op hun plek.
4
+ */
5
+ export declare function useStableList<T>(items: T[], keyOf: (item: T) => string, holdMs?: number): {
6
+ shown: {
7
+ item: T;
8
+ leaving: boolean;
9
+ }[];
10
+ handlers: {
11
+ onPointerDown: () => void;
12
+ onPointerUp: () => void;
13
+ onPointerCancel: () => void;
14
+ };
15
+ };
16
+ /** Na `ms` zonder aanraking of toets: onIdle. */
17
+ export declare function useIdle(ms: number, onIdle: () => void): void;
18
+ /** Browser meldt verbinding (navigator.onLine + online/offline-events). */
19
+ export declare function useBrowserOnline(): boolean;
20
+ //# sourceMappingURL=useWerkvloer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWerkvloer.d.ts","sourceRoot":"","sources":["../../src/hooks/useWerkvloer.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,EAAE,MAAM,SAAO;;cACzC,CAAC;iBAAW,OAAO;;;;;;;EAuD/D;AAED,iDAAiD;AACjD,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,IAAI,QAgBrD;AAED,2EAA2E;AAC3E,wBAAgB,gBAAgB,YAc/B"}
@@ -0,0 +1,98 @@
1
+ import { useCallback, useEffect, useRef, useState } from "react";
2
+ /**
3
+ * Houdt de getoonde lijst vast terwijl iemand het scherm aanraakt en tot 2 s
4
+ * daarna. Verdwenen kaarten blijven 300 ms staan (fade-out) op hun plek.
5
+ */
6
+ export function useStableList(items, keyOf, holdMs = 2000) {
7
+ const [shown, setShown] = useState(() => items.map((item) => ({ item, leaving: false })));
8
+ const touching = useRef(false);
9
+ const releaseTimer = useRef(null);
10
+ const latest = useRef(items);
11
+ latest.current = items;
12
+ const [tick, setTick] = useState(0);
13
+ const apply = useCallback(() => {
14
+ const next = latest.current;
15
+ setShown((prev) => {
16
+ const nextKeys = new Set(next.map(keyOf));
17
+ const out = next.map((item) => ({ item, leaving: false }));
18
+ // Verdwenen kaarten op hun oude plek laten uitfaden.
19
+ prev.forEach((entry, index) => {
20
+ const k = keyOf(entry.item);
21
+ if (!nextKeys.has(k) && !entry.leaving)
22
+ out.splice(Math.min(index, out.length), 0, { item: entry.item, leaving: true });
23
+ });
24
+ // Niets veranderd: zelfde lijst teruggeven, zodat React niets opnieuw tekent.
25
+ if (out.length === prev.length && out.every((e, i) => e.item === prev[i].item && e.leaving === prev[i].leaving))
26
+ return prev;
27
+ return out;
28
+ });
29
+ }, [keyOf]);
30
+ useEffect(() => {
31
+ if (!touching.current && releaseTimer.current === null)
32
+ apply();
33
+ }, [items, apply, tick]);
34
+ // Uitgefade kaarten na 300 ms echt weghalen.
35
+ useEffect(() => {
36
+ if (!shown.some((e) => e.leaving))
37
+ return;
38
+ const t = window.setTimeout(() => setShown((prev) => prev.filter((e) => !e.leaving)), 300);
39
+ return () => window.clearTimeout(t);
40
+ }, [shown]);
41
+ const onPointerDown = useCallback(() => {
42
+ touching.current = true;
43
+ if (releaseTimer.current !== null) {
44
+ window.clearTimeout(releaseTimer.current);
45
+ releaseTimer.current = null;
46
+ }
47
+ }, []);
48
+ const onPointerUp = useCallback(() => {
49
+ touching.current = false;
50
+ if (releaseTimer.current !== null)
51
+ window.clearTimeout(releaseTimer.current);
52
+ releaseTimer.current = window.setTimeout(() => {
53
+ releaseTimer.current = null;
54
+ setTick((n) => n + 1);
55
+ }, holdMs);
56
+ }, [holdMs]);
57
+ useEffect(() => () => {
58
+ if (releaseTimer.current !== null)
59
+ window.clearTimeout(releaseTimer.current);
60
+ }, []);
61
+ return { shown, handlers: { onPointerDown, onPointerUp, onPointerCancel: onPointerUp } };
62
+ }
63
+ /** Na `ms` zonder aanraking of toets: onIdle. */
64
+ export function useIdle(ms, onIdle) {
65
+ const cb = useRef(onIdle);
66
+ cb.current = onIdle;
67
+ useEffect(() => {
68
+ let timer = window.setTimeout(() => cb.current(), ms);
69
+ const reset = () => {
70
+ window.clearTimeout(timer);
71
+ timer = window.setTimeout(() => cb.current(), ms);
72
+ };
73
+ const events = ["pointerdown", "keydown", "wheel", "touchstart"];
74
+ for (const e of events)
75
+ window.addEventListener(e, reset, { passive: true });
76
+ return () => {
77
+ window.clearTimeout(timer);
78
+ for (const e of events)
79
+ window.removeEventListener(e, reset);
80
+ };
81
+ }, [ms]);
82
+ }
83
+ /** Browser meldt verbinding (navigator.onLine + online/offline-events). */
84
+ export function useBrowserOnline() {
85
+ const [online, setOnline] = useState(true);
86
+ useEffect(() => {
87
+ setOnline(navigator.onLine);
88
+ const on = () => setOnline(true);
89
+ const off = () => setOnline(false);
90
+ window.addEventListener("online", on);
91
+ window.addEventListener("offline", off);
92
+ return () => {
93
+ window.removeEventListener("online", on);
94
+ window.removeEventListener("offline", off);
95
+ };
96
+ }, []);
97
+ return online;
98
+ }
@@ -19970,6 +19970,33 @@ export type Database = {
19970
19970
  }
19971
19971
  ];
19972
19972
  };
19973
+ pick_order_claims: {
19974
+ Row: {
19975
+ created_at: string;
19976
+ idempotency_key: string;
19977
+ queue_item_ids: string[];
19978
+ session_id: string;
19979
+ station_id: string;
19980
+ unit_ref: string;
19981
+ };
19982
+ Insert: {
19983
+ created_at?: string;
19984
+ idempotency_key: string;
19985
+ queue_item_ids?: string[];
19986
+ session_id: string;
19987
+ station_id: string;
19988
+ unit_ref: string;
19989
+ };
19990
+ Update: {
19991
+ created_at?: string;
19992
+ idempotency_key?: string;
19993
+ queue_item_ids?: string[];
19994
+ session_id?: string;
19995
+ station_id?: string;
19996
+ unit_ref?: string;
19997
+ };
19998
+ Relationships: [];
19999
+ };
19973
20000
  pick_queue: {
19974
20001
  Row: {
19975
20002
  announced_at: string;
@@ -33047,6 +33074,17 @@ export type Database = {
33047
33074
  };
33048
33075
  Returns: undefined;
33049
33076
  };
33077
+ _pick_claim_order_core: {
33078
+ Args: {
33079
+ _idempotency_key: string;
33080
+ _pick_day: string;
33081
+ _session_id: string;
33082
+ _station_id: string;
33083
+ _timeout_seconds: number;
33084
+ _unit_refs: string[];
33085
+ };
33086
+ Returns: Json;
33087
+ };
33050
33088
  _pick_defaults_apply: {
33051
33089
  Args: {
33052
33090
  p_rijen: Json;
@@ -41916,6 +41954,28 @@ export type Database = {
41916
41954
  isSetofReturn: false;
41917
41955
  };
41918
41956
  };
41957
+ pick_claim_order_v1: {
41958
+ Args: {
41959
+ _idempotency_key: string;
41960
+ _pick_day: string;
41961
+ _session_id: string;
41962
+ _station_id: string;
41963
+ _timeout_seconds: number;
41964
+ _unit_refs: string[];
41965
+ };
41966
+ Returns: Json;
41967
+ } | {
41968
+ Args: {
41969
+ _idempotency_key: string;
41970
+ _pick_day: string;
41971
+ _session_id: string;
41972
+ _station_id: string;
41973
+ _timeout_seconds: number;
41974
+ _unit_refs: string[];
41975
+ p_device_key: string;
41976
+ };
41977
+ Returns: Json;
41978
+ };
41919
41979
  pick_cleanup_maintenance: {
41920
41980
  Args: {
41921
41981
  _heartbeat_hours?: number;
@@ -43672,6 +43732,15 @@ export type Database = {
43672
43732
  };
43673
43733
  Returns: undefined;
43674
43734
  };
43735
+ pickstation_shipping_note_status: {
43736
+ Args: {
43737
+ p_cart_id?: string;
43738
+ p_device_key?: string;
43739
+ p_slip_job_id?: string;
43740
+ p_slug: string;
43741
+ };
43742
+ Returns: Json;
43743
+ };
43675
43744
  pickstation_sticker_past_controle: {
43676
43745
  Args: {
43677
43746
  p_cart_id: string;