@flowselections/logistiek-engine 1.0.241 → 1.0.242
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/db/schema/logistiek-engine.sql +876 -0
- package/dist-lib/components/StandaardgegevensCard.d.ts.map +1 -1
- package/dist-lib/components/StandaardgegevensCard.js +25 -1
- package/dist-lib/integrations/supabase/types.d.ts +62 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/engineStatusTeksten.d.ts +1 -1
- package/dist-lib/lib/engineStatusTeksten.js +1 -1
- package/dist-lib/lib/karindelingBewakingTeksten.d.ts +9 -0
- package/dist-lib/lib/karindelingBewakingTeksten.d.ts.map +1 -0
- package/dist-lib/lib/karindelingBewakingTeksten.js +26 -0
- package/dist-lib/lib/moduleVersion.d.ts +1 -1
- package/dist-lib/lib/moduleVersion.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandaardgegevensCard.d.ts","sourceRoot":"","sources":["../../src/components/StandaardgegevensCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StandaardgegevensCard.d.ts","sourceRoot":"","sources":["../../src/components/StandaardgegevensCard.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,qBAAqB,gCAoDpC"}
|
|
@@ -9,6 +9,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
9
9
|
import { useEffect, useState } from "react";
|
|
10
10
|
import { Badge, Card, CardContent, CardDescription, CardHeader, CardTitle, formatDatum, formatDatumTijd, supabase } from "@flowselections/core";
|
|
11
11
|
import { ophaalmomentMeldingen } from "../lib/ophaalmomentTeksten.js";
|
|
12
|
+
import { karindelingInfo, karindelingMeldingen } from "../lib/karindelingBewakingTeksten.js";
|
|
12
13
|
import { Database } from "lucide-react";
|
|
13
14
|
import { meldingGewoneTaal, schemaVersieOud, VERWACHTE_SCHEMA_VERSIE } from "../lib/engineStatusTeksten.js";
|
|
14
15
|
import { aangevuldeOnderdelen, useEngineZelfherstel } from "../hooks/useEngineZelfherstel.js";
|
|
@@ -26,7 +27,7 @@ export function StandaardgegevensCard() {
|
|
|
26
27
|
const eerder = aangevuldeOnderdelen(laatste);
|
|
27
28
|
const meldingen = Array.isArray(resultaat?.meldingen) ? resultaat.meldingen : [];
|
|
28
29
|
return (_jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsxs(CardTitle, { className: "flex items-center gap-2 text-base", children: [_jsx(Database, { className: "h-4 w-4" }), " Standaardgegevens", fout ? _jsx(Badge, { variant: "destructive", children: "Controle mislukt" })
|
|
29
|
-
: resultaat ? _jsx(Badge, { variant: "secondary", children: nu.length ? "Aangevuld" : "Compleet" }) : null] }), _jsx(CardDescription, { children: "Ladingdragers, Floriday-vertalingen, planinstellingen, tijdinstelling en strategie." })] }), _jsxs(CardContent, { className: "space-y-2 text-sm", children: [fout && _jsxs("p", { className: "text-destructive", children: ["Kon niet controleren: ", fout] }), nu.length > 0 && (_jsxs("div", { children: [_jsx("p", { className: "font-medium", children: "Zojuist aangevuld:" }), _jsx("ul", { className: "list-disc pl-5", children: nu.map((t) => _jsx("li", { children: t }, t)) })] })), nu.length === 0 && eerder.length > 0 && laatste?.op && (_jsxs("div", { children: [_jsxs("p", { className: "text-muted-foreground", children: ["Laatst aangevuld op ", new Date(laatste.op).toLocaleString("nl-NL"), ":"] }), _jsx("ul", { className: "list-disc pl-5 text-muted-foreground", children: eerder.map((t) => _jsx("li", { children: t }, t)) })] })), resultaat && nu.length === 0 && eerder.length === 0 && _jsx("p", { className: "text-muted-foreground", children: "Alle standaardgegevens zijn aanwezig." }), meldingen.map((m) => _jsx("p", { className: "text-destructive", children: meldingGewoneTaal(m) }, m)), _jsx(SchemaVersieStatus, {}), _jsx(OnderhoudStatus, {}), _jsx(ProductiebonStatus, {}), _jsx(SamenvoeggroepenStatus, {}), _jsx(StickerSyncStatus, {}), _jsx(SamenvoegenStatus, {}), _jsx(OphaalmomentStatus, {})] })] }));
|
|
30
|
+
: resultaat ? _jsx(Badge, { variant: "secondary", children: nu.length ? "Aangevuld" : "Compleet" }) : null] }), _jsx(CardDescription, { children: "Ladingdragers, Floriday-vertalingen, planinstellingen, tijdinstelling en strategie." })] }), _jsxs(CardContent, { className: "space-y-2 text-sm", children: [fout && _jsxs("p", { className: "text-destructive", children: ["Kon niet controleren: ", fout] }), nu.length > 0 && (_jsxs("div", { children: [_jsx("p", { className: "font-medium", children: "Zojuist aangevuld:" }), _jsx("ul", { className: "list-disc pl-5", children: nu.map((t) => _jsx("li", { children: t }, t)) })] })), nu.length === 0 && eerder.length > 0 && laatste?.op && (_jsxs("div", { children: [_jsxs("p", { className: "text-muted-foreground", children: ["Laatst aangevuld op ", new Date(laatste.op).toLocaleString("nl-NL"), ":"] }), _jsx("ul", { className: "list-disc pl-5 text-muted-foreground", children: eerder.map((t) => _jsx("li", { children: t }, t)) })] })), resultaat && nu.length === 0 && eerder.length === 0 && _jsx("p", { className: "text-muted-foreground", children: "Alle standaardgegevens zijn aanwezig." }), meldingen.map((m) => _jsx("p", { className: "text-destructive", children: meldingGewoneTaal(m) }, m)), _jsx(SchemaVersieStatus, {}), _jsx(OnderhoudStatus, {}), _jsx(ProductiebonStatus, {}), _jsx(SamenvoeggroepenStatus, {}), _jsx(StickerSyncStatus, {}), _jsx(SamenvoegenStatus, {}), _jsx(OphaalmomentStatus, {}), _jsx(KarindelingStatus, {})] })] }));
|
|
30
31
|
}
|
|
31
32
|
// 1.0.228: wachtrij per status, oudste trace-regel en laatste opruimronde.
|
|
32
33
|
function OnderhoudStatus() {
|
|
@@ -156,6 +157,29 @@ function OphaalmomentStatus() {
|
|
|
156
157
|
const regels = ophaalmomentMeldingen(info, (d) => formatDatum(d));
|
|
157
158
|
return (_jsxs("div", { className: "border-t pt-2", children: [_jsx("p", { className: "font-medium", children: "Ophaalmomenten" }), regels.length === 0 && _jsx("p", { className: "text-muted-foreground", children: "Geen meldingen." }), regels.map((t, i) => (_jsx("p", { className: "text-destructive", children: t }, i)))] }));
|
|
158
159
|
}
|
|
160
|
+
// Karindeling: achterstand en duur van het lezen van productmaten.
|
|
161
|
+
function KarindelingStatus() {
|
|
162
|
+
const [info, setInfo] = useState(null);
|
|
163
|
+
const [fout, setFout] = useState(null);
|
|
164
|
+
useEffect(() => {
|
|
165
|
+
supabase.rpc("logistics_karindeling_bewaking").then(({ data, error }) => {
|
|
166
|
+
if (error) {
|
|
167
|
+
console.error("logistics_karindeling_bewaking", error);
|
|
168
|
+
if (error.code !== "42501" && error.code !== "PGRST202")
|
|
169
|
+
setFout(error.message);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
setInfo(data && typeof data === "object" ? data : null);
|
|
173
|
+
});
|
|
174
|
+
}, []);
|
|
175
|
+
if (fout)
|
|
176
|
+
return _jsx("p", { className: "border-t pt-2 text-destructive", children: "Karindeling: status kon niet worden gelezen." });
|
|
177
|
+
if (!info)
|
|
178
|
+
return null;
|
|
179
|
+
const meldingen = karindelingMeldingen(info);
|
|
180
|
+
const info2 = karindelingInfo(info);
|
|
181
|
+
return (_jsxs("div", { className: "border-t pt-2", children: [_jsx("p", { className: "font-medium", children: "Karindeling" }), meldingen.length === 0 && info2.length === 0 && _jsx("p", { className: "text-muted-foreground", children: "Geen meldingen." }), meldingen.map((t, i) => (_jsx("p", { className: "text-destructive", children: t }, `m${i}`))), info2.map((t, i) => (_jsx("p", { className: "text-muted-foreground", children: t }, `i${i}`)))] }));
|
|
182
|
+
}
|
|
159
183
|
// Punt 8: is de database van deze shell bijgewerkt voor deze moduleversie?
|
|
160
184
|
function SchemaVersieStatus() {
|
|
161
185
|
const [oud, setOud] = useState(null);
|
|
@@ -11809,6 +11809,7 @@ export type Database = {
|
|
|
11809
11809
|
last_send_outbox_id: string | null;
|
|
11810
11810
|
merged_into: string | null;
|
|
11811
11811
|
note: string | null;
|
|
11812
|
+
note_important: boolean;
|
|
11812
11813
|
paid_at: string | null;
|
|
11813
11814
|
payment_term_days: number;
|
|
11814
11815
|
reference: string | null;
|
|
@@ -11848,6 +11849,7 @@ export type Database = {
|
|
|
11848
11849
|
last_send_outbox_id?: string | null;
|
|
11849
11850
|
merged_into?: string | null;
|
|
11850
11851
|
note?: string | null;
|
|
11852
|
+
note_important?: boolean;
|
|
11851
11853
|
paid_at?: string | null;
|
|
11852
11854
|
payment_term_days?: number;
|
|
11853
11855
|
reference?: string | null;
|
|
@@ -11887,6 +11889,7 @@ export type Database = {
|
|
|
11887
11889
|
last_send_outbox_id?: string | null;
|
|
11888
11890
|
merged_into?: string | null;
|
|
11889
11891
|
note?: string | null;
|
|
11892
|
+
note_important?: boolean;
|
|
11890
11893
|
paid_at?: string | null;
|
|
11891
11894
|
payment_term_days?: number;
|
|
11892
11895
|
reference?: string | null;
|
|
@@ -38501,6 +38504,7 @@ export type Database = {
|
|
|
38501
38504
|
};
|
|
38502
38505
|
invoice_set_note: {
|
|
38503
38506
|
Args: {
|
|
38507
|
+
_important?: boolean;
|
|
38504
38508
|
_invoice_id: string;
|
|
38505
38509
|
_note: string;
|
|
38506
38510
|
};
|
|
@@ -41345,6 +41349,14 @@ export type Database = {
|
|
|
41345
41349
|
};
|
|
41346
41350
|
Returns: string;
|
|
41347
41351
|
};
|
|
41352
|
+
logistics_karindeling_bewaking: {
|
|
41353
|
+
Args: never;
|
|
41354
|
+
Returns: Json;
|
|
41355
|
+
};
|
|
41356
|
+
logistics_karindeling_onderhoud: {
|
|
41357
|
+
Args: never;
|
|
41358
|
+
Returns: Json;
|
|
41359
|
+
};
|
|
41348
41360
|
logistics_key_product: {
|
|
41349
41361
|
Args: {
|
|
41350
41362
|
p_key: string;
|
|
@@ -42549,6 +42561,27 @@ export type Database = {
|
|
|
42549
42561
|
};
|
|
42550
42562
|
Returns: number;
|
|
42551
42563
|
};
|
|
42564
|
+
logistics_plan_gegevens_codes: {
|
|
42565
|
+
Args: never;
|
|
42566
|
+
Returns: string[];
|
|
42567
|
+
};
|
|
42568
|
+
logistics_plan_gegevens_opnieuw: {
|
|
42569
|
+
Args: {
|
|
42570
|
+
p_order_ids: string[];
|
|
42571
|
+
p_reden: string;
|
|
42572
|
+
};
|
|
42573
|
+
Returns: number;
|
|
42574
|
+
};
|
|
42575
|
+
logistics_plan_gegevens_vangnet: {
|
|
42576
|
+
Args: {
|
|
42577
|
+
p_force?: boolean;
|
|
42578
|
+
};
|
|
42579
|
+
Returns: Json;
|
|
42580
|
+
};
|
|
42581
|
+
logistics_plan_herstel_tijdelijk: {
|
|
42582
|
+
Args: never;
|
|
42583
|
+
Returns: Json;
|
|
42584
|
+
};
|
|
42552
42585
|
logistics_plan_housekeeping: {
|
|
42553
42586
|
Args: never;
|
|
42554
42587
|
Returns: Json;
|
|
@@ -42569,6 +42602,12 @@ export type Database = {
|
|
|
42569
42602
|
};
|
|
42570
42603
|
Returns: string;
|
|
42571
42604
|
};
|
|
42605
|
+
logistics_plan_is_tijdelijk: {
|
|
42606
|
+
Args: {
|
|
42607
|
+
p_text: string;
|
|
42608
|
+
};
|
|
42609
|
+
Returns: boolean;
|
|
42610
|
+
};
|
|
42572
42611
|
logistics_plan_kick: {
|
|
42573
42612
|
Args: never;
|
|
42574
42613
|
Returns: undefined;
|
|
@@ -42688,6 +42727,19 @@ export type Database = {
|
|
|
42688
42727
|
};
|
|
42689
42728
|
Returns: Json;
|
|
42690
42729
|
};
|
|
42730
|
+
logistics_plan_tijdelijk_opnieuw: {
|
|
42731
|
+
Args: {
|
|
42732
|
+
p_order_ids: string[];
|
|
42733
|
+
p_reason: string;
|
|
42734
|
+
};
|
|
42735
|
+
Returns: string[];
|
|
42736
|
+
};
|
|
42737
|
+
logistics_plan_tijdelijk_wacht: {
|
|
42738
|
+
Args: {
|
|
42739
|
+
p_attempts: number;
|
|
42740
|
+
};
|
|
42741
|
+
Returns: string;
|
|
42742
|
+
};
|
|
42691
42743
|
logistics_plan_timeout_running: {
|
|
42692
42744
|
Args: never;
|
|
42693
42745
|
Returns: number;
|
|
@@ -42757,6 +42809,16 @@ export type Database = {
|
|
|
42757
42809
|
};
|
|
42758
42810
|
Returns: Json;
|
|
42759
42811
|
};
|
|
42812
|
+
logistics_prestatietest: {
|
|
42813
|
+
Args: {
|
|
42814
|
+
p_deel?: string;
|
|
42815
|
+
p_fusten?: number;
|
|
42816
|
+
p_orders?: number;
|
|
42817
|
+
p_producten?: number;
|
|
42818
|
+
p_triggers_uit?: boolean;
|
|
42819
|
+
};
|
|
42820
|
+
Returns: Json;
|
|
42821
|
+
};
|
|
42760
42822
|
logistics_print_job_state: {
|
|
42761
42823
|
Args: {
|
|
42762
42824
|
p_job_id: string;
|