@flowselections/floriday-voorraad 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.
Files changed (64) hide show
  1. package/dist-lib/components/voorraad/AdditionalPackagingDialog.d.ts +9 -0
  2. package/dist-lib/components/voorraad/AdditionalPackagingDialog.d.ts.map +1 -0
  3. package/dist-lib/components/voorraad/AdditionalPackagingDialog.js +51 -0
  4. package/dist-lib/components/voorraad/ArtikelWizard.d.ts.map +1 -1
  5. package/dist-lib/components/voorraad/ArtikelWizard.js +372 -30
  6. package/dist-lib/components/voorraad/EditArtikelPage.d.ts.map +1 -1
  7. package/dist-lib/components/voorraad/EditArtikelPage.js +78 -4
  8. package/dist-lib/components/voorraad/OrderHistoryCard.d.ts +8 -0
  9. package/dist-lib/components/voorraad/OrderHistoryCard.d.ts.map +1 -0
  10. package/dist-lib/components/voorraad/OrderHistoryCard.js +133 -0
  11. package/dist-lib/components/voorraad/PriceStatusBadge.d.ts +7 -0
  12. package/dist-lib/components/voorraad/PriceStatusBadge.d.ts.map +1 -0
  13. package/dist-lib/components/voorraad/PriceStatusBadge.js +67 -0
  14. package/dist-lib/components/voorraad/VoorraadStockCard.d.ts +2 -1
  15. package/dist-lib/components/voorraad/VoorraadStockCard.d.ts.map +1 -1
  16. package/dist-lib/components/voorraad/VoorraadStockCard.js +5 -4
  17. package/dist-lib/components/voorraad/VoorraadTable.d.ts.map +1 -1
  18. package/dist-lib/components/voorraad/VoorraadTable.js +6 -1
  19. package/dist-lib/hooks/useLocalTradeItems.d.ts.map +1 -1
  20. package/dist-lib/hooks/useLocalTradeItems.js +4 -0
  21. package/dist-lib/hooks/useTradeItemStock.d.ts +14 -1
  22. package/dist-lib/hooks/useTradeItemStock.d.ts.map +1 -1
  23. package/dist-lib/hooks/useTradeItemStock.js +76 -17
  24. package/dist-lib/hooks/useTradeItemSupplyLine.d.ts +21 -0
  25. package/dist-lib/hooks/useTradeItemSupplyLine.d.ts.map +1 -0
  26. package/dist-lib/hooks/useTradeItemSupplyLine.js +49 -0
  27. package/dist-lib/hooks/useVoorraadData.d.ts.map +1 -1
  28. package/dist-lib/hooks/useVoorraadData.js +35 -3
  29. package/dist-lib/integrations/supabase/auth-middleware.d.ts +473 -3
  30. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  31. package/dist-lib/integrations/supabase/client.d.ts +473 -3
  32. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  33. package/dist-lib/integrations/supabase/client.server.d.ts +473 -3
  34. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  35. package/dist-lib/integrations/supabase/types.d.ts +481 -3
  36. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  37. package/dist-lib/lib/floricode-required-features.functions.d.ts +480 -4
  38. package/dist-lib/lib/floricode-required-features.functions.d.ts.map +1 -1
  39. package/dist-lib/lib/floricode-required-features.functions.js +20 -2
  40. package/dist-lib/lib/floriday-customer-offer.functions.d.ts +11264 -0
  41. package/dist-lib/lib/floriday-customer-offer.functions.d.ts.map +1 -0
  42. package/dist-lib/lib/floriday-customer-offer.functions.js +175 -0
  43. package/dist-lib/lib/floriday-gateway.functions.d.ts +13155 -15
  44. package/dist-lib/lib/floriday-gateway.functions.d.ts.map +1 -1
  45. package/dist-lib/lib/floriday-gateway.functions.js +150 -0
  46. package/dist-lib/lib/floriday-gateway.server.d.ts +22 -0
  47. package/dist-lib/lib/floriday-gateway.server.d.ts.map +1 -1
  48. package/dist-lib/lib/floriday-gateway.server.js +3 -0
  49. package/dist-lib/lib/floriday-payload.d.ts +60 -6
  50. package/dist-lib/lib/floriday-payload.d.ts.map +1 -1
  51. package/dist-lib/lib/floriday-payload.js +104 -7
  52. package/dist-lib/lib/floriday-supply-line.d.ts +53 -0
  53. package/dist-lib/lib/floriday-supply-line.d.ts.map +1 -0
  54. package/dist-lib/lib/floriday-supply-line.js +109 -0
  55. package/dist-lib/lib/floriday-warehouse.functions.d.ts +1420 -10
  56. package/dist-lib/lib/floriday-warehouse.functions.d.ts.map +1 -1
  57. package/dist-lib/lib/floriday-writes.functions.d.ts +947 -7
  58. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  59. package/dist-lib/lib/floriday-writes.functions.js +6 -1
  60. package/dist-lib/lib/vrs-catalog.d.ts +27 -0
  61. package/dist-lib/lib/vrs-catalog.d.ts.map +1 -0
  62. package/dist-lib/lib/vrs-catalog.js +98 -0
  63. package/package.json +3 -2
  64. package/public/flowselections-assets/Voorraad/floriday-logo.png +0 -0
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Curated fallback-catalogus met veelvoorkomende VRS (Verpakkings­leveranciers
3
+ * Registratie Systeem) materialen per leverancier. Wordt gebruikt door de
4
+ * "Aanvullende verpakkingsmaterialen"-stap zodat de wizard 1-op-1 werkt zoals
5
+ * Floriday (leverancier → type → materiaal), ook wanneer Floriday's live
6
+ * VRS-endpoint niet via de gateway beschikbaar is.
7
+ *
8
+ * Wanneer een material-id een echte Floriday-uuid is, wordt dit meegestuurd
9
+ * in `additionalPackagingMaterialIds` op de TradeItem-payload. IDs zoals
10
+ * `koen-pack:sleeve-50` blijven lokaal en worden niet naar Floriday gepusht.
11
+ */
12
+ /** Gestandaardiseerde materiaaltypes zoals Floriday ze categoriseert. */
13
+ export const VRS_MATERIAL_TYPES = [
14
+ { code: "SLEEVE", name: "Hoes" },
15
+ { code: "STICK", name: "Steker" },
16
+ { code: "LABEL", name: "Label" },
17
+ { code: "POT_COVER", name: "Potfolie" },
18
+ { code: "CARDBOARD", name: "Karton" },
19
+ { code: "PROTECTION", name: "Beschermmateriaal" },
20
+ { code: "OTHER", name: "Overig" },
21
+ ];
22
+ /** Curated lijst met materialen per leverancier. */
23
+ export const VRS_MATERIALS = {
24
+ anylabel: [
25
+ { id: "anylabel:label-hangtag", name: "Hangtag label 50x80", typeCode: "LABEL" },
26
+ { id: "anylabel:label-sticker", name: "Sticker label 40x40", typeCode: "LABEL" },
27
+ ],
28
+ chrysal: [
29
+ { id: "chrysal:sachet-clear", name: "Chrysal Clear sachet 10ml", typeCode: "OTHER" },
30
+ { id: "chrysal:pill-plant", name: "Chrysal Plant food pill", typeCode: "OTHER" },
31
+ ],
32
+ comdec: [
33
+ { id: "comdec:sleeve-hr", name: "Comdec HR hoes", typeCode: "SLEEVE" },
34
+ { id: "comdec:sleeve-eco", name: "Comdec Eco hoes", typeCode: "SLEEVE" },
35
+ ],
36
+ decowraps: [
37
+ { id: "decowraps:sleeve-kraft", name: "Kraft sleeve premium", typeCode: "SLEEVE" },
38
+ { id: "decowraps:pot-cover", name: "Deco pot cover 12cm", typeCode: "POT_COVER" },
39
+ ],
40
+ "desch-plantpak": [
41
+ { id: "desch:pot-cover-13", name: "Desch pot cover Ø13", typeCode: "POT_COVER" },
42
+ { id: "desch:pot-cover-17", name: "Desch pot cover Ø17", typeCode: "POT_COVER" },
43
+ ],
44
+ floralife: [
45
+ { id: "floralife:sachet-hydration", name: "FloraLife Hydration sachet", typeCode: "OTHER" },
46
+ ],
47
+ "hb-rts-holding": [
48
+ { id: "hbrts:cardboard-tray", name: "HB kartonnen tray", typeCode: "CARDBOARD" },
49
+ ],
50
+ "jbb-packaging": [
51
+ { id: "jbb:sleeve-clear", name: "JBB transparante hoes", typeCode: "SLEEVE" },
52
+ { id: "jbb:sleeve-print", name: "JBB bedrukte hoes", typeCode: "SLEEVE" },
53
+ ],
54
+ "koen-pack": [
55
+ { id: "koen-pack:sleeve-50", name: "Koen Pack hoes 50cm", typeCode: "SLEEVE" },
56
+ { id: "koen-pack:sleeve-60", name: "Koen Pack hoes 60cm", typeCode: "SLEEVE" },
57
+ { id: "koen-pack:stick-plant", name: "Koen Pack plantensteker", typeCode: "STICK" },
58
+ { id: "koen-pack:pot-cover-12", name: "Koen Pack pot cover Ø12", typeCode: "POT_COVER" },
59
+ ],
60
+ modiform: [
61
+ { id: "modiform:tray-15", name: "Modiform tray 15-cell", typeCode: "CARDBOARD" },
62
+ { id: "modiform:tray-20", name: "Modiform tray 20-cell", typeCode: "CARDBOARD" },
63
+ ],
64
+ "multi-supplies": [
65
+ { id: "multi:protection-corner", name: "Hoekbescherming karton", typeCode: "PROTECTION" },
66
+ ],
67
+ paardekooper: [
68
+ { id: "paardekooper:sleeve-standard", name: "Paardekooper standaard hoes", typeCode: "SLEEVE" },
69
+ { id: "paardekooper:cardboard-box", name: "Paardekooper kartonnen doos", typeCode: "CARDBOARD" },
70
+ ],
71
+ "poppelmann-teku": [
72
+ { id: "poppelmann:pot-cover-13", name: "Pöppelmann Teku pot cover Ø13", typeCode: "POT_COVER" },
73
+ ],
74
+ "royal-floraholland": [
75
+ { id: "rfh:sticker-lot", name: "RFH lot-sticker", typeCode: "LABEL" },
76
+ ],
77
+ twinpack: [
78
+ { id: "twinpack:sleeve-eco", name: "Twinpack Eco hoes", typeCode: "SLEEVE" },
79
+ { id: "twinpack:stick-mini", name: "Twinpack mini steker", typeCode: "STICK" },
80
+ ],
81
+ };
82
+ export function getMaterialsForSupplier(supplierId) {
83
+ return VRS_MATERIALS[supplierId] ?? [];
84
+ }
85
+ export function getMaterialTypesForSupplier(supplierId) {
86
+ const materials = getMaterialsForSupplier(supplierId);
87
+ const seen = new Set();
88
+ const types = [];
89
+ for (const m of materials) {
90
+ if (seen.has(m.typeCode))
91
+ continue;
92
+ seen.add(m.typeCode);
93
+ const t = VRS_MATERIAL_TYPES.find((x) => x.code === m.typeCode);
94
+ if (t)
95
+ types.push(t);
96
+ }
97
+ return types;
98
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowselections/floriday-voorraad",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "sideEffects": false,
5
5
  "type": "module",
6
6
  "main": "./dist-lib/index.js",
@@ -12,7 +12,8 @@
12
12
  }
13
13
  },
14
14
  "files": [
15
- "dist-lib"
15
+ "dist-lib",
16
+ "public"
16
17
  ],
17
18
  "publishConfig": {
18
19
  "access": "public"