@flowselections/logistiek-engine 1.0.16 → 1.0.17
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/README.md +24 -24
- package/dist-lib/components/RuleEnginePage.js +1 -1
- package/dist-lib/components/rule-engine/RuleFieldInput.d.ts +1 -1
- package/dist-lib/components/rule-engine/RuleFieldInput.d.ts.map +1 -1
- package/dist-lib/components/rule-engine/RuleFieldInput.js +11 -3
- package/dist-lib/hooks/useDocumentLayouts.d.ts +1 -0
- package/dist-lib/hooks/useDocumentLayouts.d.ts.map +1 -1
- package/dist-lib/hooks/useDocumentLayouts.js +8 -1
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +55 -1
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +1516 -159
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +55 -1
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/moduleClient.d.ts +55 -1
- package/dist-lib/integrations/supabase/moduleClient.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +58 -1
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/floridayDocuments.functions.d.ts +165 -3
- package/dist-lib/lib/floridayDocuments.functions.d.ts.map +1 -1
- package/dist-lib/lib/floridayPush.functions.d.ts +55 -1
- package/dist-lib/lib/floridayPush.functions.d.ts.map +1 -1
- package/dist-lib/lib/loadCarrierPlanning.functions.d.ts +280 -35
- package/dist-lib/lib/loadCarrierPlanning.functions.d.ts.map +1 -1
- package/dist-lib/lib/logisticsRecalcJob.functions.d.ts +110 -2
- package/dist-lib/lib/logisticsRecalcJob.functions.d.ts.map +1 -1
- package/dist-lib/lib/logisticsRecalculate.functions.d.ts +55 -1
- package/dist-lib/lib/logisticsRecalculate.functions.d.ts.map +1 -1
- package/dist-lib/lib/modulePrompts.d.ts.map +1 -1
- package/dist-lib/lib/modulePrompts.js +1105 -1002
- package/dist-lib/lib/ruleEngineSchema.d.ts +7 -1
- package/dist-lib/lib/ruleEngineSchema.d.ts.map +1 -1
- package/dist-lib/lib/ruleEngineSchema.js +48 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
# logistiek Engine
|
|
2
|
-
|
|
3
|
-
blank project start
|
|
4
|
-
|
|
5
|
-
This project was built with [Lovable](https://lovable.dev).
|
|
6
|
-
|
|
7
|
-
## Build with Lovable
|
|
8
|
-
|
|
9
|
-
Continue developing this project in the [Lovable editor](https://lovable.dev/projects/316ec9c5-0f01-408a-b7ec-3d4dccf9b65d).
|
|
10
|
-
|
|
11
|
-
- **Ship faster**: describe what you want to build and Lovable handles the code.
|
|
12
|
-
- **Stay in sync**: every change made in Lovable is committed straight to this repository.
|
|
13
|
-
- **Full ownership**: this code is yours. Push to `main` on GitHub and your changes sync back into Lovable, ready for your next prompt.
|
|
14
|
-
|
|
15
|
-
## Development
|
|
16
|
-
|
|
17
|
-
Prefer working locally? You need Node.js and npm — [install with nvm](https://github.com/nvm-sh/nvm#installing-and-updating).
|
|
18
|
-
|
|
19
|
-
```sh
|
|
20
|
-
git clone <this-repository-url>
|
|
21
|
-
cd <repository-name>
|
|
22
|
-
npm i
|
|
23
|
-
npm run dev
|
|
24
|
-
```
|
|
1
|
+
# logistiek Engine
|
|
2
|
+
|
|
3
|
+
blank project start
|
|
4
|
+
|
|
5
|
+
This project was built with [Lovable](https://lovable.dev).
|
|
6
|
+
|
|
7
|
+
## Build with Lovable
|
|
8
|
+
|
|
9
|
+
Continue developing this project in the [Lovable editor](https://lovable.dev/projects/316ec9c5-0f01-408a-b7ec-3d4dccf9b65d).
|
|
10
|
+
|
|
11
|
+
- **Ship faster**: describe what you want to build and Lovable handles the code.
|
|
12
|
+
- **Stay in sync**: every change made in Lovable is committed straight to this repository.
|
|
13
|
+
- **Full ownership**: this code is yours. Push to `main` on GitHub and your changes sync back into Lovable, ready for your next prompt.
|
|
14
|
+
|
|
15
|
+
## Development
|
|
16
|
+
|
|
17
|
+
Prefer working locally? You need Node.js and npm — [install with nvm](https://github.com/nvm-sh/nvm#installing-and-updating).
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
git clone <this-repository-url>
|
|
21
|
+
cd <repository-name>
|
|
22
|
+
npm i
|
|
23
|
+
npm run dev
|
|
24
|
+
```
|
|
@@ -16,7 +16,7 @@ import { CollapsibleGroup } from "./rule-engine/CollapsibleGroup";
|
|
|
16
16
|
import { ConditionsEditor } from "./rule-engine/ConditionsEditor";
|
|
17
17
|
import { ImpactPanel } from "./rule-engine/ImpactPanel";
|
|
18
18
|
import { VersionsPanel } from "./rule-engine/VersionsPanel";
|
|
19
|
-
const WIDE_TYPES = ["priority", "toggle", "days", "radio", "textarea"];
|
|
19
|
+
const WIDE_TYPES = ["priority", "toggle", "days", "radio", "textarea", "guidance"];
|
|
20
20
|
function fieldClass(field) {
|
|
21
21
|
return WIDE_TYPES.includes(field.type) ? "md:col-span-2" : "";
|
|
22
22
|
}
|
|
@@ -4,6 +4,6 @@ interface Props {
|
|
|
4
4
|
value: unknown;
|
|
5
5
|
onChange: (value: unknown) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare function RuleFieldInput({ field, value, onChange }: Props): import("react").JSX.Element;
|
|
7
|
+
export declare function RuleFieldInput({ field, value, onChange }: Props): import("react").JSX.Element | null;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=RuleFieldInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleFieldInput.d.ts","sourceRoot":"","sources":["../../../src/components/rule-engine/RuleFieldInput.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAM3E,UAAU,KAAK;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK
|
|
1
|
+
{"version":3,"file":"RuleFieldInput.d.ts","sourceRoot":"","sources":["../../../src/components/rule-engine/RuleFieldInput.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAM3E,UAAU,KAAK;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,sCA2S/D"}
|
|
@@ -12,16 +12,24 @@ import { usePickstations } from "../../hooks/usePickstations";
|
|
|
12
12
|
import { useDocumentLayouts } from "../../hooks/useDocumentLayouts";
|
|
13
13
|
export function RuleFieldInput({ field, value, onChange }) {
|
|
14
14
|
const { stations, types, loading } = usePickstations();
|
|
15
|
-
const { layouts: matching, allLayouts, loading: layoutsLoading } = useDocumentLayouts(field.layoutTypes);
|
|
15
|
+
const { layouts: matching, allLayouts, autoLayout, loading: layoutsLoading, } = useDocumentLayouts(field.layoutTypes);
|
|
16
16
|
const help = fieldHelp(field);
|
|
17
|
+
if (field.type === "guidance") {
|
|
18
|
+
const g = field.guidance;
|
|
19
|
+
if (!g)
|
|
20
|
+
return null;
|
|
21
|
+
return (_jsxs("details", { className: "rounded-lg border border-dashed border-border bg-muted/30", children: [_jsx("summary", { className: "cursor-pointer px-3 py-2 text-sm font-medium text-muted-foreground", children: field.label }), _jsxs("div", { className: "space-y-3 border-t border-border px-3 py-3 text-sm", children: [_jsxs("div", { children: [_jsx("p", { className: "font-medium", children: "Hier (Logistiek Engine)" }), _jsx("p", { className: "text-muted-foreground", children: g.engine })] }), _jsxs("div", { children: [_jsx("p", { className: "font-medium", children: "In de Layout maker" }), _jsx("p", { className: "text-muted-foreground", children: g.layoutMaker })] }), _jsxs("div", { children: [_jsx("p", { className: "font-medium", children: "Op de pickschermen" }), _jsx("p", { className: "text-muted-foreground", children: g.pickstations })] })] })] }));
|
|
22
|
+
}
|
|
17
23
|
if (field.type === "layout") {
|
|
18
24
|
const others = allLayouts.filter((l) => !matching.some((m) => m.id === l.id));
|
|
19
25
|
const options = [...matching, ...others];
|
|
20
|
-
|
|
26
|
+
const isAuto = !value;
|
|
27
|
+
return (_jsxs("div", { className: "space-y-2", children: [_jsx(FieldLabel, { label: field.label, help: help }), _jsxs(Select, { value: String(value ?? ""), onValueChange: (v) => onChange(v === "__none__" ? "" : v), children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, { placeholder: layoutsLoading ? "Laden…" : "Automatisch — de layout uit de Layout maker" }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "__none__", children: "Automatisch \u2014 de layout uit de Layout maker" }), options.map((layout) => (_jsxs(SelectItem, { value: layout.id, children: [layout.name, " \u00B7 ", layout.documentType, " \u00B7 v", layout.version, layout.active ? "" : " (inactief)"] }, layout.id)))] })] }), !layoutsLoading && isAuto && autoLayout && (_jsxs("p", { className: "text-xs text-muted-foreground", children: ["Nu wordt \u201C", autoLayout.name, "\u201D gebruikt \u2014 de layout die in de Layout maker op actief staat."] })), !layoutsLoading && isAuto && !autoLayout && (_jsx("p", { className: "text-xs text-destructive", children: "Er staat nog geen layout op actief in de Layout maker. Maak daar een layout aan en zet die op actief, anders blijft het printen wachten." })), !layoutsLoading && options.length === 0 && (_jsx("p", { className: "text-xs text-muted-foreground", children: "Er staan nog geen layouts klaar om te kiezen." }))] }));
|
|
21
28
|
}
|
|
22
29
|
if (field.type === "pickstation") {
|
|
23
30
|
const options = field.type === "pickstation" ? stations : types;
|
|
24
|
-
return (_jsxs("div", { className: "space-y-2", children: [_jsx(FieldLabel, { label: field.label, help: help
|
|
31
|
+
return (_jsxs("div", { className: "space-y-2", children: [_jsx(FieldLabel, { label: field.label, help: help ??
|
|
32
|
+
"Het pickstation waar dit document hoort. De pickschermen koppelen dat station aan een printplek uit de Layout maker; die printplek bepaalt de printer." }), _jsxs(Select, { value: String(value ?? ""), onValueChange: (v) => onChange(v === "__none__" ? "" : v), children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, { placeholder: loading ? "Laden…" : "Kies een pickstation" }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "__none__", children: "Niet instellen" }), options.map((option) => (_jsx(SelectItem, { value: option.id, children: option.name }, option.id)))] })] }), !loading && options.length === 0 && (_jsx("p", { className: "text-xs text-muted-foreground", children: "Er zijn nog geen pickstations ingericht." }))] }));
|
|
25
33
|
}
|
|
26
34
|
if (field.type === "days") {
|
|
27
35
|
const selected = Array.isArray(value) ? value : [];
|
|
@@ -8,6 +8,7 @@ export interface DocumentLayoutOption {
|
|
|
8
8
|
export declare function useDocumentLayouts(documentTypes?: string[]): {
|
|
9
9
|
layouts: DocumentLayoutOption[];
|
|
10
10
|
allLayouts: DocumentLayoutOption[];
|
|
11
|
+
autoLayout: DocumentLayoutOption | null;
|
|
11
12
|
loading: boolean;
|
|
12
13
|
};
|
|
13
14
|
//# sourceMappingURL=useDocumentLayouts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentLayouts.d.ts","sourceRoot":"","sources":["../../src/hooks/useDocumentLayouts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDocumentLayouts.d.ts","sourceRoot":"","sources":["../../src/hooks/useDocumentLayouts.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB;AA4BD,wBAAgB,kBAAkB,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE;;;;;EA8B1D"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// ============================================================================
|
|
2
2
|
// src/hooks/useDocumentLayouts.ts — layouts uit de Layout maker, zodat je per
|
|
3
3
|
// documentsoort in de Logistiek Engine een layout kunt koppelen.
|
|
4
|
+
//
|
|
5
|
+
// De hook geeft ook terug welke layout de Layout maker zélf zou pakken als de
|
|
6
|
+
// Engine niets meestuurt (de layout die op "actief" staat). Daarmee kan het
|
|
7
|
+
// instelscherm laten zien wat "Automatisch" in de praktijk oplevert.
|
|
4
8
|
// ============================================================================
|
|
5
9
|
import { useEffect, useState } from "react";
|
|
6
10
|
import { supabase } from "@flowselections/core";
|
|
@@ -50,5 +54,8 @@ export function useDocumentLayouts(documentTypes) {
|
|
|
50
54
|
const filtered = documentTypes && documentTypes.length > 0
|
|
51
55
|
? layouts.filter((l) => documentTypes.includes(l.documentType))
|
|
52
56
|
: layouts;
|
|
53
|
-
|
|
57
|
+
// Wat de Layout maker pakt zonder meegestuurde layout: de actieve layout van
|
|
58
|
+
// het eerste passende documenttype.
|
|
59
|
+
const autoLayout = filtered.find((l) => l.active) ?? null;
|
|
60
|
+
return { layouts: filtered, allLayouts: layouts, autoLayout, loading };
|
|
54
61
|
}
|
|
@@ -18620,6 +18620,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
18620
18620
|
werkbon_package_items: {
|
|
18621
18621
|
Row: {
|
|
18622
18622
|
article_number: string | null;
|
|
18623
|
+
artikel_id: string | null;
|
|
18623
18624
|
created_at: string;
|
|
18624
18625
|
gtin: string | null;
|
|
18625
18626
|
id: string;
|
|
@@ -18637,6 +18638,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
18637
18638
|
};
|
|
18638
18639
|
Insert: {
|
|
18639
18640
|
article_number?: string | null;
|
|
18641
|
+
artikel_id?: string | null;
|
|
18640
18642
|
created_at?: string;
|
|
18641
18643
|
gtin?: string | null;
|
|
18642
18644
|
id?: string;
|
|
@@ -18654,6 +18656,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
18654
18656
|
};
|
|
18655
18657
|
Update: {
|
|
18656
18658
|
article_number?: string | null;
|
|
18659
|
+
artikel_id?: string | null;
|
|
18657
18660
|
created_at?: string;
|
|
18658
18661
|
gtin?: string | null;
|
|
18659
18662
|
id?: string;
|
|
@@ -18670,6 +18673,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
18670
18673
|
updated_at?: string;
|
|
18671
18674
|
};
|
|
18672
18675
|
Relationships: [{
|
|
18676
|
+
foreignKeyName: "werkbon_package_items_artikel_id_fkey";
|
|
18677
|
+
columns: ["artikel_id"];
|
|
18678
|
+
isOneToOne: false;
|
|
18679
|
+
referencedRelation: "artikelen_cache";
|
|
18680
|
+
referencedColumns: ["id"];
|
|
18681
|
+
}, {
|
|
18673
18682
|
foreignKeyName: "werkbon_package_items_package_id_fkey";
|
|
18674
18683
|
columns: ["package_id"];
|
|
18675
18684
|
isOneToOne: false;
|
|
@@ -19892,6 +19901,20 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
19892
19901
|
referencedColumns: ["id"];
|
|
19893
19902
|
}];
|
|
19894
19903
|
};
|
|
19904
|
+
v_werkbon_totalen: {
|
|
19905
|
+
Row: {
|
|
19906
|
+
packages_cents: number | null;
|
|
19907
|
+
packages_minutes: number | null;
|
|
19908
|
+
werkbon_id: string | null;
|
|
19909
|
+
};
|
|
19910
|
+
Relationships: [{
|
|
19911
|
+
foreignKeyName: "werkbon_package_lines_werkbon_id_fkey";
|
|
19912
|
+
columns: ["werkbon_id"];
|
|
19913
|
+
isOneToOne: false;
|
|
19914
|
+
referencedRelation: "werkbonnen";
|
|
19915
|
+
referencedColumns: ["id"];
|
|
19916
|
+
}];
|
|
19917
|
+
};
|
|
19895
19918
|
};
|
|
19896
19919
|
Functions: {
|
|
19897
19920
|
_floriday_schedule_job: {
|
|
@@ -21828,6 +21851,25 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
21828
21851
|
};
|
|
21829
21852
|
Returns: string;
|
|
21830
21853
|
};
|
|
21854
|
+
pakket_suggesties_voor_tekst: {
|
|
21855
|
+
Args: {
|
|
21856
|
+
_tekst: string;
|
|
21857
|
+
};
|
|
21858
|
+
Returns: {
|
|
21859
|
+
hit_type: string;
|
|
21860
|
+
package_id: string;
|
|
21861
|
+
priority: number;
|
|
21862
|
+
}[];
|
|
21863
|
+
};
|
|
21864
|
+
pakket_voor_reistijd: {
|
|
21865
|
+
Args: {
|
|
21866
|
+
_minuten: number;
|
|
21867
|
+
};
|
|
21868
|
+
Returns: {
|
|
21869
|
+
package_id: string;
|
|
21870
|
+
priority: number;
|
|
21871
|
+
}[];
|
|
21872
|
+
};
|
|
21831
21873
|
pick_active_printers: {
|
|
21832
21874
|
Args: never;
|
|
21833
21875
|
Returns: {
|
|
@@ -22878,6 +22920,18 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
22878
22920
|
Args: never;
|
|
22879
22921
|
Returns: string;
|
|
22880
22922
|
};
|
|
22923
|
+
werkbon_totalen: {
|
|
22924
|
+
Args: {
|
|
22925
|
+
_werkbon_id: string;
|
|
22926
|
+
};
|
|
22927
|
+
Returns: {
|
|
22928
|
+
materials_cents: number;
|
|
22929
|
+
packages_cents: number;
|
|
22930
|
+
packages_minutes: number;
|
|
22931
|
+
total_cents: number;
|
|
22932
|
+
total_minutes: number;
|
|
22933
|
+
}[];
|
|
22934
|
+
};
|
|
22881
22935
|
wo_create_from_source: {
|
|
22882
22936
|
Args: {
|
|
22883
22937
|
_payload?: import("./types").Json;
|
|
@@ -22916,7 +22970,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
22916
22970
|
};
|
|
22917
22971
|
CompositeTypes: { [_ in never]: never; };
|
|
22918
22972
|
}, {
|
|
22919
|
-
PostgrestVersion: "14.
|
|
22973
|
+
PostgrestVersion: "14.17";
|
|
22920
22974
|
}>;
|
|
22921
22975
|
userId: string;
|
|
22922
22976
|
claims: import("@supabase/auth-js").User;
|