@flowselections/floriday-voorraad 1.0.152 → 1.0.155

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 (86) hide show
  1. package/dist-lib/components/fs-ui/DataTable.d.ts.map +1 -1
  2. package/dist-lib/components/fs-ui/DataTable.js +8 -8
  3. package/dist-lib/components/fs-ui/FilterChips.d.ts +1 -1
  4. package/dist-lib/components/fs-ui/FilterChips.d.ts.map +1 -1
  5. package/dist-lib/components/fs-ui/FilterChips.js +3 -3
  6. package/dist-lib/components/fs-ui/FilterPanel.d.ts +19 -0
  7. package/dist-lib/components/fs-ui/FilterPanel.d.ts.map +1 -0
  8. package/dist-lib/components/fs-ui/FilterPanel.js +10 -0
  9. package/dist-lib/components/fs-ui/FiltersButton.d.ts +6 -0
  10. package/dist-lib/components/fs-ui/FiltersButton.d.ts.map +1 -0
  11. package/dist-lib/components/fs-ui/FiltersButton.js +7 -0
  12. package/dist-lib/components/fs-ui/HeaderButton.d.ts +16 -0
  13. package/dist-lib/components/fs-ui/HeaderButton.d.ts.map +1 -0
  14. package/dist-lib/components/fs-ui/HeaderButton.js +10 -0
  15. package/dist-lib/components/fs-ui/KpiRow.d.ts +2 -2
  16. package/dist-lib/components/fs-ui/KpiRow.js +3 -3
  17. package/dist-lib/components/fs-ui/NoticeBar.d.ts +10 -0
  18. package/dist-lib/components/fs-ui/NoticeBar.d.ts.map +1 -0
  19. package/dist-lib/components/fs-ui/NoticeBar.js +16 -0
  20. package/dist-lib/components/fs-ui/PageHeader.d.ts +6 -5
  21. package/dist-lib/components/fs-ui/PageHeader.d.ts.map +1 -1
  22. package/dist-lib/components/fs-ui/PageHeader.js +4 -3
  23. package/dist-lib/components/fs-ui/Pagination.d.ts +10 -0
  24. package/dist-lib/components/fs-ui/Pagination.d.ts.map +1 -0
  25. package/dist-lib/components/fs-ui/Pagination.js +10 -0
  26. package/dist-lib/components/fs-ui/PillTabs.d.ts +3 -5
  27. package/dist-lib/components/fs-ui/PillTabs.d.ts.map +1 -1
  28. package/dist-lib/components/fs-ui/PillTabs.js +25 -15
  29. package/dist-lib/components/fs-ui/RowMenu.d.ts +13 -0
  30. package/dist-lib/components/fs-ui/RowMenu.d.ts.map +1 -0
  31. package/dist-lib/components/fs-ui/RowMenu.js +7 -0
  32. package/dist-lib/components/fs-ui/SearchInput.d.ts +1 -4
  33. package/dist-lib/components/fs-ui/SearchInput.d.ts.map +1 -1
  34. package/dist-lib/components/fs-ui/SearchInput.js +23 -19
  35. package/dist-lib/components/fs-ui/ShortcutHelp.d.ts +8 -0
  36. package/dist-lib/components/fs-ui/ShortcutHelp.d.ts.map +1 -0
  37. package/dist-lib/components/fs-ui/ShortcutHelp.js +6 -0
  38. package/dist-lib/components/fs-ui/Toolbar.d.ts +7 -3
  39. package/dist-lib/components/fs-ui/Toolbar.d.ts.map +1 -1
  40. package/dist-lib/components/fs-ui/Toolbar.js +6 -3
  41. package/dist-lib/components/fs-ui/UpdatedAt.d.ts +6 -2
  42. package/dist-lib/components/fs-ui/UpdatedAt.d.ts.map +1 -1
  43. package/dist-lib/components/fs-ui/UpdatedAt.js +16 -8
  44. package/dist-lib/components/voorraad/FloridayConnectionNotice.d.ts +2 -1
  45. package/dist-lib/components/voorraad/FloridayConnectionNotice.d.ts.map +1 -1
  46. package/dist-lib/components/voorraad/FloridayConnectionNotice.js +9 -4
  47. package/dist-lib/components/voorraad/FustenPage.d.ts.map +1 -1
  48. package/dist-lib/components/voorraad/FustenPage.js +90 -26
  49. package/dist-lib/components/voorraad/OrderHistoryCard.d.ts +3 -1
  50. package/dist-lib/components/voorraad/OrderHistoryCard.d.ts.map +1 -1
  51. package/dist-lib/components/voorraad/OrderHistoryCard.js +26 -50
  52. package/dist-lib/components/voorraad/PublicatiesPage.d.ts.map +1 -1
  53. package/dist-lib/components/voorraad/PublicatiesPage.js +41 -36
  54. package/dist-lib/components/voorraad/Sneltoetsen.d.ts +1 -1
  55. package/dist-lib/components/voorraad/Sneltoetsen.d.ts.map +1 -1
  56. package/dist-lib/components/voorraad/Sneltoetsen.js +12 -13
  57. package/dist-lib/components/voorraad/StockIntegrityAlert.d.ts +42 -1
  58. package/dist-lib/components/voorraad/StockIntegrityAlert.d.ts.map +1 -1
  59. package/dist-lib/components/voorraad/StockIntegrityAlert.js +30 -6
  60. package/dist-lib/components/voorraad/StockMutationHistoryCard.d.ts.map +1 -1
  61. package/dist-lib/components/voorraad/StockMutationHistoryCard.js +10 -46
  62. package/dist-lib/components/voorraad/ValidationOverviewTable.d.ts.map +1 -1
  63. package/dist-lib/components/voorraad/ValidationOverviewTable.js +7 -38
  64. package/dist-lib/components/voorraad/ValidationPage.d.ts.map +1 -1
  65. package/dist-lib/components/voorraad/ValidationPage.js +3 -3
  66. package/dist-lib/components/voorraad/VoorraadPage.d.ts.map +1 -1
  67. package/dist-lib/components/voorraad/VoorraadPage.js +28 -10
  68. package/dist-lib/components/voorraad/artikel/ArtikelPagina.d.ts.map +1 -1
  69. package/dist-lib/components/voorraad/artikel/ArtikelPagina.js +16 -3
  70. package/dist-lib/components/voorraad/lijst/ImporteerKnop.d.ts.map +1 -1
  71. package/dist-lib/components/voorraad/lijst/ImporteerKnop.js +1 -1
  72. package/dist-lib/components/voorraad/lijst/LijstExportKnop.d.ts.map +1 -1
  73. package/dist-lib/components/voorraad/lijst/LijstExportKnop.js +1 -1
  74. package/dist-lib/components/voorraad/lijst/VoorraadLijstTabel.js +10 -10
  75. package/dist-lib/integrations/supabase/types.d.ts +102 -0
  76. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  77. package/dist-lib/lib/labels.d.ts +42 -0
  78. package/dist-lib/lib/labels.d.ts.map +1 -0
  79. package/dist-lib/lib/labels.js +152 -0
  80. package/dist-lib/lib/notatie.d.ts +4 -0
  81. package/dist-lib/lib/notatie.d.ts.map +1 -0
  82. package/dist-lib/lib/notatie.js +18 -0
  83. package/dist-lib/lib/voorraad-lijst.d.ts +4 -1
  84. package/dist-lib/lib/voorraad-lijst.d.ts.map +1 -1
  85. package/dist-lib/lib/voorraad-lijst.js +16 -5
  86. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { lazy, Suspense, useCallback, useEffect, useMemo, useRef, useState } from "react";
