@flowselections/floriday-verkoop-module 1.0.132 → 1.0.133

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 (53) hide show
  1. package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
  2. package/dist-lib/components/verkoop/CreateOrderPage.js +4 -1
  3. package/dist-lib/components/verkoop/InvoiceSignoffSettings.d.ts +2 -0
  4. package/dist-lib/components/verkoop/InvoiceSignoffSettings.d.ts.map +1 -0
  5. package/dist-lib/components/verkoop/InvoiceSignoffSettings.js +31 -0
  6. package/dist-lib/components/verkoop/SalesOrderDetailView.js +1 -1
  7. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  8. package/dist-lib/components/verkoop/SalesOrdersTable.js +1 -1
  9. package/dist-lib/index.d.ts.map +1 -1
  10. package/dist-lib/index.js +2 -0
  11. package/dist-lib/integrations/supabase/types.d.ts +18 -0
  12. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  13. package/dist-lib/lib/delivery-location.server.d.ts.map +1 -1
  14. package/dist-lib/lib/delivery-location.server.js +56 -13
  15. package/dist-lib/lib/invoice-release.check.d.ts +2 -0
  16. package/dist-lib/lib/invoice-release.check.d.ts.map +1 -0
  17. package/dist-lib/lib/invoice-release.check.js +21 -0
  18. package/dist-lib/lib/invoice-signoff-payload.check.d.ts +2 -0
  19. package/dist-lib/lib/invoice-signoff-payload.check.d.ts.map +1 -0
  20. package/dist-lib/lib/invoice-signoff-payload.check.js +27 -0
  21. package/dist-lib/lib/invoice-signoff-payload.d.ts +4 -0
  22. package/dist-lib/lib/invoice-signoff-payload.d.ts.map +1 -0
  23. package/dist-lib/lib/invoice-signoff-payload.js +5 -0
  24. package/dist-lib/lib/invoice-timing.d.ts +35 -0
  25. package/dist-lib/lib/invoice-timing.d.ts.map +1 -1
  26. package/dist-lib/lib/invoice-timing.functions.d.ts +16 -2
  27. package/dist-lib/lib/invoice-timing.functions.d.ts.map +1 -1
  28. package/dist-lib/lib/invoice-timing.functions.js +33 -2
  29. package/dist-lib/lib/invoice-timing.js +29 -0
  30. package/dist-lib/lib/invoice-timing.server.d.ts +19 -3
  31. package/dist-lib/lib/invoice-timing.server.d.ts.map +1 -1
  32. package/dist-lib/lib/invoice-timing.server.js +75 -11
  33. package/dist-lib/lib/module-version.d.ts +1 -1
  34. package/dist-lib/lib/module-version.js +1 -1
  35. package/dist-lib/lib/plan-coverage-v204.check.js +2 -0
  36. package/dist-lib/lib/plan-coverage.d.ts +9 -2
  37. package/dist-lib/lib/plan-coverage.d.ts.map +1 -1
  38. package/dist-lib/lib/plan-coverage.js +15 -3
  39. package/dist-lib/lib/product-oordeel.d.ts +12 -0
  40. package/dist-lib/lib/product-oordeel.d.ts.map +1 -0
  41. package/dist-lib/lib/product-oordeel.js +24 -0
  42. package/dist-lib/lib/product-plannable.functions.d.ts +2 -0
  43. package/dist-lib/lib/product-plannable.functions.d.ts.map +1 -1
  44. package/dist-lib/lib/product-plannable.functions.js +15 -9
  45. package/dist-lib/lib/salesorders-list.functions.d.ts +1 -1
  46. package/dist-lib/lib/salesorders-list.server.d.ts.map +1 -1
  47. package/dist-lib/lib/salesorders-list.server.js +6 -1
  48. package/dist-lib/lib/salesorders-mapping.d.ts +4 -0
  49. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  50. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  51. package/dist-lib/lib/salesorders.functions.js +4 -1
  52. package/package.json +1 -1
  53. package/schema/verkoop.sql +5 -0
