@flowselections/floriday-verkoop-module 1.0.150 → 1.0.153
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/verkoop/CreateOrderPage.js +11 -11
- package/dist-lib/components/verkoop/SearchableSelect.js +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +124 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/module-version.d.ts +1 -1
- package/dist-lib/lib/module-version.js +1 -1
- package/package.json +1 -1
- package/dist-lib/components/verkoop/order-detail-shortcuts.check.d.ts +0 -2
- package/dist-lib/components/verkoop/order-detail-shortcuts.check.d.ts.map +0 -1
- package/dist-lib/components/verkoop/order-detail-shortcuts.check.js +0 -38
- package/dist-lib/components/verkoop/order-shortcuts.check.d.ts +0 -2
- package/dist-lib/components/verkoop/order-shortcuts.check.d.ts.map +0 -1
- package/dist-lib/components/verkoop/order-shortcuts.check.js +0 -34
- package/dist-lib/lib/buffer-carts.check.d.ts +0 -2
- package/dist-lib/lib/buffer-carts.check.d.ts.map +0 -1
- package/dist-lib/lib/buffer-carts.check.js +0 -23
- package/dist-lib/lib/buffer-pick-progress.check.d.ts +0 -2
- package/dist-lib/lib/buffer-pick-progress.check.d.ts.map +0 -1
- package/dist-lib/lib/buffer-pick-progress.check.js +0 -11
- package/dist-lib/lib/carrier-resolve.check.d.ts +0 -2
- package/dist-lib/lib/carrier-resolve.check.d.ts.map +0 -1
- package/dist-lib/lib/carrier-resolve.check.js +0 -38
- package/dist-lib/lib/create-order-form.check.d.ts +0 -2
- package/dist-lib/lib/create-order-form.check.d.ts.map +0 -1
- package/dist-lib/lib/create-order-form.check.js +0 -34
- package/dist-lib/lib/cron/cron-auth.check.d.ts +0 -2
- package/dist-lib/lib/cron/cron-auth.check.d.ts.map +0 -1
- package/dist-lib/lib/cron/cron-auth.check.js +0 -25
- package/dist-lib/lib/customer-stickers.check.d.ts +0 -2
- package/dist-lib/lib/customer-stickers.check.d.ts.map +0 -1
- package/dist-lib/lib/customer-stickers.check.js +0 -22
- package/dist-lib/lib/delivery-format.check.d.ts +0 -2
- package/dist-lib/lib/delivery-format.check.d.ts.map +0 -1
- package/dist-lib/lib/delivery-format.check.js +0 -32
- package/dist-lib/lib/delivery-location.check.d.ts +0 -2
- package/dist-lib/lib/delivery-location.check.d.ts.map +0 -1
- package/dist-lib/lib/delivery-location.check.js +0 -36
- package/dist-lib/lib/departure-preview.check.d.ts +0 -2
- package/dist-lib/lib/departure-preview.check.d.ts.map +0 -1
- package/dist-lib/lib/departure-preview.check.js +0 -60
- package/dist-lib/lib/erp-invoice-rpc.check.d.ts +0 -2
- package/dist-lib/lib/erp-invoice-rpc.check.d.ts.map +0 -1
- package/dist-lib/lib/erp-invoice-rpc.check.js +0 -47
- package/dist-lib/lib/erp-invoice-view.check.d.ts +0 -2
- package/dist-lib/lib/erp-invoice-view.check.d.ts.map +0 -1
- package/dist-lib/lib/erp-invoice-view.check.js +0 -32
- package/dist-lib/lib/floriday-change-diff.check.d.ts +0 -2
- package/dist-lib/lib/floriday-change-diff.check.d.ts.map +0 -1
- package/dist-lib/lib/floriday-change-diff.check.js +0 -27
- package/dist-lib/lib/floriday-external-fulfillment.check.d.ts +0 -2
- package/dist-lib/lib/floriday-external-fulfillment.check.d.ts.map +0 -1
- package/dist-lib/lib/floriday-external-fulfillment.check.js +0 -21
- package/dist-lib/lib/floriday-invoice-line.check.d.ts +0 -2
- package/dist-lib/lib/floriday-invoice-line.check.d.ts.map +0 -1
- package/dist-lib/lib/floriday-invoice-line.check.js +0 -18
- package/dist-lib/lib/floriday-line-key.check.d.ts +0 -2
- package/dist-lib/lib/floriday-line-key.check.d.ts.map +0 -1
- package/dist-lib/lib/floriday-line-key.check.js +0 -50
- package/dist-lib/lib/floriday-promote-customer.check.d.ts +0 -2
- package/dist-lib/lib/floriday-promote-customer.check.d.ts.map +0 -1
- package/dist-lib/lib/floriday-promote-customer.check.js +0 -28
- package/dist-lib/lib/invoice-release.check.d.ts +0 -2
- package/dist-lib/lib/invoice-release.check.d.ts.map +0 -1
- package/dist-lib/lib/invoice-release.check.js +0 -21
- package/dist-lib/lib/invoice-signoff-payload.check.d.ts +0 -2
- package/dist-lib/lib/invoice-signoff-payload.check.d.ts.map +0 -1
- package/dist-lib/lib/invoice-signoff-payload.check.js +0 -27
- package/dist-lib/lib/invoice-timing.check.d.ts +0 -2
- package/dist-lib/lib/invoice-timing.check.d.ts.map +0 -1
- package/dist-lib/lib/invoice-timing.check.js +0 -19
- package/dist-lib/lib/list-speed.check.d.ts +0 -2
- package/dist-lib/lib/list-speed.check.d.ts.map +0 -1
- package/dist-lib/lib/list-speed.check.js +0 -49
- package/dist-lib/lib/nl-datetime.check.d.ts +0 -2
- package/dist-lib/lib/nl-datetime.check.d.ts.map +0 -1
- package/dist-lib/lib/nl-datetime.check.js +0 -14
- package/dist-lib/lib/order-departure.check.d.ts +0 -2
- package/dist-lib/lib/order-departure.check.d.ts.map +0 -1
- package/dist-lib/lib/order-departure.check.js +0 -25
- package/dist-lib/lib/order-fust.check.d.ts +0 -2
- package/dist-lib/lib/order-fust.check.d.ts.map +0 -1
- package/dist-lib/lib/order-fust.check.js +0 -19
- package/dist-lib/lib/order-nav.check.d.ts +0 -2
- package/dist-lib/lib/order-nav.check.d.ts.map +0 -1
- package/dist-lib/lib/order-nav.check.js +0 -16
- package/dist-lib/lib/order-patch.check.d.ts +0 -2
- package/dist-lib/lib/order-patch.check.d.ts.map +0 -1
- package/dist-lib/lib/order-patch.check.js +0 -40
- package/dist-lib/lib/order-price-lock.check.d.ts +0 -2
- package/dist-lib/lib/order-price-lock.check.d.ts.map +0 -1
- package/dist-lib/lib/order-price-lock.check.js +0 -43
- package/dist-lib/lib/order-progress.check.d.ts +0 -2
- package/dist-lib/lib/order-progress.check.d.ts.map +0 -1
- package/dist-lib/lib/order-progress.check.js +0 -90
- package/dist-lib/lib/order-search.check.d.ts +0 -2
- package/dist-lib/lib/order-search.check.d.ts.map +0 -1
- package/dist-lib/lib/order-search.check.js +0 -16
- package/dist-lib/lib/packing-snapshot.check.d.ts +0 -2
- package/dist-lib/lib/packing-snapshot.check.d.ts.map +0 -1
- package/dist-lib/lib/packing-snapshot.check.js +0 -45
- package/dist-lib/lib/period-range.check.d.ts +0 -2
- package/dist-lib/lib/period-range.check.d.ts.map +0 -1
- package/dist-lib/lib/period-range.check.js +0 -63
- package/dist-lib/lib/pickup-seed.check.d.ts +0 -2
- package/dist-lib/lib/pickup-seed.check.d.ts.map +0 -1
- package/dist-lib/lib/pickup-seed.check.js +0 -18
- package/dist-lib/lib/plan-coverage-v204.check.d.ts +0 -2
- package/dist-lib/lib/plan-coverage-v204.check.d.ts.map +0 -1
- package/dist-lib/lib/plan-coverage-v204.check.js +0 -29
- package/dist-lib/lib/plan-coverage.check.d.ts +0 -2
- package/dist-lib/lib/plan-coverage.check.d.ts.map +0 -1
- package/dist-lib/lib/plan-coverage.check.js +0 -30
- package/dist-lib/lib/reference-cache.check.d.ts +0 -2
- package/dist-lib/lib/reference-cache.check.d.ts.map +0 -1
- package/dist-lib/lib/reference-cache.check.js +0 -31
- package/dist-lib/lib/session-error.check.d.ts +0 -2
- package/dist-lib/lib/session-error.check.d.ts.map +0 -1
- package/dist-lib/lib/session-error.check.js +0 -17
- package/dist-lib/lib/stock-errors.check.d.ts +0 -2
- package/dist-lib/lib/stock-errors.check.d.ts.map +0 -1
- package/dist-lib/lib/stock-errors.check.js +0 -15
- package/dist-lib/lib/stock-product-link.check.d.ts +0 -2
- package/dist-lib/lib/stock-product-link.check.d.ts.map +0 -1
- package/dist-lib/lib/stock-product-link.check.js +0 -40
- package/dist-lib/lib/sync-watermark.check.d.ts +0 -2
- package/dist-lib/lib/sync-watermark.check.d.ts.map +0 -1
- package/dist-lib/lib/sync-watermark.check.js +0 -22
- package/dist-lib/lib/testronde-1119.check.d.ts +0 -2
- package/dist-lib/lib/testronde-1119.check.d.ts.map +0 -1
- package/dist-lib/lib/testronde-1119.check.js +0 -20
- package/dist-lib/lib/zero-price-write-mode.check.d.ts +0 -2
- package/dist-lib/lib/zero-price-write-mode.check.d.ts.map +0 -1
- package/dist-lib/lib/zero-price-write-mode.check.js +0 -18
|
@@ -662,19 +662,19 @@ export function CreateOrderPage() {
|
|
|
662
662
|
: "—") }))] }), _jsxs("div", { className: "grid grid-cols-[minmax(0,1fr)_auto] gap-2", children: [_jsx("dt", { className: "text-muted-foreground", children: "Vervoerder" }), _jsx("dd", { className: "truncate text-right text-foreground", children: carrierText })] }), _jsxs("div", { className: "border-t border-border pt-3 grid grid-cols-[minmax(0,1fr)_auto] gap-y-1.5 gap-x-2 tabular-nums", children: [_jsx("dt", { className: "text-muted-foreground", children: "Regels" }), _jsx("dd", { className: "text-right", children: validLines.length }), _jsx("dt", { className: "text-muted-foreground", children: "Fusten" }), _jsx("dd", { className: "text-right", children: totals.crates }), _jsx("dt", { className: "text-muted-foreground", children: "Stuks" }), _jsx("dd", { className: "text-right", children: totals.stuks.toLocaleString("nl-NL") })] }), _jsxs("div", { className: "border-t border-border pt-3 grid grid-cols-[minmax(0,1fr)_auto] gap-2", children: [_jsx("dt", { className: "font-semibold text-foreground", children: "Totaal" }), _jsx("dd", { className: "text-right text-lg font-semibold tabular-nums text-foreground", children: eur(totals.amount) })] })] }));
|
|
663
663
|
const missingBlock = missing.length > 0 ? (_jsxs("div", { className: "rounded-lg border border-border bg-muted/40 p-3 text-sm", children: [_jsx("div", { className: "mb-1 font-medium text-foreground", children: "Ontbreekt nog" }), _jsx("ul", { className: "space-y-1 text-muted-foreground", children: missing.map((m) => (_jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "mt-2 h-1 w-1 shrink-0 rounded-full bg-muted-foreground" }), m] }, m))) })] })) : attention.length > 0 ? null : (_jsxs("div", { className: "flex items-center gap-2 rounded-lg bg-primary/10 p-3 text-sm font-medium text-primary", children: [_jsx(CheckCircle2, { className: "h-4 w-4 shrink-0" }), " Alles is compleet"] }));
|
|
664
664
|
const attentionBlock = attention.length > 0 ? (_jsxs("div", { className: "rounded-lg border border-warning/40 bg-warning-soft p-3 text-sm", children: [_jsxs("div", { className: "mb-1 flex items-center gap-2 font-medium text-foreground", children: [_jsx(AlertTriangle, { className: "h-4 w-4 shrink-0 text-warning-soft-foreground" }), "Aandachtspunten"] }), _jsx("ul", { className: "space-y-1 text-muted-foreground", children: attention.map((m) => (_jsxs("li", { className: "flex items-start gap-2", children: [_jsx("span", { className: "mt-2 h-1 w-1 shrink-0 rounded-full bg-muted-foreground" }), m] }, m))) })] })) : null;
|
|
665
|
-
const createButton = (cls = "") => (_jsx(Button, { className: `h-10 w-full ${cls}`, onClick: submit, disabled: !canCreate, title: stockBlocked ? "Onvoldoende voorraad; pas de aantallen aan." : undefined, children: createMut.isPending ? _jsxs(_Fragment, { children: [_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), "Bezig\u2026"] })
|
|
665
|
+
const createButton = (cls = "") => (_jsx(Button, { className: `h-10 w-full [@media(pointer:coarse)]:h-11 ${cls}`, onClick: submit, disabled: !canCreate, title: stockBlocked ? "Onvoldoende voorraad; pas de aantallen aan." : undefined, children: createMut.isPending ? _jsxs(_Fragment, { children: [_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), "Bezig\u2026"] })
|
|
666
666
|
: stockQ.isFetching ? "Voorraad controleren…" : "Bestelling aanmaken" }));
|
|
667
667
|
const deliveryAddr = (l) => [
|
|
668
668
|
l.address_line || [l.street, l.house_number].filter(Boolean).join(" "),
|
|
669
669
|
l.postal_code, l.city, l.country,
|
|
670
670
|
].filter(Boolean).join(", ");
|
|
671
|
-
return (_jsxs("main", { className: "
|
|
671
|
+
return (_jsxs("main", { className: "flex w-full min-w-0 flex-col gap-4 overflow-x-clip p-4 pb-0 sm:p-6 sm:pb-0 xl:pb-6", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [_jsx(Button, { asChild: true, variant: "ghost", size: "icon", className: "h-9 w-9 shrink-0 [@media(pointer:coarse)]:h-11 [@media(pointer:coarse)]:w-11", "aria-label": "Terug naar verkooporders", children: _jsx(Link, { to: "/floriday-verkoop/verkooporders", children: _jsx(ArrowLeft, { className: "h-4 w-4" }) }) }), _jsx("h1", { className: "truncate text-xl font-bold text-foreground sm:text-2xl", children: "Nieuwe bestelling" })] }), loadErrors.length > 0 && (_jsx("div", { className: "rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive", children: loadErrors.map((m) => _jsx("div", { children: m }, m)) })), _jsxs("div", { className: "grid grid-cols-[minmax(0,1fr)] gap-4 xl:grid-cols-[minmax(0,1fr)_340px]", children: [_jsxs("div", { className: "min-w-0 space-y-4", children: [_jsxs("section", { className: `${cardCls} @container`, children: [_jsx("h2", { className: h2, children: "Ordergegevens" }), _jsxs("div", { className: "mt-4 grid grid-cols-[minmax(0,1fr)] gap-4 @[47.5rem]:grid-cols-2", children: [_jsxs("div", { className: "min-w-0 space-y-1.5", children: [_jsxs(Label, { className: fieldLabel, children: ["Klant ", _jsx("span", { className: "text-destructive", children: "*" })] }), _jsx(SearchableSelect, { value: customerId, placeholder: customersQ.isLoading ? "Laden…" : "Zoek op naam, plaats of debiteurnummer", options: customers.map((c) => ({
|
|
672
672
|
value: c.id,
|
|
673
673
|
label: customerLabel(c),
|
|
674
674
|
hint: customerSub(c) || (c.commercial_name && c.company_name !== c.commercial_name ? c.company_name : null),
|
|
675
675
|
search: [c.commercial_name, c.company_name, c.city, c.twinfield_code].filter(Boolean).join(" "),
|
|
676
676
|
badge: c.blocked ? "Geblokkeerd" : null,
|
|
677
|
-
})), renderValue: (o) => (_jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "block truncate text-foreground", children: o?.label }), o?.hint && _jsx("span", { className: "block truncate text-xs text-muted-foreground", children: o.hint })] })), className: "h-auto min-h-9 py-1.5", onChange: (v) => { pickupTouched.current = false; void handleSelectCustomer(v); }, allowClear: false }), selectedCustomer?.blocked && (_jsxs("div", { className: "flex items-start gap-2 rounded-lg border border-destructive/40 bg-destructive/10 p-2.5 text-sm text-destructive", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-4 w-4 shrink-0" }), "Deze klant is geblokkeerd. Controleer bij de administratie of je voor deze klant mag leveren."] }))] }), _jsxs("div", { className: "space-y-1.5
|
|
677
|
+
})), renderValue: (o) => (_jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "block truncate text-foreground", children: o?.label }), o?.hint && _jsx("span", { className: "block truncate text-xs text-muted-foreground", children: o.hint })] })), className: "h-auto min-h-9 py-1.5 [@media(pointer:coarse)]:min-h-11", onChange: (v) => { pickupTouched.current = false; void handleSelectCustomer(v); }, allowClear: false }), selectedCustomer?.blocked && (_jsxs("div", { className: "flex items-start gap-2 rounded-lg border border-destructive/40 bg-destructive/10 p-2.5 text-sm text-destructive", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-4 w-4 shrink-0" }), "Deze klant is geblokkeerd. Controleer bij de administratie of je voor deze klant mag leveren."] }))] }), _jsxs("div", { className: "min-w-0 space-y-1.5", children: [_jsxs(Label, { className: fieldLabel, children: ["Afleverlocatie ", _jsx("span", { className: "text-destructive", children: "*" })] }), selectedLocation && !deliveryEditOpen ? (_jsxs("div", { className: "flex min-h-9 items-center gap-3 rounded-md border border-input px-3 py-1.5 [@media(pointer:coarse)]:min-h-11", children: [_jsxs("div", { className: "min-w-0 flex-1 text-sm", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: "truncate text-foreground", children: selectedLocation.name || deliveryAddr(selectedLocation) }), selectedLocation.is_primary && _jsx("span", { className: "shrink-0 rounded-full bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground", children: "Standaard" })] }), selectedLocation.name && _jsx("div", { className: "truncate text-xs text-muted-foreground", children: deliveryAddr(selectedLocation) })] }), deliveryLocations.length > 1 && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", className: "h-8 shrink-0 [@media(pointer:coarse)]:h-11", onClick: () => setDeliveryEditOpen(true), children: "Wijzigen" }))] })) : (_jsx(SearchableSelect, { value: deliveryLocationId, placeholder: !customerId ? "Kies eerst een klant"
|
|
678
678
|
: deliveryLocQ.isFetching && deliveryLocations.length === 0 ? "Laden…"
|
|
679
679
|
: deliveryLocations.length ? "Kies locatie…"
|
|
680
680
|
: "Geen locaties bekend voor deze klant", disabled: !customerId || deliveryLocations.length === 0, allowClear: false, options: deliveryLocations.map((l) => ({
|
|
@@ -684,7 +684,7 @@ export function CreateOrderPage() {
|
|
|
684
684
|
badge: l.is_primary ? "Standaard" : null,
|
|
685
685
|
})), onChange: (v) => { setDeliveryLocationId(v); setDeliveryEditOpen(false); } }))] }), _jsxs("div", { className: "space-y-1.5", children: [_jsxs(Label, { className: fieldLabel, children: ["Afhaallocatie ", _jsx("span", { className: "text-destructive", children: "*" })] }), _jsx(SearchableSelect, { value: pickupLocationId, placeholder: pickupLocations.length ? "Kies eigen locatie…" : "Geen eigen locaties bekend", disabled: pickupLocations.length === 0, allowClear: false, options: pickupLocations.map((l) => ({ value: l.id, label: l.name, badge: l.isDefault ? "Standaard" : null })), onChange: (v) => { pickupTouched.current = true; setPickupFromLast(false); setPickupLocationId(v); } }), pickupFromLast && _jsx("div", { className: "text-xs text-muted-foreground", children: "Laatst gebruikt bij deze klant" }), pickupQ.isSuccess && pickupLocations.length === 0 && (_jsx("div", { className: "text-xs text-muted-foreground", children: pickupQ.data?.source === "floriday"
|
|
686
686
|
? "Geen eigen Floriday-warehouses gevonden. Controleer de Floriday-synchronisatie."
|
|
687
|
-
: "Geen Floriday-koppeling: voeg een afhaallocatie toe via Instellingen → Afhaallocaties." }))] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { className: fieldLabel, children: "Vervoerder" }), isReservation ? (_jsx("div", { className: "flex h-9 items-center rounded-md border border-border bg-muted/40 px-3 text-sm text-muted-foreground", children: "Wordt gekozen bij de verzending" })) : (_jsx(SearchableSelect, { value: ownTransport ? "__own__" : carrierId ?? "__auto__", placeholder: !deliveryLocationId ? "Kies eerst een afleverlocatie" : "Automatisch", disabled: !deliveryLocationId, allowClear: false, options: [
|
|
687
|
+
: "Geen Floriday-koppeling: voeg een afhaallocatie toe via Instellingen → Afhaallocaties." }))] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { className: fieldLabel, children: "Vervoerder" }), isReservation ? (_jsx("div", { className: "flex h-9 items-center [@media(pointer:coarse)]:h-11 rounded-md border border-border bg-muted/40 px-3 text-sm text-muted-foreground", children: "Wordt gekozen bij de verzending" })) : (_jsx(SearchableSelect, { value: ownTransport ? "__own__" : carrierId ?? "__auto__", placeholder: !deliveryLocationId ? "Kies eerst een afleverlocatie" : "Automatisch", disabled: !deliveryLocationId, allowClear: false, options: [
|
|
688
688
|
{ value: "__auto__", label: preview?.carrierId && !carrierId && !ownTransport ? `Automatisch: ${carrierName(preview.carrierId) ?? "onbekend"}` : "Automatisch" },
|
|
689
689
|
{ value: "__own__", label: "Eigen vervoer / zelf afleveren" },
|
|
690
690
|
...carriers.map((c) => ({ value: c.id, label: c.name })),
|
|
@@ -698,7 +698,7 @@ export function CreateOrderPage() {
|
|
|
698
698
|
setCarrierId(!v || v === "__auto__" ? null : v);
|
|
699
699
|
}
|
|
700
700
|
setMomentKey(null);
|
|
701
|
-
} }))] }), _jsxs("div", { className: "space-y-1.5
|
|
701
|
+
} }))] }), _jsxs("div", { className: "min-w-0 space-y-1.5 @[47.5rem]:col-span-2", children: [_jsxs(Label, { className: fieldLabel, children: ["Leverdatum ", !isReservation && _jsx("span", { className: "text-destructive", children: "*" })] }), _jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-center", children: [_jsx(Input, { type: "date", className: "h-9 sm:w-48 [@media(pointer:coarse)]:h-11", value: !isReservation && canPickDate ? deliveryDate : "", disabled: isReservation || !canPickDate, onChange: (e) => { setDeliveryDate(e.target.value || ""); setDateSource(e.target.value ? "user" : "auto"); setDateNotice(null); setMomentKey(null); } }), dateNotice && !deliveryDate && _jsx("span", { className: "text-sm text-warning-soft-foreground", children: dateNotice }), !isReservation && deliveryDate && canPickDate && (_jsx("span", { className: "text-sm font-medium text-foreground", children: dateWithWeekday(deliveryDate) }))] }), _jsxs("label", { className: "flex w-fit cursor-pointer items-center gap-2 text-sm text-muted-foreground [@media(pointer:coarse)]:min-h-11", children: [_jsx("input", { type: "checkbox", checked: isReservation, onChange: (e) => setIsReservation(e.target.checked), className: "h-4 w-4 rounded border-input accent-primary" }), "Reservering (nog geen vaste leverdatum)"] }), !isReservation && !canPickDate && (_jsx("div", { className: "text-xs text-muted-foreground", children: "Kies eerst klant, afleverlocatie en afhaallocatie." })), !isReservation && momentText && (_jsxs("div", { className: "text-xs text-muted-foreground md:hidden", children: ["Ophaalmoment: ", momentText] })), !isReservation && decision?.kind === "blocked" && (_jsx("div", { className: "text-xs text-destructive", children: decision.reason })), !isReservation && decision?.kind === "departed" && (_jsxs("div", { className: "space-y-2 rounded-lg border border-destructive/40 p-2.5 text-xs", children: [_jsx("div", { className: "text-destructive", children: decision.reason }), firstDateText(decision.firstDate, decision.next?.signupDeadline ?? null) && (_jsx("div", { className: "text-muted-foreground", children: firstDateText(decision.firstDate, decision.next?.signupDeadline ?? null) })), _jsxs("div", { className: "flex flex-wrap gap-2", children: [decision.firstDate && (_jsxs(Button, { type: "button", size: "sm", variant: "outline", onClick: () => { setDeliveryDate(decision.firstDate); setDateSource("user"); setMomentKey(null); }, children: ["Gebruik ", fmtDate(decision.firstDate)] })), _jsx(Button, { type: "button", size: "sm", variant: "outline", onClick: () => { setOwnTransport(true); setCarrierId(null); setMomentKey(null); }, children: "Eigen vervoer / zelf afleveren" })] })] })), !isReservation && decision?.kind === "late" && (_jsxs("div", { className: "space-y-2 rounded-lg border border-destructive/40 p-2.5 text-xs", children: [_jsx("div", { className: "text-destructive", children: decision.reason }), (firstDateText(decision.firstDate, preview?.nextFeasibleMoment?.signupDeadline ?? null) ?? decision.firstReason) && (_jsx("div", { className: "text-muted-foreground", children: firstDateText(decision.firstDate, preview?.nextFeasibleMoment?.signupDeadline ?? null) ?? decision.firstReason })), _jsxs("div", { className: "flex flex-wrap gap-2", children: [decision.firstDate && (_jsxs(Button, { type: "button", size: "sm", variant: "outline", onClick: () => { setDeliveryDate(decision.firstDate); setDateSource("user"); setMomentKey(null); }, children: ["Gebruik ", fmtDate(decision.firstDate)] })), _jsxs(Button, { type: "button", size: "sm", variant: "outline", disabled: createMut.isPending, onClick: () => setLateConfirmOpen(true), children: ["Toch aanmaken voor ", deliveryDate ? fmtDate(deliveryDate) : "de gekozen datum"] })] })] }))] })] })] }), _jsxs("section", { className: `${cardCls} @container`, children: [_jsx("div", { className: "flex items-center justify-between gap-3", children: _jsx("h2", { className: h2, children: "Bestelregels" }) }), _jsxs("div", { className: "mt-4 hidden grid-cols-[minmax(220px,1fr)_56px_minmax(120px,0.8fr)_80px_72px_minmax(88px,0.6fr)_92px_88px_44px] gap-2 px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground @[60rem]:grid", children: [_jsx("div", { children: "Product" }), _jsx("div", { className: "text-center", children: "Sticker" }), _jsx("div", { children: "Belading" }), _jsx("div", { children: "Fusten" }), _jsx("div", { className: "text-right", children: "Stuks" }), _jsx("div", { children: "Beschikbaar" }), _jsx("div", { children: "Prijs/st" }), _jsx("div", { className: "text-right", children: "Totaal" }), _jsx("div", {})] }), _jsx("div", { className: "mt-2 space-y-2 @[60rem]:space-y-0 @[60rem]:divide-y @[60rem]:divide-border", children: lines.map((line, idx) => {
|
|
702
702
|
const { product, eff: effBelading, ppc, crates } = lineInfo[idx];
|
|
703
703
|
const defaultBelading = completeBelading(product);
|
|
704
704
|
const plants = line.quantity ?? null;
|
|
@@ -725,8 +725,8 @@ export function CreateOrderPage() {
|
|
|
725
725
|
const impossible = line.product_id ? impossibleByLine[String(idx)] : undefined;
|
|
726
726
|
const missingLine = line.product_id && !impossible ? (missingByLine[String(idx)] ?? missingByProduct[line.product_id]) : undefined;
|
|
727
727
|
const sizeText = product?.plant_height_cm ? `${product.plant_height_cm} cm` : null;
|
|
728
|
-
return (_jsxs("div", { className: "
|
|
729
|
-
: _jsx("span", { "aria-hidden": true, className: "h-8 w-8 shrink-0 rounded-md border border-border bg-muted" }), _jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "
|
|
728
|
+
return (_jsxs("div", { className: "flex flex-wrap items-start gap-x-3 gap-y-2 rounded-lg border border-border p-3 @[60rem]:grid @[60rem]:gap-2 @[60rem]:gap-x-2 @[60rem]:grid-cols-[minmax(220px,1fr)_56px_minmax(120px,0.8fr)_80px_72px_minmax(88px,0.6fr)_92px_88px_44px] @[60rem]:rounded-none @[60rem]:border-0 @[60rem]:px-1 @[60rem]:py-2.5", children: [_jsxs("div", { className: "order-1 min-w-0 flex-1 basis-[calc(100%-3.5rem)] @[60rem]:order-none @[60rem]:basis-auto", children: [_jsx(SearchableSelect, { ref: (el) => { productRefs.current[idx] = el; }, value: line.product_id, placeholder: "Kies product\u2026", clearLabel: "\u2014 Handmatig \u2014", showImages: true, className: "h-auto min-h-9 py-1 [@media(pointer:coarse)]:min-h-11", renderValue: (o) => (_jsxs(_Fragment, { children: [o?.image ? _jsx("img", { src: o.image, alt: "", className: "h-8 w-8 shrink-0 rounded-md border border-border object-cover" })
|
|
729
|
+
: _jsx("span", { "aria-hidden": true, className: "h-8 w-8 shrink-0 rounded-md border border-border bg-muted" }), _jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "line-clamp-2 break-words whitespace-normal text-left text-foreground", title: o?.label, children: o?.label }), sizeText && _jsx("span", { className: "block truncate text-xs text-muted-foreground", children: sizeText })] })] })), options: products.map((p) => {
|
|
730
730
|
const code = p.article_code ? `${p.article_code} · ` : "";
|
|
731
731
|
const size = p.plant_height_cm ? `${p.plant_height_cm} cm · ` : "";
|
|
732
732
|
return {
|
|
@@ -778,7 +778,7 @@ export function CreateOrderPage() {
|
|
|
778
778
|
})
|
|
779
779
|
.catch(() => undefined);
|
|
780
780
|
}
|
|
781
|
-
} }), impossible && _jsxs("div", { className: "mt-1 text-xs text-destructive", children: ["Niet in te delen met deze belading: ", impossible] }), missingLine && _jsxs("div", { className: "mt-1 text-xs text-muted-foreground", children: ["Let op: ", missingLine] })] }), _jsxs("label", { className: "
|
|
781
|
+
} }), impossible && _jsxs("div", { className: "mt-1 text-xs text-destructive", children: ["Niet in te delen met deze belading: ", impossible] }), missingLine && _jsxs("div", { className: "mt-1 text-xs text-muted-foreground", children: ["Let op: ", missingLine] })] }), _jsxs("label", { className: "order-3 flex h-9 min-w-11 shrink-0 cursor-pointer items-center gap-2 [@media(pointer:coarse)]:h-11 @[60rem]:order-none @[60rem]:justify-center", children: [_jsx("input", { type: "checkbox", className: "h-4 w-4 accent-primary [@media(pointer:coarse)]:h-6 [@media(pointer:coarse)]:w-6", "aria-label": "Sticker nodig", title: "Sticker nodig", checked: line.needs_sticker === true, disabled: !line.product_id, onChange: (e) => { const next = [...lines]; next[idx] = { ...next[idx], needs_sticker: e.target.checked, sticker_manual_for: line.product_id }; setLines(next); } }), _jsx("span", { className: "text-sm @[60rem]:sr-only", children: "Sticker nodig" })] }), _jsxs("div", { className: "order-3 min-w-0 grow basis-[13rem] @[60rem]:order-none @[60rem]:basis-auto", children: [_jsx("div", { className: "mb-1 text-xs text-muted-foreground @[60rem]:sr-only", children: "Belading" }), _jsx(SearchableSelect, { value: effBelading ? beladingKey(effBelading) : null, placeholder: !line.product_id ? "Kies eerst product" : loadingBeladingen ? "Laden…" : noBeladingen ? "Geen belading" : "Kies belading…", disabled: !line.product_id || loadingBeladingen || noBeladingen, allowClear: false, emptyLabel: "Geen belading gekoppeld aan dit product", options: Array.from(optionMap.entries()).map(([key, b]) => ({
|
|
782
782
|
value: key,
|
|
783
783
|
label: beladingLabel(b),
|
|
784
784
|
badge: key === defaultKey ? "Standaard" : null,
|
|
@@ -793,7 +793,7 @@ export function CreateOrderPage() {
|
|
|
793
793
|
const cr = Math.max(1, Math.ceil(Number(next[idx].quantity ?? 0) / (ppc ?? b.plants_per_crate)));
|
|
794
794
|
next[idx] = { ...next[idx], belading: b, quantity: cr * b.plants_per_crate };
|
|
795
795
|
setLines(next);
|
|
796
|
-
} }), noBeladingen ? (_jsx("div", { className: "mt-1 text-xs text-destructive", children: "Geen belading bekend voor dit product." })) : effBelading && (beladingTypes(effBelading) || deviates) ? (_jsxs("div", { className: "mt-1 truncate text-xs text-muted-foreground", children: [beladingTypes(effBelading), deviates ? `${beladingTypes(effBelading) ? " · " : ""}afwijkend van standaard` : ""] })) : null] }), _jsxs("label", { className: "
|
|
796
|
+
} }), noBeladingen ? (_jsx("div", { className: "mt-1 text-xs text-destructive", children: "Geen belading bekend voor dit product." })) : effBelading && (beladingTypes(effBelading) || deviates) ? (_jsxs("div", { className: "mt-1 truncate text-xs text-muted-foreground", children: [beladingTypes(effBelading), deviates ? `${beladingTypes(effBelading) ? " · " : ""}afwijkend van standaard` : ""] })) : null] }), _jsxs("label", { className: "grow basis-[7.5rem] @[60rem]:basis-auto order-3 @[60rem]:order-none", children: [_jsx("span", { className: "mb-1 block text-xs text-muted-foreground @[60rem]:sr-only", children: "Fusten" }), _jsx(Input, { ref: (el) => { crateRefs.current[idx] = el; }, type: "number", min: 1, step: 1, inputMode: "numeric", className: "h-9 tabular-nums [@media(pointer:coarse)]:h-11", onKeyDown: (e) => {
|
|
797
797
|
blockDecimal(e);
|
|
798
798
|
if (e.key === "Enter") {
|
|
799
799
|
e.preventDefault();
|
|
@@ -807,6 +807,6 @@ export function CreateOrderPage() {
|
|
|
807
807
|
const cr = raw ? Math.max(1, Math.floor(Number(raw))) : null;
|
|
808
808
|
next[idx] = { ...next[idx], quantity: cr === null ? null : cr * ppc };
|
|
809
809
|
setLines(next);
|
|
810
|
-
}, placeholder: ppc === null ? "—" : "Fusten", title: ppc === null ? "Kies eerst een belading" : `${ppc} planten per fust` })] }), _jsxs("div", { className: "
|
|
811
|
-
}) }), _jsxs("div", { className: "mt-3 flex flex-col gap-3 border-t border-border pt-3 sm:flex-row sm:items-center sm:justify-between", children: [_jsxs(Button, { variant: "outline", className: "h-9 w-full sm:w-auto", onClick: addLine, children: [_jsx(Plus, { className: "mr-1 h-4 w-4" }), " Regel toevoegen"] }), _jsxs("div", { className: "flex flex-wrap items-center gap-x-5 gap-y-1 text-sm tabular-nums", children: [_jsxs("span", { className: "text-muted-foreground", children: ["Fusten ", _jsx("span", { className: "font-medium text-foreground", children: totals.crates })] }), _jsxs("span", { className: "text-muted-foreground", children: ["Stuks ", _jsx("span", { className: "font-medium text-foreground", children: totals.stuks.toLocaleString("nl-NL") })] }), _jsxs("span", { className: "text-muted-foreground", children: ["Totaal ", _jsx("span", { className: "font-semibold text-foreground", children: eur(totals.amount) })] })] })] }), stockCheck && stockCheck.shortages.length > 0 && !stockBlocked && (_jsx("div", { className: "mt-3 rounded-lg bg-warning-soft p-2.5 text-xs text-warning-soft-foreground", children: "Uitleveren zonder voorraad staat aan: de bestelling kan met tekort worden aangemaakt." }))] }), _jsxs("section", { className: cardCls, children: [_jsx("h2", { className: h2, children: "Aanvullend" }), _jsxs("div", { className: "mt-4 grid gap-4", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { className: fieldLabel, children: "Referentie klant" }), _jsx(Input, { value: customerReference, maxLength: 100, className: "h-9", onChange: (e) => setCustomerReference(e.target.value), placeholder: "Optioneel, bijvoorbeeld het bestelnummer van je klant" })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { className: fieldLabel, children: "Opmerkingen" }), _jsx(Textarea, { value: notes, onChange: (e) => setNotes(e.target.value), placeholder: "Optionele notities bij deze bestelling", rows: 3 })] })] })] })] }), _jsx("aside", { className: "
|
|
810
|
+
}, placeholder: ppc === null ? "—" : "Fusten", title: ppc === null ? "Kies eerst een belading" : `${ppc} planten per fust` })] }), _jsxs("div", { className: "grow basis-[7.5rem] @[60rem]:basis-auto order-3 @[60rem]:order-none", children: [_jsx("span", { className: "mb-1 block text-xs text-muted-foreground @[60rem]:sr-only", children: "Stuks" }), _jsx("div", { className: "flex h-9 items-center text-sm tabular-nums text-foreground @[60rem]:justify-end", children: line.product_id && plants ? plants.toLocaleString("nl-NL") : "—" })] }), _jsxs("div", { className: "min-w-0 grow basis-[7.5rem] @[60rem]:basis-auto order-3 @[60rem]:order-none", children: [_jsx("span", { className: "mb-1 block text-xs text-muted-foreground @[60rem]:sr-only", children: "Beschikbaar" }), product ? (_jsxs("div", { className: `flex min-h-9 items-center gap-1 text-sm tabular-nums ${overStock ? (stockBlocked ? "text-destructive" : "text-warning-soft-foreground") : "text-foreground"}`, children: [overStock && _jsx(AlertTriangle, { className: "h-3.5 w-3.5 shrink-0" }), _jsxs("span", { className: "truncate", children: [(available ?? 0).toLocaleString("nl-NL"), " ", unit] })] })) : _jsx("div", { className: "flex h-9 items-center text-sm text-muted-foreground", children: "\u2014" }), overStock && (_jsx("div", { className: `text-xs ${stockBlocked ? "text-destructive" : "text-warning-soft-foreground"}`, children: shortage ? `Tekort ${shortage.missing.toLocaleString("nl-NL")}` : "Meer dan beschikbaar" }))] }), _jsxs("label", { className: "grow basis-[7.5rem] @[60rem]:basis-auto order-3 @[60rem]:order-none", children: [_jsx("span", { className: "mb-1 block text-xs text-muted-foreground @[60rem]:sr-only", children: "Prijs per stuk" }), _jsx(Input, { type: "number", min: 0, step: "0.01", inputMode: "decimal", className: "h-9 tabular-nums [@media(pointer:coarse)]:h-11", value: line.unit_price ?? "", onChange: (e) => { const next = [...lines]; next[idx] = { ...next[idx], unit_price: e.target.value === "" ? null : Number(e.target.value) }; setLines(next); }, placeholder: "\u20AC", "aria-invalid": noPrice }), noPrice && _jsx("span", { className: "mt-1 block text-xs text-destructive", children: "Geen prijs gevonden" })] }), _jsxs("div", { className: "grow basis-[7.5rem] @[60rem]:basis-auto order-3 @[60rem]:order-none", children: [_jsx("span", { className: "mb-1 block text-xs text-muted-foreground @[60rem]:sr-only", children: "Totaal" }), _jsx("div", { className: "flex h-9 items-center text-sm font-medium tabular-nums text-foreground @[60rem]:justify-end", children: line.product_id ? eur(lineInfo[idx].total) : "—" })] }), _jsx("div", { className: "order-2 flex shrink-0 justify-end @[60rem]:order-none", children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-9 w-9 [@media(pointer:coarse)]:h-11 [@media(pointer:coarse)]:w-11", onClick: () => setLines(lines.filter((_, i) => i !== idx)), "aria-label": "Regel verwijderen", children: _jsx(Trash2, { className: "h-4 w-4" }) }) })] }, idx));
|
|
811
|
+
}) }), _jsxs("div", { className: "mt-3 flex flex-col gap-3 border-t border-border pt-3 sm:flex-row sm:items-center sm:justify-between", children: [_jsxs(Button, { variant: "outline", className: "h-9 w-full sm:w-auto [@media(pointer:coarse)]:h-11", onClick: addLine, children: [_jsx(Plus, { className: "mr-1 h-4 w-4" }), " Regel toevoegen"] }), _jsxs("div", { className: "flex flex-wrap items-center gap-x-5 gap-y-1 text-sm tabular-nums", children: [_jsxs("span", { className: "text-muted-foreground", children: ["Fusten ", _jsx("span", { className: "font-medium text-foreground", children: totals.crates })] }), _jsxs("span", { className: "text-muted-foreground", children: ["Stuks ", _jsx("span", { className: "font-medium text-foreground", children: totals.stuks.toLocaleString("nl-NL") })] }), _jsxs("span", { className: "text-muted-foreground", children: ["Totaal ", _jsx("span", { className: "font-semibold text-foreground", children: eur(totals.amount) })] })] })] }), stockCheck && stockCheck.shortages.length > 0 && !stockBlocked && (_jsx("div", { className: "mt-3 rounded-lg bg-warning-soft p-2.5 text-xs text-warning-soft-foreground", children: "Uitleveren zonder voorraad staat aan: de bestelling kan met tekort worden aangemaakt." }))] }), _jsxs("section", { className: cardCls, children: [_jsx("h2", { className: h2, children: "Aanvullend" }), _jsxs("div", { className: "mt-4 grid gap-4", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { className: fieldLabel, children: "Referentie klant" }), _jsx(Input, { value: customerReference, maxLength: 100, className: "h-9 [@media(pointer:coarse)]:h-11", onChange: (e) => setCustomerReference(e.target.value), placeholder: "Optioneel, bijvoorbeeld het bestelnummer van je klant" })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { className: fieldLabel, children: "Opmerkingen" }), _jsx(Textarea, { value: notes, onChange: (e) => setNotes(e.target.value), placeholder: "Optionele notities bij deze bestelling", rows: 3 })] })] })] })] }), _jsx("aside", { className: "min-w-0", children: _jsxs("div", { className: `${cardCls} space-y-4 xl:sticky xl:top-4`, children: [_jsx("h2", { className: h2, children: "Samenvatting" }), summaryRows, missingBlock, attentionBlock, createButton(), _jsx(Button, { variant: "ghost", className: "h-9 w-full [@media(pointer:coarse)]:h-11", onClick: () => navigate({ to: "/floriday-verkoop/verkooporders" }), disabled: createMut.isPending, children: "Annuleren" })] }) })] }), _jsxs("div", { className: "sticky bottom-0 z-30 -mx-4 border-t border-border bg-background/95 px-4 pt-3 backdrop-blur sm:-mx-6 sm:px-6 xl:hidden", style: { paddingBottom: "max(12px, env(safe-area-inset-bottom))" }, children: [mobileSummaryOpen && (_jsxs("div", { className: "mb-3 max-h-[50vh] space-y-3 overflow-y-auto", children: [summaryRows, missingBlock, attentionBlock] })), _jsxs("button", { type: "button", className: "mb-2 flex w-full items-center justify-between gap-3 text-left [@media(pointer:coarse)]:min-h-11", onClick: () => setMobileSummaryOpen((o) => !o), "aria-expanded": mobileSummaryOpen, children: [_jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "block truncate text-xs text-muted-foreground", children: momentText ? `Ophalen: ${momentText.replace(/^ophalen /, "")}` : missing.length > 0 ? `${missing.length} ontbreekt nog` : attention.length > 0 ? `${attention.length} aandachtspunt${attention.length === 1 ? "" : "en"}` : "Alles is compleet" }), _jsx("span", { className: "block text-base font-semibold tabular-nums text-foreground", children: eur(totals.amount) })] }), _jsx(ChevronUp, { className: `h-5 w-5 shrink-0 text-muted-foreground transition-transform ${mobileSummaryOpen ? "" : "rotate-180"}` })] }), createButton("h-12")] }), _jsx(ConfirmDialog, { open: zeroConfirmOpen, onOpenChange: setZeroConfirmOpen, title: "Prijs \u20AC 0 bevestigen?", description: `${zeroPriceCount} regel(s) hebben prijs € 0. Deze regels worden zo gefactureerd. Weet je zeker dat dat klopt?`, confirmLabel: "Ja, prijs \u20AC 0 klopt", onConfirm: () => { zeroPriceOkRef.current = true; createMut.mutate(undefined); } }), _jsx(ConfirmDialog, { open: lateConfirmOpen, onOpenChange: setLateConfirmOpen, title: "Toch aanmaken na de aanmeldtijd?", description: LATE_CONFIRM, confirmLabel: "Toch aanmaken", onConfirm: () => createMut.mutate({ lateConfirmed: true }) })] }));
|
|
812
812
|
}
|
|
@@ -20,7 +20,7 @@ export const SearchableSelect = forwardRef(function SearchableSelect({ value, op
|
|
|
20
20
|
}, [options, q]);
|
|
21
21
|
return (_jsxs(Popover, { open: open, onOpenChange: (o) => { if (disabled)
|
|
22
22
|
return; setOpen(o); if (!o)
|
|
23
|
-
setQ(""); }, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: "outline", role: "combobox", "aria-expanded": open, disabled: disabled, ref: ref, id: id, className: `w-full min-w-0 max-w-full justify-between overflow-hidden font-normal ${className ?? ""}`, children: [renderValue && selected ? (_jsx("span", { className: "flex min-w-0 flex-1 items-center gap-2 text-left", children: renderValue(selected) })) : (_jsx("span", { className: `truncate ${selected ? "" : "text-muted-foreground"}`, children: selected?.label ?? placeholder })), _jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }) }), _jsxs(PopoverContent, { className: "w-[--radix-popover-trigger-width] p-0", align: "start", children: [_jsx("div", { className: "p-2 border-b", children: _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "absolute left-2 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }), _jsx(Input, { autoFocus: true, value: q, onChange: (e) => setQ(e.target.value), onKeyDown: (e) => {
|
|
23
|
+
setQ(""); }, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: "outline", role: "combobox", "aria-expanded": open, disabled: disabled, ref: ref, id: id, className: `w-full min-w-0 max-w-full [@media(pointer:coarse)]:min-h-11 justify-between overflow-hidden font-normal ${className ?? ""}`, children: [renderValue && selected ? (_jsx("span", { className: "flex min-w-0 flex-1 items-center gap-2 text-left", children: renderValue(selected) })) : (_jsx("span", { className: `truncate ${selected ? "" : "text-muted-foreground"}`, children: selected?.label ?? placeholder })), _jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }) }), _jsxs(PopoverContent, { className: "w-[--radix-popover-trigger-width] p-0", align: "start", children: [_jsx("div", { className: "p-2 border-b", children: _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "absolute left-2 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }), _jsx(Input, { autoFocus: true, value: q, onChange: (e) => setQ(e.target.value), onKeyDown: (e) => {
|
|
24
24
|
if (e.key === "Enter" && filtered.length > 0) {
|
|
25
25
|
e.preventDefault();
|
|
26
26
|
onChange(filtered[0].value);
|
|
@@ -13318,37 +13318,49 @@ export type Database = {
|
|
|
13318
13318
|
};
|
|
13319
13319
|
logistics_autolink_audit: {
|
|
13320
13320
|
Row: {
|
|
13321
|
+
bron: string | null;
|
|
13321
13322
|
created_at: string;
|
|
13322
13323
|
id: string;
|
|
13323
13324
|
match_type: string;
|
|
13325
|
+
melding: string | null;
|
|
13324
13326
|
order_id: string | null;
|
|
13325
13327
|
order_item_id: string | null;
|
|
13326
13328
|
order_source: string | null;
|
|
13327
13329
|
product_floriday_id: string | null;
|
|
13328
13330
|
product_id: string | null;
|
|
13329
13331
|
product_name: string | null;
|
|
13332
|
+
source_line_key: string | null;
|
|
13333
|
+
status: string | null;
|
|
13330
13334
|
};
|
|
13331
13335
|
Insert: {
|
|
13336
|
+
bron?: string | null;
|
|
13332
13337
|
created_at?: string;
|
|
13333
13338
|
id?: string;
|
|
13334
13339
|
match_type: string;
|
|
13340
|
+
melding?: string | null;
|
|
13335
13341
|
order_id?: string | null;
|
|
13336
13342
|
order_item_id?: string | null;
|
|
13337
13343
|
order_source?: string | null;
|
|
13338
13344
|
product_floriday_id?: string | null;
|
|
13339
13345
|
product_id?: string | null;
|
|
13340
13346
|
product_name?: string | null;
|
|
13347
|
+
source_line_key?: string | null;
|
|
13348
|
+
status?: string | null;
|
|
13341
13349
|
};
|
|
13342
13350
|
Update: {
|
|
13351
|
+
bron?: string | null;
|
|
13343
13352
|
created_at?: string;
|
|
13344
13353
|
id?: string;
|
|
13345
13354
|
match_type?: string;
|
|
13355
|
+
melding?: string | null;
|
|
13346
13356
|
order_id?: string | null;
|
|
13347
13357
|
order_item_id?: string | null;
|
|
13348
13358
|
order_source?: string | null;
|
|
13349
13359
|
product_floriday_id?: string | null;
|
|
13350
13360
|
product_id?: string | null;
|
|
13351
13361
|
product_name?: string | null;
|
|
13362
|
+
source_line_key?: string | null;
|
|
13363
|
+
status?: string | null;
|
|
13352
13364
|
};
|
|
13353
13365
|
Relationships: [];
|
|
13354
13366
|
};
|
|
@@ -16684,6 +16696,7 @@ export type Database = {
|
|
|
16684
16696
|
conf_orange: number;
|
|
16685
16697
|
created_at: string;
|
|
16686
16698
|
domain_match: boolean;
|
|
16699
|
+
door_gebruiker_opgeslagen_at: string | null;
|
|
16687
16700
|
duplicate_days: number;
|
|
16688
16701
|
id: string;
|
|
16689
16702
|
max_age_days: number;
|
|
@@ -16700,6 +16713,7 @@ export type Database = {
|
|
|
16700
16713
|
singleton: boolean;
|
|
16701
16714
|
skip_domains: string[];
|
|
16702
16715
|
skip_senders: string[];
|
|
16716
|
+
standaard_lijsten_at: string | null;
|
|
16703
16717
|
updated_at: string;
|
|
16704
16718
|
};
|
|
16705
16719
|
Insert: {
|
|
@@ -16708,6 +16722,7 @@ export type Database = {
|
|
|
16708
16722
|
conf_orange?: number;
|
|
16709
16723
|
created_at?: string;
|
|
16710
16724
|
domain_match?: boolean;
|
|
16725
|
+
door_gebruiker_opgeslagen_at?: string | null;
|
|
16711
16726
|
duplicate_days?: number;
|
|
16712
16727
|
id?: string;
|
|
16713
16728
|
max_age_days?: number;
|
|
@@ -16724,6 +16739,7 @@ export type Database = {
|
|
|
16724
16739
|
singleton?: boolean;
|
|
16725
16740
|
skip_domains?: string[];
|
|
16726
16741
|
skip_senders?: string[];
|
|
16742
|
+
standaard_lijsten_at?: string | null;
|
|
16727
16743
|
updated_at?: string;
|
|
16728
16744
|
};
|
|
16729
16745
|
Update: {
|
|
@@ -16732,6 +16748,7 @@ export type Database = {
|
|
|
16732
16748
|
conf_orange?: number;
|
|
16733
16749
|
created_at?: string;
|
|
16734
16750
|
domain_match?: boolean;
|
|
16751
|
+
door_gebruiker_opgeslagen_at?: string | null;
|
|
16735
16752
|
duplicate_days?: number;
|
|
16736
16753
|
id?: string;
|
|
16737
16754
|
max_age_days?: number;
|
|
@@ -16748,6 +16765,7 @@ export type Database = {
|
|
|
16748
16765
|
singleton?: boolean;
|
|
16749
16766
|
skip_domains?: string[];
|
|
16750
16767
|
skip_senders?: string[];
|
|
16768
|
+
standaard_lijsten_at?: string | null;
|
|
16751
16769
|
updated_at?: string;
|
|
16752
16770
|
};
|
|
16753
16771
|
Relationships: [];
|
|
@@ -23689,6 +23707,7 @@ export type Database = {
|
|
|
23689
23707
|
fust_type_id: string | null;
|
|
23690
23708
|
gearchiveerd_at: string | null;
|
|
23691
23709
|
gearchiveerd_door: string | null;
|
|
23710
|
+
gearchiveerd_floriday_nul: boolean;
|
|
23692
23711
|
id: string;
|
|
23693
23712
|
image_url: string | null;
|
|
23694
23713
|
incoming_quantity: number;
|
|
@@ -23723,6 +23742,7 @@ export type Database = {
|
|
|
23723
23742
|
fust_type_id?: string | null;
|
|
23724
23743
|
gearchiveerd_at?: string | null;
|
|
23725
23744
|
gearchiveerd_door?: string | null;
|
|
23745
|
+
gearchiveerd_floriday_nul?: boolean;
|
|
23726
23746
|
id?: string;
|
|
23727
23747
|
image_url?: string | null;
|
|
23728
23748
|
incoming_quantity?: number;
|
|
@@ -23757,6 +23777,7 @@ export type Database = {
|
|
|
23757
23777
|
fust_type_id?: string | null;
|
|
23758
23778
|
gearchiveerd_at?: string | null;
|
|
23759
23779
|
gearchiveerd_door?: string | null;
|
|
23780
|
+
gearchiveerd_floriday_nul?: boolean;
|
|
23760
23781
|
id?: string;
|
|
23761
23782
|
image_url?: string | null;
|
|
23762
23783
|
incoming_quantity?: number;
|
|
@@ -38465,6 +38486,14 @@ export type Database = {
|
|
|
38465
38486
|
uitleg: string;
|
|
38466
38487
|
}[];
|
|
38467
38488
|
};
|
|
38489
|
+
logistics_install_check_231: {
|
|
38490
|
+
Args: never;
|
|
38491
|
+
Returns: {
|
|
38492
|
+
ok: boolean;
|
|
38493
|
+
punt: string;
|
|
38494
|
+
uitleg: string;
|
|
38495
|
+
}[];
|
|
38496
|
+
};
|
|
38468
38497
|
logistics_is_beheer: {
|
|
38469
38498
|
Args: never;
|
|
38470
38499
|
Returns: boolean;
|
|
@@ -41114,6 +41143,10 @@ export type Database = {
|
|
|
41114
41143
|
};
|
|
41115
41144
|
Returns: number;
|
|
41116
41145
|
};
|
|
41146
|
+
mailbox_add_standaard_woorden: {
|
|
41147
|
+
Args: never;
|
|
41148
|
+
Returns: Json;
|
|
41149
|
+
};
|
|
41117
41150
|
mailbox_claim_analysis: {
|
|
41118
41151
|
Args: {
|
|
41119
41152
|
p_force?: boolean;
|
|
@@ -41122,6 +41155,10 @@ export type Database = {
|
|
|
41122
41155
|
};
|
|
41123
41156
|
Returns: Json;
|
|
41124
41157
|
};
|
|
41158
|
+
mailbox_defaults_status: {
|
|
41159
|
+
Args: never;
|
|
41160
|
+
Returns: Json;
|
|
41161
|
+
};
|
|
41125
41162
|
mailbox_ensure_defaults: {
|
|
41126
41163
|
Args: never;
|
|
41127
41164
|
Returns: undefined;
|
|
@@ -41132,6 +41169,10 @@ export type Database = {
|
|
|
41132
41169
|
};
|
|
41133
41170
|
Returns: Json;
|
|
41134
41171
|
};
|
|
41172
|
+
mailbox_standaard_lijsten: {
|
|
41173
|
+
Args: never;
|
|
41174
|
+
Returns: Json;
|
|
41175
|
+
};
|
|
41135
41176
|
mark_offer_clicked: {
|
|
41136
41177
|
Args: {
|
|
41137
41178
|
p_code: string;
|
|
@@ -46389,6 +46430,29 @@ export type Database = {
|
|
|
46389
46430
|
};
|
|
46390
46431
|
Returns: Json;
|
|
46391
46432
|
};
|
|
46433
|
+
voorraad_artikel_archiveren: {
|
|
46434
|
+
Args: {
|
|
46435
|
+
p_archiveren: boolean;
|
|
46436
|
+
p_bevestigd?: boolean;
|
|
46437
|
+
p_id: string;
|
|
46438
|
+
p_ook_floriday?: boolean;
|
|
46439
|
+
};
|
|
46440
|
+
Returns: Json;
|
|
46441
|
+
};
|
|
46442
|
+
voorraad_artikel_detail: {
|
|
46443
|
+
Args: {
|
|
46444
|
+
p_id: string;
|
|
46445
|
+
};
|
|
46446
|
+
Returns: Json;
|
|
46447
|
+
};
|
|
46448
|
+
voorraad_artikel_opslaan: {
|
|
46449
|
+
Args: {
|
|
46450
|
+
p_id: string;
|
|
46451
|
+
p_nieuw: Json;
|
|
46452
|
+
p_oud: Json;
|
|
46453
|
+
};
|
|
46454
|
+
Returns: Json;
|
|
46455
|
+
};
|
|
46392
46456
|
voorraad_artikel_prijs: {
|
|
46393
46457
|
Args: {
|
|
46394
46458
|
p_id: string;
|
|
@@ -46555,6 +46619,14 @@ export type Database = {
|
|
|
46555
46619
|
Args: never;
|
|
46556
46620
|
Returns: Json;
|
|
46557
46621
|
};
|
|
46622
|
+
voorraad_eigen_velden_opslaan: {
|
|
46623
|
+
Args: {
|
|
46624
|
+
p_id: string;
|
|
46625
|
+
p_nieuw: Json;
|
|
46626
|
+
p_oud: Json;
|
|
46627
|
+
};
|
|
46628
|
+
Returns: Json;
|
|
46629
|
+
};
|
|
46558
46630
|
voorraad_ensure_defaults: {
|
|
46559
46631
|
Args: never;
|
|
46560
46632
|
Returns: Json;
|
|
@@ -46592,6 +46664,12 @@ export type Database = {
|
|
|
46592
46664
|
};
|
|
46593
46665
|
Returns: boolean;
|
|
46594
46666
|
};
|
|
46667
|
+
voorraad_floriday_volgt: {
|
|
46668
|
+
Args: {
|
|
46669
|
+
p_product_id: string;
|
|
46670
|
+
};
|
|
46671
|
+
Returns: boolean;
|
|
46672
|
+
};
|
|
46595
46673
|
voorraad_fust_bijhouden: {
|
|
46596
46674
|
Args: {
|
|
46597
46675
|
p_fust_type_id: string;
|
|
@@ -46683,6 +46761,10 @@ export type Database = {
|
|
|
46683
46761
|
Args: never;
|
|
46684
46762
|
Returns: Json;
|
|
46685
46763
|
};
|
|
46764
|
+
voorraad_instellingen_lezen: {
|
|
46765
|
+
Args: never;
|
|
46766
|
+
Returns: Json;
|
|
46767
|
+
};
|
|
46686
46768
|
voorraad_instellingen_opslaan: {
|
|
46687
46769
|
Args: {
|
|
46688
46770
|
p_standaard_sturing: string;
|
|
@@ -46762,6 +46844,12 @@ export type Database = {
|
|
|
46762
46844
|
};
|
|
46763
46845
|
Returns: Json;
|
|
46764
46846
|
};
|
|
46847
|
+
voorraad_orders_gearchiveerd: {
|
|
46848
|
+
Args: {
|
|
46849
|
+
p_product_id?: string;
|
|
46850
|
+
};
|
|
46851
|
+
Returns: Json;
|
|
46852
|
+
};
|
|
46765
46853
|
voorraad_overzicht_orderregel_koppeling: {
|
|
46766
46854
|
Args: {
|
|
46767
46855
|
p_voorbeelden?: number;
|
|
@@ -46826,6 +46914,34 @@ export type Database = {
|
|
|
46826
46914
|
};
|
|
46827
46915
|
Returns: Json;
|
|
46828
46916
|
};
|
|
46917
|
+
voorraad_traysticker_opslaan: {
|
|
46918
|
+
Args: {
|
|
46919
|
+
p_nieuw: Json;
|
|
46920
|
+
p_oud_pad: string;
|
|
46921
|
+
p_product_id: string;
|
|
46922
|
+
};
|
|
46923
|
+
Returns: Json;
|
|
46924
|
+
};
|
|
46925
|
+
voorraad_twijfel_kiezen: {
|
|
46926
|
+
Args: {
|
|
46927
|
+
p_floriday_id: string;
|
|
46928
|
+
p_product_id: string;
|
|
46929
|
+
};
|
|
46930
|
+
Returns: Json;
|
|
46931
|
+
};
|
|
46932
|
+
voorraad_twijfel_lijst: {
|
|
46933
|
+
Args: {
|
|
46934
|
+
p_floriday_id?: string;
|
|
46935
|
+
p_product_id?: string;
|
|
46936
|
+
};
|
|
46937
|
+
Returns: Json;
|
|
46938
|
+
};
|
|
46939
|
+
voorraad_twijfel_nieuw_artikel: {
|
|
46940
|
+
Args: {
|
|
46941
|
+
p_floriday_id: string;
|
|
46942
|
+
};
|
|
46943
|
+
Returns: Json;
|
|
46944
|
+
};
|
|
46829
46945
|
voorraad_vereis: {
|
|
46830
46946
|
Args: {
|
|
46831
46947
|
p_functie: string;
|
|
@@ -46841,6 +46957,14 @@ export type Database = {
|
|
|
46841
46957
|
};
|
|
46842
46958
|
Returns: Json;
|
|
46843
46959
|
};
|
|
46960
|
+
voorraad_voorraad_instellingen_opslaan: {
|
|
46961
|
+
Args: {
|
|
46962
|
+
p_nieuw: Json;
|
|
46963
|
+
p_oud: Json;
|
|
46964
|
+
p_product_id: string;
|
|
46965
|
+
};
|
|
46966
|
+
Returns: Json;
|
|
46967
|
+
};
|
|
46844
46968
|
voorraad_voorraad_opslaan: {
|
|
46845
46969
|
Args: {
|
|
46846
46970
|
p_artikel_notitie?: string;
|