3
- import { Link, useBlocker } from "@tanstack/react-router";
3
+ import { Link, useBlocker, useRouterState } from "@tanstack/react-router";
4
+ import { datum } from "../../../lib/notatie.js";
4
5
  import { Button, Card, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, Input, Label, Skeleton, Tabs, TabsContent, toast, } from "@flowselections/core";
5
6
  import { AlertTriangle, Archive, ArchiveRestore, ArrowDownToLine, ArrowLeft, Boxes, Layers, Link2, Loader2, Lock, MoreHorizontal, Minus, Package, Send, SlidersHorizontal } from "lucide-react";
6
7
  import { supabase } from "../../../integrations/supabase/client.js";
@@ -298,6 +299,18 @@ export function ArtikelPagina({ id, resumeJobId, onNietGevonden }) {
298
299
  toast.success("Artikel staat weer in de voorraad.");
299
300
  await laad();
300
301
  }
302
+ // Vanaf de controlepagina: open het overzicht vooraf (er wordt niets verstuurd zonder bevestiging).
303
+ const vraagOverzicht = useRouterState({ select: (st) => Boolean(st.location.state?.stuurOverzicht) });
304
+ const overzichtGeopend = useRef(false);
305
+ useEffect(() => {
306
+ if (!vraagOverzicht || overzichtGeopend.current || !detail)
307
+ return;
308
+ overzichtGeopend.current = true;
309
+ if (floridayActie(detail)) {
310
+ setFloridayOpen(true);
311
+ setTab("floriday");
312
+ }
313
+ }, [vraagOverzicht, detail]); // eslint-disable-line react-hooks/exhaustive-deps
301
314
  if (fout) {
302
315
  return (_jsxs("main", { className: "flex flex-col gap-4 p-4 pb-24 sm:p-6 sm:pb-24", children: [_jsxs(Link, { to: "/voorraad", className: "inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground", children: [_jsx(ArrowLeft, { className: "h-4 w-4" }), " Voorraad"] }), _jsx(InlineAlert, { tone: "fout", action: _jsx(Button, { size: "sm", variant: "outline", onClick: () => { setFout(null); geladen.current = false; void laad(); }, children: "Opnieuw proberen" }), children: fout })] }));
303
316
  }
