@flowselections/floriday-verkoop-module 1.0.130 → 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.
- package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
- package/dist-lib/components/verkoop/CreateOrderPage.js +25 -4
- package/dist-lib/components/verkoop/EngineActieButtons.d.ts +7 -0
- package/dist-lib/components/verkoop/EngineActieButtons.d.ts.map +1 -0
- package/dist-lib/components/verkoop/EngineActieButtons.js +22 -0
- package/dist-lib/components/verkoop/FloridayStageLine.d.ts +3 -1
- package/dist-lib/components/verkoop/FloridayStageLine.d.ts.map +1 -1
- package/dist-lib/components/verkoop/FloridayStageLine.js +4 -1
- package/dist-lib/components/verkoop/InvoiceSignoffSettings.d.ts +2 -0
- package/dist-lib/components/verkoop/InvoiceSignoffSettings.d.ts.map +1 -0
- package/dist-lib/components/verkoop/InvoiceSignoffSettings.js +31 -0
- package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts +4 -0
- package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts.map +1 -1
- package/dist-lib/components/verkoop/OrderKarindelingCard.js +17 -1
- package/dist-lib/components/verkoop/OrderLinePackingCard.d.ts.map +1 -1
- package/dist-lib/components/verkoop/OrderLinePackingCard.js +22 -5
- package/dist-lib/components/verkoop/SalesOrderDetailPage.js +1 -1
- package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts +1 -1
- package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
- package/dist-lib/components/verkoop/SalesOrderDetailView.js +25 -2
- package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
- package/dist-lib/components/verkoop/SalesOrdersTable.js +24 -2
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/index.js +2 -0
- package/dist-lib/integrations/supabase/types.d.ts +326 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/delivery-location.check.js +2 -1
- package/dist-lib/lib/delivery-location.server.d.ts.map +1 -1
- package/dist-lib/lib/delivery-location.server.js +56 -13
- package/dist-lib/lib/floriday-line-key.check.js +19 -0
- package/dist-lib/lib/floriday-line-key.d.ts +20 -0
- package/dist-lib/lib/floriday-line-key.d.ts.map +1 -1
- package/dist-lib/lib/floriday-line-key.js +24 -0
- package/dist-lib/lib/floriday-mirror.server.d.ts.map +1 -1
- package/dist-lib/lib/floriday-mirror.server.js +50 -4
- package/dist-lib/lib/floriday-status.server.d.ts +1 -1
- package/dist-lib/lib/floriday-status.server.d.ts.map +1 -1
- package/dist-lib/lib/floriday-status.server.js +3 -3
- package/dist-lib/lib/invoice-release.check.d.ts +2 -0
- package/dist-lib/lib/invoice-release.check.d.ts.map +1 -0
- package/dist-lib/lib/invoice-release.check.js +21 -0
- package/dist-lib/lib/invoice-signoff-payload.check.d.ts +2 -0
- package/dist-lib/lib/invoice-signoff-payload.check.d.ts.map +1 -0
- package/dist-lib/lib/invoice-signoff-payload.check.js +27 -0
- package/dist-lib/lib/invoice-signoff-payload.d.ts +4 -0
- package/dist-lib/lib/invoice-signoff-payload.d.ts.map +1 -0
- package/dist-lib/lib/invoice-signoff-payload.js +5 -0
- package/dist-lib/lib/invoice-timing.d.ts +35 -0
- package/dist-lib/lib/invoice-timing.d.ts.map +1 -1
- package/dist-lib/lib/invoice-timing.functions.d.ts +16 -2
- package/dist-lib/lib/invoice-timing.functions.d.ts.map +1 -1
- package/dist-lib/lib/invoice-timing.functions.js +33 -2
- package/dist-lib/lib/invoice-timing.js +29 -0
- package/dist-lib/lib/invoice-timing.server.d.ts +19 -3
- package/dist-lib/lib/invoice-timing.server.d.ts.map +1 -1
- package/dist-lib/lib/invoice-timing.server.js +75 -11
- package/dist-lib/lib/module-version.d.ts +1 -1
- package/dist-lib/lib/module-version.js +1 -1
- package/dist-lib/lib/order-fust.check.d.ts +2 -0
- package/dist-lib/lib/order-fust.check.d.ts.map +1 -0
- package/dist-lib/lib/order-fust.check.js +19 -0
- package/dist-lib/lib/order-fust.d.ts +19 -0
- package/dist-lib/lib/order-fust.d.ts.map +1 -0
- package/dist-lib/lib/order-fust.js +21 -0
- package/dist-lib/lib/order-item-packing.functions.d.ts +22 -0
- package/dist-lib/lib/order-item-packing.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-item-packing.functions.js +29 -1
- package/dist-lib/lib/plan-coverage-v204.check.d.ts +2 -0
- package/dist-lib/lib/plan-coverage-v204.check.d.ts.map +1 -0
- package/dist-lib/lib/plan-coverage-v204.check.js +29 -0
- package/dist-lib/lib/plan-coverage.d.ts +37 -0
- package/dist-lib/lib/plan-coverage.d.ts.map +1 -1
- package/dist-lib/lib/plan-coverage.js +69 -1
- package/dist-lib/lib/product-oordeel.d.ts +12 -0
- package/dist-lib/lib/product-oordeel.d.ts.map +1 -0
- package/dist-lib/lib/product-oordeel.js +24 -0
- package/dist-lib/lib/product-plannable.functions.d.ts +12 -0
- package/dist-lib/lib/product-plannable.functions.d.ts.map +1 -1
- package/dist-lib/lib/product-plannable.functions.js +66 -4
- package/dist-lib/lib/salesorders-list.functions.d.ts +18 -1
- package/dist-lib/lib/salesorders-list.functions.d.ts.map +1 -1
- package/dist-lib/lib/salesorders-list.functions.js +23 -0
- package/dist-lib/lib/salesorders-list.server.d.ts +2 -0
- package/dist-lib/lib/salesorders-list.server.d.ts.map +1 -1
- package/dist-lib/lib/salesorders-list.server.js +46 -12
- package/dist-lib/lib/salesorders-mapping.d.ts +10 -0
- package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
- package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
- package/dist-lib/lib/salesorders.functions.js +8 -9
- package/dist-lib/lib/useEngineMelding.d.ts +9 -0
- package/dist-lib/lib/useEngineMelding.d.ts.map +1 -0
- package/dist-lib/lib/useEngineMelding.js +20 -0
- package/package.json +1 -1
- package/schema/verkoop.sql +18 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type OordeelRegelInput = {
|
|
2
|
+
productId: string;
|
|
3
|
+
plantsPerCrate: number | null;
|
|
4
|
+
cratesPerLayer: number | null;
|
|
5
|
+
layersPerCart: number | null;
|
|
6
|
+
carrierCode?: string | null;
|
|
7
|
+
};
|
|
8
|
+
/** p_regels voor logistics_product_oordeel_belading; carrier_code alleen als die er is, ongewijzigd. */
|
|
9
|
+
export declare function buildOordeelRegel(r: OordeelRegelInput): Record<string, unknown>;
|
|
10
|
+
export type OordeelKind = "blokkade" | "zacht" | null;
|
|
11
|
+
export declare function classifyOordeel(oordeel: unknown): OordeelKind;
|
|
12
|
+
//# sourceMappingURL=product-oordeel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-oordeel.d.ts","sourceRoot":"","sources":["../../src/lib/product-oordeel.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF,wGAAwG;AACxG,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAU/E;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,OAAO,GAAG,IAAI,CAAC;AAEtD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAK7D"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Client-veilige helpers voor het productoordeel van de Engine per orderregel.
|
|
2
|
+
// Verkoop beoordeelt nooit zelf; dit verdeelt alleen het Engine-oordeel over
|
|
3
|
+
// blokkade (onmogelijk) en zachte melding (mist_gegevens).
|
|
4
|
+
/** p_regels voor logistics_product_oordeel_belading; carrier_code alleen als die er is, ongewijzigd. */
|
|
5
|
+
export function buildOordeelRegel(r) {
|
|
6
|
+
const out = {
|
|
7
|
+
product_id: r.productId,
|
|
8
|
+
plants_per_crate: r.plantsPerCrate,
|
|
9
|
+
crates_per_layer: r.cratesPerLayer,
|
|
10
|
+
layers_per_cart: r.layersPerCart,
|
|
11
|
+
};
|
|
12
|
+
const code = typeof r.carrierCode === "string" ? r.carrierCode.trim() : "";
|
|
13
|
+
if (code)
|
|
14
|
+
out.carrier_code = r.carrierCode.trim();
|
|
15
|
+
return out;
|
|
16
|
+
}
|
|
17
|
+
export function classifyOordeel(oordeel) {
|
|
18
|
+
const o = String(oordeel ?? "").toLowerCase();
|
|
19
|
+
if (o === "onmogelijk")
|
|
20
|
+
return "blokkade";
|
|
21
|
+
if (o === "mist_gegevens")
|
|
22
|
+
return "zacht";
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
@@ -4,10 +4,22 @@ export declare const getProductPlannability: import("@tanstack/start-client-core
|
|
|
4
4
|
claims: import("@supabase/auth-js").User;
|
|
5
5
|
}, undefined, undefined, undefined>], (input: unknown) => {
|
|
6
6
|
productIds: string[];
|
|
7
|
+
regels?: {
|
|
8
|
+
key: string;
|
|
9
|
+
productId: string;
|
|
10
|
+
plantsPerCrate: number | null;
|
|
11
|
+
cratesPerLayer: number | null;
|
|
12
|
+
layersPerCart: number | null;
|
|
13
|
+
isDefault: boolean;
|
|
14
|
+
carrierCode?: string | null | undefined;
|
|
15
|
+
}[] | undefined;
|
|
7
16
|
}, Promise<{
|
|
8
17
|
impossible: Record<string, string>;
|
|
9
18
|
missing: Record<string, string>;
|
|
19
|
+
impossibleByLine: Record<string, string>;
|
|
20
|
+
missingByLine: Record<string, string>;
|
|
10
21
|
available: boolean;
|
|
11
22
|
oordeelAvailable: boolean;
|
|
23
|
+
perLine: boolean;
|
|
12
24
|
}>>;
|
|
13
25
|
//# sourceMappingURL=product-plannable.functions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-plannable.functions.d.ts","sourceRoot":"","sources":["../../src/lib/product-plannable.functions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"product-plannable.functions.d.ts","sourceRoot":"","sources":["../../src/lib/product-plannable.functions.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,sBAAsB;;;;8CAET,OAAO;;;;;;;;;;;;;;;;;;;GAkF7B,CAAC"}
|
|
@@ -1,34 +1,96 @@
|
|
|
1
1
|
// Oordeel van de Logistiek Engine per product. Alleen lezen, nooit zelf beoordelen.
|
|
2
2
|
// - impossible: logistics_product_oordeel_many (Engine 1.0.201+), oordeel "onmogelijk".
|
|
3
3
|
// Ontbreekt die functie: geen waarschuwing.
|
|
4
|
+
// - impossibleByLine: logistics_product_oordeel_belading(p_regels) op de gekozen
|
|
5
|
+
// belading per regel; ontbreekt die, dan alleen het productoordeel voor regels
|
|
6
|
+
// met de standaardbelading (nooit een oordeel over de standaard bij een andere keuze).
|
|
4
7
|
// - missing: ontbrekende gegevens via logistics_product_maten.missing_reason.
|
|
5
8
|
import { createServerFn } from "@tanstack/react-start";
|
|
6
9
|
import { z } from "zod";
|
|
10
|
+
import { buildOordeelRegel, classifyOordeel } from "./product-oordeel.js";
|
|
7
11
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
8
12
|
export const getProductPlannability = createServerFn({ method: "POST" })
|
|
9
13
|
.middleware([requireSupabaseAuth])
|
|
10
|
-
.inputValidator((input) => z
|
|
14
|
+
.inputValidator((input) => z
|
|
15
|
+
.object({
|
|
16
|
+
productIds: z.array(z.string().uuid()).max(200),
|
|
17
|
+
/** Gekozen belading per regel; isDefault = gelijk aan de standaard van het product. */
|
|
18
|
+
regels: z
|
|
19
|
+
.array(z.object({
|
|
20
|
+
key: z.string().min(1).max(50),
|
|
21
|
+
productId: z.string().uuid(),
|
|
22
|
+
plantsPerCrate: z.number().int().positive().nullable(),
|
|
23
|
+
cratesPerLayer: z.number().int().positive().nullable(),
|
|
24
|
+
layersPerCart: z.number().int().positive().nullable(),
|
|
25
|
+
isDefault: z.boolean(),
|
|
26
|
+
/** Ladingdrager van de regel of standaardverpakking, ongewijzigd (Beheer- of Floriday-code). */
|
|
27
|
+
carrierCode: z.string().max(80).nullable().optional(),
|
|
28
|
+
}))
|
|
29
|
+
.max(200)
|
|
30
|
+
.optional(),
|
|
31
|
+
})
|
|
32
|
+
.parse(input))
|
|
11
33
|
.handler(async ({ data, context }) => {
|
|
12
34
|
const impossible = {};
|
|
13
35
|
const missing = {};
|
|
36
|
+
/** Oordeel per regel (sleutel = regels[].key). */
|
|
37
|
+
const impossibleByLine = {};
|
|
38
|
+
/** Zachte melding per regel (Engine-oordeel mist_gegevens), geen blokkade. */
|
|
39
|
+
const missingByLine = {};
|
|
14
40
|
if (!data.productIds.length)
|
|
15
|
-
return { impossible, missing, available: true, oordeelAvailable: true };
|
|
41
|
+
return { impossible, missing, impossibleByLine, missingByLine, available: true, oordeelAvailable: true, perLine: false };
|
|
16
42
|
const sb = context.supabase;
|
|
17
|
-
const
|
|
43
|
+
const regels = data.regels ?? [];
|
|
44
|
+
const [oordeel, maten, perRegel] = await Promise.all([
|
|
18
45
|
sb.rpc("logistics_product_oordeel_many", { p_product_ids: data.productIds }),
|
|
19
46
|
sb.rpc("logistics_product_maten", { p_product_ids: data.productIds }),
|
|
47
|
+
regels.length
|
|
48
|
+
? sb.rpc("logistics_product_oordeel_belading", {
|
|
49
|
+
p_regels: regels.map((r) => buildOordeelRegel(r)),
|
|
50
|
+
})
|
|
51
|
+
: Promise.resolve({ data: null, error: { code: "SKIP" } }),
|
|
20
52
|
]);
|
|
53
|
+
// Engine met oordeel op de gekozen belading: dat is leidend.
|
|
54
|
+
const perLine = !perRegel.error;
|
|
55
|
+
if (perLine) {
|
|
56
|
+
// Uitvoer [{product_id, oordeel, tekst, regels[]}] in dezelfde volgorde als de invoer.
|
|
57
|
+
const out = (Array.isArray(perRegel.data) ? perRegel.data : []);
|
|
58
|
+
out.forEach((r, i) => {
|
|
59
|
+
const regel = regels[i];
|
|
60
|
+
if (!regel || String(r?.product_id ?? "") !== regel.productId)
|
|
61
|
+
return;
|
|
62
|
+
const kind = classifyOordeel(r?.oordeel);
|
|
63
|
+
if (kind === "zacht") {
|
|
64
|
+
const t = typeof r.tekst === "string" && r.tekst.trim() ? r.tekst.trim() : "";
|
|
65
|
+
missingByLine[regel.key] = t || (regel.carrierCode ? "gegevens ontbreken voor de Engine" : "ladingdrager ontbreekt");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (kind !== "blokkade")
|
|
69
|
+
return;
|
|
70
|
+
const tekst = typeof r.tekst === "string" && r.tekst.trim() ? r.tekst.trim() : "De Engine noemt deze belading onmogelijk.";
|
|
71
|
+
const extra = Array.isArray(r.regels) ? r.regels.filter((x) => typeof x === "string" && x.trim()) : [];
|
|
72
|
+
impossibleByLine[regel.key] = extra.length ? `${tekst} — ${extra.join("; ")}` : tekst;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
21
75
|
if (!oordeel.error) {
|
|
22
76
|
for (const r of (oordeel.data ?? [])) {
|
|
23
77
|
if (r?.product_id && String(r.oordeel ?? "").toLowerCase() === "onmogelijk")
|
|
24
78
|
impossible[String(r.product_id)] = typeof r.tekst === "string" && r.tekst.trim() ? r.tekst.trim() : "De Engine noemt dit product onmogelijk.";
|
|
25
79
|
}
|
|
26
80
|
}
|
|
81
|
+
// Terugval (oudere Engine): het productoordeel gaat over de standaardbelading
|
|
82
|
+
// van het artikel en geldt daarom alleen voor regels die die standaard gebruiken.
|
|
83
|
+
if (!perLine) {
|
|
84
|
+
for (const r of regels) {
|
|
85
|
+
if (r.isDefault && impossible[r.productId])
|
|
86
|
+
impossibleByLine[r.key] = impossible[r.productId];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
27
89
|
if (!maten.error) {
|
|
28
90
|
for (const r of (maten.data ?? [])) {
|
|
29
91
|
if (r?.product_id && typeof r.missing_reason === "string" && r.missing_reason.trim())
|
|
30
92
|
missing[String(r.product_id)] = r.missing_reason.trim();
|
|
31
93
|
}
|
|
32
94
|
}
|
|
33
|
-
return { impossible, missing, available: !maten.error, oordeelAvailable: !oordeel.error };
|
|
95
|
+
return { impossible, missing, impossibleByLine, missingByLine, available: !maten.error, oordeelAvailable: !oordeel.error, perLine };
|
|
34
96
|
});
|
|
@@ -4,7 +4,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
|
|
|
4
4
|
claims: import("@supabase/auth-js").User;
|
|
5
5
|
}, undefined, undefined, undefined>], (input: unknown) => {
|
|
6
6
|
dateField: "ordered" | "delivery";
|
|
7
|
-
tab: "
|
|
7
|
+
tab: "picked" | "shipped" | "incoming" | "topick" | "cancelled" | "backlog" | "all" | "not_reported";
|
|
8
8
|
page: number;
|
|
9
9
|
pageSize: number;
|
|
10
10
|
since?: string | undefined;
|
|
@@ -27,4 +27,21 @@ export declare const getLocalSalesOrderDetail: import("@tanstack/start-client-co
|
|
|
27
27
|
sellerFallback: string | null;
|
|
28
28
|
environment: "staging" | "live";
|
|
29
29
|
}>>;
|
|
30
|
+
/**
|
|
31
|
+
* Floriday-stand voor de zichtbare lijstrijen, los van de lijst geladen zodat
|
|
32
|
+
* de lijst er nooit op wacht. Alleen weergave; fail closed per rij.
|
|
33
|
+
*/
|
|
34
|
+
export declare const getFloridayStatusesForRows: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
|
|
35
|
+
supabase: import("../integrations/supabase/auth-middleware.js").AuthedSupabaseClient;
|
|
36
|
+
userId: string;
|
|
37
|
+
claims: import("@supabase/auth-js").User;
|
|
38
|
+
}, undefined, undefined, undefined>], (input: unknown) => {
|
|
39
|
+
rows: {
|
|
40
|
+
key: string;
|
|
41
|
+
ids: string[];
|
|
42
|
+
}[];
|
|
43
|
+
}, Promise<{
|
|
44
|
+
statuses: Record<string, import("./floriday-status.js").FloridayStatusSummary>;
|
|
45
|
+
error: string | null;
|
|
46
|
+
}>>;
|
|
30
47
|
//# sourceMappingURL=salesorders-list.functions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"salesorders-list.functions.d.ts","sourceRoot":"","sources":["../../src/lib/salesorders-list.functions.ts"],"names":[],"mappings":"AAwDA,eAAO,MAAM,eAAe;;;;8CAEF,OAAO;;;;;;;;;;;2DAQ7B,CAAC;AAML,eAAO,MAAM,wBAAwB;;;;8CAEX,OAAO;;;;;;;;GA+B7B,CAAC"}
|
|
1
|
+
{"version":3,"file":"salesorders-list.functions.d.ts","sourceRoot":"","sources":["../../src/lib/salesorders-list.functions.ts"],"names":[],"mappings":"AAwDA,eAAO,MAAM,eAAe;;;;8CAEF,OAAO;;;;;;;;;;;2DAQ7B,CAAC;AAML,eAAO,MAAM,wBAAwB;;;;8CAEX,OAAO;;;;;;;;GA+B7B,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;8CAEb,OAAO;;;;;;;;GAiB7B,CAAC"}
|
|
@@ -95,3 +95,26 @@ export const getLocalSalesOrderDetail = createServerFn({ method: "POST" })
|
|
|
95
95
|
environment: result.environment,
|
|
96
96
|
};
|
|
97
97
|
});
|
|
98
|
+
/**
|
|
99
|
+
* Floriday-stand voor de zichtbare lijstrijen, los van de lijst geladen zodat
|
|
100
|
+
* de lijst er nooit op wacht. Alleen weergave; fail closed per rij.
|
|
101
|
+
*/
|
|
102
|
+
export const getFloridayStatusesForRows = createServerFn({ method: "POST" })
|
|
103
|
+
.middleware([requireSupabaseAuth])
|
|
104
|
+
.inputValidator((input) => z
|
|
105
|
+
.object({
|
|
106
|
+
rows: z
|
|
107
|
+
.array(z.object({ key: z.string().min(1).max(200), ids: z.array(z.string().min(1).max(100)).max(100) }))
|
|
108
|
+
.max(200),
|
|
109
|
+
})
|
|
110
|
+
.parse(input))
|
|
111
|
+
.handler(async ({ data }) => {
|
|
112
|
+
const { loadFloridayStatuses } = await import("./floriday-status.server.js");
|
|
113
|
+
const { summarizeFloridayStatus } = await import("./salesorders-list.server.js");
|
|
114
|
+
const all = Array.from(new Set(data.rows.flatMap((r) => r.ids))).slice(0, 200);
|
|
115
|
+
const res = await loadFloridayStatuses(all, 8000);
|
|
116
|
+
const out = {};
|
|
117
|
+
for (const r of data.rows)
|
|
118
|
+
out[r.key] = summarizeFloridayStatus(r.ids, res.entries, res.error);
|
|
119
|
+
return { statuses: out, error: res.error };
|
|
120
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SupabaseClient } from "@supabase/supabase-js";
|
|
2
2
|
import { type SalesOrderDTO, type SalesOrdersTotals } from "./salesorders-mapping.js";
|
|
3
|
+
import { type FloridayStatusEntry, type FloridayStatusSummary } from "./floriday-status.js";
|
|
3
4
|
import { type OrderStage } from "./order-status.js";
|
|
4
5
|
/** "backlog" is géén status: het is een aparte weergave van "Te picken". */
|
|
5
6
|
export type StatusTab = "all" | OrderStage | "backlog" | "not_reported";
|
|
@@ -49,4 +50,5 @@ export declare function overviewWindowFor(deliveries: (string | null)[]): {
|
|
|
49
50
|
to: string | null;
|
|
50
51
|
};
|
|
51
52
|
export declare function buildSalesOrdersList(supabase: SupabaseClient, params: ListParams, connectionSupabase?: SupabaseClient): Promise<ListResult>;
|
|
53
|
+
export declare function summarizeFloridayStatus(ids: string[], entries: Map<string, FloridayStatusEntry>, error: string | null): FloridayStatusSummary;
|
|
52
54
|
//# sourceMappingURL=salesorders-list.server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"salesorders-list.server.d.ts","sourceRoot":"","sources":["../../src/lib/salesorders-list.server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"salesorders-list.server.d.ts","sourceRoot":"","sources":["../../src/lib/salesorders-list.server.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAML,KAAK,aAAa,E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AC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACvC;AAoDD;+EAC+E;AAC/E,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAgB3G;AA8BD,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,UAAU,EAClB,kBAAkB,GAAE,cAAyB,GAC5C,OAAO,CAAC,UAAU,CAAC,CAutCrB;AA0DD,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,MAAM,EAAE,EACb,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,EACzC,KAAK,EAAE,MAAM,GAAG,IAAI,GACnB,qBAAqB,CAIvB"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { invoiceStateLabel } from "./invoice-timing.js";
|
|
1
2
|
import { loadReviewDismissals, isReviewDismissed } from "./review-dismissals.server.js";
|
|
3
|
+
import { orderFust } from "./order-fust.js";
|
|
2
4
|
import { posOrNull } from "./packing-snapshot.js";
|
|
3
5
|
import { customerDisplayName } from "./customer-name.js";
|
|
4
6
|
import { isNotReportedLocally } from "./floriday-status.js";
|
|
@@ -302,7 +304,7 @@ export async function buildSalesOrdersList(supabase, params, connectionSupabase
|
|
|
302
304
|
return { environment, sellerFallback, foRows, truncated };
|
|
303
305
|
});
|
|
304
306
|
// 3) Lokale orders binnen hetzelfde venster.
|
|
305
|
-
const localOrderSelect = "id, order_number, customer_name, customer_id, order_date, delivery_date, status, status_origin, status_changed_at, total, custom_fields, order_source, created_at, is_reservation, plan_locked_at, buffer_id, floriday_sales_order_id, floriday_order_group_key, order_items(id, product_id, product_name, source_line_key, quantity, unit, unit_price, quarantined_at, products(plants_per_crate, crates_per_layer, layers_per_cart, floriday_trade_item_id, custom_fields))";
|
|
307
|
+
const localOrderSelect = "id, order_number, customer_name, customer_id, order_date, delivery_date, status, status_origin, status_changed_at, total, custom_fields, order_source, created_at, is_reservation, invoice_due_at, invoice_ready_at, invoice_ready_note, plan_locked_at, buffer_id, floriday_sales_order_id, floriday_order_group_key, order_items(id, product_id, product_name, source_line_key, quantity, unit, unit_price, quarantined_at, plants_per_crate, crates_per_layer, layers_per_cart, products(plants_per_crate, crates_per_layer, layers_per_cart, floriday_trade_item_id, custom_fields))";
|
|
306
308
|
const localTask = t.time("3_lokaal", async () => {
|
|
307
309
|
if (params.localOrderId) {
|
|
308
310
|
const primaryRes = await supabase
|
|
@@ -635,6 +637,8 @@ export async function buildSalesOrdersList(supabase, params, connectionSupabase
|
|
|
635
637
|
controlledAt: r.controlled_at ?? (shipState?.picked ? "picked" : null),
|
|
636
638
|
isReservation: localRow ? !!localRow.is_reservation : false,
|
|
637
639
|
});
|
|
640
|
+
dto.invoiceState = localRow ? invoiceStateLabel(localRow) : null;
|
|
641
|
+
dto.invoiceNote = localRow?.invoice_ready_note ?? null;
|
|
638
642
|
dto.floridayFulfilled = Boolean((localRow?.custom_fields ?? {})?.floriday_fulfilled);
|
|
639
643
|
dto.notReportedToFloriday = isNotReportedLocally(dto.stage, dto.floridayFulfilled);
|
|
640
644
|
const reviewCf = (localRow?.custom_fields ?? {});
|
|
@@ -765,7 +769,15 @@ export async function buildSalesOrdersList(supabase, params, connectionSupabase
|
|
|
765
769
|
// Geen eigen karrentelling: het aantal karren komt alleen uit de Engine.
|
|
766
770
|
void karTotalRaw;
|
|
767
771
|
const karCount = 0;
|
|
768
|
-
|
|
772
|
+
// Fust = som per regel met de regelbelading (zoals de Engine); zie order-fust.ts.
|
|
773
|
+
const fustSummary = orderFust(lineItems.map((it) => ({
|
|
774
|
+
pieces: toNumber(it?.quantity) || 0,
|
|
775
|
+
line: it,
|
|
776
|
+
product: it?.products ?? null,
|
|
777
|
+
articleKey: String(it?.product_id ?? it?.product_name ?? ""),
|
|
778
|
+
})));
|
|
779
|
+
void fustTotal;
|
|
780
|
+
const fustCount = fustSummary.fust > 0 ? fustSummary.fust : totalQuantity;
|
|
769
781
|
const unitPrice = firstLine ? toNumber(firstLine.unit_price) : total;
|
|
770
782
|
const rawOrderDate = r.order_date ?? "";
|
|
771
783
|
const orderedAt = typeof rawOrderDate === "string" && rawOrderDate.includes("T")
|
|
@@ -810,6 +822,8 @@ export async function buildSalesOrdersList(supabase, params, connectionSupabase
|
|
|
810
822
|
revenue: total,
|
|
811
823
|
fustCount,
|
|
812
824
|
karCount,
|
|
825
|
+
mixedPacking: fustSummary.mixed,
|
|
826
|
+
articleCount: fustSummary.articleCount,
|
|
813
827
|
crateTypeName: mergeTypeNames(crateNames),
|
|
814
828
|
cartTypeName: mergeTypeNames(cartNames),
|
|
815
829
|
loadCarrierType: normalizeLoadCarrierCode(cf.load_carrier_type),
|
|
@@ -839,6 +853,8 @@ export async function buildSalesOrdersList(supabase, params, connectionSupabase
|
|
|
839
853
|
...(r.delivery_date ? [] : ["geen leverdatum"]),
|
|
840
854
|
],
|
|
841
855
|
packingSource: localPackingSource,
|
|
856
|
+
invoiceState: invoiceStateLabel(r),
|
|
857
|
+
invoiceNote: r.invoice_ready_note ?? null,
|
|
842
858
|
floridayFulfilled: Boolean(cf.floriday_fulfilled),
|
|
843
859
|
floridayExternalFulfilledAt: cf.floriday_external_fulfilled_at ?? null,
|
|
844
860
|
floridayMissingLineKeyNotice: typeof cf.floriday_missing_line_key_notice === "string" ? cf.floriday_missing_line_key_notice : null,
|
|
@@ -987,10 +1003,13 @@ export async function buildSalesOrdersList(supabase, params, connectionSupabase
|
|
|
987
1003
|
const karUnknown = members.some((m) => m.karUnknown);
|
|
988
1004
|
const totalPieces = members.reduce((s, m) => s + (m.totalPieces ?? 0), 0);
|
|
989
1005
|
const incomplete = Array.from(new Set(members.flatMap((m) => m.incomplete ?? [])));
|
|
1006
|
+
const articleCount = members.reduce((s, m) => s + (m.articleCount ?? 1), 0);
|
|
990
1007
|
return {
|
|
991
1008
|
...head,
|
|
992
1009
|
revenue,
|
|
993
1010
|
fustCount,
|
|
1011
|
+
mixedPacking: members.some((m) => m.mixedPacking) || articleCount > 1,
|
|
1012
|
+
articleCount,
|
|
994
1013
|
karCount,
|
|
995
1014
|
karShared,
|
|
996
1015
|
karUnknown,
|
|
@@ -1284,15 +1303,24 @@ export async function buildSalesOrdersList(supabase, params, connectionSupabase
|
|
|
1284
1303
|
}));
|
|
1285
1304
|
}
|
|
1286
1305
|
}
|
|
1287
|
-
// 15) Floriday-stand uit het statusoverzicht (alleen weergave)
|
|
1288
|
-
//
|
|
1289
|
-
|
|
1306
|
+
// 15) Floriday-stand uit het statusoverzicht (alleen weergave). In de lijst
|
|
1307
|
+
// wordt hij NIET meer afgewacht: alleen de ids gaan mee (floridayStatusIds)
|
|
1308
|
+
// en het scherm laadt de stand los na (getFloridayStatusesForRows).
|
|
1309
|
+
// Alleen het detailscherm wacht er nog op. Fail closed: "stand onbekend".
|
|
1310
|
+
const idsOf = (o) => o.floridayIds && o.floridayIds.length
|
|
1311
|
+
? o.floridayIds
|
|
1312
|
+
: !o.id.startsWith("local:") && !o.id.startsWith("mailbox-proposal:") && /^[0-9a-f-]{36}$/i.test(o.id) && !o.isLocal
|
|
1313
|
+
? [o.id]
|
|
1314
|
+
: [];
|
|
1315
|
+
if (!params.all && !params.localOrderId) {
|
|
1316
|
+
for (const o of pageGroups.flat()) {
|
|
1317
|
+
const ids = idsOf(o);
|
|
1318
|
+
if (ids.length)
|
|
1319
|
+
o.floridayStatusIds = ids;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
if (!params.all && params.localOrderId) {
|
|
1290
1323
|
const visible = pageGroups.flat();
|
|
1291
|
-
const idsOf = (o) => o.floridayIds && o.floridayIds.length
|
|
1292
|
-
? o.floridayIds
|
|
1293
|
-
: !o.id.startsWith("local:") && !o.id.startsWith("mailbox-proposal:") && /^[0-9a-f-]{36}$/i.test(o.id) && !o.isLocal
|
|
1294
|
-
? [o.id]
|
|
1295
|
-
: [];
|
|
1296
1324
|
const allIds = Array.from(new Set(visible.flatMap(idsOf))).slice(0, 100);
|
|
1297
1325
|
if (allIds.length) {
|
|
1298
1326
|
enrichTasks.push(t.time("15_floriday_stand", async () => {
|
|
@@ -1311,7 +1339,13 @@ export async function buildSalesOrdersList(supabase, params, connectionSupabase
|
|
|
1311
1339
|
}
|
|
1312
1340
|
await Promise.all(enrichTasks);
|
|
1313
1341
|
t.mark("14_15_verrijking");
|
|
1314
|
-
const rows = pageGroups.map(
|
|
1342
|
+
const rows = pageGroups.map((g) => {
|
|
1343
|
+
const row = mergeGroup(g);
|
|
1344
|
+
const ids = Array.from(new Set(g.flatMap((m) => m.floridayStatusIds ?? [])));
|
|
1345
|
+
if (ids.length)
|
|
1346
|
+
row.floridayStatusIds = ids;
|
|
1347
|
+
return row;
|
|
1348
|
+
});
|
|
1315
1349
|
// Totalen over de volledige gefilterde set (alle orders in elke buffer).
|
|
1316
1350
|
const totals = computeTotals(filteredGroups.map(mergeGroup));
|
|
1317
1351
|
t.mark("16_samenvoegen");
|
|
@@ -1386,7 +1420,7 @@ async function loadGroupPackingUncached(supabase) {
|
|
|
1386
1420
|
}
|
|
1387
1421
|
return byName;
|
|
1388
1422
|
}
|
|
1389
|
-
function summarizeFloridayStatus(ids, entries, error) {
|
|
1423
|
+
export function summarizeFloridayStatus(ids, entries, error) {
|
|
1390
1424
|
const found = ids.map((id) => entries.get(id)).filter((e) => !!e);
|
|
1391
1425
|
if (found.length === 0)
|
|
1392
1426
|
return { stage: "onbekend", error: error ?? "geen antwoord", entries: [] };
|
|
@@ -15,6 +15,10 @@ export interface SalesOrderDTO {
|
|
|
15
15
|
revenue: number;
|
|
16
16
|
fustCount: number;
|
|
17
17
|
karCount: number;
|
|
18
|
+
/** Meerdere artikelen of beladingen op één order: kop toont "Gemengd (N artikelen)". */
|
|
19
|
+
mixedPacking?: boolean;
|
|
20
|
+
/** Aantal verschillende artikelen op de order. */
|
|
21
|
+
articleCount?: number;
|
|
18
22
|
/** Type fust (bijv. "VBN 101" of de Floricode-omschrijving). */
|
|
19
23
|
crateTypeName?: string | null;
|
|
20
24
|
/** Type ladingdrager / kar (bijv. "Deense container"). */
|
|
@@ -34,6 +38,10 @@ export interface SalesOrderDTO {
|
|
|
34
38
|
totalPieces: number;
|
|
35
39
|
isLocal?: boolean;
|
|
36
40
|
isReservation?: boolean;
|
|
41
|
+
/** "factuur wacht op levering" / "klaar voor facturatie sinds …" (invoice-timing.ts). */
|
|
42
|
+
invoiceState?: string | null;
|
|
43
|
+
/** Toelichting bij vrijgave, bv. "geen afmelding gevonden, gefactureerd op leverdatum". */
|
|
44
|
+
invoiceNote?: string | null;
|
|
37
45
|
bufferId?: string | null;
|
|
38
46
|
bufferSize?: number;
|
|
39
47
|
bufferKey?: string | null;
|
|
@@ -108,6 +116,8 @@ export interface SalesOrderDTO {
|
|
|
108
116
|
floridayIds?: string[];
|
|
109
117
|
/** Floriday-stand uit het statusoverzicht; alleen weergave. */
|
|
110
118
|
floridayStatus?: import("./floriday-status.js").FloridayStatusSummary | null;
|
|
119
|
+
/** Lijst: ids waarvoor het scherm de Floriday-stand los nalaadt. */
|
|
120
|
+
floridayStatusIds?: string[];
|
|
111
121
|
/** Actieve orderregels: stuks en prijs per stuk (voor de totaalregel). */
|
|
112
122
|
priceLines?: {
|
|
113
123
|
pieces: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"salesorders-mapping.d.ts","sourceRoot":"","sources":["../../src/lib/salesorders-mapping.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAElE,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM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AG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;CACnE;AAGD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,IAAI,CAAA;CAAE,CAWnF;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,IAAI,CAAA;CAAE,CAIlF;AAYD,wBAAgB,YAAY,CAC1B,MAAM,EAAE,aAAa,EAAE,EACvB,CAAC,EAAE,iBAAiB,GACnB,aAAa,EAAE,CAuDjB;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAyCtF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"salesorders.functions.d.ts","sourceRoot":"","sources":["../../src/lib/salesorders.functions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"salesorders.functions.d.ts","sourceRoot":"","sources":["../../src/lib/salesorders.functions.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,aAAa,EAEnB,MAAM,uBAAuB,CAAC;AAgC/B,eAAO,MAAM,kBAAkB;;;;;;;;GAK3B,CAAC;AA6BL,eAAO,MAAM,gBAAgB;;;;6CAEJ,OAAO;;;;;;;;;;;;;GAmC5B,CAAC;AAGL,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDnC,CAAC;AASL,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,EAAE,SAAS,GAAG,MAAM,CAAC;IAChC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,cAAc,EAAE,aAAa,EAAE,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;0CAEV,OAAO;;mCAkazB,CAAC;AAQL,eAAO,MAAM,uBAAuB;;;;0CAEd,OAAO;;;;;GAQzB,CAAC;AAOL,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC;IACvC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,qEAAqE;IACrE,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAIF,eAAO,MAAM,qBAAqB;;;;6EA4E9B,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { unlinkedFloridayProducts } from "./floriday-unlinked-products.js";
|
|
|
2
2
|
// Sales orders sync (Floriday sequence-pattern) + write actions.
|
|
3
3
|
// Alle Floriday HTTP-calls lopen via floriday-gateway.server.
|
|
4
4
|
import { createServerFn } from "@tanstack/react-start";
|
|
5
|
+
import { invoiceStateLabel } from "./invoice-timing.js";
|
|
5
6
|
import { z } from "zod";
|
|
6
7
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
7
8
|
import { mapJsonbToSalesOrderDTO, packingConfigFromFloridayPacking, } from "./salesorders-mapping.js";
|
|
@@ -290,7 +291,7 @@ export const getSalesOrderDetail = createServerFn({ method: "POST" })
|
|
|
290
291
|
try {
|
|
291
292
|
const ownRes = await supabase
|
|
292
293
|
.from("orders")
|
|
293
|
-
.select("id, buffer_id, status, is_reservation, custom_fields, order_items(product_id, product_name, source_line_key, quarantined_at, quantity, unit_price)")
|
|
294
|
+
.select("id, buffer_id, status, is_reservation, custom_fields, invoice_due_at, invoice_ready_at, invoice_ready_note, order_items(product_id, product_name, source_line_key, quarantined_at, quantity, unit_price)")
|
|
294
295
|
.eq("floriday_sales_order_id", data.id)
|
|
295
296
|
.maybeSingle();
|
|
296
297
|
const ownRow = ownRes.data ?? null;
|
|
@@ -307,6 +308,8 @@ export const getSalesOrderDetail = createServerFn({ method: "POST" })
|
|
|
307
308
|
controlledAt: controlledAt,
|
|
308
309
|
isReservation: ownRow ? !!ownRow.is_reservation : false,
|
|
309
310
|
});
|
|
311
|
+
dto.invoiceState = ownRow ? invoiceStateLabel(ownRow) : null;
|
|
312
|
+
dto.invoiceNote = ownRow?.invoice_ready_note ?? null;
|
|
310
313
|
dto.floridayFulfilled = Boolean((ownRow?.custom_fields ?? {})?.floriday_fulfilled);
|
|
311
314
|
dto.floridayExternalFulfilledAt = (ownRow?.custom_fields ?? {})?.floriday_external_fulfilled_at ?? null;
|
|
312
315
|
{
|
|
@@ -376,14 +379,10 @@ export const getSalesOrderDetail = createServerFn({ method: "POST" })
|
|
|
376
379
|
// Floriday-stand (alleen weergave), voor alle bestellingen op deze order.
|
|
377
380
|
{
|
|
378
381
|
const foIds = Array.from(new Set([String(data.id), ...activeItems.map((it) => String(it?.source_line_key ?? ""))].filter((v) => /^[0-9a-f-]{36}$/i.test(v)))).slice(0, 100);
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
dto.floridayStatus =
|
|
384
|
-
found.length > 0
|
|
385
|
-
? { stage: combineStages(found.map((e) => e.floridayStage)), error: null, entries: found }
|
|
386
|
-
: { stage: "onbekend", error: res.error ?? "geen antwoord", entries: [] };
|
|
382
|
+
// Niet meer afwachten (grens 0,8 s gaf "stand onbekend"): het scherm laadt
|
|
383
|
+
// de stand los na via getFloridayStatusesForRows, net als de lijst.
|
|
384
|
+
if (foIds.length)
|
|
385
|
+
dto.floridayStatusIds = foIds;
|
|
387
386
|
}
|
|
388
387
|
if (bufferId) {
|
|
389
388
|
dto.bufferId = bufferId;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EngineActie } from "./plan-coverage.js";
|
|
2
|
+
export interface EngineMelding {
|
|
3
|
+
tekst: string;
|
|
4
|
+
/** Alleen acties die de Engine meegaf. */
|
|
5
|
+
acties: EngineActie[];
|
|
6
|
+
}
|
|
7
|
+
export declare function useEngineMelding(orderId: string | null | undefined): EngineMelding | null;
|
|
8
|
+
export declare function useSetEngineMelding(orderId: string | null | undefined): (m: EngineMelding | null) => unknown;
|
|
9
|
+
//# sourceMappingURL=useEngineMelding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEngineMelding.d.ts","sourceRoot":"","sources":["../../src/lib/useEngineMelding.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAKD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,aAAa,GAAG,IAAI,CASzF;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,IAE5D,GAAG,aAAa,GAAG,IAAI,aAChC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Laatste melding van de Engine bij vastzetten (karren liggen al vast), gedeeld
|
|
2
|
+
// tussen de beladingkaart en de karindeling-kaart via de querycache. Alleen
|
|
3
|
+
// weergave; nooit opgeslagen in de order.
|
|
4
|
+
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
5
|
+
const norm = (id) => String(id ?? "").replace(/^(local:|mailbox-proposal:)/, "");
|
|
6
|
+
const key = (id) => ["engine-melding", norm(id)];
|
|
7
|
+
export function useEngineMelding(orderId) {
|
|
8
|
+
const { data } = useQuery({
|
|
9
|
+
queryKey: key(orderId),
|
|
10
|
+
queryFn: () => null,
|
|
11
|
+
enabled: false,
|
|
12
|
+
staleTime: Infinity,
|
|
13
|
+
gcTime: Infinity,
|
|
14
|
+
});
|
|
15
|
+
return data ?? null;
|
|
16
|
+
}
|
|
17
|
+
export function useSetEngineMelding(orderId) {
|
|
18
|
+
const qc = useQueryClient();
|
|
19
|
+
return (m) => qc.setQueryData(key(orderId), m);
|
|
20
|
+
}
|
package/package.json
CHANGED
package/schema/verkoop.sql
CHANGED
|
@@ -156,6 +156,11 @@ ALTER TABLE public.invoice_timing_settings ADD COLUMN IF NOT EXISTS pickup_busin
|
|
|
156
156
|
ALTER TABLE public.invoice_timing_settings ADD COLUMN IF NOT EXISTS pickup_time_of_day time without time zone DEFAULT '18:00:00'::time without time zone;
|
|
157
157
|
ALTER TABLE public.invoice_timing_settings ADD COLUMN IF NOT EXISTS created_at timestamp with time zone DEFAULT now();
|
|
158
158
|
ALTER TABLE public.invoice_timing_settings ADD COLUMN IF NOT EXISTS updated_at timestamp with time zone DEFAULT now();
|
|
159
|
+
ALTER TABLE public.invoice_timing_settings ADD COLUMN IF NOT EXISTS invoice_without_signoff boolean NOT NULL DEFAULT false;
|
|
160
|
+
-- Gedeeld met Facturatie: definitie exact gelijk houden (timestamptz, geen standaardwaarde).
|
|
161
|
+
ALTER TABLE public.orders ADD COLUMN IF NOT EXISTS invoice_ready_at timestamptz;
|
|
162
|
+
ALTER TABLE public.orders ADD COLUMN IF NOT EXISTS invoice_ready_note text;
|
|
163
|
+
CREATE INDEX IF NOT EXISTS orders_invoice_due_pending_idx ON public.orders (invoice_due_at) WHERE invoice_ready_at IS NULL AND deleted_at IS NULL AND cancelled_at IS NULL;
|
|
159
164
|
CREATE TABLE IF NOT EXISTS public.job_locks (
|
|
160
165
|
lock_key text NOT NULL,
|
|
161
166
|
locked_until timestamp with time zone NOT NULL,
|
|
@@ -3053,11 +3058,11 @@ END $function$;
|
|
|
3053
3058
|
CREATE OR REPLACE FUNCTION public.verkoop_health_checks()
|
|
3054
3059
|
RETURNS TABLE(naam text, ok boolean, opm text)
|
|
3055
3060
|
LANGUAGE plpgsql
|
|
3056
|
-
|
|
3061
|
+
SECURITY DEFINER
|
|
3057
3062
|
SET search_path TO 'public'
|
|
3058
3063
|
AS $function$
|
|
3059
3064
|
DECLARE v_bad integer; v_cnt integer; v_idx integer; v_has_cache boolean := to_regclass('public.floriday_fulfillment_orders_cache') IS NOT NULL;
|
|
3060
|
-
v_status jsonb; v_ok boolean; j record; v_trg integer;
|
|
3065
|
+
v_status jsonb; v_ok boolean; j record; v_trg integer; v_unl integer; v_dup integer;
|
|
3061
3066
|
BEGIN
|
|
3062
3067
|
IF NOT public.verkoop_is_server() THEN
|
|
3063
3068
|
PERFORM public.verkoop_assert_caller('rol', '{admin,superadmin}'::public.app_role[]);
|
|
@@ -3085,6 +3090,17 @@ BEGIN
|
|
|
3085
3090
|
WHEN v_trg < 2 THEN 'nee (triggers op floriday_salesorders_cache ontbreken); de minuutronde vangt de orders op'
|
|
3086
3091
|
WHEN NOT v_ok THEN 'nee (' || (v_status->>'reden') || '); de minuutronde vangt de orders op'
|
|
3087
3092
|
ELSE 'ja' END;
|
|
3093
|
+
-- Orderregels zonder Floriday-koppeling op Floriday-orders (restant oude overname).
|
|
3094
|
+
SELECT count(*)::int,
|
|
3095
|
+
count(*) FILTER (WHERE EXISTS (SELECT 1 FROM public.order_items k WHERE k.order_id = oi.order_id
|
|
3096
|
+
AND k.source_line_key IS NOT NULL AND k.quarantined_at IS NULL
|
|
3097
|
+
AND k.product_id IS NOT DISTINCT FROM oi.product_id))::int
|
|
3098
|
+
INTO v_unl, v_dup
|
|
3099
|
+
FROM public.order_items oi JOIN public.orders o ON o.id = oi.order_id
|
|
3100
|
+
WHERE o.floriday_sales_order_id IS NOT NULL AND oi.source_line_key IS NULL AND oi.quarantined_at IS NULL;
|
|
3101
|
+
RETURN QUERY SELECT 'Verkoop: orderregels zonder Floriday-koppeling'::text, v_unl = 0,
|
|
3102
|
+
CASE WHEN v_unl = 0 THEN 'ok: 0'
|
|
3103
|
+
ELSE format('%s regel(s) zonder koppeling op Floriday-orders, waarvan %s met een gekoppelde tegenhanger (dubbel geteld in lijst en karindeling); opruimen alleen na akkoord per shell', v_unl, v_dup) END;
|
|
3088
3104
|
IF NOT v_has_cache THEN
|
|
3089
3105
|
RETURN QUERY SELECT 'Verkoop: geen volledige cache-scan per minuut'::text, true, 'geen Floriday-afhandelingen in deze shell'::text;
|
|
3090
3106
|
ELSE
|