@flowselections/pick-schermen-kwekers 1.0.12 → 1.0.13
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/PickstationsPage.d.ts.map +1 -1
- package/dist-lib/components/PickstationsPage.js +11 -19
- package/dist-lib/hooks/useKoppelingVoorBron.d.ts +12 -0
- package/dist-lib/hooks/useKoppelingVoorBron.d.ts.map +1 -0
- package/dist-lib/hooks/useKoppelingVoorBron.js +48 -0
- package/dist-lib/index.d.ts +1 -0
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/index.js +1 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +74 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +74 -0
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +74 -0
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +74 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/package.json +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PickstationsPage.d.ts","sourceRoot":"","sources":["../../src/components/PickstationsPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PickstationsPage.d.ts","sourceRoot":"","sources":["../../src/components/PickstationsPage.tsx"],"names":[],"mappings":"AA+FA,wBAAgB,gBAAgB,gCAuL/B"}
|
|
@@ -2,54 +2,47 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
import { Button, Card, CardContent, Dialog, DialogContent, DialogHeader, DialogTitle, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Switch, Textarea, toast, } from "@flowselections/core";
|
|
5
|
-
import { AlertTriangle, Copy, ExternalLink, Loader2, Pencil, Plus, Printer, Trash2, } from "lucide-react";
|
|
5
|
+
import { AlertTriangle, Copy, ExternalLink, Loader2, Pencil, Plus, Printer, Trash2, Unlink, } from "lucide-react";
|
|
6
6
|
import { pickApi } from "../lib/pickApi";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const emptyDraft = { name: "", description: "", active: true
|
|
7
|
+
import { usePickStations } from "../hooks/usePickConfig";
|
|
8
|
+
import { useKoppelingVoorBron } from "../hooks/useKoppelingVoorBron";
|
|
9
|
+
const emptyDraft = { name: "", description: "", active: true };
|
|
10
10
|
function publicUrl(slug) {
|
|
11
11
|
const origin = typeof window !== "undefined" ? window.location.origin : "";
|
|
12
12
|
return `${origin}/pickstation/${slug ?? ""}`;
|
|
13
13
|
}
|
|
14
|
+
function StationPrintplek({ station }) {
|
|
15
|
+
const { plekken, printplekId, printplekNaam, gekoppeld, laden, koppel, ontkoppel } = useKoppelingVoorBron("pickstation", station.id, station.name);
|
|
16
|
+
return (_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: `plek-${station.id}`, children: "Printplek" }), _jsxs(Select, { value: printplekId ?? undefined, onValueChange: (id) => void koppel(id), disabled: laden, children: [_jsx(SelectTrigger, { id: `plek-${station.id}`, children: _jsx(SelectValue, { placeholder: "Kies een printplek" }) }), _jsx(SelectContent, { children: plekken.map((p) => (_jsx(SelectItem, { value: p.id, children: p.naam }, p.id))) })] }), gekoppeld ? (_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsxs("p", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [_jsx(Printer, { className: "h-4 w-4 shrink-0" }), _jsx("span", { className: "truncate", children: printplekNaam })] }), _jsxs(Button, { variant: "ghost", size: "sm", onClick: () => void ontkoppel(), children: [_jsx(Unlink, { className: "mr-2 h-4 w-4" }), " Loskoppelen"] })] })) : (_jsxs("p", { className: "flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/5 px-2 py-1.5 text-sm text-destructive", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-4 w-4 shrink-0" }), "Nog geen printplek gekoppeld \u2014 de opdracht blijft in de wachtrij staan."] }))] }));
|
|
17
|
+
}
|
|
14
18
|
export function PickstationsPage() {
|
|
15
19
|
const { data: stations, isLoading } = usePickStations();
|
|
16
|
-
const { data: printPlekken } = usePickPrintPlekken();
|
|
17
|
-
const { data: koppelingen } = useStationPrintPlekken();
|
|
18
20
|
const queryClient = useQueryClient();
|
|
19
21
|
const [draft, setDraft] = useState(null);
|
|
20
22
|
const safeStations = Array.isArray(stations) ? stations : [];
|
|
21
|
-
const safePlekken = Array.isArray(printPlekken) ? printPlekken : [];
|
|
22
|
-
const safeKoppelingen = Array.isArray(koppelingen) ? koppelingen : [];
|
|
23
|
-
const plekOf = (stationId) => safeKoppelingen.find((k) => k.station_id === stationId) ?? null;
|
|
24
23
|
const save = useMutation({
|
|
25
24
|
mutationFn: async (d) => {
|
|
26
|
-
|
|
25
|
+
await pickApi.upsert("pick_stations", {
|
|
27
26
|
...(d.id ? { id: d.id } : {}),
|
|
28
27
|
name: d.name.trim(),
|
|
29
28
|
description: d.description.trim() || null,
|
|
30
29
|
active: d.active,
|
|
31
30
|
});
|
|
32
|
-
const stationId = d.id ?? row?.["id"] ?? null;
|
|
33
|
-
if (stationId)
|
|
34
|
-
await pickApi.setStationPrintPlek(stationId, d.printPlekId);
|
|
35
31
|
},
|
|
36
32
|
onSuccess: () => {
|
|
37
33
|
toast.success("Pickstation opgeslagen.");
|
|
38
34
|
setDraft(null);
|
|
39
35
|
queryClient.invalidateQueries({ queryKey: ["pick", "stations"] });
|
|
40
|
-
queryClient.invalidateQueries({ queryKey: ["pick", "stationPrintPlekken"] });
|
|
41
36
|
},
|
|
42
37
|
onError: (e) => toast.error(e instanceof Error ? e.message : "Opslaan mislukt."),
|
|
43
38
|
});
|
|
44
39
|
const remove = useMutation({
|
|
45
40
|
mutationFn: async (id) => {
|
|
46
|
-
await pickApi.setStationPrintPlek(id, null);
|
|
47
41
|
await pickApi.remove("pick_stations", id);
|
|
48
42
|
},
|
|
49
43
|
onSuccess: () => {
|
|
50
44
|
toast.success("Pickstation verwijderd.");
|
|
51
45
|
queryClient.invalidateQueries({ queryKey: ["pick", "stations"] });
|
|
52
|
-
queryClient.invalidateQueries({ queryKey: ["pick", "stationPrintPlekken"] });
|
|
53
46
|
},
|
|
54
47
|
onError: (e) => toast.error(e instanceof Error ? e.message : "Verwijderen mislukt."),
|
|
55
48
|
});
|
|
@@ -66,11 +59,10 @@ export function PickstationsPage() {
|
|
|
66
59
|
return (_jsxs("main", { className: "space-y-6 p-6", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-2xl font-bold text-foreground", children: "Pickstations" }), _jsx("p", { className: "text-sm text-muted-foreground", children: "Beheer je pickstations en hun openbare link. Alle logica komt uit de Logistiek Engine." })] }), _jsxs(Button, { onClick: () => setDraft({ ...emptyDraft }), children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), " Nieuw pickstation"] })] }), isLoading ? (_jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin" }), " Laden..."] })) : safeStations.length === 0 ? (_jsx("p", { className: "text-sm text-muted-foreground", children: "Nog geen pickstations." })) : (_jsx("div", { className: "grid gap-4 sm:grid-cols-2 xl:grid-cols-3", children: safeStations.map((station) => (_jsx(Card, { className: "border-2", children: _jsxs(CardContent, { className: "space-y-4 p-6", children: [_jsxs("div", { className: "flex items-start justify-between gap-2", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-lg font-semibold text-foreground", children: station.name }), _jsx("p", { className: "text-sm text-muted-foreground", children: station.description })] }), _jsx("span", { className: "rounded-full px-2 py-1 text-xs font-medium " +
|
|
67
60
|
(station.active
|
|
68
61
|
? "bg-primary/10 text-primary"
|
|
69
|
-
: "bg-muted text-muted-foreground"), children: station.active ? "Actief" : "Inactief" })] }), _jsx("code", { className: "block truncate rounded bg-muted px-2 py-1 text-xs text-muted-foreground", children: publicUrl(station.slug) }),
|
|
62
|
+
: "bg-muted text-muted-foreground"), children: station.active ? "Actief" : "Inactief" })] }), _jsx("code", { className: "block truncate rounded bg-muted px-2 py-1 text-xs text-muted-foreground", children: publicUrl(station.slug) }), _jsx(StationPrintplek, { station: station }), _jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Button, { className: "flex-1", asChild: true, children: _jsxs("a", { href: publicUrl(station.slug), target: "_blank", rel: "noreferrer", children: [_jsx(ExternalLink, { className: "mr-2 h-4 w-4" }), " Open pickstation"] }) }), _jsxs(Button, { variant: "outline", onClick: () => copyLink(station), children: [_jsx(Copy, { className: "mr-2 h-4 w-4" }), " Link kopi\u00EBren"] })] }), _jsxs("div", { className: "flex gap-2", children: [_jsxs(Button, { variant: "ghost", size: "sm", onClick: () => setDraft({
|
|
70
63
|
id: station.id,
|
|
71
64
|
name: station.name,
|
|
72
65
|
description: station.description ?? "",
|
|
73
66
|
active: station.active,
|
|
74
|
-
|
|
75
|
-
}), children: [_jsx(Pencil, { className: "mr-2 h-4 w-4" }), " Wijzigen"] }), _jsxs(Button, { variant: "ghost", size: "sm", className: "text-destructive", onClick: () => remove.mutate(station.id), children: [_jsx(Trash2, { className: "mr-2 h-4 w-4" }), " Verwijderen"] })] })] }) }, station.id))) })), _jsx(Dialog, { open: draft !== null, onOpenChange: (open) => !open && setDraft(null), children: _jsxs(DialogContent, { children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: draft?.id ? "Pickstation wijzigen" : "Nieuw pickstation" }) }), draft && (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "station-name", children: "Naam" }), _jsx(Input, { id: "station-name", value: draft.name, onChange: (e) => setDraft({ ...draft, name: e.target.value }) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "station-desc", children: "Omschrijving (optioneel)" }), _jsx(Textarea, { id: "station-desc", value: draft.description, onChange: (e) => setDraft({ ...draft, description: e.target.value }) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "station-plek", children: "Printplek" }), _jsxs(Select, { value: draft.printPlekId ?? NO_PLEK, onValueChange: (v) => setDraft({ ...draft, printPlekId: v === NO_PLEK ? null : v }), children: [_jsx(SelectTrigger, { id: "station-plek", children: _jsx(SelectValue, { placeholder: "Kies een printplek" }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: NO_PLEK, children: "Geen printplek" }), safePlekken.map((plek) => (_jsxs(SelectItem, { value: plek.id, children: [plek.naam, plek.omschrijving ? ` — ${plek.omschrijving}` : ""] }, plek.id)))] })] }), !draft.printPlekId && (_jsx("p", { className: "text-sm text-destructive", children: "Nog geen printplek gekoppeld \u2014 de opdracht blijft in de wachtrij staan." }))] }), _jsxs("div", { className: "flex items-center justify-between rounded-md border px-3 py-2", children: [_jsx(Label, { htmlFor: "station-active", children: "Actief" }), _jsx(Switch, { id: "station-active", checked: draft.active, onCheckedChange: (v) => setDraft({ ...draft, active: v }) })] }), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(Button, { variant: "outline", onClick: () => setDraft(null), children: "Annuleren" }), _jsxs(Button, { disabled: !draft.name.trim() || save.isPending, onClick: () => save.mutate(draft), children: [save.isPending && _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), " Opslaan"] })] })] }))] }) })] }));
|
|
67
|
+
}), children: [_jsx(Pencil, { className: "mr-2 h-4 w-4" }), " Wijzigen"] }), _jsxs(Button, { variant: "ghost", size: "sm", className: "text-destructive", onClick: () => remove.mutate(station.id), children: [_jsx(Trash2, { className: "mr-2 h-4 w-4" }), " Verwijderen"] })] })] }) }, station.id))) })), _jsx(Dialog, { open: draft !== null, onOpenChange: (open) => !open && setDraft(null), children: _jsxs(DialogContent, { children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: draft?.id ? "Pickstation wijzigen" : "Nieuw pickstation" }) }), draft && (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "station-name", children: "Naam" }), _jsx(Input, { id: "station-name", value: draft.name, onChange: (e) => setDraft({ ...draft, name: e.target.value }) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "station-desc", children: "Omschrijving (optioneel)" }), _jsx(Textarea, { id: "station-desc", value: draft.description, onChange: (e) => setDraft({ ...draft, description: e.target.value }) })] }), _jsxs("div", { className: "flex items-center justify-between rounded-md border px-3 py-2", children: [_jsx(Label, { htmlFor: "station-active", children: "Actief" }), _jsx(Switch, { id: "station-active", checked: draft.active, onCheckedChange: (v) => setDraft({ ...draft, active: v }) })] }), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(Button, { variant: "outline", onClick: () => setDraft(null), children: "Annuleren" }), _jsxs(Button, { disabled: !draft.name.trim() || save.isPending, onClick: () => save.mutate(draft), children: [save.isPending && _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), " Opslaan"] })] })] }))] }) })] }));
|
|
76
68
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Printplek } from "@flowselections/layout-maker";
|
|
2
|
+
export interface KoppelingVoorBron {
|
|
3
|
+
plekken: Printplek[];
|
|
4
|
+
printplekId: string | null;
|
|
5
|
+
printplekNaam: string | null;
|
|
6
|
+
gekoppeld: boolean;
|
|
7
|
+
laden: boolean;
|
|
8
|
+
koppel: (printPlekId: string) => Promise<void>;
|
|
9
|
+
ontkoppel: () => Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export declare function useKoppelingVoorBron(bron: string, bronId: string, label?: string): KoppelingVoorBron;
|
|
12
|
+
//# sourceMappingURL=useKoppelingVoorBron.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKoppelingVoorBron.d.ts","sourceRoot":"","sources":["../../src/hooks/useKoppelingVoorBron.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,MAAM,GACb,iBAAiB,CAmDnB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Koppeling bron → printplek, volledig via @flowselections/layout-maker.
|
|
2
|
+
// Niets hardcoded: plekken, koppelingen en namen komen uit de Layout maker.
|
|
3
|
+
import { useCallback, useEffect, useState } from "react";
|
|
4
|
+
import { koppelBronAanPrintplek, ontkoppelBron, printplekVoorBron, useBeschikbarePrintplekken, } from "@flowselections/layout-maker";
|
|
5
|
+
export function useKoppelingVoorBron(bron, bronId, label) {
|
|
6
|
+
const { plekken, laden: plekkenLaden } = useBeschikbarePrintplekken();
|
|
7
|
+
const safePlekken = Array.isArray(plekken) ? plekken : [];
|
|
8
|
+
const [printplekId, setPrintplekId] = useState(null);
|
|
9
|
+
const [laden, setLaden] = useState(true);
|
|
10
|
+
const herlaad = useCallback(async () => {
|
|
11
|
+
if (!bronId) {
|
|
12
|
+
setPrintplekId(null);
|
|
13
|
+
setLaden(false);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
setLaden(true);
|
|
17
|
+
try {
|
|
18
|
+
setPrintplekId(await printplekVoorBron(bron, bronId));
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
setPrintplekId(null);
|
|
22
|
+
}
|
|
23
|
+
finally {
|
|
24
|
+
setLaden(false);
|
|
25
|
+
}
|
|
26
|
+
}, [bron, bronId]);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
void herlaad();
|
|
29
|
+
}, [herlaad]);
|
|
30
|
+
const koppel = useCallback(async (nieuwId) => {
|
|
31
|
+
await koppelBronAanPrintplek(nieuwId, bron, bronId, label);
|
|
32
|
+
await herlaad();
|
|
33
|
+
}, [bron, bronId, label, herlaad]);
|
|
34
|
+
const ontkoppel = useCallback(async () => {
|
|
35
|
+
await ontkoppelBron(bron, bronId);
|
|
36
|
+
await herlaad();
|
|
37
|
+
}, [bron, bronId, herlaad]);
|
|
38
|
+
const printplekNaam = safePlekken.find((p) => p.id === printplekId)?.naam ?? null;
|
|
39
|
+
return {
|
|
40
|
+
plekken: safePlekken,
|
|
41
|
+
printplekId,
|
|
42
|
+
printplekNaam,
|
|
43
|
+
gekoppeld: Boolean(printplekId),
|
|
44
|
+
laden: laden || plekkenLaden,
|
|
45
|
+
koppel,
|
|
46
|
+
ontkoppel,
|
|
47
|
+
};
|
|
48
|
+
}
|
package/dist-lib/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './lib/pickApi';
|
|
|
7
7
|
export * from './lib/logisticsTypes';
|
|
8
8
|
export * from './lib/logisticsApi';
|
|
9
9
|
export * from './hooks/usePickConfig';
|
|
10
|
+
export * from './hooks/useKoppelingVoorBron';
|
|
10
11
|
export * from './hooks/usePickQueue';
|
|
11
12
|
export { LanguageTiles } from './components/pick/LanguageTiles';
|
|
12
13
|
export * from './lib/pickI18n';
|
package/dist-lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAOpE,eAAO,MAAM,kBAAkB,EAAE,UAYhC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAOpE,eAAO,MAAM,kBAAkB,EAAE,UAYhC,CAAC"}
|
package/dist-lib/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export * from './lib/pickApi';
|
|
|
22
22
|
export * from './lib/logisticsTypes';
|
|
23
23
|
export * from './lib/logisticsApi';
|
|
24
24
|
export * from './hooks/usePickConfig';
|
|
25
|
+
export * from './hooks/useKoppelingVoorBron';
|
|
25
26
|
export * from './hooks/usePickQueue';
|
|
26
27
|
export { LanguageTiles } from './components/pick/LanguageTiles';
|
|
27
28
|
export * from './lib/pickI18n';
|
|
@@ -9262,6 +9262,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
9262
9262
|
last_error_at: string | null;
|
|
9263
9263
|
last_error_code: string | null;
|
|
9264
9264
|
last_gateway_status: number | null;
|
|
9265
|
+
last_queued_at: string | null;
|
|
9265
9266
|
last_response: import("./types").Json | null;
|
|
9266
9267
|
last_sent_hash: string | null;
|
|
9267
9268
|
locked_by: string | null;
|
|
@@ -9285,6 +9286,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
9285
9286
|
last_error_at?: string | null;
|
|
9286
9287
|
last_error_code?: string | null;
|
|
9287
9288
|
last_gateway_status?: number | null;
|
|
9289
|
+
last_queued_at?: string | null;
|
|
9288
9290
|
last_response?: import("./types").Json | null;
|
|
9289
9291
|
last_sent_hash?: string | null;
|
|
9290
9292
|
locked_by?: string | null;
|
|
@@ -9308,6 +9310,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
9308
9310
|
last_error_at?: string | null;
|
|
9309
9311
|
last_error_code?: string | null;
|
|
9310
9312
|
last_gateway_status?: number | null;
|
|
9313
|
+
last_queued_at?: string | null;
|
|
9311
9314
|
last_response?: import("./types").Json | null;
|
|
9312
9315
|
last_sent_hash?: string | null;
|
|
9313
9316
|
locked_by?: string | null;
|
|
@@ -15725,6 +15728,45 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
15725
15728
|
};
|
|
15726
15729
|
Relationships: [];
|
|
15727
15730
|
};
|
|
15731
|
+
stock_consumption_alerts: {
|
|
15732
|
+
Row: {
|
|
15733
|
+
alert_type: string;
|
|
15734
|
+
created_at: string;
|
|
15735
|
+
id: string;
|
|
15736
|
+
mutation_log_id: string | null;
|
|
15737
|
+
order_id: string | null;
|
|
15738
|
+
order_item_id: string | null;
|
|
15739
|
+
qty: number;
|
|
15740
|
+
reason: string | null;
|
|
15741
|
+
resolved_at: string | null;
|
|
15742
|
+
updated_at: string;
|
|
15743
|
+
};
|
|
15744
|
+
Insert: {
|
|
15745
|
+
alert_type: string;
|
|
15746
|
+
created_at?: string;
|
|
15747
|
+
id?: string;
|
|
15748
|
+
mutation_log_id?: string | null;
|
|
15749
|
+
order_id?: string | null;
|
|
15750
|
+
order_item_id?: string | null;
|
|
15751
|
+
qty?: number;
|
|
15752
|
+
reason?: string | null;
|
|
15753
|
+
resolved_at?: string | null;
|
|
15754
|
+
updated_at?: string;
|
|
15755
|
+
};
|
|
15756
|
+
Update: {
|
|
15757
|
+
alert_type?: string;
|
|
15758
|
+
created_at?: string;
|
|
15759
|
+
id?: string;
|
|
15760
|
+
mutation_log_id?: string | null;
|
|
15761
|
+
order_id?: string | null;
|
|
15762
|
+
order_item_id?: string | null;
|
|
15763
|
+
qty?: number;
|
|
15764
|
+
reason?: string | null;
|
|
15765
|
+
resolved_at?: string | null;
|
|
15766
|
+
updated_at?: string;
|
|
15767
|
+
};
|
|
15768
|
+
Relationships: [];
|
|
15769
|
+
};
|
|
15728
15770
|
stock_import_runs: {
|
|
15729
15771
|
Row: {
|
|
15730
15772
|
connection_id: string | null;
|
|
@@ -21319,6 +21361,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
21319
21361
|
};
|
|
21320
21362
|
Returns: string;
|
|
21321
21363
|
};
|
|
21364
|
+
logistics_floriday_finish_push_v3: {
|
|
21365
|
+
Args: {
|
|
21366
|
+
_error?: string;
|
|
21367
|
+
_error_code?: string;
|
|
21368
|
+
_fulfillment_order_id?: string;
|
|
21369
|
+
_gateway_status?: number;
|
|
21370
|
+
_id: string;
|
|
21371
|
+
_max_age_hours?: number;
|
|
21372
|
+
_max_attempts?: number;
|
|
21373
|
+
_outcome: string;
|
|
21374
|
+
_permanent?: boolean;
|
|
21375
|
+
_response?: import("./types").Json;
|
|
21376
|
+
_revision: number;
|
|
21377
|
+
_sent_hash?: string;
|
|
21378
|
+
_wait_max_age_hours?: number;
|
|
21379
|
+
};
|
|
21380
|
+
Returns: string;
|
|
21381
|
+
};
|
|
21322
21382
|
logistics_floriday_prune_pushes: {
|
|
21323
21383
|
Args: {
|
|
21324
21384
|
_days?: number;
|
|
@@ -21379,6 +21439,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
21379
21439
|
};
|
|
21380
21440
|
Returns: import("./types").Json;
|
|
21381
21441
|
};
|
|
21442
|
+
logistics_plan_block: {
|
|
21443
|
+
Args: {
|
|
21444
|
+
p_details?: import("./types").Json;
|
|
21445
|
+
p_order_ids: string[];
|
|
21446
|
+
p_reason: string;
|
|
21447
|
+
};
|
|
21448
|
+
Returns: number;
|
|
21449
|
+
};
|
|
21382
21450
|
logistics_plan_buffer_sql: {
|
|
21383
21451
|
Args: {
|
|
21384
21452
|
p_buffer_id: string;
|
|
@@ -21747,6 +21815,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
21747
21815
|
verwijderd: number;
|
|
21748
21816
|
}[];
|
|
21749
21817
|
};
|
|
21818
|
+
order_departure_proof: {
|
|
21819
|
+
Args: {
|
|
21820
|
+
p_order_id: string;
|
|
21821
|
+
};
|
|
21822
|
+
Returns: import("./types").Json;
|
|
21823
|
+
};
|
|
21750
21824
|
order_number_prefix: {
|
|
21751
21825
|
Args: {
|
|
21752
21826
|
p_custom_fields?: import("./types").Json;
|