@flowselections/logistiek-engine 1.0.108 → 1.0.109
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/lib/moduleVersion.d.ts +1 -1
- package/dist-lib/lib/moduleVersion.js +1 -1
- package/package.json +1 -1
- package/dist-lib/components/rule-engine/FloridayConnectionBanner.d.ts +0 -2
- package/dist-lib/components/rule-engine/FloridayConnectionBanner.d.ts.map +0 -1
- package/dist-lib/components/rule-engine/FloridayConnectionBanner.js +0 -41
- package/dist-lib/hooks/useShippingNoteStatus.test.d.ts +0 -2
- package/dist-lib/hooks/useShippingNoteStatus.test.d.ts.map +0 -1
- package/dist-lib/hooks/useShippingNoteStatus.test.js +0 -20
- package/dist-lib/integrations/supabase/client.d.ts +0 -20293
- package/dist-lib/integrations/supabase/client.d.ts.map +0 -1
- package/dist-lib/integrations/supabase/client.js +0 -13
- package/dist-lib/lib/bufferDecision.test.d.ts +0 -2
- package/dist-lib/lib/bufferDecision.test.d.ts.map +0 -1
- package/dist-lib/lib/bufferDecision.test.js +0 -104
- package/dist-lib/lib/expandGroups.test.d.ts +0 -2
- package/dist-lib/lib/expandGroups.test.d.ts.map +0 -1
- package/dist-lib/lib/expandGroups.test.js +0 -80
- package/dist-lib/lib/floridayCancellation.test.d.ts +0 -2
- package/dist-lib/lib/floridayCancellation.test.d.ts.map +0 -1
- package/dist-lib/lib/floridayCancellation.test.js +0 -42
- package/dist-lib/lib/floridayCartCarriers.test.d.ts +0 -2
- package/dist-lib/lib/floridayCartCarriers.test.d.ts.map +0 -1
- package/dist-lib/lib/floridayCartCarriers.test.js +0 -66
- package/dist-lib/lib/handlers/logistics-tick.test.d.ts +0 -2
- package/dist-lib/lib/handlers/logistics-tick.test.d.ts.map +0 -1
- package/dist-lib/lib/handlers/logistics-tick.test.js +0 -70
- package/dist-lib/lib/layerUtilization.test.d.ts +0 -2
- package/dist-lib/lib/layerUtilization.test.d.ts.map +0 -1
- package/dist-lib/lib/layerUtilization.test.js +0 -11
- package/dist-lib/lib/layoutPrint.test.d.ts +0 -2
- package/dist-lib/lib/layoutPrint.test.d.ts.map +0 -1
- package/dist-lib/lib/layoutPrint.test.js +0 -47
- package/dist-lib/lib/plannerDiff.test.d.ts +0 -2
- package/dist-lib/lib/plannerDiff.test.d.ts.map +0 -1
- package/dist-lib/lib/plannerDiff.test.js +0 -41
- package/dist-lib/lib/quarantineFilter.test.d.ts +0 -2
- package/dist-lib/lib/quarantineFilter.test.d.ts.map +0 -1
- package/dist-lib/lib/quarantineFilter.test.js +0 -18
- package/dist-lib/lib/resolveBuffer.test.d.ts +0 -2
- package/dist-lib/lib/resolveBuffer.test.d.ts.map +0 -1
- package/dist-lib/lib/resolveBuffer.test.js +0 -38
- package/dist-lib/lib/taskCounts.test.d.ts +0 -2
- package/dist-lib/lib/taskCounts.test.d.ts.map +0 -1
- package/dist-lib/lib/taskCounts.test.js +0 -12
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const MODULE_VERSION = "1.0.
|
|
1
|
+
export declare const MODULE_VERSION = "1.0.109";
|
|
2
2
|
//# sourceMappingURL=moduleVersion.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatisch gegenereerd door prebuild:lib; niet handmatig aanpassen.
|
|
2
|
-
export const MODULE_VERSION = "1.0.
|
|
2
|
+
export const MODULE_VERSION = "1.0.109";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FloridayConnectionBanner.d.ts","sourceRoot":"","sources":["../../../src/components/rule-engine/FloridayConnectionBanner.tsx"],"names":[],"mappings":"AAYA,wBAAgB,wBAAwB,gCAwDvC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// ============================================================================
|
|
3
|
-
// src/components/rule-engine/FloridayConnectionBanner.tsx
|
|
4
|
-
// Toont welke Floriday-koppeling de documenten levert. De gegevens komen
|
|
5
|
-
// volledig uit de authenticatie-module; deze module kiest niets zelf.
|
|
6
|
-
// ============================================================================
|
|
7
|
-
import { useQuery } from "@tanstack/react-query";
|
|
8
|
-
import { Badge, Skeleton } from "@flowselections/core";
|
|
9
|
-
import { AlertTriangle, Link2 } from "lucide-react";
|
|
10
|
-
import { supabase } from "../../integrations/supabase/client";
|
|
11
|
-
import { getFloridayConnection } from "../../lib/floridayDocuments.functions";
|
|
12
|
-
export function FloridayConnectionBanner() {
|
|
13
|
-
const { data, isLoading } = useQuery({
|
|
14
|
-
queryKey: ["floriday-connection"],
|
|
15
|
-
queryFn: async () => {
|
|
16
|
-
try {
|
|
17
|
-
// Zonder sessie geeft de server-function een 401-Response terug; die
|
|
18
|
-
// mag nooit als throw naar de router lekken (blanco scherm).
|
|
19
|
-
const { data: sessionData } = await supabase.auth.getSession();
|
|
20
|
-
if (!sessionData.session) {
|
|
21
|
-
return { ok: false, error: "Geen actieve sessie." };
|
|
22
|
-
}
|
|
23
|
-
return await getFloridayConnection();
|
|
24
|
-
}
|
|
25
|
-
catch (e) {
|
|
26
|
-
// Geen sessie of gateway-fout: banner toont de foutstaat, geen crash.
|
|
27
|
-
const message = e instanceof Response ? `HTTP ${e.status}` : String(e?.message ?? e);
|
|
28
|
-
return { ok: false, error: message };
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
retry: false,
|
|
32
|
-
staleTime: 60000,
|
|
33
|
-
});
|
|
34
|
-
if (isLoading)
|
|
35
|
-
return _jsx(Skeleton, { className: "h-14 w-full rounded-lg" });
|
|
36
|
-
if (!data || data.ok !== true) {
|
|
37
|
-
return (_jsxs("div", { className: "flex items-start gap-3 rounded-lg border border-destructive/40 bg-destructive/5 p-3", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-4 w-4 text-destructive" }), _jsxs("div", { className: "text-sm", children: [_jsx("p", { className: "font-medium text-destructive", children: "Geen actieve Floriday-koppeling" }), _jsx("p", { className: "text-muted-foreground", children: "Documenten kunnen niet worden opgehaald zolang de Floriday-authenticatiemodule geen actieve koppeling heeft." })] })] }));
|
|
38
|
-
}
|
|
39
|
-
const c = data.connection;
|
|
40
|
-
return (_jsxs("div", { className: "flex flex-wrap items-center gap-3 rounded-lg border border-border bg-muted/40 p-3", children: [_jsx(Link2, { className: "h-4 w-4 text-muted-foreground" }), _jsxs("div", { className: "text-sm", children: [_jsx("span", { className: "font-medium", children: c?.label ?? c?.organization_name ?? "Floriday" }), c?.gln_code && _jsxs("span", { className: "text-muted-foreground", children: [" \u00B7 GLN ", c.gln_code] })] }), _jsx(Badge, { variant: data.environment === "live" ? "default" : "secondary", children: data.environment === "live" ? "Live" : "Staging" }), _jsx("span", { className: "text-xs text-muted-foreground", children: "Documenten worden opgehaald via de Floriday-authenticatiemodule." })] }));
|
|
41
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useShippingNoteStatus.test.d.ts","sourceRoot":"","sources":["../../src/hooks/useShippingNoteStatus.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { timedOutStatus } from "./useShippingNoteStatus";
|
|
3
|
-
describe("timedOutStatus", () => {
|
|
4
|
-
it("maakt van een wachtende status na de limiet een expliciete fout", () => {
|
|
5
|
-
const wachtend = {
|
|
6
|
-
status: "klaar_voor_print",
|
|
7
|
-
message: "Verzendbrief wordt klaargezet.",
|
|
8
|
-
attempts: 0,
|
|
9
|
-
nextAttemptAt: null,
|
|
10
|
-
slipJobId: "s",
|
|
11
|
-
shippingNoteJobId: null,
|
|
12
|
-
cartId: "c",
|
|
13
|
-
orderNumber: "HO-1",
|
|
14
|
-
};
|
|
15
|
-
const uit = timedOutStatus(wachtend, 15 * 60000);
|
|
16
|
-
expect(uit.status).toBe("mislukt");
|
|
17
|
-
expect(uit.message).toContain("15 minuten");
|
|
18
|
-
expect(uit.slipJobId).toBe("s");
|
|
19
|
-
});
|
|
20
|
-
});
|