@flowselections/floriday-afhandeling-module 1.0.9 → 1.0.11

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 (96) hide show
  1. package/dist-lib/components/afhandeling/ControleLijstPrint.d.ts +7 -0
  2. package/dist-lib/components/afhandeling/ControleLijstPrint.d.ts.map +1 -0
  3. package/dist-lib/components/afhandeling/ControleLijstPrint.js +67 -0
  4. package/dist-lib/components/afhandeling/ControlePage.d.ts +2 -0
  5. package/dist-lib/components/afhandeling/ControlePage.d.ts.map +1 -0
  6. package/dist-lib/components/afhandeling/ControlePage.js +456 -0
  7. package/dist-lib/components/afhandeling/DagDetailDialog.d.ts +9 -0
  8. package/dist-lib/components/afhandeling/DagDetailDialog.d.ts.map +1 -0
  9. package/dist-lib/components/afhandeling/DagDetailDialog.js +149 -0
  10. package/dist-lib/components/afhandeling/LeveringenPage.d.ts.map +1 -1
  11. package/dist-lib/components/afhandeling/LeveringenPage.js +11 -5
  12. package/dist-lib/components/afhandeling/PickAgendaView.d.ts.map +1 -1
  13. package/dist-lib/components/afhandeling/PickAgendaView.js +13 -4
  14. package/dist-lib/components/afhandeling/PlanningAgendaPage.d.ts.map +1 -1
  15. package/dist-lib/components/afhandeling/PlanningAgendaPage.js +2 -2
  16. package/dist-lib/components/afhandeling/ServiceAreaSelect.d.ts +12 -0
  17. package/dist-lib/components/afhandeling/ServiceAreaSelect.d.ts.map +1 -0
  18. package/dist-lib/components/afhandeling/ServiceAreaSelect.js +79 -0
  19. package/dist-lib/components/afhandeling/VervoerderForm.d.ts.map +1 -1
  20. package/dist-lib/components/afhandeling/VervoerderForm.js +62 -6
  21. package/dist-lib/components/afhandeling/VervoerdersPage.d.ts.map +1 -1
  22. package/dist-lib/components/afhandeling/VervoerdersPage.js +25 -6
  23. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts +2 -1
  24. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts.map +1 -1
  25. package/dist-lib/components/afhandeling/WeekAgendaView.js +63 -18
  26. package/dist-lib/components/afhandeling/WeekdayPicker.d.ts +12 -0
  27. package/dist-lib/components/afhandeling/WeekdayPicker.d.ts.map +1 -0
  28. package/dist-lib/components/afhandeling/WeekdayPicker.js +30 -0
  29. package/dist-lib/components/pickstation/PakbonTemplate.d.ts +6 -2
  30. package/dist-lib/components/pickstation/PakbonTemplate.d.ts.map +1 -1
  31. package/dist-lib/components/pickstation/PakbonTemplate.js +37 -12
  32. package/dist-lib/components/settings/AfhandelingSettingsCard.d.ts.map +1 -1
  33. package/dist-lib/components/settings/AfhandelingSettingsCard.js +25 -6
  34. package/dist-lib/components/ui/responsive-dialog.d.ts +20 -0
  35. package/dist-lib/components/ui/responsive-dialog.d.ts.map +1 -0
  36. package/dist-lib/components/ui/responsive-dialog.js +44 -0
  37. package/dist-lib/hooks/useOrderPlanning.d.ts +3 -0
  38. package/dist-lib/hooks/useOrderPlanning.d.ts.map +1 -1
  39. package/dist-lib/hooks/useOrderPlanning.js +64 -12
  40. package/dist-lib/index.d.ts +1 -0
  41. package/dist-lib/index.d.ts.map +1 -1
  42. package/dist-lib/index.js +4 -2
  43. package/dist-lib/integrations/supabase/auth-middleware.d.ts +2898 -147
  44. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  45. package/dist-lib/integrations/supabase/client.d.ts +2898 -147
  46. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  47. package/dist-lib/integrations/supabase/client.server.d.ts +2898 -147
  48. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  49. package/dist-lib/integrations/supabase/types.d.ts +2986 -155
  50. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  51. package/dist-lib/integrations/supabase/types.js +1 -0
  52. package/dist-lib/lib/afhandelingSettings.functions.d.ts +10666 -5151
  53. package/dist-lib/lib/afhandelingSettings.functions.d.ts.map +1 -1
  54. package/dist-lib/lib/afhandelingSettings.functions.js +42 -2
  55. package/dist-lib/lib/carrierMatch.server.d.ts +27 -0
  56. package/dist-lib/lib/carrierMatch.server.d.ts.map +1 -0
  57. package/dist-lib/lib/carrierMatch.server.js +75 -0
  58. package/dist-lib/lib/carrierSignupMail.server.d.ts +56 -0
  59. package/dist-lib/lib/carrierSignupMail.server.d.ts.map +1 -0
  60. package/dist-lib/lib/carrierSignupMail.server.js +229 -0
  61. package/dist-lib/lib/carriers.functions.d.ts +36404 -15470
  62. package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
  63. package/dist-lib/lib/carriers.functions.js +43 -2
  64. package/dist-lib/lib/cartAssignments.functions.d.ts +49609 -0
  65. package/dist-lib/lib/cartAssignments.functions.d.ts.map +1 -0
  66. package/dist-lib/lib/cartAssignments.functions.js +130 -0
  67. package/dist-lib/lib/cartControl.functions.d.ts +99259 -0
  68. package/dist-lib/lib/cartControl.functions.d.ts.map +1 -0
  69. package/dist-lib/lib/cartControl.functions.js +489 -0
  70. package/dist-lib/lib/cartMoveImpact.d.ts +8 -0
  71. package/dist-lib/lib/cartMoveImpact.d.ts.map +1 -0
  72. package/dist-lib/lib/cartMoveImpact.js +26 -0
  73. package/dist-lib/lib/cartRescheduling.d.ts +30 -0
  74. package/dist-lib/lib/cartRescheduling.d.ts.map +1 -0
  75. package/dist-lib/lib/cartRescheduling.js +71 -0
  76. package/dist-lib/lib/floriday.functions.d.ts +2902 -147
  77. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  78. package/dist-lib/lib/floriday.functions.js +178 -98
  79. package/dist-lib/lib/geo/euServiceAreas.d.ts +30 -0
  80. package/dist-lib/lib/geo/euServiceAreas.d.ts.map +1 -0
  81. package/dist-lib/lib/geo/euServiceAreas.js +277 -0
  82. package/dist-lib/lib/invalidatePlanning.d.ts +11 -0
  83. package/dist-lib/lib/invalidatePlanning.d.ts.map +1 -0
  84. package/dist-lib/lib/invalidatePlanning.js +25 -0
  85. package/dist-lib/lib/pickstationI18n.d.ts +12 -0
  86. package/dist-lib/lib/pickstationI18n.d.ts.map +1 -1
  87. package/dist-lib/lib/pickstationI18n.js +72 -0
  88. package/dist-lib/lib/pickstationOrders.server.d.ts +2 -1
  89. package/dist-lib/lib/pickstationOrders.server.d.ts.map +1 -1
  90. package/dist-lib/lib/pickstationOrders.server.js +393 -178
  91. package/dist-lib/lib/pickstationTypes.d.ts +23 -2
  92. package/dist-lib/lib/pickstationTypes.d.ts.map +1 -1
  93. package/dist-lib/lib/planning.d.ts +41 -2
  94. package/dist-lib/lib/planning.d.ts.map +1 -1
  95. package/dist-lib/lib/planning.js +159 -36
  96. package/package.json +2 -2
