@flowselections/layout-maker 1.67.1 → 1.68.1
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/LayoutsPage.d.ts.map +1 -1
- package/dist-lib/components/LayoutsPage.js +2 -2
- package/dist-lib/integrations/supabase/types.d.ts +60 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/printService.functions.d.ts +3 -2
- package/dist-lib/lib/printService.functions.d.ts.map +1 -1
- package/dist-lib/lib/printService.functions.js +9 -5
- package/dist-lib/lib/standaardLayouts.server.d.ts +19 -0
- package/dist-lib/lib/standaardLayouts.server.d.ts.map +1 -1
- package/dist-lib/lib/standaardLayouts.server.js +44 -1
- package/dist-lib/lib/standaardenBron.d.ts +15 -0
- package/dist-lib/lib/standaardenBron.d.ts.map +1 -0
- package/dist-lib/lib/standaardenBron.js +256 -0
- package/dist-lib/lib/useDocumentData.d.ts +2 -0
- package/dist-lib/lib/useDocumentData.d.ts.map +1 -1
- package/dist-lib/lib/useDocumentData.js +6 -0
- package/dist-lib/lib/versie.generated.d.ts +1 -1
- package/dist-lib/lib/versie.generated.js +1 -1
- package/package.json +1 -1
- package/sql/print-schema.sql +1 -1
|
@@ -82,8 +82,7 @@ export declare const netwerkComputers: import("@tanstack/start-client-core").Opt
|
|
|
82
82
|
computers?: undefined;
|
|
83
83
|
}>>;
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
86
|
-
* enkele layout bestaat. Zo schrijft een pagina nooit met de gebruikerssessie.
|
|
85
|
+
* Vult de standaarden aan en maakt ontbrekende standaardlayouts aan met de servicerol. Zo schrijft een pagina nooit met de gebruikerssessie.
|
|
87
86
|
*/
|
|
88
87
|
export declare const zorgVoorStandaardLayoutsFn: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
|
|
89
88
|
supabase: import("../integrations/supabase/auth-middleware.js").AuthedSupabaseClient;
|
|
@@ -92,10 +91,12 @@ export declare const zorgVoorStandaardLayoutsFn: import("@tanstack/start-client-
|
|
|
92
91
|
}, undefined, undefined, undefined>], undefined, Promise<{
|
|
93
92
|
ok: true;
|
|
94
93
|
aangemaakt: number;
|
|
94
|
+
schemaMelding: "Het schema van Layouts is nog niet gedraaid in deze database. Laat de schema-update van Layouts uitvoeren; tot die tijd worden Pakbon, Afleverbrief (BVO) en Productiebon niet automatisch aangemaakt." | null;
|
|
95
95
|
fout?: undefined;
|
|
96
96
|
} | {
|
|
97
97
|
ok: false;
|
|
98
98
|
aangemaakt: 0;
|
|
99
|
+
schemaMelding: null;
|
|
99
100
|
fout: string;
|
|
100
101
|
}>>;
|
|
101
102
|
/** Echte tellingen per status over alle opdrachten (niet alleen de laatste 200). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"printService.functions.d.ts","sourceRoot":"","sources":["../../src/lib/printService.functions.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe;;;;;;;;;;;;GASxB,CAAC;AAEL,eAAO,MAAM,qBAAqB;;;;8CAER;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;;;;;;;;;;;;;GAmBC,CAAC;AAEL,eAAO,MAAM,WAAW;;;;8CAEE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;GAU7C,CAAC;AAEL,eAAO,MAAM,uBAAuB;;;;+CAET;IAAE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE;;;;;;;;;;GAqE5C,CAAC;AAEL,eAAO,MAAM,gBAAgB;;;;;;;;;;;;GAYzB,CAAC;AAEL
|
|
1
|
+
{"version":3,"file":"printService.functions.d.ts","sourceRoot":"","sources":["../../src/lib/printService.functions.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe;;;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;0CAET;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE;;;;;;;;;GAqBxD,CAAC"}
|
|
@@ -136,19 +136,23 @@ export const netwerkComputers = createServerFn({ method: "POST" })
|
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
140
|
-
* enkele layout bestaat. Zo schrijft een pagina nooit met de gebruikerssessie.
|
|
139
|
+
* Vult de standaarden aan en maakt ontbrekende standaardlayouts aan met de servicerol. Zo schrijft een pagina nooit met de gebruikerssessie.
|
|
141
140
|
*/
|
|
142
141
|
export const zorgVoorStandaardLayoutsFn = createServerFn({ method: "POST" })
|
|
143
142
|
.middleware([requireSupabaseAuth])
|
|
144
143
|
.handler(async () => {
|
|
145
144
|
try {
|
|
146
145
|
const { supabaseAdmin } = await import("../integrations/supabase/client.server.js");
|
|
147
|
-
const {
|
|
148
|
-
|
|
146
|
+
const { zorgVoorStandaardLayoutsMetStatus, SCHEMA_ONTBREEKT_MELDING } = await import("./standaardLayouts.server.js");
|
|
147
|
+
const r = await zorgVoorStandaardLayoutsMetStatus(supabaseAdmin);
|
|
148
|
+
return {
|
|
149
|
+
ok: true,
|
|
150
|
+
aangemaakt: r.aantal,
|
|
151
|
+
schemaMelding: r.schemaOntbreekt ? SCHEMA_ONTBREEKT_MELDING : null,
|
|
152
|
+
};
|
|
149
153
|
}
|
|
150
154
|
catch (e) {
|
|
151
|
-
return { ok: false, aangemaakt: 0, fout: e instanceof Error ? e.message : "Mislukt" };
|
|
155
|
+
return { ok: false, aangemaakt: 0, schemaMelding: null, fout: e instanceof Error ? e.message : "Mislukt" };
|
|
152
156
|
}
|
|
153
157
|
});
|
|
154
158
|
/** Echte tellingen per status over alle opdrachten (niet alleen de laatste 200). */
|
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
import type { SupabaseClient } from "@supabase/supabase-js";
|
|
2
2
|
type Db = SupabaseClient<any, any, any>;
|
|
3
|
+
export declare const SCHEMA_ONTBREEKT_MELDING = "Het schema van Layouts is nog niet gedraaid in deze database. Laat de schema-update van Layouts uitvoeren; tot die tijd worden Pakbon, Afleverbrief (BVO) en Productiebon niet automatisch aangemaakt.";
|
|
4
|
+
/** Tabel of kolom bestaat niet (Postgres of PostgREST). */
|
|
5
|
+
export declare function isSchemaOntbreekt(fout: {
|
|
6
|
+
code?: string | null;
|
|
7
|
+
message?: string | null;
|
|
8
|
+
} | null | undefined): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Zet de standaarden uit het pakket in layout_standaarden: invoegen als de
|
|
11
|
+
* sleutel ontbreekt, bijwerken alleen bij een hogere versie. Raakt nooit
|
|
12
|
+
* document_layouts aan.
|
|
13
|
+
*/
|
|
14
|
+
export declare function vulStandaardenAan(db: Db): Promise<{
|
|
15
|
+
aantal: number;
|
|
16
|
+
schemaOntbreekt: boolean;
|
|
17
|
+
}>;
|
|
3
18
|
/** Geeft het aantal automatische acties terug. */
|
|
4
19
|
export declare function zorgVoorStandaardLayoutsServer(db: Db): Promise<number>;
|
|
20
|
+
export declare function zorgVoorStandaardLayoutsMetStatus(db: Db): Promise<{
|
|
21
|
+
aantal: number;
|
|
22
|
+
schemaOntbreekt: boolean;
|
|
23
|
+
}>;
|
|
5
24
|
/**
|
|
6
25
|
* Eenmalig voorinvullen: eerst de eigen organisatie uit Floriday-auth
|
|
7
26
|
* (floriday_eigen_organisatie), anders invoice_branding_settings. Nooit als er
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standaardLayouts.server.d.ts","sourceRoot":"","sources":["../../src/lib/standaardLayouts.server.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"standaardLayouts.server.d.ts","sourceRoot":"","sources":["../../src/lib/standaardLayouts.server.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI5D,KAAK,EAAE,GAAG,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAExC,eAAO,MAAM,wBAAwB,2MACqK,CAAC;AAE3M,2DAA2D;AAC3D,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAKrH;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,OAAO,CAAA;CAAE,CAAC,CAmBrG;AAED,kDAAkD;AAClD,wBAAsB,8BAA8B,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAE5E;AAED,wBAAsB,iCAAiC,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,OAAO,CAAA;CAAE,CAAC,CAYrH;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAqBvE"}
|
|
@@ -11,8 +11,51 @@
|
|
|
11
11
|
// Daarna: bedrijfsgegevens eenmalig voorinvullen als ze nog leeg zijn.
|
|
12
12
|
// ============================================================================
|
|
13
13
|
import { BEDRIJFSGEGEVENS_SLEUTEL, voorinvulBesluit } from "./bedrijfsgegevens.js";
|
|
14
|
+
import { STANDAARDEN_BRON } from "./standaardenBron.js";
|
|
15
|
+
export const SCHEMA_ONTBREEKT_MELDING = "Het schema van Layouts is nog niet gedraaid in deze database. Laat de schema-update van Layouts uitvoeren; tot die tijd worden Pakbon, Afleverbrief (BVO) en Productiebon niet automatisch aangemaakt.";
|
|
16
|
+
/** Tabel of kolom bestaat niet (Postgres of PostgREST). */
|
|
17
|
+
export function isSchemaOntbreekt(fout) {
|
|
18
|
+
if (!fout)
|
|
19
|
+
return false;
|
|
20
|
+
const code = String(fout.code ?? "");
|
|
21
|
+
if (["42P01", "42703", "PGRST204", "PGRST205"].includes(code))
|
|
22
|
+
return true;
|
|
23
|
+
return /does not exist|could not find the .*(table|column)/i.test(String(fout.message ?? ""));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Zet de standaarden uit het pakket in layout_standaarden: invoegen als de
|
|
27
|
+
* sleutel ontbreekt, bijwerken alleen bij een hogere versie. Raakt nooit
|
|
28
|
+
* document_layouts aan.
|
|
29
|
+
*/
|
|
30
|
+
export async function vulStandaardenAan(db) {
|
|
31
|
+
const { data, error } = await db.from("layout_standaarden").select("sleutel, versie");
|
|
32
|
+
if (error) {
|
|
33
|
+
if (isSchemaOntbreekt(error))
|
|
34
|
+
return { aantal: 0, schemaOntbreekt: true };
|
|
35
|
+
throw new Error(`Standaarden lezen mislukt: ${error.message}`);
|
|
36
|
+
}
|
|
37
|
+
const huidig = new Map();
|
|
38
|
+
for (const r of Array.isArray(data) ? data : [])
|
|
39
|
+
huidig.set(String(r.sleutel), Number(r.versie ?? 0));
|
|
40
|
+
const nodig = STANDAARDEN_BRON.filter((s) => !huidig.has(s.sleutel) || s.versie > (huidig.get(s.sleutel) ?? 0));
|
|
41
|
+
if (nodig.length === 0)
|
|
42
|
+
return { aantal: 0, schemaOntbreekt: false };
|
|
43
|
+
const { error: fout } = await db.from("layout_standaarden").upsert(nodig.map((s) => ({ ...s, page_settings: {}, updated_at: new Date().toISOString() })), { onConflict: "sleutel" });
|
|
44
|
+
if (fout) {
|
|
45
|
+
if (isSchemaOntbreekt(fout))
|
|
46
|
+
return { aantal: 0, schemaOntbreekt: true };
|
|
47
|
+
throw new Error(`Standaarden aanvullen mislukt: ${fout.message}`);
|
|
48
|
+
}
|
|
49
|
+
return { aantal: nodig.length, schemaOntbreekt: false };
|
|
50
|
+
}
|
|
14
51
|
/** Geeft het aantal automatische acties terug. */
|
|
15
52
|
export async function zorgVoorStandaardLayoutsServer(db) {
|
|
53
|
+
return (await zorgVoorStandaardLayoutsMetStatus(db)).aantal;
|
|
54
|
+
}
|
|
55
|
+
export async function zorgVoorStandaardLayoutsMetStatus(db) {
|
|
56
|
+
const aanvulling = await vulStandaardenAan(db);
|
|
57
|
+
if (aanvulling.schemaOntbreekt)
|
|
58
|
+
return { aantal: 0, schemaOntbreekt: true };
|
|
16
59
|
const { data, error: rpcFout } = await db.rpc("layout_zorg_systeemlayouts");
|
|
17
60
|
if (rpcFout)
|
|
18
61
|
throw new Error(`Standaardlayouts controleren mislukt: ${rpcFout.message}`);
|
|
@@ -24,7 +67,7 @@ export async function zorgVoorStandaardLayoutsServer(db) {
|
|
|
24
67
|
catch {
|
|
25
68
|
/* voorinvullen is een gemak; nooit de aanvulronde laten mislukken */
|
|
26
69
|
}
|
|
27
|
-
return aantal;
|
|
70
|
+
return { aantal, schemaOntbreekt: false };
|
|
28
71
|
}
|
|
29
72
|
/**
|
|
30
73
|
* Eenmalig voorinvullen: eerst de eigen organisatie uit Floriday-auth
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface StandaardBron {
|
|
2
|
+
sleutel: string;
|
|
3
|
+
versie: number;
|
|
4
|
+
documenttype: string;
|
|
5
|
+
naam: string;
|
|
6
|
+
omschrijving: string;
|
|
7
|
+
papierformaat: string;
|
|
8
|
+
breedte_mm: number;
|
|
9
|
+
hoogte_mm: number;
|
|
10
|
+
config: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
export declare const STANDAARDEN_BRON: StandaardBron[];
|
|
13
|
+
/** Het idempotente schema-blok: invoegen als de sleutel ontbreekt, bijwerken alleen bij een hogere versie. */
|
|
14
|
+
export declare function standaardenSql(): string;
|
|
15
|
+
//# sourceMappingURL=standaardenBron.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standaardenBron.d.ts","sourceRoot":"","sources":["../../src/lib/standaardenBron.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,gBAAgB,EAAE,aAAa,EAsO3C,CAAC;AAMF,8GAA8G;AAC9G,wBAAgB,cAAc,IAAI,MAAM,CAevC"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// src/lib/standaardenBron.ts — ENIGE bron voor de Flow Selections-standaarden.
|
|
3
|
+
// Het blok in sql/print-schema.sql wordt hieruit gegenereerd
|
|
4
|
+
// (bun scripts/schrijf-standaarden.ts) en de server vult layout_standaarden
|
|
5
|
+
// hieruit aan. Pas de versie op wanneer de inhoud verandert.
|
|
6
|
+
// Puur data: geen imports, geen servercode.
|
|
7
|
+
// ============================================================================
|
|
8
|
+
export const STANDAARDEN_BRON = [
|
|
9
|
+
{
|
|
10
|
+
"sleutel": "fs.pakbon",
|
|
11
|
+
"versie": 2,
|
|
12
|
+
"documenttype": "pakbon",
|
|
13
|
+
"naam": "Pakbon",
|
|
14
|
+
"omschrijving": "Standaarddocument voor eigen orders, met kolom Sticker. Volledig aanpasbaar — aanpassen kan per klant.",
|
|
15
|
+
"papierformaat": "A4",
|
|
16
|
+
"breedte_mm": 210,
|
|
17
|
+
"hoogte_mm": 297,
|
|
18
|
+
"config": {
|
|
19
|
+
"pakbon": {
|
|
20
|
+
"secties": [
|
|
21
|
+
{
|
|
22
|
+
"id": "logo-std",
|
|
23
|
+
"type": "logo",
|
|
24
|
+
"titel": "Logo",
|
|
25
|
+
"zichtbaar": true,
|
|
26
|
+
"opties": {
|
|
27
|
+
"uitlijning": "left",
|
|
28
|
+
"hoogte": 18
|
|
29
|
+
},
|
|
30
|
+
"condities": []
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "bedrijfsgegevens-std",
|
|
34
|
+
"type": "bedrijfsgegevens",
|
|
35
|
+
"titel": "Bedrijfsgegevens",
|
|
36
|
+
"zichtbaar": true,
|
|
37
|
+
"opties": {
|
|
38
|
+
"toonNaam": true,
|
|
39
|
+
"toonAdres": true,
|
|
40
|
+
"toonContact": true,
|
|
41
|
+
"toonKvk": false
|
|
42
|
+
},
|
|
43
|
+
"condities": []
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "klantgegevens-std",
|
|
47
|
+
"type": "klantgegevens",
|
|
48
|
+
"titel": "Klantgegevens",
|
|
49
|
+
"zichtbaar": true,
|
|
50
|
+
"opties": {
|
|
51
|
+
"toonKlantnummer": true,
|
|
52
|
+
"toonContact": true,
|
|
53
|
+
"toonReferentie": true
|
|
54
|
+
},
|
|
55
|
+
"condities": []
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "afleveradres-std",
|
|
59
|
+
"type": "afleveradres",
|
|
60
|
+
"titel": "Afleveradres",
|
|
61
|
+
"zichtbaar": true,
|
|
62
|
+
"opties": {
|
|
63
|
+
"toonLand": true
|
|
64
|
+
},
|
|
65
|
+
"condities": []
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "orderinformatie-std",
|
|
69
|
+
"type": "orderinformatie",
|
|
70
|
+
"titel": "Orderinformatie",
|
|
71
|
+
"zichtbaar": true,
|
|
72
|
+
"opties": {
|
|
73
|
+
"toonOrdernummer": true,
|
|
74
|
+
"toonDatum": true,
|
|
75
|
+
"toonLeverdatum": true,
|
|
76
|
+
"toonReferentie": true
|
|
77
|
+
},
|
|
78
|
+
"condities": []
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "pickmethode-std",
|
|
82
|
+
"type": "pickmethode",
|
|
83
|
+
"titel": "Pickmethode",
|
|
84
|
+
"zichtbaar": true,
|
|
85
|
+
"opties": {
|
|
86
|
+
"methode": "kar",
|
|
87
|
+
"kop": "Te verzamelen fusten — karindeling zelf bepalen",
|
|
88
|
+
"velden": [
|
|
89
|
+
"artikelnummer",
|
|
90
|
+
"artikelnaam",
|
|
91
|
+
"potmaat",
|
|
92
|
+
"kleur",
|
|
93
|
+
"locatie",
|
|
94
|
+
"fustsoort",
|
|
95
|
+
"planten_per_fust",
|
|
96
|
+
"fust_aantal",
|
|
97
|
+
"aantal"
|
|
98
|
+
],
|
|
99
|
+
"toonFusthoogte": true,
|
|
100
|
+
"toonTotaal": true,
|
|
101
|
+
"toonBarcode": true,
|
|
102
|
+
"barcodeHoogte": 15
|
|
103
|
+
},
|
|
104
|
+
"condities": []
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "karren-std",
|
|
108
|
+
"type": "karren",
|
|
109
|
+
"titel": "Karren",
|
|
110
|
+
"zichtbaar": true,
|
|
111
|
+
"opties": {
|
|
112
|
+
"modus": "pagina",
|
|
113
|
+
"bundel_identiek": true,
|
|
114
|
+
"velden": [
|
|
115
|
+
"karnummer",
|
|
116
|
+
"lagen",
|
|
117
|
+
"producten"
|
|
118
|
+
],
|
|
119
|
+
"scheiding": "kop",
|
|
120
|
+
"koptekst": "KAR {kar}",
|
|
121
|
+
"kleur": "#e8eef7"
|
|
122
|
+
},
|
|
123
|
+
"condities": []
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"id": "lagen-std",
|
|
127
|
+
"type": "lagen",
|
|
128
|
+
"titel": "Lagen",
|
|
129
|
+
"zichtbaar": true,
|
|
130
|
+
"opties": {
|
|
131
|
+
"modus": "apart",
|
|
132
|
+
"velden": [
|
|
133
|
+
"laagnummer",
|
|
134
|
+
"belading",
|
|
135
|
+
"producten"
|
|
136
|
+
],
|
|
137
|
+
"koptekst": "Laag {laag}"
|
|
138
|
+
},
|
|
139
|
+
"condities": []
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "producten-std",
|
|
143
|
+
"type": "producten",
|
|
144
|
+
"titel": "Producten op een laag",
|
|
145
|
+
"zichtbaar": true,
|
|
146
|
+
"opties": {
|
|
147
|
+
"weergave": "tabel",
|
|
148
|
+
"velden": [
|
|
149
|
+
"artikelnummer",
|
|
150
|
+
"artikelnaam",
|
|
151
|
+
"potmaat",
|
|
152
|
+
"aantal",
|
|
153
|
+
"sticker"
|
|
154
|
+
],
|
|
155
|
+
"toonSamenstelling": true,
|
|
156
|
+
"onderdeelVelden": [
|
|
157
|
+
"artikelnaam",
|
|
158
|
+
"kleur",
|
|
159
|
+
"potmaat",
|
|
160
|
+
"aantal"
|
|
161
|
+
],
|
|
162
|
+
"groeperen": false,
|
|
163
|
+
"kop_eenmalig": true,
|
|
164
|
+
"sortering": "eigen"
|
|
165
|
+
},
|
|
166
|
+
"condities": []
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"id": "fusten-std",
|
|
170
|
+
"type": "fusten",
|
|
171
|
+
"titel": "Fusten",
|
|
172
|
+
"zichtbaar": true,
|
|
173
|
+
"opties": {
|
|
174
|
+
"modus": "totaal",
|
|
175
|
+
"velden": [
|
|
176
|
+
"fusttype",
|
|
177
|
+
"aantal"
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"condities": []
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"id": "totalen-std",
|
|
184
|
+
"type": "totalen",
|
|
185
|
+
"titel": "Totalen",
|
|
186
|
+
"zichtbaar": true,
|
|
187
|
+
"opties": {
|
|
188
|
+
"velden": [
|
|
189
|
+
"producten",
|
|
190
|
+
"karren",
|
|
191
|
+
"lagen"
|
|
192
|
+
],
|
|
193
|
+
"uitlijning": "right",
|
|
194
|
+
"elke_pagina": false,
|
|
195
|
+
"toon_paginanummer": false
|
|
196
|
+
},
|
|
197
|
+
"condities": []
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"id": "handtekening-std",
|
|
201
|
+
"type": "handtekening",
|
|
202
|
+
"titel": "Handtekening",
|
|
203
|
+
"zichtbaar": true,
|
|
204
|
+
"opties": {
|
|
205
|
+
"label": "Voor ontvangst getekend",
|
|
206
|
+
"toonNaam": true,
|
|
207
|
+
"toonDatum": true,
|
|
208
|
+
"toonBarcode": true
|
|
209
|
+
},
|
|
210
|
+
"condities": []
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"sleutel": "fs.afleverbrief_bvo",
|
|
218
|
+
"versie": 1,
|
|
219
|
+
"documenttype": "afleverbrief",
|
|
220
|
+
"naam": "Afleverbrief (BVO)",
|
|
221
|
+
"omschrijving": "Verzendbrief voor eigen (niet-Floriday) orders. Volledig aanpasbaar.",
|
|
222
|
+
"papierformaat": "A4",
|
|
223
|
+
"breedte_mm": 210,
|
|
224
|
+
"hoogte_mm": 297,
|
|
225
|
+
"config": {}
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"sleutel": "fs.productiebon",
|
|
229
|
+
"versie": 1,
|
|
230
|
+
"documenttype": "productiebon",
|
|
231
|
+
"naam": "Productiebon",
|
|
232
|
+
"omschrijving": "Standaard productiebon met de vaste blokindeling. Volledig aanpasbaar.",
|
|
233
|
+
"papierformaat": "A4",
|
|
234
|
+
"breedte_mm": 210,
|
|
235
|
+
"hoogte_mm": 297,
|
|
236
|
+
"config": {}
|
|
237
|
+
}
|
|
238
|
+
];
|
|
239
|
+
function lit(s) {
|
|
240
|
+
return "'" + s.replace(/'/g, "''") + "'";
|
|
241
|
+
}
|
|
242
|
+
/** Het idempotente schema-blok: invoegen als de sleutel ontbreekt, bijwerken alleen bij een hogere versie. */
|
|
243
|
+
export function standaardenSql() {
|
|
244
|
+
const rijen = STANDAARDEN_BRON.map((s) => ` (${lit(s.sleutel)}, ${s.versie}, ${lit(s.documenttype)}, ${lit(s.naam)}, ${lit(s.omschrijving)}, ${lit(s.papierformaat)}, ${s.breedte_mm}, ${s.hoogte_mm}, ${lit(JSON.stringify(s.config))}::jsonb)`).join(",\n");
|
|
245
|
+
return [
|
|
246
|
+
"INSERT INTO public.layout_standaarden AS s (sleutel, versie, documenttype, naam, omschrijving, papierformaat, breedte_mm, hoogte_mm, config)",
|
|
247
|
+
"VALUES",
|
|
248
|
+
rijen,
|
|
249
|
+
"ON CONFLICT (sleutel) DO UPDATE SET",
|
|
250
|
+
" versie = EXCLUDED.versie, documenttype = EXCLUDED.documenttype, naam = EXCLUDED.naam,",
|
|
251
|
+
" omschrijving = EXCLUDED.omschrijving, papierformaat = EXCLUDED.papierformaat,",
|
|
252
|
+
" breedte_mm = EXCLUDED.breedte_mm, hoogte_mm = EXCLUDED.hoogte_mm,",
|
|
253
|
+
" config = EXCLUDED.config, page_settings = EXCLUDED.page_settings, updated_at = now()",
|
|
254
|
+
"WHERE EXCLUDED.versie > s.versie;",
|
|
255
|
+
].join("\n");
|
|
256
|
+
}
|
|
@@ -48,6 +48,8 @@ export interface PrintJobModel {
|
|
|
48
48
|
printnode_bericht?: string | null;
|
|
49
49
|
printnode_status_op?: string | null;
|
|
50
50
|
}
|
|
51
|
+
/** Melding voor "Details voor beheer" uit de laatste aanvulronde (bijv. schema ontbreekt). */
|
|
52
|
+
export declare function laatsteLayoutBeheerMelding(): string | null;
|
|
51
53
|
/**
|
|
52
54
|
* Vraagt de server (servicerol) om de standaardlayouts aan te maken als er nog
|
|
53
55
|
* geen enkele layout bestaat. Schrijft nooit met de gebruikerssessie.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentData.d.ts","sourceRoot":"","sources":["../../src/lib/useDocumentData.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,YAAY,EAAE,M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,EAAE,OAAO,CAAC,CAAC;CACnC,iBAkBA"}
|
|
@@ -11,6 +11,11 @@ const arr = (v) => (Array.isArray(v) ? v : []);
|
|
|
11
11
|
* waar de seed-SQL nog niet is gedraaid. Idempotent en stil bij fouten.
|
|
12
12
|
*/
|
|
13
13
|
let seedGevraagdOp = 0;
|
|
14
|
+
let beheerMelding = null;
|
|
15
|
+
/** Melding voor "Details voor beheer" uit de laatste aanvulronde (bijv. schema ontbreekt). */
|
|
16
|
+
export function laatsteLayoutBeheerMelding() {
|
|
17
|
+
return beheerMelding;
|
|
18
|
+
}
|
|
14
19
|
/**
|
|
15
20
|
* Vraagt de server (servicerol) om de standaardlayouts aan te maken als er nog
|
|
16
21
|
* geen enkele layout bestaat. Schrijft nooit met de gebruikerssessie.
|
|
@@ -25,6 +30,7 @@ export async function zorgVoorFloridayLayouts() {
|
|
|
25
30
|
const r = await zorgVoorStandaardLayoutsFn();
|
|
26
31
|
if (!r?.ok)
|
|
27
32
|
seedGevraagdOp = 0;
|
|
33
|
+
beheerMelding = r?.ok ? (r.schemaMelding ?? null) : (r?.fout ?? null);
|
|
28
34
|
return Number(r?.aangemaakt ?? 0) > 0;
|
|
29
35
|
}
|
|
30
36
|
catch {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PAKKET_VERSIE = "1.
|
|
1
|
+
export declare const PAKKET_VERSIE = "1.68.1";
|
|
2
2
|
//# sourceMappingURL=versie.generated.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Gegenereerd door scripts/schrijf-versie.cjs uit package.json. Niet met de hand wijzigen.
|
|
2
|
-
export const PAKKET_VERSIE = "1.
|
|
2
|
+
export const PAKKET_VERSIE = "1.68.1";
|
package/package.json
CHANGED
package/sql/print-schema.sql
CHANGED
|
@@ -3006,7 +3006,7 @@ CREATE POLICY "Automatische acties lezen" ON public.layout_auto_acties FOR SELEC
|
|
|
3006
3006
|
-- Referentiedata: vaste Flow Selections-standaarden (klant-onafhankelijk). Alleen een hogere versie vervangt.
|
|
3007
3007
|
INSERT INTO public.layout_standaarden AS s (sleutel, versie, documenttype, naam, omschrijving, papierformaat, breedte_mm, hoogte_mm, config)
|
|
3008
3008
|
VALUES
|
|
3009
|
-
('fs.pakbon', 2, 'pakbon', 'Pakbon', 'Standaarddocument voor eigen orders, met kolom Sticker. Volledig aanpasbaar — aanpassen kan per klant.', 'A4', 210, 297, '{"pakbon":
|
|
3009
|
+
('fs.pakbon', 2, 'pakbon', 'Pakbon', 'Standaarddocument voor eigen orders, met kolom Sticker. Volledig aanpasbaar — aanpassen kan per klant.', 'A4', 210, 297, '{"pakbon":{"secties":[{"id":"logo-std","type":"logo","titel":"Logo","zichtbaar":true,"opties":{"uitlijning":"left","hoogte":18},"condities":[]},{"id":"bedrijfsgegevens-std","type":"bedrijfsgegevens","titel":"Bedrijfsgegevens","zichtbaar":true,"opties":{"toonNaam":true,"toonAdres":true,"toonContact":true,"toonKvk":false},"condities":[]},{"id":"klantgegevens-std","type":"klantgegevens","titel":"Klantgegevens","zichtbaar":true,"opties":{"toonKlantnummer":true,"toonContact":true,"toonReferentie":true},"condities":[]},{"id":"afleveradres-std","type":"afleveradres","titel":"Afleveradres","zichtbaar":true,"opties":{"toonLand":true},"condities":[]},{"id":"orderinformatie-std","type":"orderinformatie","titel":"Orderinformatie","zichtbaar":true,"opties":{"toonOrdernummer":true,"toonDatum":true,"toonLeverdatum":true,"toonReferentie":true},"condities":[]},{"id":"pickmethode-std","type":"pickmethode","titel":"Pickmethode","zichtbaar":true,"opties":{"methode":"kar","kop":"Te verzamelen fusten — karindeling zelf bepalen","velden":["artikelnummer","artikelnaam","potmaat","kleur","locatie","fustsoort","planten_per_fust","fust_aantal","aantal"],"toonFusthoogte":true,"toonTotaal":true,"toonBarcode":true,"barcodeHoogte":15},"condities":[]},{"id":"karren-std","type":"karren","titel":"Karren","zichtbaar":true,"opties":{"modus":"pagina","bundel_identiek":true,"velden":["karnummer","lagen","producten"],"scheiding":"kop","koptekst":"KAR {kar}","kleur":"#e8eef7"},"condities":[]},{"id":"lagen-std","type":"lagen","titel":"Lagen","zichtbaar":true,"opties":{"modus":"apart","velden":["laagnummer","belading","producten"],"koptekst":"Laag {laag}"},"condities":[]},{"id":"producten-std","type":"producten","titel":"Producten op een laag","zichtbaar":true,"opties":{"weergave":"tabel","velden":["artikelnummer","artikelnaam","potmaat","aantal","sticker"],"toonSamenstelling":true,"onderdeelVelden":["artikelnaam","kleur","potmaat","aantal"],"groeperen":false,"kop_eenmalig":true,"sortering":"eigen"},"condities":[]},{"id":"fusten-std","type":"fusten","titel":"Fusten","zichtbaar":true,"opties":{"modus":"totaal","velden":["fusttype","aantal"]},"condities":[]},{"id":"totalen-std","type":"totalen","titel":"Totalen","zichtbaar":true,"opties":{"velden":["producten","karren","lagen"],"uitlijning":"right","elke_pagina":false,"toon_paginanummer":false},"condities":[]},{"id":"handtekening-std","type":"handtekening","titel":"Handtekening","zichtbaar":true,"opties":{"label":"Voor ontvangst getekend","toonNaam":true,"toonDatum":true,"toonBarcode":true},"condities":[]}]}}'::jsonb),
|
|
3010
3010
|
('fs.afleverbrief_bvo', 1, 'afleverbrief', 'Afleverbrief (BVO)', 'Verzendbrief voor eigen (niet-Floriday) orders. Volledig aanpasbaar.', 'A4', 210, 297, '{}'::jsonb),
|
|
3011
3011
|
('fs.productiebon', 1, 'productiebon', 'Productiebon', 'Standaard productiebon met de vaste blokindeling. Volledig aanpasbaar.', 'A4', 210, 297, '{}'::jsonb)
|
|
3012
3012
|
ON CONFLICT (sleutel) DO UPDATE SET
|