@@ -313,9 +326,9 @@ export function ArtikelPagina({ id, resumeJobId, onNietGevonden }) {
313
326
  const rij = alsLijstRij(detail);
314
327
  const opslaanUit = !vuil || opslaan || Boolean(prijsFout) || Boolean(aantalFout);
315
328
  const gearchiveerd = Boolean(detail.gearchiveerd_at);
316
- return (_jsxs("main", { className: "flex flex-col gap-4 p-4 pb-24 sm:p-6 sm:pb-24", children: [_jsx(PageHeader, { crumb: _jsxs(Link, { to: "/voorraad", className: "inline-flex items-center gap-1 hover:text-foreground", children: [_jsx(ArrowLeft, { className: "h-4 w-4" }), " Voorraad"] }), media: _jsx("div", { className: "flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-xl border border-border bg-muted", children: detail.foto ? _jsx("img", { src: detail.foto, alt: detail.naam, className: "h-full w-full object-cover" }) : _jsx(Package, { className: "h-7 w-7 text-muted-foreground" }) }), title: detail.naam, updated: _jsx("span", { className: "block break-words", children: detail.artikelnummer ?? "Geen artikelnummer" }), meta: _jsxs(_Fragment, { children: [_jsx(ArtikelStatusIcoon, { status: status }), _jsx("span", { className: status === "ok" ? "text-muted-foreground" : "font-medium", children: info.label }), info.actie && info.tab && tabs.includes(info.tab) && (_jsx("button", { type: "button", className: "text-primary underline-offset-2 hover:underline", onClick: () => setTab(info.tab), children: info.actie })), _jsx("span", { className: "text-muted-foreground", children: "\u00B7" }), _jsxs("span", { className: "tabular-nums", children: [geld(detail.velden.sale_price === null ? null : Number(detail.velden.sale_price)), " per stuk"] }), detail.floriday_id && detail.heeft_koppeling && (_jsx(HoverTip, { label: "Gekoppeld met Floriday", content: "Gekoppeld met Floriday", className: "h-5 w-5 text-muted-foreground [&_svg]:h-3.5 [&_svg]:w-3.5", children: _jsx(Link2, {}) })), vuil && _jsx("span", { className: "inline-flex h-5 items-center rounded-full bg-warning-soft px-2 text-xs text-warning-soft-foreground", children: "Niet opgeslagen" })] }), actions: _jsxs(_Fragment, { children: [_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "outline", size: "sm", className: "h-9", "aria-label": "Meer acties", children: [_jsx(MoreHorizontal, { className: "h-4 w-4 sm:mr-2" }), _jsx("span", { className: "hidden sm:inline", children: "Meer" })] }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-56", children: [_jsxs(DropdownMenuItem, { disabled: gearchiveerd, onSelect: () => setAanpassen(true), children: [_jsx(SlidersHorizontal, { className: "mr-2 h-4 w-4" }), "Voorraad aanpassen"] }), _jsxs(DropdownMenuItem, { disabled: gearchiveerd, onSelect: () => setAfboeken(true), children: [_jsx(Minus, { className: "mr-2 h-4 w-4" }), "Afboeken"] }), actie && (_jsxs(_Fragment, { children: [_jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { onSelect: () => { setFloridayOpen(true); setTab("floriday"); }, children: [_jsx(Send, { className: "mr-2 h-4 w-4" }), actie === "sturen" ? "Naar Floriday sturen" : "Op Floriday zetten"] })] })), _jsx(DropdownMenuSeparator, {}), gearchiveerd
329
+ return (_jsxs("main", { className: "flex w-full min-w-0 flex-col gap-4 overflow-x-clip p-4 pb-[calc(7rem+env(safe-area-inset-bottom))] sm:p-6 sm:pb-24", children: [_jsx(PageHeader, { crumb: _jsxs(Link, { to: "/voorraad", className: "inline-flex items-center gap-1 hover:text-foreground", children: [_jsx(ArrowLeft, { className: "h-4 w-4" }), " Voorraad"] }), media: _jsx("div", { className: "flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-xl border border-border bg-muted", children: detail.foto ? _jsx("img", { src: detail.foto, alt: detail.naam, className: "h-full w-full object-cover" }) : _jsx(Package, { className: "h-7 w-7 text-muted-foreground" }) }), title: detail.naam, updated: _jsx("span", { className: "block break-words", children: detail.artikelnummer ?? "Geen artikelnummer" }), meta: _jsxs(_Fragment, { children: [_jsx(ArtikelStatusIcoon, { status: status }), _jsx("span", { className: status === "ok" ? "text-muted-foreground" : "font-medium", children: info.label }), info.actie && info.tab && tabs.includes(info.tab) && (_jsx("button", { type: "button", className: "text-primary underline-offset-2 hover:underline", onClick: () => setTab(info.tab), children: info.actie })), _jsx("span", { className: "text-muted-foreground", children: "\u00B7" }), _jsxs("span", { className: "tabular-nums", children: [geld(detail.velden.sale_price === null ? null : Number(detail.velden.sale_price)), " per stuk"] }), detail.floriday_id && detail.heeft_koppeling && (_jsx(HoverTip, { label: "Gekoppeld met Floriday", content: "Gekoppeld met Floriday", className: "h-5 w-5 text-muted-foreground [&_svg]:h-3.5 [&_svg]:w-3.5", children: _jsx(Link2, {}) })), vuil && _jsx("span", { className: "text-xs font-medium text-warning", children: "Niet opgeslagen" })] }), actions: _jsxs(_Fragment, { children: [_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "outline", size: "sm", className: "h-10 w-10 p-0 sm:h-9 sm:w-auto sm:px-3", "aria-label": "Meer acties", children: [_jsx(MoreHorizontal, { className: "h-4 w-4 sm:mr-2" }), _jsx("span", { className: "hidden sm:inline", children: "Meer" })] }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-56", children: [_jsxs(DropdownMenuItem, { disabled: gearchiveerd, onSelect: () => setAanpassen(true), children: [_jsx(SlidersHorizontal, { className: "mr-2 h-4 w-4" }), "Voorraad aanpassen"] }), _jsxs(DropdownMenuItem, { disabled: gearchiveerd, onSelect: () => setAfboeken(true), children: [_jsx(Minus, { className: "mr-2 h-4 w-4" }), "Afboeken"] }), actie && (_jsxs(_Fragment, { children: [_jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { onSelect: () => { setFloridayOpen(true); setTab("floriday"); }, children: [_jsx(Send, { className: "mr-2 h-4 w-4" }), actie === "sturen" ? "Naar Floriday sturen" : "Op Floriday zetten"] })] })), _jsx(DropdownMenuSeparator, {}), gearchiveerd
317
330
  ? _jsxs(DropdownMenuItem, { onSelect: terugzetten, children: [_jsx(ArchiveRestore, { className: "mr-2 h-4 w-4" }), "Terugzetten in voorraad"] })
318
- : _jsxs(DropdownMenuItem, { onSelect: () => { setArchiefKeuze("hier"); setArchief({}); }, children: [_jsx(Archive, { className: "mr-2 h-4 w-4" }), "Archiveren\u2026"] })] })] }), _jsxs(Button, { size: "sm", className: "hidden h-9 md:inline-flex", onClick: doeOpslaan, disabled: opslaanUit, children: [opslaan && _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), "Opslaan"] })] }) }), _jsxs(KpiRow, { children: [_jsx(KpiTile, { title: "Liggend", icon: _jsx(Package, {}), value: aantal(detail.liggend), sub: _jsxs(_Fragment, { children: ["Telmoment ", detail.telmoment ? new Date(detail.telmoment).toLocaleDateString("nl-NL") : _jsx("span", { className: "text-destructive", children: "ontbreekt" })] }) }), _jsx(KpiTile, { title: "Gereserveerd", icon: _jsx(Lock, {}), value: aantal(detail.gereserveerd), sub: "Voor open orders" }), _jsx(KpiTile, { title: "Vrij beschikbaar", icon: _jsx(Layers, {}), tone: rij.onder_minimum ? "warning" : "default", value: _jsx("span", { className: rij.onder_minimum ? "text-destructive" : "", children: aantal(detail.vrij) }), sub: detail.minimum > 0 ? (rij.onder_minimum ? _jsxs("span", { className: "text-destructive", children: ["Onder minimum (", aantal(detail.minimum), ")"] }) : `Minimum ${aantal(detail.minimum)}`) : "Geen minimum" }), _jsx(KpiTile, { title: "Inkomend", icon: _jsx(ArrowDownToLine, {}), value: aantal(detail.inkomend), sub: "Stuks verwacht" })] }), gearchiveerd && (detail.orders_gearchiveerd ?? 0) > 0 && (_jsxs(InlineAlert, { tone: "let_op", action: _jsx(Button, { size: "sm", variant: "outline", className: "h-8", onClick: terugzetten, children: "Terugzetten in voorraad" }), children: ["Dit artikel is gearchiveerd, maar er ", detail.orders_gearchiveerd === 1 ? "is 1 open orderregel" : `zijn ${detail.orders_gearchiveerd} open orderregels`, " binnengekomen. De orders zijn gewoon gekoppeld."] })), _jsx(OpslaanContext.Provider, { value: register, children: _jsxs(Tabs, { value: tab, onValueChange: setTab, children: [_jsx(PillTabs, { tabs: tabs.map((t) => ({ value: t, label: TAB_LABEL[t], icon: TAB_ICON[t] })), value: tab, onChange: setTab, label: "Onderdelen van het artikel" }), _jsxs(TabsContent, { value: "voorraad", forceMount: bezocht.has("voorraad") ? true : undefined, className: "mt-4 space-y-4 data-[state=inactive]:hidden", children: [_jsxs(Card, { className: "space-y-4 rounded-xl p-4 shadow-sm sm:p-5", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsx("h2", { className: "text-base font-semibold", children: "Artikelgegevens" }), detail.heeft_koppeling && _jsx("span", { className: "text-xs text-muted-foreground", children: "Opslaan bewaart alleen in je eigen administratie. Naar Floriday sturen doe je apart." })] }), _jsx("div", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-5", children: ARTIKEL_VELDEN.map((k) => (_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: `veld-${k}`, children: VELD_LABEL[k] }), _jsx(Input, { id: `veld-${k}`, className: "h-10 rounded-lg text-base sm:h-9 sm:text-sm", value: invoer[k] ?? "", inputMode: k === "sale_price" ? "decimal" : undefined, onChange: (e) => setInvoer((s) => ({ ...s, [k]: e.target.value })) }), k === "sale_price" && prijsFout && _jsx("p", { className: "text-xs text-destructive", children: prijsFout })] }, k))) })] }), _jsxs(Card, { className: "space-y-4 rounded-xl p-4 shadow-sm sm:p-5", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-base font-semibold", children: "Voorraad" }), _jsxs("p", { className: "text-xs text-muted-foreground", children: ["Liggend wijzig je met Aanpassen of Afboeken \u00B7 Telmoment ", detail.telmoment ? new Date(detail.telmoment).toLocaleString("nl-NL") : _jsx("span", { className: "text-destructive", children: "ontbreekt" })] })] }), _jsxs("div", { className: "flex gap-2", children: [_jsxs(Button, { variant: "outline", size: "sm", className: "h-9", onClick: () => setAanpassen(true), disabled: gearchiveerd, children: [_jsx(SlidersHorizontal, { className: "mr-2 h-4 w-4" }), "Aanpassen"] }), _jsxs(Button, { variant: "outline", size: "sm", className: "h-9", onClick: () => setAfboeken(true), disabled: gearchiveerd, children: [_jsx(Minus, { className: "mr-2 h-4 w-4" }), "Afboeken"] })] })] }), _jsxs("div", { className: "grid w-full gap-3 sm:grid-cols-3", children: [VOORRAAD_VELDEN.map((k) => (_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: `voorraad-${k}`, children: VOORRAAD_LABEL[k] }), _jsx(Input, { id: `voorraad-${k}`, className: "h-10 rounded-lg text-base sm:h-9 sm:text-sm", value: invoer[k] ?? "", inputMode: k === "notes" ? undefined : "numeric", onChange: (e) => setInvoer((s) => ({ ...s, [k]: e.target.value })) })] }, k))), aantalFout && _jsx("p", { className: "text-xs text-destructive sm:col-span-3", children: aantalFout })] })] }), _jsxs(Suspense, { fallback: _jsx(Laden, {}), children: [_jsx(StockMutationHistoryCard, { tradeItemKey: detail.voorraad_sleutel, productId: detail.id, sleutels: detail.controle?.mutatie_sleutels ?? undefined }), _jsx(OrderHistoryCard, { tradeItemKey: detail.voorraad_sleutel, productName: detail.naam, productId: detail.id, productIds: detail.controle?.zelfde_sleutel_ids }), _jsx(ProductCustomFieldsCard, { productId: detail.id, beginVelden: detail.eigen_velden?.definities, beginWaarden: detail.eigen_velden?.waarden })] })] }), _jsx(TabsContent, { value: "verpakking", forceMount: bezocht.has("verpakking") ? true : undefined, className: "mt-4 space-y-4 data-[state=inactive]:hidden", children: _jsxs(Suspense, { fallback: _jsx(Laden, {}), children: [_jsx(ProductStructureCard, { productId: detail.id }), _jsx(ArtikelCompositionCard, { productId: detail.id, floridayId: detail.floriday_id }), _jsx(TrayStickerCard, { productId: detail.id })] }) }), _jsxs(TabsContent, { value: "koppelingen", className: "mt-4 space-y-4", children: [_jsx(TwijfelKiezen, { productId: detail.id, onGekozen: () => void laad() }), _jsxs(Suspense, { fallback: _jsx(Laden, {}), children: [detail.floriday_id && detail.heeft_koppeling ? (_jsx(FloridayInfoCard, { floridayTradeItemId: detail.floriday_id, local: { name: detail.naam, articleNumber: detail.artikelnummer, gtin: detail.velden.barcode ?? null } })) : detail.heeft_koppeling ? (_jsx(Card, { className: "rounded-xl p-4 text-sm text-muted-foreground shadow-sm", children: detail.floriday_verwijderd_at ? "Dit artikel is in Floriday verwijderd." : "Dit artikel is niet aan Floriday gekoppeld." })) : null, _jsx(ProductLinkCard, { tradeItemKey: detail.voorraad_sleutel, productName: detail.naam })] })] }), tabs.includes("floriday") && (_jsx(TabsContent, { value: "floriday", className: "mt-4", children: _jsx(Suspense, { fallback: _jsx(Laden, {}), children: _jsx(ArtikelWizard, { productId: detail.id, resumeJobId: resumeJobId, embedded: true }) }) }))] }) }), _jsx(MobilePrimaryAction, { onClick: () => void doeOpslaan(), disabled: opslaanUit, children: opslaan ? "Opslaan…" : "Opslaan" }), _jsx(AanpassenDialog, { rij: aanpassen ? rij : null, onClose: () => setAanpassen(false), onDone: () => { setAanpassen(false); void laad(); } }), _jsx(AfboekenDialog, { rij: afboeken ? rij : null, connectionId: null, onClose: () => setAfboeken(false), onDone: () => { setAfboeken(false); void laad(); } }), _jsx(Dialog, { open: Boolean(conflicten && conflicten.length), onOpenChange: (o) => !o && setConflicten(null), children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Iemand anders heeft dit ook gewijzigd" }), _jsx(DialogDescription, { children: "Er is niets opgeslagen. Kies per veld welke waarde blijft." })] }), _jsx("div", { className: "space-y-3", children: (conflicten ?? []).map((c) => (_jsxs("div", { className: "rounded-md border p-3 text-sm space-y-2", children: [_jsx("div", { className: "font-medium", children: VELD_LABEL[c.veld] ?? VOORRAAD_LABEL[c.veld] }), _jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsxs("div", { children: [_jsx("div", { className: "text-xs text-muted-foreground", children: "Jouw wijziging" }), toon(c.jouw)] }), _jsxs("div", { children: [_jsx("div", { className: "text-xs text-muted-foreground", children: "Hun wijziging" }), toon(c.hun)] })] }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Button, { size: "sm", variant: "outline", onClick: () => houdJouw(c), children: "Mijn waarde houden" }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => neemHunOver(c), children: "Hun waarde overnemen" })] })] }, c.veld))) })] }) }), _jsx(Dialog, { open: archief !== null, onOpenChange: (o) => !o && setArchief(null), children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Artikel archiveren" }), _jsx(DialogDescription, { children: "Het artikel wordt nooit verwijderd. Je kunt het later terugzetten." })] }), archief?.waarschuwing && (_jsxs("div", { className: "flex gap-2 rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm", children: [_jsx(AlertTriangle, { className: "h-4 w-4 shrink-0 text-destructive" }), _jsxs("span", { children: ["Let op: er ", archief.waarschuwing.open_orders === 1 ? "is 1 open order" : `zijn ${archief.waarschuwing.open_orders} open orders`, " en ", aantal(archief.waarschuwing.gereserveerd), " gereserveerd. Die blijven bestaan."] })] })), _jsxs("div", { className: "space-y-2 text-sm", children: [_jsxs("label", { className: "flex gap-2 items-start", children: [_jsx("input", { type: "radio", checked: archiefKeuze === "hier", onChange: () => setArchiefKeuze("hier") }), _jsxs("span", { children: [_jsx("strong", { children: detail.floriday_id && detail.heeft_koppeling ? "Alleen hier." : "Archiveren." }), " ", detail.floriday_id && detail.heeft_koppeling && !detail.floriday_verwijderd_at
331
+ : _jsxs(DropdownMenuItem, { onSelect: () => { setArchiefKeuze("hier"); setArchief({}); }, children: [_jsx(Archive, { className: "mr-2 h-4 w-4" }), "Archiveren\u2026"] })] })] }), _jsxs(Button, { size: "sm", className: "hidden sm:inline-flex", onClick: doeOpslaan, disabled: opslaanUit, children: [opslaan && _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), "Opslaan"] })] }) }), gearchiveerd && (detail.orders_gearchiveerd ?? 0) > 0 && (_jsxs(InlineAlert, { tone: "let_op", action: _jsx(Button, { size: "sm", variant: "outline", className: "h-8", onClick: terugzetten, children: "Terugzetten in voorraad" }), children: ["Dit artikel is gearchiveerd, maar er ", detail.orders_gearchiveerd === 1 ? "is 1 open orderregel" : `zijn ${detail.orders_gearchiveerd} open orderregels`, " binnengekomen. De orders zijn gewoon gekoppeld."] })), _jsxs(KpiRow, { children: [_jsx(KpiTile, { title: "Liggend", icon: _jsx(Package, {}), value: aantal(detail.liggend), sub: _jsxs(_Fragment, { children: ["Telmoment ", detail.telmoment ? datum(detail.telmoment) : _jsx("span", { className: "text-destructive", children: "ontbreekt" })] }) }), _jsx(KpiTile, { title: "Gereserveerd", icon: _jsx(Lock, {}), value: aantal(detail.gereserveerd), sub: "Voor open orders" }), _jsx(KpiTile, { title: "Vrij beschikbaar", icon: _jsx(Layers, {}), tone: rij.onder_minimum ? "warning" : "default", value: _jsx("span", { className: rij.onder_minimum ? "text-destructive" : "", children: aantal(detail.vrij) }), sub: detail.minimum > 0 ? (rij.onder_minimum ? _jsxs("span", { className: "text-destructive", children: ["Onder minimum (", aantal(detail.minimum), ")"] }) : `Minimum ${aantal(detail.minimum)}`) : "Geen minimum" }), _jsx(KpiTile, { title: "Inkomend", icon: _jsx(ArrowDownToLine, {}), value: aantal(detail.inkomend), sub: "Stuks verwacht" })] }), _jsx(OpslaanContext.Provider, { value: register, children: _jsxs(Tabs, { value: tab, onValueChange: setTab, children: [_jsx(PillTabs, { tabs: tabs.map((t) => ({ value: t, label: TAB_LABEL[t], icon: TAB_ICON[t] })), value: tab, onChange: setTab, label: "Onderdelen van het artikel" }), _jsxs(TabsContent, { value: "voorraad", forceMount: bezocht.has("voorraad") ? true : undefined, className: "mt-4 space-y-4 data-[state=inactive]:hidden", children: [_jsxs(Card, { className: "space-y-4 rounded-xl p-4 shadow-sm sm:p-5", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsx("h2", { className: "text-base font-semibold", children: "Artikelgegevens" }), detail.heeft_koppeling && _jsx("span", { className: "text-xs text-muted-foreground", children: "Opslaan bewaart alleen in je eigen administratie. Naar Floriday sturen doe je apart." })] }), _jsx("div", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-5", children: ARTIKEL_VELDEN.map((k) => (_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: `veld-${k}`, children: VELD_LABEL[k] }), _jsx(Input, { id: `veld-${k}`, className: "h-10 rounded-lg text-base sm:h-9 sm:text-sm", value: invoer[k] ?? "", inputMode: k === "sale_price" ? "decimal" : undefined, onChange: (e) => setInvoer((s) => ({ ...s, [k]: e.target.value })) }), k === "sale_price" && prijsFout && _jsx("p", { className: "text-xs text-destructive", children: prijsFout })] }, k))) })] }), _jsxs(Card, { className: "space-y-4 rounded-xl p-4 shadow-sm sm:p-5", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-base font-semibold", children: "Voorraad" }), _jsxs("p", { className: "text-xs text-muted-foreground", children: ["Liggend wijzig je met Aanpassen of Afboeken \u00B7 Telmoment ", detail.telmoment ? new Date(detail.telmoment).toLocaleString("nl-NL") : _jsx("span", { className: "text-destructive", children: "ontbreekt" })] })] }), _jsxs("div", { className: "flex gap-2", children: [_jsxs(Button, { variant: "outline", size: "sm", className: "h-9", onClick: () => setAanpassen(true), disabled: gearchiveerd, children: [_jsx(SlidersHorizontal, { className: "mr-2 h-4 w-4" }), "Aanpassen"] }), _jsxs(Button, { variant: "outline", size: "sm", className: "h-9", onClick: () => setAfboeken(true), disabled: gearchiveerd, children: [_jsx(Minus, { className: "mr-2 h-4 w-4" }), "Afboeken"] })] })] }), _jsxs("div", { className: "grid w-full gap-3 sm:grid-cols-3", children: [VOORRAAD_VELDEN.map((k) => (_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: `voorraad-${k}`, children: VOORRAAD_LABEL[k] }), _jsx(Input, { id: `voorraad-${k}`, className: "h-10 rounded-lg text-base sm:h-9 sm:text-sm", value: invoer[k] ?? "", inputMode: k === "notes" ? undefined : "numeric", onChange: (e) => setInvoer((s) => ({ ...s, [k]: e.target.value })) })] }, k))), aantalFout && _jsx("p", { className: "text-xs text-destructive sm:col-span-3", children: aantalFout })] })] }), _jsxs(Suspense, { fallback: _jsx(Laden, {}), children: [_jsx(StockMutationHistoryCard, { tradeItemKey: detail.voorraad_sleutel, productId: detail.id, sleutels: detail.controle?.mutatie_sleutels ?? undefined }), _jsx(OrderHistoryCard, { tradeItemKey: detail.voorraad_sleutel, productName: detail.naam, productId: detail.id, productIds: detail.controle?.zelfde_sleutel_ids }), _jsx(ProductCustomFieldsCard, { productId: detail.id, beginVelden: detail.eigen_velden?.definities, beginWaarden: detail.eigen_velden?.waarden })] })] }), _jsx(TabsContent, { value: "verpakking", forceMount: bezocht.has("verpakking") ? true : undefined, className: "mt-4 space-y-4 data-[state=inactive]:hidden", children: _jsxs(Suspense, { fallback: _jsx(Laden, {}), children: [_jsx(ProductStructureCard, { productId: detail.id }), _jsx(ArtikelCompositionCard, { productId: detail.id, floridayId: detail.floriday_id }), _jsx(TrayStickerCard, { productId: detail.id })] }) }), _jsxs(TabsContent, { value: "koppelingen", className: "mt-4 space-y-4", children: [_jsx(TwijfelKiezen, { productId: detail.id, onGekozen: () => void laad() }), _jsxs(Suspense, { fallback: _jsx(Laden, {}), children: [detail.floriday_id && detail.heeft_koppeling ? (_jsx(FloridayInfoCard, { floridayTradeItemId: detail.floriday_id, local: { name: detail.naam, articleNumber: detail.artikelnummer, gtin: detail.velden.barcode ?? null } })) : detail.heeft_koppeling ? (_jsx(Card, { className: "rounded-xl p-4 text-sm text-muted-foreground shadow-sm", children: detail.floriday_verwijderd_at ? "Dit artikel is in Floriday verwijderd." : "Dit artikel is niet aan Floriday gekoppeld." })) : null, _jsx(ProductLinkCard, { tradeItemKey: detail.voorraad_sleutel, productName: detail.naam })] })] }), tabs.includes("floriday") && (_jsx(TabsContent, { value: "floriday", className: "mt-4", children: _jsx(Suspense, { fallback: _jsx(Laden, {}), children: _jsx(ArtikelWizard, { productId: detail.id, resumeJobId: resumeJobId, embedded: true }) }) }))] }) }), _jsx(MobilePrimaryAction, { onClick: () => void doeOpslaan(), disabled: opslaanUit, children: opslaan ? "Opslaan…" : "Opslaan" }), _jsx(AanpassenDialog, { rij: aanpassen ? rij : null, onClose: () => setAanpassen(false), onDone: () => { setAanpassen(false); void laad(); } }), _jsx(AfboekenDialog, { rij: afboeken ? rij : null, connectionId: null, onClose: () => setAfboeken(false), onDone: () => { setAfboeken(false); void laad(); } }), _jsx(Dialog, { open: Boolean(conflicten && conflicten.length), onOpenChange: (o) => !o && setConflicten(null), children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Iemand anders heeft dit ook gewijzigd" }), _jsx(DialogDescription, { children: "Er is niets opgeslagen. Kies per veld welke waarde blijft." })] }), _jsx("div", { className: "space-y-3", children: (conflicten ?? []).map((c) => (_jsxs("div", { className: "rounded-md border p-3 text-sm space-y-2", children: [_jsx("div", { className: "font-medium", children: VELD_LABEL[c.veld] ?? VOORRAAD_LABEL[c.veld] }), _jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsxs("div", { children: [_jsx("div", { className: "text-xs text-muted-foreground", children: "Jouw wijziging" }), toon(c.jouw)] }), _jsxs("div", { children: [_jsx("div", { className: "text-xs text-muted-foreground", children: "Hun wijziging" }), toon(c.hun)] })] }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Button, { size: "sm", variant: "outline", onClick: () => houdJouw(c), children: "Mijn waarde houden" }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => neemHunOver(c), children: "Hun waarde overnemen" })] })] }, c.veld))) })] }) }), _jsx(Dialog, { open: archief !== null, onOpenChange: (o) => !o && setArchief(null), children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Artikel archiveren" }), _jsx(DialogDescription, { children: "Het artikel wordt nooit verwijderd. Je kunt het later terugzetten." })] }), archief?.waarschuwing && (_jsxs("div", { className: "flex gap-2 rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm", children: [_jsx(AlertTriangle, { className: "h-4 w-4 shrink-0 text-destructive" }), _jsxs("span", { children: ["Let op: er ", archief.waarschuwing.open_orders === 1 ? "is 1 open order" : `zijn ${archief.waarschuwing.open_orders} open orders`, " en ", aantal(archief.waarschuwing.gereserveerd), " gereserveerd. Die blijven bestaan."] })] })), _jsxs("div", { className: "space-y-2 text-sm", children: [_jsxs("label", { className: "flex gap-2 items-start", children: [_jsx("input", { type: "radio", checked: archiefKeuze === "hier", onChange: () => setArchiefKeuze("hier") }), _jsxs("span", { children: [_jsx("strong", { children: detail.floriday_id && detail.heeft_koppeling ? "Alleen hier." : "Archiveren." }), " ", detail.floriday_id && detail.heeft_koppeling && !detail.floriday_verwijderd_at
319
332
  ? "Floriday blijft ongewijzigd: het artikel blijft op Floriday te koop."
320
333
  : "Het artikel verdwijnt uit de voorraadlijst en de tellers."] })] }), detail.floriday_id && detail.heeft_koppeling && !detail.floriday_verwijderd_at && (_jsxs("label", { className: "flex gap-2 items-start", children: [_jsx("input", { type: "radio", checked: archiefKeuze === "floriday", onChange: () => setArchiefKeuze("floriday") }), _jsxs("span", { children: [_jsx("strong", { children: "Ook in Floriday." }), " De voorraad op Floriday wordt 0."] })] })), archiefKeuze === "floriday" && (_jsxs("div", { className: "rounded-md border p-3 space-y-1", children: [_jsx("div", { className: "font-medium", children: "Overzicht vooraf" }), _jsx("div", { children: "Voorraad op Floriday: wordt 0 (niet meer te koop)." }), _jsxs("div", { children: ["Je eigen voorraad blijft ", aantal(detail.liggend), " liggend."] }), _jsx("div", { className: "text-muted-foreground", children: detail.floriday_stuurt
321
334
  ? "Wordt op de gewone manier naar Floriday gestuurd. Staat het versturen naar Floriday stil, dan wacht dit tot het weer aan staat."
@@ -1 +1 @@
1
- {"version":3,"file":"ImporteerKnop.d.ts","sourceRoot":"","sources":["../../../../src/components/voorraad/lijst/ImporteerKnop.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,aAAa,CAAC,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE;IAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,IAAI,CAAA;CAAE,+BAmBlH"}
1
+ {"version":3,"file":"ImporteerKnop.d.ts","sourceRoot":"","sources":["../../../../src/components/voorraad/lijst/ImporteerKnop.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,aAAa,CAAC,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE;IAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,IAAI,CAAA;CAAE,+BAkBlH"}
@@ -16,5 +16,5 @@ function ImportInhoud({ connectionId, onImported }) {
16
16
  }
17
17
  export function ImporteerKnop({ connectionId, onImported }) {
18
18
  const [open, setOpen] = useState(false);
19
- return (_jsxs(_Fragment, { children: [_jsxs(Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [_jsx(Upload, { className: "mr-2 h-4 w-4" }), "Importeren"] }), _jsx(Dialog, { open: open, onOpenChange: setOpen, children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Importeren" }), _jsx(DialogDescription, { children: "Download het sjabloon of kies een bestand. Je krijgt eerst een proefcontrole." })] }), open && _jsx(ImportInhoud, { connectionId: connectionId, onImported: onImported })] }) })] }));
19
+ return (_jsxs(_Fragment, { children: [_jsxs(Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), "aria-label": "Importeren", className: "h-10 w-10 p-0 sm:h-9 sm:w-auto sm:px-3", children: [_jsx(Upload, { className: "h-4 w-4 sm:mr-2" }), " ", _jsx("span", { className: "hidden sm:inline", children: "Importeren" })] }), _jsx(Dialog, { open: open, onOpenChange: setOpen, children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Importeren" }), _jsx(DialogDescription, { children: "Download het sjabloon of kies een bestand. Je krijgt eerst een proefcontrole." })] }), open && _jsx(ImportInhoud, { connectionId: connectionId, onImported: onImported })] }) })] }));
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LijstExportKnop.d.ts","sourceRoot":"","sources":["../../../../src/components/voorraad/lijst/LijstExportKnop.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAGrF,sGAAsG;AACtG,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAA;CAAE,+BAuC3F"}
1
+ {"version":3,"file":"LijstExportKnop.d.ts","sourceRoot":"","sources":["../../../../src/components/voorraad/lijst/LijstExportKnop.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAGrF,sGAAsG;AACtG,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAA;CAAE,+BAsC3F"}
@@ -39,5 +39,5 @@ export function LijstExportKnop({ vraag }) {
39
39
  setBezig(null);
40
40
  }
41
41
  };
42
- return (_jsxs(Button, { variant: "outline", size: "sm", onClick: exporteer, disabled: !!bezig, children: [_jsx(Download, { className: "mr-2 h-4 w-4" }), bezig ?? "Exporteren"] }));
42
+ return (_jsxs(Button, { variant: "outline", size: "sm", onClick: exporteer, disabled: !!bezig, "aria-label": "Exporteren", className: "h-10 w-10 p-0 sm:h-9 sm:w-auto sm:px-3", children: [_jsx(Download, { className: "h-4 w-4 sm:mr-2" }), " ", _jsx("span", { className: "hidden sm:inline", children: bezig ?? "Exporteren" })] }));
43
43
  }
@@ -43,26 +43,26 @@ function Koppeling({ r, heeftKoppeling }) {
43
43
  export function VoorraadLijstTabel({ rijen, loading, sort, oplopend, onSort, kolommen, selected, onToggleSelect, onToggleAll, onAanpassen, onAfboeken, heeftKoppeling = false, leeg, }) {
44
44
  const navigate = useNavigate();
45
45
  const k = (s) => kolommen.has(s);
46
- const getal = (n, extra = "") => _jsx("span", { className: "tabular-nums " + extra, children: aantal(n) });
46
+ const getal = (n, extra = "") => _jsxs("span", { className: "tabular-nums " + extra, children: [aantal(n), " ", _jsx("span", { className: "text-xs font-normal text-muted-foreground", children: "stuks" })] });
47
47
  const kolomDefs = [
48
48
  {
49
- key: "naam", header: "Artikel", width: "34%", sortKey: "naam",
49
+ key: "naam", header: "Artikel", width: "260px", sortKey: "naam",
50
50
  render: (r) => (_jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [_jsx(Foto, { r: r }), _jsxs("div", { className: "min-w-0", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [_jsx("span", { className: "truncate font-medium text-foreground", children: r.naam }), _jsx(Koppeling, { r: r, heeftKoppeling: heeftKoppeling })] }), _jsxs("div", { className: "truncate text-xs text-muted-foreground", children: [r.artikelnummer || "Geen artikelnummer", r.soort === "SET" ? " · Samenstelling" : r.soort === "GROUP" ? " · Productgroep" : ""] })] })] })),
51
51
  },
52
- k("artikelnummer") && { key: "artikelnummer", header: "Artikelnummer", width: "12%", sortKey: "artikelnummer", render: (r) => _jsx("span", { className: "text-muted-foreground", children: r.artikelnummer ?? "—" }) },
53
- { key: "liggend", header: "Liggend", width: "9%", sortKey: "liggend", render: (r) => getal(r.liggend) },
54
- { key: "gereserveerd", header: "Gereserveerd", width: "10%", sortKey: "gereserveerd", render: (r) => getal(r.gereserveerd, "text-muted-foreground") },
52
+ k("artikelnummer") && { key: "artikelnummer", header: "Artikelnummer", width: "132px", sortKey: "artikelnummer", render: (r) => _jsx("span", { className: "text-muted-foreground", children: r.artikelnummer ?? "—" }) },
53
+ { key: "liggend", header: "Liggend", width: "112px", sortKey: "liggend", render: (r) => getal(r.liggend) },
54
+ { key: "gereserveerd", header: "Gereserveerd", width: "120px", sortKey: "gereserveerd", render: (r) => getal(r.gereserveerd, "text-muted-foreground") },
55
55
  {
56
- key: "vrij", header: "Vrij", width: "9%", sortKey: "vrij",
56
+ key: "vrij", header: "Vrij", width: "112px", sortKey: "vrij",
57
57
  render: (r) => {
58
58
  const rood = onderMinimum(r);
59
59
  return rood ? (_jsx(HoverTip, { label: `Onder minimum (${aantal(r.minimum)})`, content: `Onder minimum (${aantal(r.minimum)})`, className: "rounded-sm", children: getal(r.vrij, "font-semibold text-destructive") })) : getal(r.vrij, "font-medium");
60
60
  },
61
61
  },
62
- k("minimum") && { key: "minimum", header: "Minimum", width: "9%", render: (r) => getal(r.minimum, "text-muted-foreground") },
63
- k("inkomend") && { key: "inkomend", header: "Inkomend", width: "9%", sortKey: "inkomend", render: (r) => getal(r.inkomend, "text-muted-foreground") },
64
- k("prijs") && { key: "prijs", header: "Prijs", width: "9%", sortKey: "prijs", render: (r) => _jsx("span", { className: "tabular-nums", children: geld(r.prijs) }) },
65
- { key: "status", header: "Status", width: "7%", render: (r) => _jsx(ArtikelStatusIcoon, { status: r.status }) },
62
+ k("minimum") && { key: "minimum", header: "Minimum", width: "112px", render: (r) => getal(r.minimum, "text-muted-foreground") },
63
+ k("inkomend") && { key: "inkomend", header: "Inkomend", width: "112px", sortKey: "inkomend", render: (r) => getal(r.inkomend, "text-muted-foreground") },
64
+ k("prijs") && { key: "prijs", header: "Prijs", width: "104px", sortKey: "prijs", render: (r) => _jsx("span", { className: "tabular-nums", children: geld(r.prijs) }) },
65
+ { key: "status", header: "Status", width: "76px", render: (r) => _jsx(ArtikelStatusIcoon, { status: r.status }) },
66
66
  ];
67
67
  const columns = kolomDefs.filter(Boolean);
68
68
  const open = (r) => navigate({ to: "/voorraad/$id", params: { id: r.id } });
@@ -33034,6 +33034,12 @@ export type Database = {
33034
33034
  };
33035
33035
  Returns: Json;
33036
33036
  };
33037
+ _mailbox_norm: {
33038
+ Args: {
33039
+ p: string;
33040
+ };
33041
+ Returns: string;
33042
+ };
33037
33043
  _migrate_rewrite_stock_key: {
33038
33044
  Args: {
33039
33045
  _from_key: string;
@@ -33204,6 +33210,25 @@ export type Database = {
33204
33210
  };
33205
33211
  Returns: undefined;
33206
33212
  };
33213
+ aanbiedingsmail_campagnes_lijst: {
33214
+ Args: {
33215
+ p_limit?: number;
33216
+ p_offset?: number;
33217
+ p_status?: string;
33218
+ p_tot?: string;
33219
+ p_van?: string;
33220
+ p_zoek?: string;
33221
+ };
33222
+ Returns: Json;
33223
+ };
33224
+ aanbiedingsmail_campagnes_tellers: {
33225
+ Args: {
33226
+ p_tot?: string;
33227
+ p_van?: string;
33228
+ p_zoek?: string;
33229
+ };
33230
+ Returns: Json;
33231
+ };
33207
33232
  aanbiedingsmail_create_order: {
33208
33233
  Args: {
33209
33234
  p_offer_order_id: string;
@@ -33240,6 +33265,15 @@ export type Database = {
33240
33265
  };
33241
33266
  Returns: Json;
33242
33267
  };
33268
+ aanbiedingsmail_ontvangers_lijst: {
33269
+ Args: {
33270
+ p_campaign_id: string;
33271
+ p_limit?: number;
33272
+ p_offset?: number;
33273
+ p_zoek?: string;
33274
+ };
33275
+ Returns: Json;
33276
+ };
33243
33277
  aanbiedingsmail_place_offer_order: {
33244
33278
  Args: {
33245
33279
  p_code: string;
@@ -33259,6 +33293,12 @@ export type Database = {
33259
33293
  };
33260
33294
  Returns: string;
33261
33295
  };
33296
+ aanbiedingsmail_status_sleutel: {
33297
+ Args: {
33298
+ p_status: string;
33299
+ };
33300
+ Returns: string;
33301
+ };
33262
33302
  aanbiedingsmail_stock_key: {
33263
33303
  Args: {
33264
33304
  p_ref: string;
@@ -35876,6 +35916,19 @@ export type Database = {
35876
35916
  };
35877
35917
  Returns: Json;
35878
35918
  };
35919
+ inkoop_artikelen_page: {
35920
+ Args: {
35921
+ _asc?: boolean;
35922
+ _limit?: number;
35923
+ _location?: string;
35924
+ _offset?: number;
35925
+ _search?: string;
35926
+ _sort?: string;
35927
+ _tab?: string;
35928
+ _unit?: string;
35929
+ };
35930
+ Returns: Json;
35931
+ };
35879
35932
  inkoop_cancel_line: {
35880
35933
  Args: {
35881
35934
  _item_id: string;
@@ -35925,6 +35978,18 @@ export type Database = {
35925
35978
  Args: never;
35926
35979
  Returns: string;
35927
35980
  };
35981
+ inkoop_orders_page: {
35982
+ Args: {
35983
+ _delivery_from?: string;
35984
+ _delivery_to?: string;
35985
+ _limit?: number;
35986
+ _offset?: number;
35987
+ _search?: string;
35988
+ _supplier_id?: string;
35989
+ _tab?: string;
35990
+ };
35991
+ Returns: Json;
35992
+ };
35928
35993
  inkoop_process_request: {
35929
35994
  Args: {
35930
35995
  _request_id: string;
@@ -41370,6 +41435,26 @@ export type Database = {
41370
41435
  Args: never;
41371
41436
  Returns: undefined;
41372
41437
  };
41438
+ mailbox_kpis: {
41439
+ Args: {
41440
+ p_tz?: string;
41441
+ };
41442
+ Returns: Json;
41443
+ };
41444
+ mailbox_proposals_page: {
41445
+ Args: {
41446
+ p_date_field?: string;
41447
+ p_filter?: string;
41448
+ p_limit?: number;
41449
+ p_offset?: number;
41450
+ p_period?: string;
41451
+ p_search?: string;
41452
+ p_sort?: string;
41453
+ p_statuses: string[];
41454
+ p_tz?: string;
41455
+ };
41456
+ Returns: Json;
41457
+ };
41373
41458
  mailbox_prune_ingest_runs: {
41374
41459
  Args: {
41375
41460
  p_limit?: number;
@@ -44732,6 +44817,12 @@ export type Database = {
44732
44817
  };
44733
44818
  Returns: Json;
44734
44819
  };
44820
+ scan_kar_scans_lezen: {
44821
+ Args: {
44822
+ p_kar_id: string;
44823
+ };
44824
+ Returns: Json;
44825
+ };
44735
44826
  scan_kar_voortgang: {
44736
44827
  Args: {
44737
44828
  p_cart_id: string;
@@ -44748,6 +44839,17 @@ export type Database = {
44748
44839
  };
44749
44840
  Returns: Json;
44750
44841
  };
44842
+ scan_karren_overzicht: {
44843
+ Args: {
44844
+ p_limit?: number;
44845
+ p_offset?: number;
44846
+ p_status?: string;
44847
+ p_tot?: string;
44848
+ p_van?: string;
44849
+ p_zoek?: string;
44850
+ };
44851
+ Returns: Json;
44852
+ };
44751
44853
  scan_koppelcode_maken: {
44752
44854
  Args: {
44753
44855
  p_scanner_id: string;