@@ -0,0 +1,277 @@
1
+ // EU service-area catalog used by the carrier "Bedieningsgebied" selector.
2
+ //
3
+ // Three levels:
4
+ // - country (code = ISO 3166-1 alpha-2, e.g. "NL")
5
+ // - province (code = ISO 3166-2, e.g. "NL-ZH")
6
+ // - city (code = "<country>:<slug>", e.g. "NL:gouda")
7
+ //
8
+ // Cities & provinces include a `parent` reference so we can do hierarchical matching:
9
+ // selecting a country implies all its provinces & cities; selecting a province implies all its cities.
10
+ // ---------------- Countries (EU-27) ----------------
11
+ const COUNTRIES = [
12
+ { code: "AT", label: "Oostenrijk" },
13
+ { code: "BE", label: "België" },
14
+ { code: "BG", label: "Bulgarije" },
15
+ { code: "HR", label: "Kroatië" },
16
+ { code: "CY", label: "Cyprus" },
17
+ { code: "CZ", label: "Tsjechië" },
18
+ { code: "DK", label: "Denemarken" },
19
+ { code: "EE", label: "Estland" },
20
+ { code: "FI", label: "Finland" },
21
+ { code: "FR", label: "Frankrijk" },
22
+ { code: "DE", label: "Duitsland" },
23
+ { code: "GR", label: "Griekenland" },
24
+ { code: "HU", label: "Hongarije" },
25
+ { code: "IE", label: "Ierland" },
26
+ { code: "IT", label: "Italië" },
27
+ { code: "LV", label: "Letland" },
28
+ { code: "LT", label: "Litouwen" },
29
+ { code: "LU", label: "Luxemburg" },
30
+ { code: "MT", label: "Malta" },
31
+ { code: "NL", label: "Nederland" },
32
+ { code: "PL", label: "Polen" },
33
+ { code: "PT", label: "Portugal" },
34
+ { code: "RO", label: "Roemenië" },
35
+ { code: "SK", label: "Slowakije" },
36
+ { code: "SI", label: "Slovenië" },
37
+ { code: "ES", label: "Spanje" },
38
+ { code: "SE", label: "Zweden" },
39
+ // Non-EU but relevant for transport
40
+ { code: "GB", label: "Verenigd Koninkrijk" },
41
+ { code: "CH", label: "Zwitserland" },
42
+ { code: "NO", label: "Noorwegen" },
43
+ ];
44
+ // ---------------- Provinces (ISO 3166-2 subset) ----------------
45
+ const PROVINCES = [
46
+ // Nederland
47
+ { code: "NL-DR", label: "Drenthe", country: "NL" },
48
+ { code: "NL-FL", label: "Flevoland", country: "NL" },
49
+ { code: "NL-FR", label: "Friesland", country: "NL" },
50
+ { code: "NL-GE", label: "Gelderland", country: "NL" },
51
+ { code: "NL-GR", label: "Groningen", country: "NL" },
52
+ { code: "NL-LI", label: "Limburg", country: "NL" },
53
+ { code: "NL-NB", label: "Noord-Brabant", country: "NL" },
54
+ { code: "NL-NH", label: "Noord-Holland", country: "NL" },
55
+ { code: "NL-OV", label: "Overijssel", country: "NL" },
56
+ { code: "NL-UT", label: "Utrecht", country: "NL" },
57
+ { code: "NL-ZE", label: "Zeeland", country: "NL" },
58
+ { code: "NL-ZH", label: "Zuid-Holland", country: "NL" },
59
+ // België
60
+ { code: "BE-VAN", label: "Antwerpen", country: "BE" },
61
+ { code: "BE-VBR", label: "Vlaams-Brabant", country: "BE" },
62
+ { code: "BE-WBR", label: "Waals-Brabant", country: "BE" },
63
+ { code: "BE-BRU", label: "Brussel", country: "BE" },
64
+ { code: "BE-WHT", label: "Henegouwen", country: "BE" },
65
+ { code: "BE-WLG", label: "Luik", country: "BE" },
66
+ { code: "BE-VLI", label: "Limburg (BE)", country: "BE" },
67
+ { code: "BE-WLX", label: "Luxemburg (BE)", country: "BE" },
68
+ { code: "BE-WNA", label: "Namen", country: "BE" },
69
+ { code: "BE-VOV", label: "Oost-Vlaanderen", country: "BE" },
70
+ { code: "BE-VWV", label: "West-Vlaanderen", country: "BE" },
71
+ // Duitsland (Bundesländer)
72
+ { code: "DE-BW", label: "Baden-Württemberg", country: "DE" },
73
+ { code: "DE-BY", label: "Beieren", country: "DE" },
74
+ { code: "DE-BE", label: "Berlijn", country: "DE" },
75
+ { code: "DE-BB", label: "Brandenburg", country: "DE" },
76
+ { code: "DE-HB", label: "Bremen", country: "DE" },
77
+ { code: "DE-HH", label: "Hamburg", country: "DE" },
78
+ { code: "DE-HE", label: "Hessen", country: "DE" },
79
+ { code: "DE-MV", label: "Mecklenburg-Voor-Pommeren", country: "DE" },
80
+ { code: "DE-NI", label: "Nedersaksen", country: "DE" },
81
+ { code: "DE-NW", label: "Noordrijn-Westfalen", country: "DE" },
82
+ { code: "DE-RP", label: "Rijnland-Palts", country: "DE" },
83
+ { code: "DE-SL", label: "Saarland", country: "DE" },
84
+ { code: "DE-SN", label: "Saksen", country: "DE" },
85
+ { code: "DE-ST", label: "Saksen-Anhalt", country: "DE" },
86
+ { code: "DE-SH", label: "Sleeswijk-Holstein", country: "DE" },
87
+ { code: "DE-TH", label: "Thüringen", country: "DE" },
88
+ // Frankrijk (régions)
89
+ { code: "FR-ARA", label: "Auvergne-Rhône-Alpes", country: "FR" },
90
+ { code: "FR-BFC", label: "Bourgogne-Franche-Comté", country: "FR" },
91
+ { code: "FR-BRE", label: "Bretagne", country: "FR" },
92
+ { code: "FR-CVL", label: "Centre-Val de Loire", country: "FR" },
93
+ { code: "FR-COR", label: "Corsica", country: "FR" },
94
+ { code: "FR-GES", label: "Grand Est", country: "FR" },
95
+ { code: "FR-HDF", label: "Hauts-de-France", country: "FR" },
96
+ { code: "FR-IDF", label: "Île-de-France", country: "FR" },
97
+ { code: "FR-NOR", label: "Normandië", country: "FR" },
98
+ { code: "FR-NAQ", label: "Nouvelle-Aquitaine", country: "FR" },
99
+ { code: "FR-OCC", label: "Occitanie", country: "FR" },
100
+ { code: "FR-PDL", label: "Pays de la Loire", country: "FR" },
101
+ { code: "FR-PAC", label: "Provence-Alpes-Côte d'Azur", country: "FR" },
102
+ // Spanje (comunidades)
103
+ { code: "ES-AN", label: "Andalusië", country: "ES" },
104
+ { code: "ES-AR", label: "Aragón", country: "ES" },
105
+ { code: "ES-AS", label: "Asturië", country: "ES" },
106
+ { code: "ES-IB", label: "Balearen", country: "ES" },
107
+ { code: "ES-PV", label: "Baskenland", country: "ES" },
108
+ { code: "ES-CN", label: "Canarische Eilanden", country: "ES" },
109
+ { code: "ES-CB", label: "Cantabrië", country: "ES" },
110
+ { code: "ES-CM", label: "Castilië-La Mancha", country: "ES" },
111
+ { code: "ES-CL", label: "Castilië en León", country: "ES" },
112
+ { code: "ES-CT", label: "Catalonië", country: "ES" },
113
+ { code: "ES-EX", label: "Extremadura", country: "ES" },
114
+ { code: "ES-GA", label: "Galicië", country: "ES" },
115
+ { code: "ES-RI", label: "La Rioja", country: "ES" },
116
+ { code: "ES-MD", label: "Madrid", country: "ES" },
117
+ { code: "ES-MC", label: "Murcia", country: "ES" },
118
+ { code: "ES-NC", label: "Navarra", country: "ES" },
119
+ { code: "ES-VC", label: "Valencia", country: "ES" },
120
+ // Italië (selectie van regio's)
121
+ { code: "IT-21", label: "Piemonte", country: "IT" },
122
+ { code: "IT-25", label: "Lombardije", country: "IT" },
123
+ { code: "IT-34", label: "Veneto", country: "IT" },
124
+ { code: "IT-42", label: "Ligurië", country: "IT" },
125
+ { code: "IT-45", label: "Emilia-Romagna", country: "IT" },
126
+ { code: "IT-52", label: "Toscane", country: "IT" },
127
+ { code: "IT-62", label: "Lazio", country: "IT" },
128
+ { code: "IT-72", label: "Campanië", country: "IT" },
129
+ { code: "IT-75", label: "Apulië", country: "IT" },
130
+ { code: "IT-82", label: "Sicilië", country: "IT" },
131
+ // Oostenrijk
132
+ { code: "AT-1", label: "Burgenland", country: "AT" },
133
+ { code: "AT-2", label: "Karinthië", country: "AT" },
134
+ { code: "AT-3", label: "Neder-Oostenrijk", country: "AT" },
135
+ { code: "AT-4", label: "Opper-Oostenrijk", country: "AT" },
136
+ { code: "AT-5", label: "Salzburg", country: "AT" },
137
+ { code: "AT-6", label: "Stiermarken", country: "AT" },
138
+ { code: "AT-7", label: "Tirol", country: "AT" },
139
+ { code: "AT-8", label: "Vorarlberg", country: "AT" },
140
+ { code: "AT-9", label: "Wenen", country: "AT" },
141
+ // Polen (województwa)
142
+ { code: "PL-02", label: "Neder-Silezië", country: "PL" },
143
+ { code: "PL-04", label: "Koejavië-Pommeren", country: "PL" },
144
+ { code: "PL-06", label: "Lublin", country: "PL" },
145
+ { code: "PL-08", label: "Lubusz", country: "PL" },
146
+ { code: "PL-10", label: "Łódź", country: "PL" },
147
+ { code: "PL-12", label: "Klein-Polen", country: "PL" },
148
+ { code: "PL-14", label: "Mazovië", country: "PL" },
149
+ { code: "PL-16", label: "Opole", country: "PL" },
150
+ { code: "PL-18", label: "Subkarpaten", country: "PL" },
151
+ { code: "PL-20", label: "Podlachië", country: "PL" },
152
+ { code: "PL-22", label: "Pommeren", country: "PL" },
153
+ { code: "PL-24", label: "Silezië", country: "PL" },
154
+ { code: "PL-26", label: "Heiligkruis", country: "PL" },
155
+ { code: "PL-28", label: "Ermland-Mazurië", country: "PL" },
156
+ { code: "PL-30", label: "Groot-Polen", country: "PL" },
157
+ { code: "PL-32", label: "West-Pommeren", country: "PL" },
158
+ ];
159
+ // ---------------- Cities ----------------
160
+ // Major cities for delivery-relevant countries. Slug-based codes so the list is extensible.
161
+ function city(country, name, parent) {
162
+ const slug = name.toLowerCase()
163
+ .replace(/['’]/g, "")
164
+ .replace(/[äàáâ]/g, "a").replace(/[ëèéê]/g, "e").replace(/[ïìíî]/g, "i")
165
+ .replace(/[öòóô]/g, "o").replace(/[üùúû]/g, "u").replace(/ß/g, "ss")
166
+ .replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
167
+ return { code: `${country}:${slug}`, label: name, country, parent: parent ?? country };
168
+ }
169
+ const CITIES = [
170
+ // Nederland
171
+ city("NL", "Amsterdam", "NL-NH"),
172
+ city("NL", "Rotterdam", "NL-ZH"),
173
+ city("NL", "Den Haag", "NL-ZH"),
174
+ city("NL", "Utrecht", "NL-UT"),
175
+ city("NL", "Eindhoven", "NL-NB"),
176
+ city("NL", "Groningen", "NL-GR"),
177
+ city("NL", "Tilburg", "NL-NB"),
178
+ city("NL", "Almere", "NL-FL"),
179
+ city("NL", "Breda", "NL-NB"),
180
+ city("NL", "Nijmegen", "NL-GE"),
181
+ city("NL", "Apeldoorn", "NL-GE"),
182
+ city("NL", "Haarlem", "NL-NH"),
183
+ city("NL", "Arnhem", "NL-GE"),
184
+ city("NL", "Enschede", "NL-OV"),
185
+ city("NL", "Amersfoort", "NL-UT"),
186
+ city("NL", "Zaanstad", "NL-NH"),
187
+ city("NL", "Den Bosch", "NL-NB"),
188
+ city("NL", "Zwolle", "NL-OV"),
189
+ city("NL", "Leiden", "NL-ZH"),
190
+ city("NL", "Maastricht", "NL-LI"),
191
+ city("NL", "Dordrecht", "NL-ZH"),
192
+ city("NL", "Gouda", "NL-ZH"),
193
+ city("NL", "Alphen aan den Rijn", "NL-ZH"),
194
+ city("NL", "Delft", "NL-ZH"),
195
+ city("NL", "Hilversum", "NL-NH"),
196
+ city("NL", "Venlo", "NL-LI"),
197
+ city("NL", "Naaldwijk", "NL-ZH"),
198
+ city("NL", "Aalsmeer", "NL-NH"),
199
+ city("NL", "Rijnsburg", "NL-ZH"),
200
+ city("NL", "Boskoop", "NL-ZH"),
201
+ city("NL", "Honselersdijk", "NL-ZH"),
202
+ city("NL", "Bleiswijk", "NL-ZH"),
203
+ city("NL", "Bemmel", "NL-GE"),
204
+ // België
205
+ city("BE", "Brussel", "BE-BRU"),
206
+ city("BE", "Antwerpen", "BE-VAN"),
207
+ city("BE", "Gent", "BE-VOV"),
208
+ city("BE", "Brugge", "BE-VWV"),
209
+ city("BE", "Leuven", "BE-VBR"),
210
+ city("BE", "Mechelen", "BE-VAN"),
211
+ city("BE", "Hasselt", "BE-VLI"),
212
+ city("BE", "Luik", "BE-WLG"),
213
+ city("BE", "Charleroi", "BE-WHT"),
214
+ city("BE", "Namen", "BE-WNA"),
215
+ city("BE", "Kortrijk", "BE-VWV"),
216
+ city("BE", "Oostende", "BE-VWV"),
217
+ // Duitsland
218
+ city("DE", "Berlijn", "DE-BE"),
219
+ city("DE", "Hamburg", "DE-HH"),
220
+ city("DE", "München", "DE-BY"),
221
+ city("DE", "Keulen", "DE-NW"),
222
+ city("DE", "Frankfurt", "DE-HE"),
223
+ city("DE", "Stuttgart", "DE-BW"),
224
+ city("DE", "Düsseldorf", "DE-NW"),
225
+ city("DE", "Dortmund", "DE-NW"),
226
+ city("DE", "Essen", "DE-NW"),
227
+ city("DE", "Bremen", "DE-HB"),
228
+ city("DE", "Hannover", "DE-NI"),
229
+ city("DE", "Leipzig", "DE-SN"),
230
+ city("DE", "Dresden", "DE-SN"),
231
+ city("DE", "Neurenberg", "DE-BY"),
232
+ city("DE", "Bonn", "DE-NW"),
233
+ city("DE", "Münster", "DE-NW"),
234
+ city("DE", "Aken", "DE-NW"),
235
+ // Frankrijk
236
+ city("FR", "Parijs", "FR-IDF"),
237
+ city("FR", "Marseille", "FR-PAC"),
238
+ city("FR", "Lyon", "FR-ARA"),
239
+ city("FR", "Toulouse", "FR-OCC"),
240
+ city("FR", "Nice", "FR-PAC"),
241
+ city("FR", "Nantes", "FR-PDL"),
242
+ city("FR", "Straatsburg", "FR-GES"),
243
+ city("FR", "Bordeaux", "FR-NAQ"),
244
+ city("FR", "Lille", "FR-HDF"),
245
+ city("FR", "Rijsel", "FR-HDF"),
246
+ city("FR", "Rouen", "FR-NOR"),
247
+ // Luxemburg
248
+ city("LU", "Luxemburg-stad"),
249
+ ];
250
+ // ---------------- Public API ----------------
251
+ export const GEO_ITEMS = [
252
+ ...COUNTRIES.map((c) => ({ code: c.code, label: c.label, level: "country", country: c.code })),
253
+ ...PROVINCES.map((p) => ({ code: p.code, label: p.label, level: "province", country: p.country, parent: p.country })),
254
+ ...CITIES.map((c) => ({ code: c.code, label: c.label, level: "city", country: c.country, parent: c.parent })),
255
+ ];
256
+ const BY_CODE = new Map(GEO_ITEMS.map((i) => [i.code, i]));
257
+ export function getGeoItem(code) {
258
+ return BY_CODE.get(code);
259
+ }
260
+ export function geoLabel(code) {
261
+ return BY_CODE.get(code)?.label ?? code;
262
+ }
263
+ /**
264
+ * Returns true when `target` (a country/province/city code derived from an order's address)
265
+ * is covered by `selected` (a list of country/province/city codes saved on a carrier).
266
+ * Matching is hierarchical: country covers its provinces & cities; province covers its cities.
267
+ */
268
+ export function matchesServiceArea(selected, target) {
269
+ if (target.country && selected.countries.includes(target.country))
270
+ return true;
271
+ if (target.province && selected.provinces.includes(target.province))
272
+ return true;
273
+ if (target.city && selected.cities.includes(target.city))
274
+ return true;
275
+ // City selected falls under its province/country automatically because we also check province/country lists above.
276
+ return false;
277
+ }
@@ -0,0 +1,11 @@
1
+ import type { QueryClient } from "@tanstack/react-query";
2
+ /**
3
+ * Invalideer alle queries die invloed hebben op de logistieke planning:
4
+ * orders, instellingen, vervoerders. Hierdoor herberekent useOrderPlanning
5
+ * alle openstaande bestellingen op basis van de actuele configuratie.
6
+ *
7
+ * Wist tevens alle handmatige kar-verplaatsingen (cart_pick_overrides),
8
+ * zodat de automatische verdeling alle karren weer gelijk trekt.
9
+ */
10
+ export declare function invalidatePlanning(qc: QueryClient): Promise<void>;
11
+ //# sourceMappingURL=invalidatePlanning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invalidatePlanning.d.ts","sourceRoot":"","sources":["../../src/lib/invalidatePlanning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAcvE"}
@@ -0,0 +1,25 @@
1
+ import { resetAllCartOverrides } from "./cartAssignments.functions";
2
+ /**
3
+ * Invalideer alle queries die invloed hebben op de logistieke planning:
4
+ * orders, instellingen, vervoerders. Hierdoor herberekent useOrderPlanning
5
+ * alle openstaande bestellingen op basis van de actuele configuratie.
6
+ *
7
+ * Wist tevens alle handmatige kar-verplaatsingen (cart_pick_overrides),
8
+ * zodat de automatische verdeling alle karren weer gelijk trekt.
9
+ */
10
+ export async function invalidatePlanning(qc) {
11
+ try {
12
+ await resetAllCartOverrides();
13
+ }
14
+ catch (err) {
15
+ // Niet fataal: we vervolgen met cache invalidatie zodat de UI in elk geval ververst.
16
+ console.error("[invalidatePlanning] reset overrides failed", err);
17
+ }
18
+ await Promise.all([
19
+ qc.invalidateQueries({ queryKey: ["floriday", "orders"] }),
20
+ qc.invalidateQueries({ queryKey: ["afhandeling", "settings"] }),
21
+ qc.invalidateQueries({ queryKey: ["carriers"] }),
22
+ qc.invalidateQueries({ queryKey: ["cart-overrides"] }),
23
+ ]);
24
+ await qc.refetchQueries({ queryKey: ["cart-overrides"], type: "active" });
25
+ }
@@ -26,6 +26,18 @@ export interface PickstationDict {
26
26
  ofTotal: (done: number, total: number) => string;
27
27
  auctionLetterMissing: string;
28
28
  printDialogHint: string;
29
+ confirmPrintedTitle: string;
30
+ confirmPrintedBody: string;
31
+ confirmYes: string;
32
+ confirmNo: string;
33
+ statusChecked: string;
34
+ statusReady: string;
35
+ statusShipped: string;
36
+ statusDelivered: string;
37
+ changeStatus: string;
38
+ resetStatus: string;
39
+ printChecklist: string;
40
+ runControl: string;
29
41
  }
30
42
  export declare const PICKSTATION_DICT: Record<PickstationLang, PickstationDict>;
31
43
  //# sourceMappingURL=pickstationI18n.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pickstationI18n.d.ts","sourceRoot":"","sources":["../../src/lib/pickstationI18n.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtE,eAAO,MAAM,q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,CAA8B,CAAC"}
@@ -28,6 +28,18 @@ const nl = {
28
28
  ofTotal: (d, t) => `${d} van ${t} geprint`,
29
29
  auctionLetterMissing: "Geen veilingbrief beschikbaar",
30
30
  printDialogHint: "Tip: schakel kiosk-printen in voor printen zonder dialoog.",
31
+ confirmPrintedTitle: "Is de pakbon geprint?",
32
+ confirmPrintedBody: "Bevestig of de pakbon en eventuele veilingbrief correct zijn afgedrukt. Alleen dan wordt de order gemarkeerd als geprint.",
33
+ confirmYes: "Ja, geprint",
34
+ confirmNo: "Nee, annuleren",
35
+ statusChecked: 'Gecontroleerd',
36
+ statusReady: 'Gereed voor transport',
37
+ statusShipped: 'Verzonden',
38
+ statusDelivered: 'Afgeleverd',
39
+ changeStatus: 'Status wijzigen',
40
+ resetStatus: 'Terug naar geprint',
41
+ printChecklist: 'Controlelijst afdrukken',
42
+ runControl: 'Controle uitvoeren',
31
43
  };
32
44
  const en = {
33
45
  chooseLanguage: "Choose your language",
@@ -51,6 +63,18 @@ const en = {
51
63
  ofTotal: (d, t) => `${d} of ${t} printed`,
52
64
  auctionLetterMissing: "No auction letter available",
53
65
  printDialogHint: "Tip: enable kiosk printing for silent print.",
66
+ confirmPrintedTitle: "Has the packing slip been printed?",
67
+ confirmPrintedBody: "Confirm that the packing slip and any auction letter printed correctly. Only then is the order marked as printed.",
68
+ confirmYes: "Yes, printed",
69
+ confirmNo: "No, cancel",
70
+ statusChecked: 'Checked',
71
+ statusReady: 'Ready for transport',
72
+ statusShipped: 'Shipped',
73
+ statusDelivered: 'Delivered',
74
+ changeStatus: 'Change status',
75
+ resetStatus: 'Reset to printed',
76
+ printChecklist: 'Print checklist',
77
+ runControl: 'Run inspection',
54
78
  };
55
79
  const pl = {
56
80
  chooseLanguage: "Wybierz język",
@@ -74,6 +98,18 @@ const pl = {
74
98
  ofTotal: (d, t) => `${d} z ${t} wydrukowanych`,
75
99
  auctionLetterMissing: "Brak listu aukcyjnego",
76
100
  printDialogHint: "Wskazówka: włącz tryb kiosk, aby drukować bez dialogu.",
101
+ confirmPrintedTitle: "Czy list przewozowy został wydrukowany?",
102
+ confirmPrintedBody: "Potwierdź, że list przewozowy i ewentualny list aukcyjny wydrukowały się poprawnie. Dopiero wtedy zamówienie zostanie oznaczone jako wydrukowane.",
103
+ confirmYes: "Tak, wydrukowano",
104
+ confirmNo: "Nie, anuluj",
105
+ statusChecked: 'Sprawdzone',
106
+ statusReady: 'Gotowe do transportu',
107
+ statusShipped: 'Wysłane',
108
+ statusDelivered: 'Dostarczone',
109
+ changeStatus: 'Zmień status',
110
+ resetStatus: 'Cofnij do wydrukowane',
111
+ printChecklist: 'Drukuj listę kontrolną',
112
+ runControl: 'Wykonaj kontrolę',
77
113
  };
78
114
  const ro = {
79
115
  chooseLanguage: "Alegeți limba",
@@ -97,6 +133,18 @@ const ro = {
97
133
  ofTotal: (d, t) => `${d} din ${t} tipărite`,
98
134
  auctionLetterMissing: "Nicio scrisoare de licitație disponibilă",
99
135
  printDialogHint: "Sfat: activați modul chioșc pentru tipărire silențioasă.",
136
+ confirmPrintedTitle: "Avizul a fost tipărit?",
137
+ confirmPrintedBody: "Confirmați că avizul și eventuala scrisoare de licitație au fost tipărite corect. Doar atunci comanda este marcată ca tipărită.",
138
+ confirmYes: "Da, tipărit",
139
+ confirmNo: "Nu, anulează",
140
+ statusChecked: 'Verificat',
141
+ statusReady: 'Pregătit pentru transport',
142
+ statusShipped: 'Expediat',
143
+ statusDelivered: 'Livrat',
144
+ changeStatus: 'Schimbă starea',
145
+ resetStatus: 'Înapoi la tipărit',
146
+ printChecklist: 'Tipărește lista de control',
147
+ runControl: 'Efectuează controlul',
100
148
  };
101
149
  const bg = {
102
150
  chooseLanguage: "Изберете език",
@@ -120,6 +168,18 @@ const bg = {
120
168
  ofTotal: (d, t) => `${d} от ${t} отпечатани`,
121
169
  auctionLetterMissing: "Няма налично аукционно писмо",
122
170
  printDialogHint: "Съвет: включете киоск-печат за безшумен печат.",
171
+ confirmPrintedTitle: "Отпечатана ли е товарителницата?",
172
+ confirmPrintedBody: "Потвърдете, че товарителницата и евентуалното аукционно писмо са отпечатани правилно. Само тогава поръчката се отбелязва като отпечатана.",
173
+ confirmYes: "Да, отпечатано",
174
+ confirmNo: "Не, отказ",
175
+ statusChecked: 'Проверено',
176
+ statusReady: 'Готово за транспорт',
177
+ statusShipped: 'Изпратено',
178
+ statusDelivered: 'Доставено',
179
+ changeStatus: 'Смени статус',
180
+ resetStatus: 'Върни към отпечатано',
181
+ printChecklist: 'Печат на контролен списък',
182
+ runControl: 'Извърши проверка',
123
183
  };
124
184
  const uk = {
125
185
  chooseLanguage: "Оберіть мову",
@@ -143,5 +203,17 @@ const uk = {
143
203
  ofTotal: (d, t) => `${d} з ${t} надруковано`,
144
204
  auctionLetterMissing: "Немає аукціонного листа",
145
205
  printDialogHint: "Порада: увімкніть кіоск-режим для безшумного друку.",
206
+ confirmPrintedTitle: "Накладна надрукована?",
207
+ confirmPrintedBody: "Підтвердіть, що накладна та аукціонний лист (за наявності) надруковано коректно. Лише тоді замовлення позначається як надруковане.",
208
+ confirmYes: "Так, надруковано",
209
+ confirmNo: "Ні, скасувати",
210
+ statusChecked: 'Перевірено',
211
+ statusReady: 'Готово до транспорту',
212
+ statusShipped: 'Відправлено',
213
+ statusDelivered: 'Доставлено',
214
+ changeStatus: 'Змінити статус',
215
+ resetStatus: 'Повернути до надруковано',
216
+ printChecklist: 'Друкувати контрольний список',
217
+ runControl: 'Виконати перевірку',
146
218
  };
147
219
  export const PICKSTATION_DICT = { nl, pl, ro, bg, uk, en };
@@ -1,9 +1,10 @@
1
1
  import type { PickstationOrder } from "./pickstationTypes";
2
2
  export type { PickstationLine, PickstationOrder } from "./pickstationTypes";
3
3
  export declare function loadTodaysPickstationOrders(): Promise<PickstationOrder[]>;
4
- export declare function fetchFloridayAuctionLetterPdf(orderId: string): Promise<{
4
+ export declare function fetchFloridayAuctionLetterPdf(_orderId: string): Promise<{
5
5
  base64: string;
6
6
  mime: string;
7
7
  } | null>;
8
+ export declare function setCartStatus(orderSource: "floriday" | "manual", orderId: string, cartIndex: number, status: "pending" | "checked" | "ready" | "shipped" | "delivered"): Promise<void>;
8
9
  export declare function logPrint(orderId: string, orderNumber: string | null, customerName: string | null, documents: string[], ipAddress: string | null): Promise<void>;
9
10
  //# sourceMappingURL=pickstationOrders.server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pickstationOrders.server.d.ts","sourceRoot":"","sources":["../../src/lib/pickstationOrders.server.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA0J5E,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA+D/E;AAED,wBAAsB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,IAAI,CAAC,CAmCR;AAED,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,SAAS,EAAE,MAAM,EAAE,EACnB,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,OAAO,CAAC,IAAI,CAAC,CAUf"}
1
+ {"version":3,"file":"pickstationOrders.server.d.ts","sourceRoot":"","sources":["../../src/lib/pickstationOrders.server.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAmO5E,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA0T/E;AAED,wBAAsB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,GA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