@@ -1 +1 @@
1
- {"version":3,"file":"CreateOrderPage.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/CreateOrderPage.tsx"],"names":[],"mappings":"AAmGA,wBAAgB,eAAe,gCA4lC9B"}
1
+ {"version":3,"file":"CreateOrderPage.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/CreateOrderPage.tsx"],"names":[],"mappings":"AAmGA,wBAAgB,eAAe,gCAymC9B"}
@@ -186,6 +186,8 @@ export function CreateOrderPage() {
186
186
  cratesPerLayer: eff?.crates_per_layer ?? null,
187
187
  layersPerCart: eff?.layers_per_cart ?? null,
188
188
  isDefault: !!eff && !!def && beladingKey(eff) === beladingKey(def),
189
+ // Code op de regel, anders die van de standaardverpakking; ongewijzigd doorsturen.
190
+ carrierCode: l.belading?.cart_code ?? def?.cart_code ?? null,
189
191
  }];
190
192
  }),
191
193
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -205,6 +207,7 @@ export function CreateOrderPage() {
205
207
  });
206
208
  const impossibleByLine = plannableQ.data?.impossibleByLine ?? {};
207
209
  const missingByProduct = plannableQ.data?.missing ?? {};
210
+ const missingByLine = plannableQ.data?.missingByLine ?? {};
208
211
  const beladingByProduct = beladingQ.data?.byProduct ?? {};
209
212
  // Zodra de lijst binnen is: zorg dat de gekozen belading een geldige optie is.
210
213
  useEffect(() => {
@@ -678,7 +681,7 @@ export function CreateOrderPage() {
678
681
  next[idx] = { ...next[idx], unit_price: v };
679
682
  setLines(next);
680
683
  }, placeholder: "\u20AC prijs", "aria-invalid": !!line.product_id && !(Number(line.unit_price) > 0), title: !!line.product_id && !(Number(line.unit_price) > 0) ? "Prijs € 0" : undefined })] }), _jsx(Button, { variant: "ghost", size: "icon", className: "col-span-2 justify-self-end lg:col-span-1 lg:justify-self-auto", onClick: () => setLines(lines.filter((_, i) => i !== idx)), "aria-label": "Regel verwijderen", children: _jsx(Trash2, { className: "h-4 w-4" }) })] }, idx));
