@flowselections/layout-maker 1.65.2 → 1.67.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/PakbonPreview.d.ts.map +1 -1
- package/dist-lib/components/PakbonPreview.js +10 -7
- package/dist-lib/index.d.ts +2 -2
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/index.js +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +87 -15
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/orderData.server.d.ts +2 -0
- package/dist-lib/lib/orderData.server.d.ts.map +1 -1
- package/dist-lib/lib/orderData.server.js +188 -0
- package/dist-lib/lib/pakbonBuilder.d.ts +30 -0
- package/dist-lib/lib/pakbonBuilder.d.ts.map +1 -1
- package/dist-lib/lib/pakbonBuilder.js +90 -2
- package/dist-lib/lib/pakbonContent.d.ts.map +1 -1
- package/dist-lib/lib/pakbonContent.js +15 -8
- package/dist-lib/lib/pakbonHtml.d.ts.map +1 -1
- package/dist-lib/lib/pakbonHtml.js +24 -7
- 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 +2 -2
|
@@ -34,5 +34,7 @@ export declare function laadPakbonData(db: PrintDb, opties: {
|
|
|
34
34
|
* laadt de gegevens. Blijft bestaan zodat aanroepers niets hoeven te weten.
|
|
35
35
|
*/
|
|
36
36
|
export declare function laadOrderVanuitDatabase(db: PrintDb, payload: unknown): Promise<Rij | null>;
|
|
37
|
+
/** order_items.needs_sticker → "Ja" / "Nee"; onbekend → leeg. */
|
|
38
|
+
export declare function needsStickerTekst(waarde: unknown): string;
|
|
37
39
|
export {};
|
|
38
40
|
//# sourceMappingURL=orderData.server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orderData.server.d.ts","sourceRoot":"","sources":["../../src/lib/orderData.server.ts"],"names":[],"mapp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G,MAAM,CAAC;AAwBtD,mEAAmE;AACnE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAKvD;AAED,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG;IACrD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAgCA;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG;IAC7C,KAAK,EAAE,WAAW,CAAC;IACnB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAMA;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,EAAE,EAAE,OAAO,EACX,MAAM,EAAE;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAC7E,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAgoBrB;AAkHD;;;GAGG;AACH,wBAAsB,uBAAuB,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAGhG;AAcD,iEAAiE;AACjE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAIzD"}
|
|
@@ -167,6 +167,9 @@ export async function laadPakbonData(db, opties) {
|
|
|
167
167
|
orders = arr(await veilig(() => db.from("orders").select("*").in("id", orderIds)));
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
+
// Quarantaineregels (quarantined_at gevuld) horen niet op de pakbon.
|
|
171
|
+
const quarantaineIds = new Set(regels.filter((r) => r["quarantined_at"] != null).map((r) => String(r["id"])));
|
|
172
|
+
regels = regels.filter((r) => r["quarantined_at"] == null);
|
|
170
173
|
karrenRijen.sort((a, b) => num(a["cart_number"]) - num(b["cart_number"]));
|
|
171
174
|
const eigenRegelIds = new Set(regels.map((r) => String(r["id"])));
|
|
172
175
|
const eigenOrderIds = new Set(orders.map((o) => String(o["id"])));
|
|
@@ -181,6 +184,8 @@ export async function laadPakbonData(db, opties) {
|
|
|
181
184
|
const karVanId = new Map(karrenRijen.map((k) => [String(k["id"]), k]));
|
|
182
185
|
karItems = alleItems.filter((i) => {
|
|
183
186
|
const regelId = i["order_item_id"] ? String(i["order_item_id"]) : "";
|
|
187
|
+
if (regelId && quarantaineIds.has(regelId))
|
|
188
|
+
return false;
|
|
184
189
|
if (!beperkTotEigenRegels)
|
|
185
190
|
return true;
|
|
186
191
|
if (regelId)
|
|
@@ -222,6 +227,140 @@ export async function laadPakbonData(db, opties) {
|
|
|
222
227
|
stickerUrls.set(String(s["product_id"]), url);
|
|
223
228
|
}
|
|
224
229
|
}
|
|
230
|
+
// --- samenstelling (halffabricaten) ----------------------------------------
|
|
231
|
+
// Alleen lezen uit `product_bom_items`. Een ouder kan gekoppeld zijn op
|
|
232
|
+
// product-id of op Floriday-handelsartikel-id; beide vormen worden gelezen.
|
|
233
|
+
const floridayVan = (p) => {
|
|
234
|
+
if (!p)
|
|
235
|
+
return "";
|
|
236
|
+
const extra = (p["custom_fields"] ?? {});
|
|
237
|
+
return String(p["floriday_trade_item_id"] ?? p["trade_item_key"] ?? extra["floriday_id"] ?? "");
|
|
238
|
+
};
|
|
239
|
+
const ouderFloridayIds = uniek(Array.from(producten.values()).map((p) => floridayVan(p)));
|
|
240
|
+
const bomPerOuder = new Map(); // sleutel: "p:<id>" of "f:<floridayId>"
|
|
241
|
+
{
|
|
242
|
+
const rijen = [];
|
|
243
|
+
if (productIds.length)
|
|
244
|
+
rijen.push(...arr(await veilig(() => db.from("product_bom_items").select("*").in("parent_product_id", productIds))));
|
|
245
|
+
if (ouderFloridayIds.length)
|
|
246
|
+
rijen.push(...arr(await veilig(() => db
|
|
247
|
+
.from("product_bom_items")
|
|
248
|
+
.select("*")
|
|
249
|
+
.in("parent_trade_item_floriday_id", ouderFloridayIds))));
|
|
250
|
+
const gezien = new Set();
|
|
251
|
+
for (const r of rijen) {
|
|
252
|
+
const id = String(r["id"] ?? "");
|
|
253
|
+
if (gezien.has(id))
|
|
254
|
+
continue;
|
|
255
|
+
gezien.add(id);
|
|
256
|
+
const sleutel = r["parent_product_id"]
|
|
257
|
+
? `p:${r["parent_product_id"]}`
|
|
258
|
+
: `f:${r["parent_trade_item_floriday_id"] ?? ""}`;
|
|
259
|
+
bomPerOuder.set(sleutel, [...(bomPerOuder.get(sleutel) ?? []), r]);
|
|
260
|
+
}
|
|
261
|
+
for (const lijstje of bomPerOuder.values())
|
|
262
|
+
lijstje.sort((a, b) => num(a["sort_order"]) - num(b["sort_order"]));
|
|
263
|
+
}
|
|
264
|
+
const alleBom = Array.from(bomPerOuder.values()).flat();
|
|
265
|
+
// Onderdelen ophalen als product, zodat kleur/potmaat dezelfde verrijking krijgen.
|
|
266
|
+
const onderdeelProductIds = uniek(alleBom.map((r) => r["component_product_id"])).filter((id) => !producten.has(id));
|
|
267
|
+
if (onderdeelProductIds.length) {
|
|
268
|
+
const data = await veilig(() => db
|
|
269
|
+
.from("products")
|
|
270
|
+
.select("id, product, article_number, custom_fields, floriday_trade_item_id, trade_item_key")
|
|
271
|
+
.in("id", onderdeelProductIds));
|
|
272
|
+
for (const p of arr(data))
|
|
273
|
+
producten.set(String(p["id"]), p);
|
|
274
|
+
}
|
|
275
|
+
const onderdeelFloridayIds = uniek(alleBom.filter((r) => !r["component_product_id"]).map((r) => r["component_trade_item_floriday_id"]));
|
|
276
|
+
const productOpFloriday = new Map();
|
|
277
|
+
if (onderdeelFloridayIds.length) {
|
|
278
|
+
const data = await veilig(() => db
|
|
279
|
+
.from("products")
|
|
280
|
+
.select("id, product, article_number, custom_fields, floriday_trade_item_id, trade_item_key")
|
|
281
|
+
.in("floriday_trade_item_id", onderdeelFloridayIds));
|
|
282
|
+
for (const p of arr(data)) {
|
|
283
|
+
producten.set(String(p["id"]), p);
|
|
284
|
+
productOpFloriday.set(String(p["floriday_trade_item_id"]), String(p["id"]));
|
|
285
|
+
}
|
|
286
|
+
// Onderdelen zonder eigen product: naam uit de Floriday-artikelcache.
|
|
287
|
+
const zonder = onderdeelFloridayIds.filter((fid) => !productOpFloriday.has(fid));
|
|
288
|
+
if (zonder.length) {
|
|
289
|
+
const items = arr(await veilig(() => db.from("floriday_trade_items_cache").select("floriday_id, data").in("floriday_id", zonder)));
|
|
290
|
+
for (const it of items) {
|
|
291
|
+
const d = (it["data"] ?? {});
|
|
292
|
+
const fid = String(it["floriday_id"]);
|
|
293
|
+
producten.set(`fl:${fid}`, {
|
|
294
|
+
id: `fl:${fid}`,
|
|
295
|
+
product: taalTekst(d["tradeItemName"]) || taalTekst(d["name"]) || "",
|
|
296
|
+
floriday_trade_item_id: fid,
|
|
297
|
+
custom_fields: {},
|
|
298
|
+
});
|
|
299
|
+
productOpFloriday.set(fid, `fl:${fid}`);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
// --- stickerinformatie ----------------------------------------------------
|
|
304
|
+
// 1. Floriday-klantstickers van de order van de regel (match op
|
|
305
|
+
// verkooporder-id + handelsartikel-id; should_be_printed bepaalt Ja/Nee).
|
|
306
|
+
// 2. Anders `customer_product_stickers` (klant + handelsartikel) → Ja.
|
|
307
|
+
// 3. Anders onbekend ("–"). Nooit op naam matchen.
|
|
308
|
+
const orderPerId = new Map(orders.map((o) => [String(o["id"]), o]));
|
|
309
|
+
const floridayOrderIds = uniek(orders.map((o) => o["floriday_sales_order_id"]));
|
|
310
|
+
const floridayStickers = new Map(); // salesOrder → tradeItem → print
|
|
311
|
+
if (floridayOrderIds.length) {
|
|
312
|
+
const rijen = arr(await veilig(() => db
|
|
313
|
+
.from("floriday_customer_stickers_cache")
|
|
314
|
+
.select("sales_order_id, trade_item_id, should_be_printed, is_deleted")
|
|
315
|
+
.in("sales_order_id", floridayOrderIds)));
|
|
316
|
+
for (const r of rijen) {
|
|
317
|
+
if (r["is_deleted"] === true)
|
|
318
|
+
continue;
|
|
319
|
+
const so = String(r["sales_order_id"] ?? "");
|
|
320
|
+
const m = floridayStickers.get(so) ?? new Map();
|
|
321
|
+
const ti = String(r["trade_item_id"] ?? "");
|
|
322
|
+
m.set(ti, (m.get(ti) ?? false) || r["should_be_printed"] !== false);
|
|
323
|
+
floridayStickers.set(so, m);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
const klantSleutels = uniek(orders.map((o) => o["customer_id"]));
|
|
327
|
+
const klantStickers = new Set(); // "<klant>|<artikel>"
|
|
328
|
+
if (klantSleutels.length) {
|
|
329
|
+
const rijen = arr(await veilig(() => db
|
|
330
|
+
.from("customer_product_stickers")
|
|
331
|
+
.select("customer_key, trade_item_key")
|
|
332
|
+
.in("customer_key", klantSleutels)));
|
|
333
|
+
for (const r of rijen)
|
|
334
|
+
klantStickers.add(`${r["customer_key"]}|${r["trade_item_key"]}`);
|
|
335
|
+
}
|
|
336
|
+
// Bron van waarheid: order_items.needs_sticker (eigenaar Verkoop), per
|
|
337
|
+
// regel op id. Alleen als die kolom in deze database ontbreekt, geldt de
|
|
338
|
+
// oude afleiding hieronder (oudere Shells verliezen dan niets).
|
|
339
|
+
const heeftNeedsSticker = regels.some((r) => Object.prototype.hasOwnProperty.call(r, "needs_sticker"));
|
|
340
|
+
const regelVan = (bron) => regelPerId.get(String(bron["order_item_id"] ?? "")) ??
|
|
341
|
+
(Object.prototype.hasOwnProperty.call(bron, "needs_sticker") ? bron : undefined);
|
|
342
|
+
const stickerWaarde = (regel, terugval) => {
|
|
343
|
+
if (!heeftNeedsSticker)
|
|
344
|
+
return terugval();
|
|
345
|
+
return needsStickerTekst(regel?.["needs_sticker"]);
|
|
346
|
+
};
|
|
347
|
+
const stickerVoor = (orderId, p) => {
|
|
348
|
+
if (!p)
|
|
349
|
+
return "–";
|
|
350
|
+
const order = orderPerId.get(orderId);
|
|
351
|
+
const fid = floridayVan(p);
|
|
352
|
+
const so = String(order?.["floriday_sales_order_id"] ?? "");
|
|
353
|
+
const opOrder = so ? floridayStickers.get(so) : undefined;
|
|
354
|
+
if (opOrder && fid)
|
|
355
|
+
return opOrder.get(fid) === true ? "Ja" : "Nee";
|
|
356
|
+
const klant = String(order?.["customer_id"] ?? "");
|
|
357
|
+
if (klant) {
|
|
358
|
+
const sleutels = [fid, String(p["trade_item_key"] ?? ""), String(p["id"] ?? "")].filter(Boolean);
|
|
359
|
+
if (sleutels.some((k) => klantStickers.has(`${klant}|${k}`)))
|
|
360
|
+
return "Ja";
|
|
361
|
+
}
|
|
362
|
+
return "–";
|
|
363
|
+
};
|
|
225
364
|
// --- verrijking vanuit Floriday-artikelcache ------------------------------
|
|
226
365
|
// `products.unit` is vrijwel altijd "stuks" en zegt niets over het fust.
|
|
227
366
|
// De echte fustsoort, potmaat en kleur staan in de Floriday-cache:
|
|
@@ -303,6 +442,45 @@ export async function laadPakbonData(db, opties) {
|
|
|
303
442
|
p["custom_fields"] = extra;
|
|
304
443
|
}
|
|
305
444
|
}
|
|
445
|
+
const orderVan = (bron) => String(bron["order_id"] ??
|
|
446
|
+
regelPerId.get(String(bron["order_item_id"] ?? ""))?.["order_id"] ??
|
|
447
|
+
karrenRijen.find((k) => k["id"] === bron["cart_id"])?.["order_id"] ??
|
|
448
|
+
(orders.length === 1 ? orders[0]["id"] : ""));
|
|
449
|
+
const kenmerk = (extra, sleutels) => {
|
|
450
|
+
for (const k of sleutels) {
|
|
451
|
+
const w = extra[k];
|
|
452
|
+
if (w != null && String(w).trim())
|
|
453
|
+
return String(w);
|
|
454
|
+
}
|
|
455
|
+
return "";
|
|
456
|
+
};
|
|
457
|
+
const onderdelenVoor = (bron, p, aantal) => {
|
|
458
|
+
const id = String(bron["product_id"] ?? "");
|
|
459
|
+
const fid = floridayVan(p);
|
|
460
|
+
const rijen = bomPerOuder.get(`p:${id}`) ?? (fid ? bomPerOuder.get(`f:${fid}`) : undefined);
|
|
461
|
+
if (!rijen?.length)
|
|
462
|
+
return undefined;
|
|
463
|
+
const orderId = orderVan(bron);
|
|
464
|
+
return rijen.map((r) => {
|
|
465
|
+
const cid = r["component_product_id"]
|
|
466
|
+
? String(r["component_product_id"])
|
|
467
|
+
: productOpFloriday.get(String(r["component_trade_item_floriday_id"] ?? "")) ?? "";
|
|
468
|
+
const c = producten.get(cid);
|
|
469
|
+
const extra = (c?.["custom_fields"] ?? {});
|
|
470
|
+
const perStuk = num(r["quantity"]);
|
|
471
|
+
return {
|
|
472
|
+
artikelnaam: taalTekst(c?.["product"]) || "",
|
|
473
|
+
kleur: kenmerk(extra, ["kleur", "Kleur", "colour", "color", "__kleur"]),
|
|
474
|
+
potmaat: kenmerk(extra, ["potmaat", "Potmaat", "pot_size", "potSize", "potmaat_cm", "maat", "__potmaat"]),
|
|
475
|
+
per_stuk: perStuk,
|
|
476
|
+
aantal: perStuk * (aantal || 0),
|
|
477
|
+
// Onderdeel erft de waarde van de orderregel waaruit het is uitgesplitst.
|
|
478
|
+
sticker: stickerWaarde(regelVan(bron), () => stickerVoor(orderId, c ?? (r["component_trade_item_floriday_id"]
|
|
479
|
+
? { floriday_trade_item_id: r["component_trade_item_floriday_id"] }
|
|
480
|
+
: undefined))),
|
|
481
|
+
};
|
|
482
|
+
});
|
|
483
|
+
};
|
|
306
484
|
const maakProduct = (bron, aantalPlanten, fusten, perFust) => {
|
|
307
485
|
const p = producten.get(String(bron["product_id"] ?? "")) ?? {};
|
|
308
486
|
const extra = (p["custom_fields"] ?? {});
|
|
@@ -340,6 +518,8 @@ export async function laadPakbonData(db, opties) {
|
|
|
340
518
|
extra["__fustsoort"] ??
|
|
341
519
|
(unit && unit.toLowerCase() !== "stuks" ? unit : "Niet ingesteld")),
|
|
342
520
|
planten_per_fust: perFust,
|
|
521
|
+
sticker: stickerWaarde(regelVan(bron), () => stickerVoor(orderVan(bron), p)),
|
|
522
|
+
onderdelen: onderdelenVoor(bron, p, aantalPlanten),
|
|
343
523
|
};
|
|
344
524
|
};
|
|
345
525
|
// --- karren met lagen -----------------------------------------------------
|
|
@@ -556,3 +736,11 @@ function vatFustenSamen(producten) {
|
|
|
556
736
|
.filter(([, aantal]) => aantal > 0)
|
|
557
737
|
.map(([fusttype, aantal]) => ({ fusttype, aantal }));
|
|
558
738
|
}
|
|
739
|
+
/** order_items.needs_sticker → "Ja" / "Nee"; onbekend → leeg. */
|
|
740
|
+
export function needsStickerTekst(waarde) {
|
|
741
|
+
if (waarde === true)
|
|
742
|
+
return "Ja";
|
|
743
|
+
if (waarde === false)
|
|
744
|
+
return "Nee";
|
|
745
|
+
return "";
|
|
746
|
+
}
|
|
@@ -42,6 +42,11 @@ export declare const BESCHIKBARE_KOLOMMEN: {
|
|
|
42
42
|
key: string;
|
|
43
43
|
label: string;
|
|
44
44
|
}[];
|
|
45
|
+
export declare const ONDERDEEL_VELD_OPTIES: {
|
|
46
|
+
value: string;
|
|
47
|
+
label: string;
|
|
48
|
+
}[];
|
|
49
|
+
export declare const ONDERDEEL_VELDEN_STANDAARD: string[];
|
|
45
50
|
export declare function kolomLabel(key: string): string;
|
|
46
51
|
export declare function nieuweKolom(key: string): PakbonKolom;
|
|
47
52
|
/**
|
|
@@ -147,7 +152,32 @@ export interface DemoProduct {
|
|
|
147
152
|
fust_aantal: number;
|
|
148
153
|
fustsoort: string;
|
|
149
154
|
planten_per_fust: number;
|
|
155
|
+
/** "Ja", "Nee" of "–" (onbekend). */
|
|
156
|
+
sticker?: string;
|
|
157
|
+
/** Onderdelen (halffabricaten) van een samengesteld product. */
|
|
158
|
+
onderdelen?: DemoProductOnderdeel[];
|
|
159
|
+
}
|
|
160
|
+
export interface DemoProductOnderdeel {
|
|
161
|
+
artikelnaam: string;
|
|
162
|
+
kleur: string;
|
|
163
|
+
potmaat: string;
|
|
164
|
+
/** aantal per stuk van het samengestelde product */
|
|
165
|
+
per_stuk: number;
|
|
166
|
+
/** totaal voor deze regel (per_stuk × aantal hoofdproduct) */
|
|
167
|
+
aantal: number;
|
|
168
|
+
sticker: string;
|
|
150
169
|
}
|
|
170
|
+
/** Staat de samenstelling aan voor deze productsectie? (standaard aan) */
|
|
171
|
+
export declare function samenstellingTonen(opties: Record<string, unknown> | undefined): boolean;
|
|
172
|
+
export declare function onderdeelVelden(opties: Record<string, unknown> | undefined): string[];
|
|
173
|
+
/**
|
|
174
|
+
* Cellen voor één onderdeelregel, uitgelijnd op de kolommen van de hoofdregel.
|
|
175
|
+
* Gekozen onderdeelgegevens zonder eigen kolom in de hoofdtabel worden achter
|
|
176
|
+
* de naam gezet, zodat niets wegvalt. Lege waarden blijven leeg.
|
|
177
|
+
*/
|
|
178
|
+
export declare function onderdeelCellen(o: DemoProductOnderdeel, velden: string[], gekozen: string[]): string[];
|
|
179
|
+
/** Telt een product op bij een gelijk product (groeperen), incl. onderdelen. */
|
|
180
|
+
export declare function voegProductSamen(doel: DemoProduct, p: DemoProduct): void;
|
|
151
181
|
export interface DemoLaag {
|
|
152
182
|
laagnummer: number;
|
|
153
183
|
belading: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pakbonBuilder.d.ts","sourceRoot":"","sources":["../../src/lib/pakbonBuilder.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,kBAAkB,GAClB,eAAe,GACf,cAAc,GACd,cAAc,GACd,iBAAiB,GACjB,qBAAqB,GACrB,aAAa,GACb,aAAa,GACb,YAAY,GACZ,aAAa,GACb,QAAQ,GACR,OAAO,GACP,WAAW,GACX,QAAQ,GACR,SAAS,GACT,cAAc,GACd,WAAW,GACX,QAAQ,GACR,SAAS,GACT,YAAY,CAAC;AAEjB,MAAM,WAAW,W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CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,mBAAmB,EAAE,CAAC;CAClC;AAQD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB,EAAE,CAoFtE;AAMD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,GAAE,SAAsB,GAAG,SAAS,CAe9E;AAID,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAKvE;AAKD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAgE/C"}
|
|
@@ -21,7 +21,16 @@ export const BESCHIKBARE_KOLOMMEN = [
|
|
|
21
21
|
{ key: "fust_aantal", label: "Aantal fusten" },
|
|
22
22
|
{ key: "fustsoort", label: "Fustsoort" },
|
|
23
23
|
{ key: "planten_per_fust", label: "Planten per fust" },
|
|
24
|
+
{ key: "sticker", label: "Sticker" },
|
|
24
25
|
];
|
|
26
|
+
export const ONDERDEEL_VELD_OPTIES = [
|
|
27
|
+
{ value: "artikelnaam", label: "Productnaam" },
|
|
28
|
+
{ value: "kleur", label: "Kleur" },
|
|
29
|
+
{ value: "potmaat", label: "Potmaat" },
|
|
30
|
+
{ value: "aantal", label: "Aantal" },
|
|
31
|
+
{ value: "sticker", label: "Sticker" },
|
|
32
|
+
];
|
|
33
|
+
export const ONDERDEEL_VELDEN_STANDAARD = ["artikelnaam", "kleur", "potmaat", "aantal"];
|
|
25
34
|
export function kolomLabel(key) {
|
|
26
35
|
return BESCHIKBARE_KOLOMMEN.find((k) => k.key === key)?.label ?? key;
|
|
27
36
|
}
|
|
@@ -58,6 +67,7 @@ export function productVeldBreedtes(velden) {
|
|
|
58
67
|
fust_aantal: 10,
|
|
59
68
|
fustsoort: 12,
|
|
60
69
|
planten_per_fust: 11,
|
|
70
|
+
sticker: 8,
|
|
61
71
|
foto: 9,
|
|
62
72
|
qrcode: 9,
|
|
63
73
|
};
|
|
@@ -547,6 +557,20 @@ export const SECTIE_REGISTER = [
|
|
|
547
557
|
{ value: "qrcode", label: "QR-code" },
|
|
548
558
|
]),
|
|
549
559
|
},
|
|
560
|
+
{
|
|
561
|
+
key: "toonSamenstelling",
|
|
562
|
+
label: "Samenstelling tonen",
|
|
563
|
+
type: "schakelaar",
|
|
564
|
+
standaard: true,
|
|
565
|
+
hint: "Toont onder een samengesteld product uit welke onderdelen het bestaat.",
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
key: "onderdeelVelden",
|
|
569
|
+
label: "Gegevens per onderdeel (halffabricaat)",
|
|
570
|
+
type: "meerkeuze",
|
|
571
|
+
standaard: ONDERDEEL_VELDEN_STANDAARD,
|
|
572
|
+
opties: ONDERDEEL_VELD_OPTIES,
|
|
573
|
+
},
|
|
550
574
|
{ key: "groeperen", label: "Gelijke producten groeperen", type: "schakelaar", standaard: false },
|
|
551
575
|
{
|
|
552
576
|
key: "kop_eenmalig",
|
|
@@ -864,6 +888,59 @@ export function sectieOnderdruktVoorVariant(type, methode, variant) {
|
|
|
864
888
|
return type === "pickmethode";
|
|
865
889
|
return type === "pickmethode" ? false : [...KAR_SECTIES, "orderregels"].includes(type);
|
|
866
890
|
}
|
|
891
|
+
/** Staat de samenstelling aan voor deze productsectie? (standaard aan) */
|
|
892
|
+
export function samenstellingTonen(opties) {
|
|
893
|
+
return opties?.["toonSamenstelling"] !== false;
|
|
894
|
+
}
|
|
895
|
+
export function onderdeelVelden(opties) {
|
|
896
|
+
const v = opties?.["onderdeelVelden"];
|
|
897
|
+
return Array.isArray(v) ? v.map(String) : ONDERDEEL_VELDEN_STANDAARD;
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* Cellen voor één onderdeelregel, uitgelijnd op de kolommen van de hoofdregel.
|
|
901
|
+
* Gekozen onderdeelgegevens zonder eigen kolom in de hoofdtabel worden achter
|
|
902
|
+
* de naam gezet, zodat niets wegvalt. Lege waarden blijven leeg.
|
|
903
|
+
*/
|
|
904
|
+
export function onderdeelCellen(o, velden, gekozen) {
|
|
905
|
+
const waarde = (v) => {
|
|
906
|
+
if (!gekozen.includes(v))
|
|
907
|
+
return "";
|
|
908
|
+
if (v === "aantal")
|
|
909
|
+
return o.aantal ? String(o.aantal) : "";
|
|
910
|
+
return String(o[v] ?? "");
|
|
911
|
+
};
|
|
912
|
+
const naamKolom = velden.includes("artikelnaam")
|
|
913
|
+
? "artikelnaam"
|
|
914
|
+
: velden.find((v) => v !== "foto" && v !== "qrcode") ?? velden[0];
|
|
915
|
+
const zonderKolom = gekozen.filter((v) => !velden.includes(v) && v !== "artikelnaam");
|
|
916
|
+
return velden.map((v) => {
|
|
917
|
+
if (v === naamKolom) {
|
|
918
|
+
const delen = [];
|
|
919
|
+
const naam = gekozen.includes("artikelnaam") ? o.artikelnaam : "";
|
|
920
|
+
const kop = `↳ ${o.per_stuk ? `${o.per_stuk}× ` : ""}${naam}`.trimEnd();
|
|
921
|
+
delen.push(kop);
|
|
922
|
+
for (const extra of zonderKolom) {
|
|
923
|
+
const w = waarde(extra);
|
|
924
|
+
if (!w)
|
|
925
|
+
continue;
|
|
926
|
+
delen.push(extra === "sticker" ? `Sticker: ${w}` : extra === "aantal" ? `${w} st` : w);
|
|
927
|
+
}
|
|
928
|
+
return delen.join(" · ");
|
|
929
|
+
}
|
|
930
|
+
return waarde(v);
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
/** Telt een product op bij een gelijk product (groeperen), incl. onderdelen. */
|
|
934
|
+
export function voegProductSamen(doel, p) {
|
|
935
|
+
doel.aantal += p.aantal;
|
|
936
|
+
doel.fust_aantal += p.fust_aantal;
|
|
937
|
+
if (doel.onderdelen && p.onderdelen) {
|
|
938
|
+
doel.onderdelen = doel.onderdelen.map((o, i) => {
|
|
939
|
+
const ander = p.onderdelen[i]?.artikelnaam === o.artikelnaam ? p.onderdelen[i] : undefined;
|
|
940
|
+
return ander ? { ...o, aantal: o.aantal + ander.aantal } : o;
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
}
|
|
867
944
|
/**
|
|
868
945
|
* Bepaalt de canonieke positie binnen de reeks volle karren. De Engine kan in
|
|
869
946
|
* cartTotal ook een afsluitende deelkar meetellen en stuurde bij oudere K2-jobs
|
|
@@ -973,7 +1050,10 @@ export const DEMO_ORDER = {
|
|
|
973
1050
|
gewicht: "48 kg",
|
|
974
1051
|
opmerking: "Onderin plaatsen",
|
|
975
1052
|
producten: [
|
|
976
|
-
|
|
1053
|
+
{
|
|
1054
|
+
...p("A1001", "Phalaenopsis wit 2-tak", "12 cm", 96, "A-03", "Orchidee", "Wit"),
|
|
1055
|
+
sticker: "Ja",
|
|
1056
|
+
},
|
|
977
1057
|
p("A1042", "Phalaenopsis roze 2-tak", "12 cm", 48, "A-04", "Orchidee", "Roze"),
|
|
978
1058
|
],
|
|
979
1059
|
fusten: [
|
|
@@ -1009,7 +1089,15 @@ export const DEMO_ORDER = {
|
|
|
1009
1089
|
gewicht: "38 kg",
|
|
1010
1090
|
opmerking: "",
|
|
1011
1091
|
producten: [
|
|
1012
|
-
|
|
1092
|
+
{
|
|
1093
|
+
...p("C3300", "Pernettya mix 12", "12 cm", 10, "C-02", "Bloeiend", "Mix"),
|
|
1094
|
+
sticker: "Nee",
|
|
1095
|
+
onderdelen: [
|
|
1096
|
+
{ artikelnaam: "Pernettya wit", kleur: "Wit", potmaat: "9 cm", per_stuk: 2, aantal: 20, sticker: "Ja" },
|
|
1097
|
+
{ artikelnaam: "Pernettya rood", kleur: "Rood", potmaat: "9 cm", per_stuk: 5, aantal: 50, sticker: "Ja" },
|
|
1098
|
+
{ artikelnaam: "Pernettya roze", kleur: "Roze", potmaat: "9 cm", per_stuk: 5, aantal: 50, sticker: "Nee" },
|
|
1099
|
+
],
|
|
1100
|
+
},
|
|
1013
1101
|
p("C3311", "Succulenten mix", "9 cm", 80, "C-05", "Bloeiend", "Mix"),
|
|
1014
1102
|
],
|
|
1015
1103
|
fusten: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pakbonContent.d.ts","sourceRoot":"","sources":["../../src/lib/pakbonContent.ts"],"names":[],"mappings":"AASA,OAAO,
|
|
1
|
+
{"version":3,"file":"pakbonContent.d.ts","sourceRoot":"","sources":["../../src/lib/pakbonContent.ts"],"names":[],"mappings":"AASA,OAAO,EAyBL,KAAK,SAAS,EAEd,KAAK,YAAY,EAGlB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAe,KAAK,IAAI,EAAmC,MAAM,kBAAkB,CAAC;AAE3F,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,2EAA2E;AAC3E,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC;IAC/B,KAAK,EAAE,eAAe,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,6EAA6E;IAC7E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7B,CAAC;AAinBF,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,SAAS,EAAE,IAAI,EAAE,CAAC;IAClB,UAAU,EAAE,IAAI,EAAE,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,sDAAsD;AACtD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CA+EvE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAmB9E"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// layout-engine (pakbonDocument.ts) bepaalt WAAR het terechtkomt. Er is geen
|
|
7
7
|
// tweede plek meer waar pakboninhoud wordt samengesteld.
|
|
8
8
|
// ============================================================================
|
|
9
|
-
import { beperkTotDeelkar, conditieContext, deelkarVoorbeeldOrder, fustVerzamellijst, groepeerIdentiekeKarren, groepeerIdentiekeLagen, karKopNummer, karBundelTekst, laagBundelTekst, leesPakbonConfig, pakbonLayoutVariant, pickMethode, productVeldBreedtes, sectieOnderdruktVoorVariant, sectieZichtbaar, sorteerProducten, totalen, vulVeldcodes, } from "./pakbonBuilder.js";
|
|
9
|
+
import { beperkTotDeelkar, conditieContext, deelkarVoorbeeldOrder, fustVerzamellijst, groepeerIdentiekeKarren, groepeerIdentiekeLagen, karKopNummer, karBundelTekst, laagBundelTekst, leesPakbonConfig, pakbonLayoutVariant, pickMethode, productVeldBreedtes, sectieOnderdruktVoorVariant, sectieZichtbaar, sorteerProducten, onderdeelCellen, onderdeelVelden, samenstellingTonen, voegProductSamen, totalen, vulVeldcodes, } from "./pakbonBuilder.js";
|
|
10
10
|
import { karMetadata } from "./pakbonPresentation.js";
|
|
11
11
|
import { KLEUR_GRIJS } from "./pakbonDocument.js";
|
|
12
12
|
const arr = (v) => (Array.isArray(v) ? v : []);
|
|
@@ -33,6 +33,7 @@ const PRODUCT_LABELS = {
|
|
|
33
33
|
fust_aantal: "Aantal fusten",
|
|
34
34
|
fustsoort: "Fustsoort",
|
|
35
35
|
planten_per_fust: "Planten per fust",
|
|
36
|
+
sticker: "Sticker",
|
|
36
37
|
};
|
|
37
38
|
const FUST_KOLOM_LABELS = {
|
|
38
39
|
artikelnummer: "Artikel",
|
|
@@ -62,7 +63,7 @@ function sectitel(tekst, basis) {
|
|
|
62
63
|
},
|
|
63
64
|
];
|
|
64
65
|
}
|
|
65
|
-
function productTabel(velden, producten, toonKop, basis) {
|
|
66
|
+
function productTabel(velden, producten, toonKop, basis, onderdeelKolommen = null) {
|
|
66
67
|
if (!velden.length || !producten.length)
|
|
67
68
|
return null;
|
|
68
69
|
const breedtes = productVeldBreedtes(velden);
|
|
@@ -74,7 +75,12 @@ function productTabel(velden, producten, toonKop, basis) {
|
|
|
74
75
|
return {
|
|
75
76
|
kind: "tabel",
|
|
76
77
|
kolommen,
|
|
77
|
-
rijen: producten.
|
|
78
|
+
rijen: producten.flatMap((p) => [
|
|
79
|
+
velden.map((v) => cel(p, v)),
|
|
80
|
+
...(onderdeelKolommen && p.onderdelen?.length
|
|
81
|
+
? p.onderdelen.map((o) => onderdeelCellen(o, velden, onderdeelKolommen))
|
|
82
|
+
: []),
|
|
83
|
+
]),
|
|
78
84
|
toonKop,
|
|
79
85
|
groottePt: basis,
|
|
80
86
|
randen: "onder",
|
|
@@ -193,10 +199,8 @@ function karBlokFlow(s, kar, lagen, zoek, omkaderd, aantal, basis) {
|
|
|
193
199
|
const map = new Map();
|
|
194
200
|
for (const p of producten) {
|
|
195
201
|
const b = map.get(p.artikelnummer);
|
|
196
|
-
if (b)
|
|
197
|
-
b
|
|
198
|
-
b.fust_aantal += p.fust_aantal;
|
|
199
|
-
}
|
|
202
|
+
if (b)
|
|
203
|
+
voegProductSamen(b, p);
|
|
200
204
|
else
|
|
201
205
|
map.set(p.artikelnummer, { ...p });
|
|
202
206
|
}
|
|
@@ -204,7 +208,10 @@ function karBlokFlow(s, kar, lagen, zoek, omkaderd, aantal, basis) {
|
|
|
204
208
|
}
|
|
205
209
|
const toonKop = opt(productSectie, "toonKoppen", true) !== false &&
|
|
206
210
|
(index === 0 || opt(productSectie, "kop_eenmalig", true) === false);
|
|
207
|
-
const
|
|
211
|
+
const sub = samenstellingTonen(productSectie.opties)
|
|
212
|
+
? onderdeelVelden(productSectie.opties)
|
|
213
|
+
: null;
|
|
214
|
+
const tabel = productTabel(velden2, producten, toonKop, basis, sub);
|
|
208
215
|
if (tabel)
|
|
209
216
|
kinderen.push(tabel);
|
|
210
217
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pakbonHtml.d.ts","sourceRoot":"","sources":["../../src/lib/pakbonHtml.ts"],"names":[],"mappings":"AAUA,OAAO,
|
|
1
|
+
{"version":3,"file":"pakbonHtml.d.ts","sourceRoot":"","sources":["../../src/lib/pakbonHtml.ts"],"names":[],"mappings":"AAUA,OAAO,EA6BL,KAAK,SAAS,EAEd,KAAK,YAAY,EAGlB,MAAM,iBAAiB,CAAC;AAMzB,2FAA2F;AAC3F,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE;QACL,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC;QACvB,OAAO,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AAE,WAAW,EAClB,MAAM,GAAE,kBAAuB,GAC9B,MAAM,CAkFR;AAED,iEAAiE;AACjE,wBAAgB,oBAAoB,IAAI,WAAW,CAElD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,YAAY,GAAG,OAAO,EAC9B,KAAK,EAAE,WAAW,EAClB,MAAM,GAAE,kBAAuB,GAC9B,IAAI,CAsCN;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,YAAY,GAAG,OAAO,EAC9B,KAAK,EAAE,WAAW,EAClB,MAAM,GAAE,kBAAuB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAUf"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// layoutconfiguratie en de echte ordergegevens. Zo tonen het live voorbeeld en
|
|
8
8
|
// de afdruk altijd exact dezelfde secties — inclusief de orderregels.
|
|
9
9
|
// ============================================================================
|
|
10
|
-
import { DEMO_ORDER, deelkarVoorbeeldOrder, conditieContext, groepeerIdentiekeKarren, groepeerIdentiekeLagen, karBundelTekst, fustVerzamellijst, fustRegels, FUSTREGEL_LABELS, FUSTREGEL_RECHTS, pickMethode, pakbonLayoutVariant, productVeldBreedtes, sectieOnderdruktVoorVariant, karKopNummer, laagBundelTekst, leesPakbonConfig, sectieZichtbaar, sorteerProducten, totalen, vulVeldcodes, } from "./pakbonBuilder.js";
|
|
10
|
+
import { DEMO_ORDER, deelkarVoorbeeldOrder, conditieContext, groepeerIdentiekeKarren, groepeerIdentiekeLagen, karBundelTekst, fustVerzamellijst, fustRegels, FUSTREGEL_LABELS, FUSTREGEL_RECHTS, pickMethode, pakbonLayoutVariant, productVeldBreedtes, sectieOnderdruktVoorVariant, karKopNummer, laagBundelTekst, leesPakbonConfig, sectieZichtbaar, sorteerProducten, onderdeelCellen, onderdeelVelden, samenstellingTonen, voegProductSamen, totalen, vulVeldcodes, } from "./pakbonBuilder.js";
|
|
11
11
|
import { haalPrintLogos } from "./logoLibrary.js";
|
|
12
12
|
import { code128BarsHtml } from "./code128.js";
|
|
13
13
|
import { karMetadata } from "./pakbonPresentation.js";
|
|
@@ -150,6 +150,17 @@ function normProduct(p) {
|
|
|
150
150
|
fust_aantal: Number(p["fust_aantal"] ?? 0) || 0,
|
|
151
151
|
fustsoort: String(p["fustsoort"] ?? ""),
|
|
152
152
|
planten_per_fust: Number(p["planten_per_fust"] ?? 0) || 0,
|
|
153
|
+
sticker: p["sticker"] == null || p["sticker"] === "" ? "–" : String(p["sticker"]),
|
|
154
|
+
onderdelen: Array.isArray(p["onderdelen"])
|
|
155
|
+
? p["onderdelen"].map((o) => ({
|
|
156
|
+
artikelnaam: String(o["artikelnaam"] ?? ""),
|
|
157
|
+
kleur: String(o["kleur"] ?? ""),
|
|
158
|
+
potmaat: String(o["potmaat"] ?? ""),
|
|
159
|
+
per_stuk: Number(o["per_stuk"] ?? 0) || 0,
|
|
160
|
+
aantal: Number(o["aantal"] ?? 0) || 0,
|
|
161
|
+
sticker: o["sticker"] == null || o["sticker"] === "" ? "–" : String(o["sticker"]),
|
|
162
|
+
}))
|
|
163
|
+
: undefined,
|
|
153
164
|
};
|
|
154
165
|
}
|
|
155
166
|
// --- secties ----------------------------------------------------------------
|
|
@@ -304,10 +315,8 @@ function productenHtml(sectie, laag, toonKop = true) {
|
|
|
304
315
|
const map = new Map();
|
|
305
316
|
for (const p of producten) {
|
|
306
317
|
const b = map.get(p.artikelnummer);
|
|
307
|
-
if (b)
|
|
308
|
-
b
|
|
309
|
-
b.fust_aantal += p.fust_aantal;
|
|
310
|
-
}
|
|
318
|
+
if (b)
|
|
319
|
+
voegProductSamen(b, p);
|
|
311
320
|
else
|
|
312
321
|
map.set(p.artikelnummer, { ...p });
|
|
313
322
|
}
|
|
@@ -317,9 +326,13 @@ function productenHtml(sectie, laag, toonKop = true) {
|
|
|
317
326
|
return "";
|
|
318
327
|
const label = (v) => v === "foto" ? "Foto" : v === "qrcode" ? "QR-code" : PRODUCT_LABELS[v] ?? v;
|
|
319
328
|
const weergave = optS(sectie, "weergave", "tabel");
|
|
329
|
+
const sub = samenstellingTonen(sectie.opties) ? onderdeelVelden(sectie.opties) : null;
|
|
330
|
+
const subRijen = (p) => sub && p.onderdelen?.length ? p.onderdelen.map((o) => onderdeelCellen(o, velden, sub)) : [];
|
|
320
331
|
if (weergave === "lijst") {
|
|
321
332
|
return `<ul class="plijst">${producten
|
|
322
|
-
.map((p) => `<li>${velden.map((v) => esc(cel(p, v))).filter(Boolean).join(" · ")}
|
|
333
|
+
.map((p) => `<li>${velden.map((v) => esc(cel(p, v))).filter(Boolean).join(" · ")}${subRijen(p)
|
|
334
|
+
.map((r) => `<div class="onderdeel">${esc(r.filter(Boolean).join(" · "))}</div>`)
|
|
335
|
+
.join("")}</li>`)
|
|
323
336
|
.join("")}</ul>`;
|
|
324
337
|
}
|
|
325
338
|
const kop = toonKop && opt(sectie, "toonKoppen", true) !== false
|
|
@@ -330,7 +343,10 @@ function productenHtml(sectie, laag, toonKop = true) {
|
|
|
330
343
|
.map((_, index) => `<col style="width:${(breedtes[index] ?? 0).toFixed(4)}%">`)
|
|
331
344
|
.join("")}</colgroup>`;
|
|
332
345
|
const rijen = producten
|
|
333
|
-
.map((p) => `<tr>${velden.map((v) => `<td class="onder">${esc(cel(p, v))}</td>`).join("")}</tr>`
|
|
346
|
+
.map((p) => `<tr>${velden.map((v) => `<td class="onder">${esc(cel(p, v))}</td>`).join("")}</tr>` +
|
|
347
|
+
subRijen(p)
|
|
348
|
+
.map((r) => `<tr class="onderdeel">${r.map((w) => `<td class="onder" style="font-size:.88em;color:#555">${esc(w)}</td>`).join("")}</tr>`)
|
|
349
|
+
.join(""))
|
|
334
350
|
.join("");
|
|
335
351
|
return `<table class="regels vast">${colgroup}${kop}${rijen}</table>`;
|
|
336
352
|
}
|
|
@@ -349,6 +365,7 @@ const PRODUCT_LABELS = {
|
|
|
349
365
|
fust_aantal: "Aantal fusten",
|
|
350
366
|
fustsoort: "Fustsoort",
|
|
351
367
|
planten_per_fust: "Planten per fust",
|
|
368
|
+
sticker: "Sticker",
|
|
352
369
|
};
|
|
353
370
|
function karKop(s, kar, velden, bundelTekst = "") {
|
|
354
371
|
const scheiding = optS(s, "scheiding", "kop");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PAKKET_VERSIE = "1.
|
|
1
|
+
export declare const PAKKET_VERSIE = "1.67.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.67.1";
|