@flowselections/floriday-verkoop-module 1.0.68 → 1.0.69

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.
@@ -336,11 +336,11 @@ export const getSalesOrderDetail = createServerFn({ method: "POST" })
336
336
  // Echt aantal ladingdragers uit de indeling (zelfde bron als de
337
337
  // Karindeling-kaart). Zonder indeling: geen aantal en geen type.
338
338
  if (ownRow?.id) {
339
- const cartRes = await supabase
340
- .from("order_carts")
341
- .select("carrier_type")
342
- .eq("order_id", ownRow.id);
343
- const carts = (cartRes.data ?? []).map((c) => c.carrier_type == null ? "" : String(c.carrier_type));
339
+ // Via de karregels: gedeelde bufferkarren hebben order_id = NULL.
340
+ const { loadCartsByOrder } = await import("./order-cart-count.server");
341
+ const ci = (await loadCartsByOrder(supabase, [String(ownRow.id)])).get(String(ownRow.id));
342
+ const carts = ci?.carrierTypes ?? [];
343
+ dto.karShared = (ci?.sharedCount ?? 0) > 0;
344
344
  if (carts.length > 0) {
345
345
  dto.karCount = carts.length;
346
346
  const labels = Array.from(new Set(carts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowselections/floriday-verkoop-module",
3
- "version": "1.0.68",
3
+ "version": "1.0.69",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",