681
- }), lines.some((l, i) => l.product_id && impossibleByLine[String(i)]) && (_jsxs("div", { className: "rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: [_jsx("div", { className: "font-medium", children: "De Engine noemt deze regels onmogelijk met de gekozen belading:" }), _jsx("ul", { className: "mt-1 list-disc pl-5", children: lines.map((l, i) => l.product_id && impossibleByLine[String(i)] ? (_jsxs("li", { children: [l.product_name || "Product", ": ", impossibleByLine[String(i)]] }, i)) : null) })] })), lines.some((l) => l.product_id && !impossibleByLine[String(lines.indexOf(l))] && missingByProduct[l.product_id]) && (_jsxs("div", { className: "rounded-md border border-border bg-muted/40 px-3 py-2 text-sm text-foreground", children: [_jsx("div", { className: "font-medium", children: "Gegevens ontbreken voor de Engine:" }), _jsx("ul", { className: "mt-1 list-disc pl-5", children: lines.filter((l) => l.product_id && !impossibleByLine[String(lines.indexOf(l))] && missingByProduct[l.product_id]).map((l) => (_jsxs("li", { children: [l.product_name || "Product", ": ", missingByProduct[l.product_id]] }, l.product_id))) })] })), lines.some((l) => l.product_id && !(Number(l.unit_price) > 0)) && (_jsxs("div", { className: "rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: ["Prijs \u20AC 0: ", zeroPriceCount, " regel(s) zonder prijs. Er is geen prijs gevonden in prijsgroep of artikel. Vul de prijs in, of bevestig bij het aanmaken dat \u20AC 0 klopt."] })), _jsxs(Button, { variant: "outline", size: "sm", onClick: () => setLines([...lines, { product_id: null, product_name: "", quantity: null, unit: "stuks", unit_price: null, belading: null }]), children: [_jsx(Plus, { className: "h-3 w-3 mr-1" }), " Regel toevoegen"] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { children: "Referentie klant" }), _jsx(Input, { value: customerReference, maxLength: 100, onChange: (e) => setCustomerReference(e.target.value), placeholder: "Optioneel, bijvoorbeeld het bestelnummer van je klant" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { children: "Opmerkingen" }), _jsx(Textarea, { value: notes, onChange: (e) => setNotes(e.target.value), placeholder: "Optionele notities bij deze bestelling", rows: 3 })] }), stockCheck && stockCheck.shortages.length > 0 && (_jsxs("div", { className: `rounded-md border p-3 text-sm ${stockBlocked
684
+ }), lines.some((l, i) => l.product_id && impossibleByLine[String(i)]) && (_jsxs("div", { className: "rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: [_jsx("div", { className: "font-medium", children: "De Engine noemt deze regels onmogelijk met de gekozen belading:" }), _jsx("ul", { className: "mt-1 list-disc pl-5", children: lines.map((l, i) => l.product_id && impossibleByLine[String(i)] ? (_jsxs("li", { children: [l.product_name || "Product", ": ", impossibleByLine[String(i)]] }, i)) : null) })] })), lines.some((l, i) => l.product_id && !impossibleByLine[String(i)] && missingByLine[String(i)]) && (_jsxs("div", { className: "rounded-md border border-border bg-muted/40 px-3 py-2 text-sm text-foreground", children: [_jsx("div", { className: "font-medium", children: "Let op (geen blokkade):" }), _jsx("ul", { className: "mt-1 list-disc pl-5", children: lines.map((l, i) => l.product_id && !impossibleByLine[String(i)] && missingByLine[String(i)] ? (_jsxs("li", { children: [missingByLine[String(i)], " bij artikel ", l.product_name || "Product"] }, i)) : null) })] })), lines.some((l) => l.product_id && !impossibleByLine[String(lines.indexOf(l))] && missingByProduct[l.product_id]) && (_jsxs("div", { className: "rounded-md border border-border bg-muted/40 px-3 py-2 text-sm text-foreground", children: [_jsx("div", { className: "font-medium", children: "Gegevens ontbreken voor de Engine:" }), _jsx("ul", { className: "mt-1 list-disc pl-5", children: lines.filter((l) => l.product_id && !impossibleByLine[String(lines.indexOf(l))] && missingByProduct[l.product_id]).map((l) => (_jsxs("li", { children: [l.product_name || "Product", ": ", missingByProduct[l.product_id]] }, l.product_id))) })] })), lines.some((l) => l.product_id && !(Number(l.unit_price) > 0)) && (_jsxs("div", { className: "rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: ["Prijs \u20AC 0: ", zeroPriceCount, " regel(s) zonder prijs. Er is geen prijs gevonden in prijsgroep of artikel. Vul de prijs in, of bevestig bij het aanmaken dat \u20AC 0 klopt."] })), _jsxs(Button, { variant: "outline", size: "sm", onClick: () => setLines([...lines, { product_id: null, product_name: "", quantity: null, unit: "stuks", unit_price: null, belading: null }]), children: [_jsx(Plus, { className: "h-3 w-3 mr-1" }), " Regel toevoegen"] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { children: "Referentie klant" }), _jsx(Input, { value: customerReference, maxLength: 100, onChange: (e) => setCustomerReference(e.target.value), placeholder: "Optioneel, bijvoorbeeld het bestelnummer van je klant" })] }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { children: "Opmerkingen" }), _jsx(Textarea, { value: notes, onChange: (e) => setNotes(e.target.value), placeholder: "Optionele notities bij deze bestelling", rows: 3 })] }), stockCheck && stockCheck.shortages.length > 0 && (_jsxs("div", { className: `rounded-md border p-3 text-sm ${stockBlocked
682
685
  ? "border-destructive/40 bg-destructive/5 text-destructive"
683
686
  : "border-amber-500/40 bg-amber-500/5 text-amber-700"}`, children: [_jsx("div", { className: "font-medium", children: stockBlocked
684
687
  ? "Bestelling geblokkeerd — onvoldoende voorraad"
@@ -0,0 +1,2 @@
1
+ export declare function InvoiceSignoffSettingsCard(): import("react").JSX.Element;
2
+ //# sourceMappingURL=InvoiceSignoffSettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvoiceSignoffSettings.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/InvoiceSignoffSettings.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,0BAA0B,gCAkDzC"}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Instellingenkaart: factuurmoment — schakelaar "Factureren zonder afmelding".
3
+ import { useState } from "react";
4
+ import { useQuery, useQueryClient } from "@tanstack/react-query";
5
+ import { useServerFn } from "@tanstack/react-start";
6
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle, Label, Switch, toast, } from "@flowselections/core";
7
+ import { Receipt } from "lucide-react";
8
+ import { getInvoiceTimingSettings, saveInvoiceWithoutSignoff, } from "../../lib/invoice-timing.functions.js";
9
+ export function InvoiceSignoffSettingsCard() {
10
+ const load = useServerFn(getInvoiceTimingSettings);
11
+ const save = useServerFn(saveInvoiceWithoutSignoff);
12
+ const qc = useQueryClient();
13
+ const [saving, setSaving] = useState(false);
14
+ const query = useQuery({ queryKey: ["invoice-timing-settings"], queryFn: () => load() });
15
+ const value = query.data?.invoiceWithoutSignoff === true;
16
+ async function toggle(next) {
17
+ setSaving(true);
18
+ try {
19
+ await save({ data: { value: next } });
20
+ toast.success(next ? "Factureren zonder afmelding staat aan" : "Factureren zonder afmelding staat uit");
21
+ }
22
+ catch (e) {
23
+ toast.error(e?.message ?? "Opslaan mislukt");
24
+ }
25
+ finally {
26
+ await qc.invalidateQueries({ queryKey: ["invoice-timing-settings"] });
27
+ setSaving(false);
28
+ }
29
+ }
30
+ return (_jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsxs(CardTitle, { className: "flex items-center gap-2", children: [_jsx(Receipt, { className: "h-5 w-5" }), " Factuurmoment"] }), _jsx(CardDescription, { children: "Wanneer orders klaar zijn om te factureren." })] }), _jsx(CardContent, { children: _jsxs("div", { className: "flex items-start justify-between gap-4", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "invoice-without-signoff", children: "Factureren zonder afmelding" }), _jsx("p", { className: "text-sm text-muted-foreground", children: "Orders zonder karindeling worden op het factuurmoment gefactureerd, ook zonder afmelding." }), query.isError && (_jsx("p", { className: "text-sm text-destructive", children: "Instelling kon niet worden geladen." }))] }), _jsx(Switch, { id: "invoice-without-signoff", checked: value, disabled: saving || query.isLoading || query.isError, onCheckedChange: toggle })] }) })] }));
31
+ }
@@ -280,7 +280,7 @@ function SalesOrderDetailViewInner({ floridayLoading, order, sellerFallback, hid
280
280
  ? (order.articleCount ?? 0) > 1
281
281
  ? `Gemengd (${order.articleCount} artikelen)`
282
282
  : "Gemengd"
283
- : belading }), _jsx(Row, { label: "Klant referentie", children: klantReferentie }), _jsx(Row, { label: "Floriday-referentie", children: floridayRef }), _jsx(Row, { label: "Verkoopkanaal", children: verkoopkanaal }), _jsx(Row, { label: "Financi\u00EBle afhandeling", children: financial }), _jsx(Row, { label: "Verkoper", children: sellerName ? (_jsxs("span", { className: "inline-flex items-center gap-2", children: [_jsx("span", { className: "inline-flex h-6 w-6 items-center justify-center rounded-full bg-muted text-[10px] font-semibold text-muted-foreground", children: initials(sellerName) }), sellerName] })) : ("—") })] }), fs && (_jsxs("div", { children: [_jsx(SectionTitle, { children: "Floriday" }), _jsx(Row, { label: "Stand", children: _jsx(FloridayStageLine, { status: fs, stage: order.stage, floridayFulfilled: order.floridayFulfilled, isFloriday: true, loading: floridayLoading }) }), _jsxs(Row, { label: "Herkomst status", children: [order.statusOrigin === "floriday" ? "Floriday" : "ERP", order.statusChangedAt ? ` · ${fmtDateTime(order.statusChangedAt)}` : ""] }), fs.entries.map((e) => (_jsx(Row, { label: `Bestelling ${e.salesOrderId.slice(0, 8)}`, children: _jsxs("div", { className: "space-y-0.5 text-sm", children: [_jsxs("div", { children: ["Floriday-status: ", e.salesOrderStatus ?? "—"] }), _jsxs("div", { children: ["Afleververzoeken: ", e.fulfillmentRequests.length, " \u00B7 Afhandelingen:", " ", e.fulfillmentOrders.length
283
+ : belading }), _jsx(Row, { label: "Klant referentie", children: klantReferentie }), _jsx(Row, { label: "Floriday-referentie", children: floridayRef }), _jsx(Row, { label: "Verkoopkanaal", children: verkoopkanaal }), _jsx(Row, { label: "Financi\u00EBle afhandeling", children: financial }), _jsx(Row, { label: "Verkoper", children: sellerName ? (_jsxs("span", { className: "inline-flex items-center gap-2", children: [_jsx("span", { className: "inline-flex h-6 w-6 items-center justify-center rounded-full bg-muted text-[10px] font-semibold text-muted-foreground", children: initials(sellerName) }), sellerName] })) : ("—") }), order.invoiceState && (_jsxs(Row, { label: "Facturatie", children: [_jsx("span", { children: order.invoiceState }), order.invoiceNote ? _jsx("span", { className: "block text-xs text-muted-foreground", children: order.invoiceNote }) : null] }))] }), fs && (_jsxs("div", { children: [_jsx(SectionTitle, { children: "Floriday" }), _jsx(Row, { label: "Stand", children: _jsx(FloridayStageLine, { status: fs, stage: order.stage, floridayFulfilled: order.floridayFulfilled, isFloriday: true, loading: floridayLoading }) }), _jsxs(Row, { label: "Herkomst status", children: [order.statusOrigin === "floriday" ? "Floriday" : "ERP", order.statusChangedAt ? ` · ${fmtDateTime(order.statusChangedAt)}` : ""] }), fs.entries.map((e) => (_jsx(Row, { label: `Bestelling ${e.salesOrderId.slice(0, 8)}`, children: _jsxs("div", { className: "space-y-0.5 text-sm", children: [_jsxs("div", { children: ["Floriday-status: ", e.salesOrderStatus ?? "—"] }), _jsxs("div", { children: ["Afleververzoeken: ", e.fulfillmentRequests.length, " \u00B7 Afhandelingen:", " ", e.fulfillmentOrders.length
284
284
  ? e.fulfillmentOrders.map((f) => f.status ?? "?").join(", ")
285
285
  : "geen"] }), _jsxs("div", { children: ["Verkoopkanaal: ", e.salesChannel ?? "—", " \u00B7 Handelsvorm: ", e.tradeInstrument ?? "—", " \u00B7 Incoterm: ", e.incoterm ?? "niet opgegeven"] }), _jsxs("div", { children: ["Klantreferentie: ", e.customerOrderId ?? "—", " \u00B7 Floriday-referentie: ", e.salesChannelOrderId ?? "—"] }), _jsxs("div", { children: ["Koper: ", e.customerOrganizationId ?? "—", " \u00B7 GLN: ", e.customerGln ?? "—"] }), _jsxs("div", { className: "text-xs text-muted-foreground", children: ["Laatst gewijzigd: ", e.lastModifiedDateTime ? fmtDateTime(e.lastModifiedDateTime) : "—", " \u00B7 Ververst: ", e.cachedAt ? fmtDateTime(e.cachedAt) : "—"] })] }) }, e.salesOrderId)))] })), _jsxs("div", { children: [_jsx(SectionTitle, { children: "Levering" }), _jsx(Row, { label: "Afleverdatum", children: fmtDateTime(order.deliveryAt) }), _jsx(Row, { label: "Incoterm", children: incoterm }), _jsx(Row, { label: "Afleveradres", children: _jsx(AddressCard, { icon: _jsx(MapPin, { className: "h-5 w-5" }), lines: resolvedAddresses?.delivery
286
286
  ? [
@@ -1 +1 @@
1
- {"version":3,"file":"SalesOrdersTable.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/SalesOrdersTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAyBjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAyGnE,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAG1D;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,OAAO,EACP,aAAa,EACb,aAAa,EACb,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,EAAE;IACD,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC/C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC7C,qBAoWA"}
1
+ {"version":3,"file":"SalesOrdersTable.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/SalesOrdersTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAyBjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAkHnE,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAG1D;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,OAAO,EACP,aAAa,EACb,aAAa,EACb,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,EAAE;IACD,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC/C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC7C,qBAoWA"}
@@ -65,7 +65,7 @@ function StatusTag({ order }) {
65
65
  ? "Leverdatum is voorbij, maar de order is nog niet gepickt."
66
66
  : "Leverdatum is voorbij, maar de order is nog niet gepickt.", children: order.backlogDays != null
67
67
  ? `Achterstand · ${order.backlogDays} ${order.backlogDays === 1 ? "dag" : "dagen"}`
68
- : "Achterstand" })), !order.backlog && order.backlogUnknown && (_jsx(Badge, { variant: "outline", className: "border-transparent bg-muted text-[11px] font-normal text-muted-foreground", title: "De achterstand kon niet bij de Logistiek Engine worden opgevraagd", children: "achterstand onbekend" }))] }));
68
+ : "Achterstand" })), !order.backlog && order.backlogUnknown && (_jsx(Badge, { variant: "outline", className: "border-transparent bg-muted text-[11px] font-normal text-muted-foreground", title: "De achterstand kon niet bij de Logistiek Engine worden opgevraagd", children: "achterstand onbekend" })), order.invoiceState && (_jsx(Badge, { variant: "outline", className: "border-transparent bg-muted text-[11px] font-normal text-muted-foreground", title: order.invoiceNote ?? "Factuurstand; de orderstatus blijft de logistieke stand", children: order.invoiceState }))] }));
69
69
  }
70
70
  /** Stabiele rij-id: buffers zijn serverside al samengevouwen tot één rij. */
71
71
  export function salesOrderRowId(row) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAIvE,eAAO,MAAM,qBAAqB,EAAE,UAoBnC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIvD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAIvE,eAAO,MAAM,qBAAqB,EAAE,UAqBnC,CAAC"}
package/dist-lib/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ShoppingCart, ListOrdered } from "lucide-react";
2
2
  import { ProductDimensionsSettingsCard } from "./components/verkoop/ProductDimensionsSettings.js";
3
+ import { InvoiceSignoffSettingsCard } from "./components/verkoop/InvoiceSignoffSettings.js";
3
4
  export * from "./_core-safelist.js";
4
5
  export { VerkoopOrdersPage } from "./components/verkoop/VerkoopOrdersPage.js";
5
6
  export { SalesOrderDetailPage } from "./components/verkoop/SalesOrderDetailPage.js";
@@ -22,5 +23,6 @@ export const floridayVerkoopModule = {
22
23
  },
23
24
  settingsCards: [
24
25
  { component: ProductDimensionsSettingsCard, order: 20 },
26
+ { component: InvoiceSignoffSettingsCard, order: 25 },
25
27
  ],
26
28
  };
@@ -10456,6 +10456,7 @@ export type Database = {
10456
10456
  created_at: string;
10457
10457
  enabled: boolean;
10458
10458
  id: string;
10459
+ invoice_without_signoff: boolean;
10459
10460
  offset_days: number;
10460
10461
  pickup_anchor: string;
10461
10462
  pickup_business_days_only: boolean;
@@ -10471,6 +10472,7 @@ export type Database = {
10471
10472
  created_at?: string;
10472
10473
  enabled?: boolean;
10473
10474
  id?: string;
10475
+ invoice_without_signoff?: boolean;
10474
10476
  offset_days?: number;
10475
10477
  pickup_anchor?: string;
10476
10478
  pickup_business_days_only?: boolean;
@@ -10486,6 +10488,7 @@ export type Database = {
10486
10488
  created_at?: string;
10487
10489
  enabled?: boolean;
10488
10490
  id?: string;
10491
+ invoice_without_signoff?: boolean;
10489
10492
  offset_days?: number;
10490
10493
  pickup_anchor?: string;
10491
10494
  pickup_business_days_only?: boolean;
@@ -18552,6 +18555,8 @@ export type Database = {
18552
18555
  floriday_sales_order_id: string | null;
18553
18556
  id: string;
18554
18557
  invoice_due_at: string | null;
18558
+ invoice_ready_at: string | null;
18559
+ invoice_ready_note: string | null;
18555
18560
  is_reservation: boolean;
18556
18561
  notes: string | null;
18557
18562
  order_date: string;
@@ -18586,6 +18591,8 @@ export type Database = {
18586
18591
  floriday_sales_order_id?: string | null;
18587
18592
  id?: string;
18588
18593
  invoice_due_at?: string | null;
18594
+ invoice_ready_at?: string | null;
18595
+ invoice_ready_note?: string | null;
18589
18596
  is_reservation?: boolean;
18590
18597
  notes?: string | null;
18591
18598
  order_date?: string;
@@ -18620,6 +18627,8 @@ export type Database = {
18620
18627
  floriday_sales_order_id?: string | null;
18621
18628
  id?: string;
18622
18629
  invoice_due_at?: string | null;
18630
+ invoice_ready_at?: string | null;
18631
+ invoice_ready_note?: string | null;
18623
18632
  is_reservation?: boolean;
18624
18633
  notes?: string | null;
18625
18634
  order_date?: string;
@@ -19876,25 +19885,31 @@ export type Database = {
19876
19885
  Row: {
19877
19886
  id: boolean;
19878
19887
  last_cleanup_at: string | null;
19888
+ last_duration_ms: number | null;
19879
19889
  last_error: string | null;
19880
19890
  last_error_at: string | null;
19881
19891
  last_sync_at: string | null;
19892
+ sync_requested_at: string | null;
19882
19893
  updated_at: string;
19883
19894
  };
19884
19895
  Insert: {
19885
19896
  id?: boolean;
19886
19897
  last_cleanup_at?: string | null;
19898
+ last_duration_ms?: number | null;
19887
19899
  last_error?: string | null;
19888
19900
  last_error_at?: string | null;
19889
19901
  last_sync_at?: string | null;
19902
+ sync_requested_at?: string | null;
19890
19903
  updated_at?: string;
19891
19904
  };
19892
19905
  Update: {
19893
19906
  id?: boolean;
19894
19907
  last_cleanup_at?: string | null;
19908
+ last_duration_ms?: number | null;
19895
19909
  last_error?: string | null;
19896
19910
  last_error_at?: string | null;
19897
19911
  last_sync_at?: string | null;
19912
+ sync_requested_at?: string | null;
19898
19913
  updated_at?: string;
19899
19914
  };
19900
19915
  Relationships: [];
@@ -29768,6 +29783,7 @@ export type Database = {
29768
29783
  sequence_number: number;
29769
29784
  signature_accepted_at: string | null;
29770
29785
  signature_by_user_id: string | null;
29786
+ signature_image_path: string | null;
29771
29787
  signature_name: string | null;
29772
29788
  source_email_meta: Json | null;
29773
29789
  source_mailbox_message_id: string | null;
@@ -29816,6 +29832,7 @@ export type Database = {
29816
29832
  sequence_number: number;
29817
29833
  signature_accepted_at?: string | null;
29818
29834
  signature_by_user_id?: string | null;
29835
+ signature_image_path?: string | null;
29819
29836
  signature_name?: string | null;
29820
29837
  source_email_meta?: Json | null;
29821
29838
  source_mailbox_message_id?: string | null;
@@ -29864,6 +29881,7 @@ export type Database = {
29864
29881
  sequence_number?: number;
29865
29882
  signature_accepted_at?: string | null;
29866
29883
  signature_by_user_id?: string | null;
29884
+ signature_image_path?: string | null;
29867
29885
  signature_name?: string | null;
29868
29886
  source_email_meta?: Json | null;
29869
29887
  source_mailbox_message_id?: string | null;