@flowselections/pick-schermen-kwekers 1.0.12 → 1.0.14
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 +129 -1
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +129 -1
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +129 -1
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +132 -1
- 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;
|
|
@@ -18578,6 +18620,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
18578
18620
|
werkbon_package_items: {
|
|
18579
18621
|
Row: {
|
|
18580
18622
|
article_number: string | null;
|
|
18623
|
+
artikel_id: string | null;
|
|
18581
18624
|
created_at: string;
|
|
18582
18625
|
gtin: string | null;
|
|
18583
18626
|
id: string;
|
|
@@ -18595,6 +18638,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
18595
18638
|
};
|
|
18596
18639
|
Insert: {
|
|
18597
18640
|
article_number?: string | null;
|
|
18641
|
+
artikel_id?: string | null;
|
|
18598
18642
|
created_at?: string;
|
|
18599
18643
|
gtin?: string | null;
|
|
18600
18644
|
id?: string;
|
|
@@ -18612,6 +18656,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
18612
18656
|
};
|
|
18613
18657
|
Update: {
|
|
18614
18658
|
article_number?: string | null;
|
|
18659
|
+
artikel_id?: string | null;
|
|
18615
18660
|
created_at?: string;
|
|
18616
18661
|
gtin?: string | null;
|
|
18617
18662
|
id?: string;
|
|
@@ -18628,6 +18673,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
18628
18673
|
updated_at?: string;
|
|
18629
18674
|
};
|
|
18630
18675
|
Relationships: [{
|
|
18676
|
+
foreignKeyName: "werkbon_package_items_artikel_id_fkey";
|
|
18677
|
+
columns: ["artikel_id"];
|
|
18678
|
+
isOneToOne: false;
|
|
18679
|
+
referencedRelation: "artikelen_cache";
|
|
18680
|
+
referencedColumns: ["id"];
|
|
18681
|
+
}, {
|
|
18631
18682
|
foreignKeyName: "werkbon_package_items_package_id_fkey";
|
|
18632
18683
|
columns: ["package_id"];
|
|
18633
18684
|
isOneToOne: false;
|
|
@@ -19850,6 +19901,20 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
19850
19901
|
referencedColumns: ["id"];
|
|
19851
19902
|
}];
|
|
19852
19903
|
};
|
|
19904
|
+
v_werkbon_totalen: {
|
|
19905
|
+
Row: {
|
|
19906
|
+
packages_cents: number | null;
|
|
19907
|
+
packages_minutes: number | null;
|
|
19908
|
+
werkbon_id: string | null;
|
|
19909
|
+
};
|
|
19910
|
+
Relationships: [{
|
|
19911
|
+
foreignKeyName: "werkbon_package_lines_werkbon_id_fkey";
|
|
19912
|
+
columns: ["werkbon_id"];
|
|
19913
|
+
isOneToOne: false;
|
|
19914
|
+
referencedRelation: "werkbonnen";
|
|
19915
|
+
referencedColumns: ["id"];
|
|
19916
|
+
}];
|
|
19917
|
+
};
|
|
19853
19918
|
};
|
|
19854
19919
|
Functions: {
|
|
19855
19920
|
_floriday_schedule_job: {
|
|
@@ -21319,6 +21384,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
21319
21384
|
};
|
|
21320
21385
|
Returns: string;
|
|
21321
21386
|
};
|
|
21387
|
+
logistics_floriday_finish_push_v3: {
|
|
21388
|
+
Args: {
|
|
21389
|
+
_error?: string;
|
|
21390
|
+
_error_code?: string;
|
|
21391
|
+
_fulfillment_order_id?: string;
|
|
21392
|
+
_gateway_status?: number;
|
|
21393
|
+
_id: string;
|
|
21394
|
+
_max_age_hours?: number;
|
|
21395
|
+
_max_attempts?: number;
|
|
21396
|
+
_outcome: string;
|
|
21397
|
+
_permanent?: boolean;
|
|
21398
|
+
_response?: import("./types").Json;
|
|
21399
|
+
_revision: number;
|
|
21400
|
+
_sent_hash?: string;
|
|
21401
|
+
_wait_max_age_hours?: number;
|
|
21402
|
+
};
|
|
21403
|
+
Returns: string;
|
|
21404
|
+
};
|
|
21322
21405
|
logistics_floriday_prune_pushes: {
|
|
21323
21406
|
Args: {
|
|
21324
21407
|
_days?: number;
|
|
@@ -21379,6 +21462,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
21379
21462
|
};
|
|
21380
21463
|
Returns: import("./types").Json;
|
|
21381
21464
|
};
|
|
21465
|
+
logistics_plan_block: {
|
|
21466
|
+
Args: {
|
|
21467
|
+
p_details?: import("./types").Json;
|
|
21468
|
+
p_order_ids: string[];
|
|
21469
|
+
p_reason: string;
|
|
21470
|
+
};
|
|
21471
|
+
Returns: number;
|
|
21472
|
+
};
|
|
21382
21473
|
logistics_plan_buffer_sql: {
|
|
21383
21474
|
Args: {
|
|
21384
21475
|
p_buffer_id: string;
|
|
@@ -21747,6 +21838,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
21747
21838
|
verwijderd: number;
|
|
21748
21839
|
}[];
|
|
21749
21840
|
};
|
|
21841
|
+
order_departure_proof: {
|
|
21842
|
+
Args: {
|
|
21843
|
+
p_order_id: string;
|
|
21844
|
+
};
|
|
21845
|
+
Returns: import("./types").Json;
|
|
21846
|
+
};
|
|
21750
21847
|
order_number_prefix: {
|
|
21751
21848
|
Args: {
|
|
21752
21849
|
p_custom_fields?: import("./types").Json;
|
|
@@ -21754,6 +21851,25 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
21754
21851
|
};
|
|
21755
21852
|
Returns: string;
|
|
21756
21853
|
};
|
|
21854
|
+
pakket_suggesties_voor_tekst: {
|
|
21855
|
+
Args: {
|
|
21856
|
+
_tekst: string;
|
|
21857
|
+
};
|
|
21858
|
+
Returns: {
|
|
21859
|
+
hit_type: string;
|
|
21860
|
+
package_id: string;
|
|
21861
|
+
priority: number;
|
|
21862
|
+
}[];
|
|
21863
|
+
};
|
|
21864
|
+
pakket_voor_reistijd: {
|
|
21865
|
+
Args: {
|
|
21866
|
+
_minuten: number;
|
|
21867
|
+
};
|
|
21868
|
+
Returns: {
|
|
21869
|
+
package_id: string;
|
|
21870
|
+
priority: number;
|
|
21871
|
+
}[];
|
|
21872
|
+
};
|
|
21757
21873
|
pick_active_printers: {
|
|
21758
21874
|
Args: never;
|
|
21759
21875
|
Returns: {
|
|
@@ -22804,6 +22920,18 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
22804
22920
|
Args: never;
|
|
22805
22921
|
Returns: string;
|
|
22806
22922
|
};
|
|
22923
|
+
werkbon_totalen: {
|
|
22924
|
+
Args: {
|
|
22925
|
+
_werkbon_id: string;
|
|
22926
|
+
};
|
|
22927
|
+
Returns: {
|
|
22928
|
+
materials_cents: number;
|
|
22929
|
+
packages_cents: number;
|
|
22930
|
+
packages_minutes: number;
|
|
22931
|
+
total_cents: number;
|
|
22932
|
+
total_minutes: number;
|
|
22933
|
+
}[];
|
|
22934
|
+
};
|
|
22807
22935
|
wo_create_from_source: {
|
|
22808
22936
|
Args: {
|
|
22809
22937
|
_payload?: import("./types").Json;
|
|
@@ -22842,7 +22970,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
22842
22970
|
};
|
|
22843
22971
|
CompositeTypes: { [_ in never]: never; };
|
|
22844
22972
|
}, {
|
|
22845
|
-
PostgrestVersion: "14.
|
|
22973
|
+
PostgrestVersion: "14.17";
|
|
22846
22974
|
}>;
|
|
22847
22975
|
userId: string;
|
|
22848
22976
|
claims: import("@supabase/auth-js").JwtPayload;
|