@flowselections/floriday-afhandeling-module 1.0.9 → 1.0.10
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/afhandeling/DagDetailDialog.d.ts +9 -0
- package/dist-lib/components/afhandeling/DagDetailDialog.d.ts.map +1 -0
- package/dist-lib/components/afhandeling/DagDetailDialog.js +145 -0
- package/dist-lib/components/afhandeling/LeveringenPage.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/LeveringenPage.js +11 -5
- package/dist-lib/components/afhandeling/PickAgendaView.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/PickAgendaView.js +13 -4
- package/dist-lib/components/afhandeling/PlanningAgendaPage.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/PlanningAgendaPage.js +2 -2
- package/dist-lib/components/afhandeling/ServiceAreaSelect.d.ts +12 -0
- package/dist-lib/components/afhandeling/ServiceAreaSelect.d.ts.map +1 -0
- package/dist-lib/components/afhandeling/ServiceAreaSelect.js +79 -0
- package/dist-lib/components/afhandeling/VervoerderForm.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/VervoerderForm.js +53 -6
- package/dist-lib/components/afhandeling/VervoerdersPage.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/VervoerdersPage.js +23 -5
- package/dist-lib/components/afhandeling/WeekAgendaView.d.ts +2 -1
- package/dist-lib/components/afhandeling/WeekAgendaView.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/WeekAgendaView.js +53 -18
- package/dist-lib/components/pickstation/PakbonTemplate.d.ts +5 -2
- package/dist-lib/components/pickstation/PakbonTemplate.d.ts.map +1 -1
- package/dist-lib/components/pickstation/PakbonTemplate.js +12 -10
- package/dist-lib/components/settings/AfhandelingSettingsCard.d.ts.map +1 -1
- package/dist-lib/components/settings/AfhandelingSettingsCard.js +18 -6
- package/dist-lib/hooks/useOrderPlanning.d.ts +3 -0
- package/dist-lib/hooks/useOrderPlanning.d.ts.map +1 -1
- package/dist-lib/hooks/useOrderPlanning.js +47 -6
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +2261 -136
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +2261 -136
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +2261 -136
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +2329 -134
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.js +1 -0
- package/dist-lib/lib/afhandelingSettings.functions.d.ts +9431 -5172
- package/dist-lib/lib/afhandelingSettings.functions.d.ts.map +1 -1
- package/dist-lib/lib/afhandelingSettings.functions.js +27 -2
- package/dist-lib/lib/carrierSignupMail.server.d.ts +56 -0
- package/dist-lib/lib/carrierSignupMail.server.d.ts.map +1 -0
- package/dist-lib/lib/carrierSignupMail.server.js +229 -0
- package/dist-lib/lib/carriers.functions.d.ts +33377 -15579
- package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
- package/dist-lib/lib/carriers.functions.js +28 -2
- package/dist-lib/lib/cartAssignments.functions.d.ts +46479 -0
- package/dist-lib/lib/cartAssignments.functions.d.ts.map +1 -0
- package/dist-lib/lib/cartAssignments.functions.js +130 -0
- package/dist-lib/lib/cartMoveImpact.d.ts +8 -0
- package/dist-lib/lib/cartMoveImpact.d.ts.map +1 -0
- package/dist-lib/lib/cartMoveImpact.js +26 -0
- package/dist-lib/lib/floriday.functions.d.ts +2265 -136
- package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday.functions.js +178 -98
- package/dist-lib/lib/geo/euServiceAreas.d.ts +30 -0
- package/dist-lib/lib/geo/euServiceAreas.d.ts.map +1 -0
- package/dist-lib/lib/geo/euServiceAreas.js +277 -0
- package/dist-lib/lib/invalidatePlanning.d.ts +11 -0
- package/dist-lib/lib/invalidatePlanning.d.ts.map +1 -0
- package/dist-lib/lib/invalidatePlanning.js +25 -0
- package/dist-lib/lib/pickstationI18n.d.ts +4 -0
- package/dist-lib/lib/pickstationI18n.d.ts.map +1 -1
- package/dist-lib/lib/pickstationI18n.js +24 -0
- package/dist-lib/lib/pickstationOrders.server.d.ts +1 -1
- package/dist-lib/lib/pickstationOrders.server.d.ts.map +1 -1
- package/dist-lib/lib/pickstationOrders.server.js +305 -177
- package/dist-lib/lib/pickstationTypes.d.ts +11 -2
- package/dist-lib/lib/pickstationTypes.d.ts.map +1 -1
- package/dist-lib/lib/planning.d.ts +18 -2
- package/dist-lib/lib/planning.d.ts.map +1 -1
- package/dist-lib/lib/planning.js +96 -33
- 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,10 @@ 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;
|
|
29
33
|
}
|
|
30
34
|
export declare const PICKSTATION_DICT: Record<PickstationLang, PickstationDict>;
|
|
31
35
|
//# 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,qBAAqB,EAAE;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAOzF,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;
|
|
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,qBAAqB,EAAE;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAOzF,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AA4KD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,eAAe,EAAE,eAAe,CAA8B,CAAC"}
|
|
@@ -28,6 +28,10 @@ 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",
|
|
31
35
|
};
|
|
32
36
|
const en = {
|
|
33
37
|
chooseLanguage: "Choose your language",
|
|
@@ -51,6 +55,10 @@ const en = {
|
|
|
51
55
|
ofTotal: (d, t) => `${d} of ${t} printed`,
|
|
52
56
|
auctionLetterMissing: "No auction letter available",
|
|
53
57
|
printDialogHint: "Tip: enable kiosk printing for silent print.",
|
|
58
|
+
confirmPrintedTitle: "Has the packing slip been printed?",
|
|
59
|
+
confirmPrintedBody: "Confirm that the packing slip and any auction letter printed correctly. Only then is the order marked as printed.",
|
|
60
|
+
confirmYes: "Yes, printed",
|
|
61
|
+
confirmNo: "No, cancel",
|
|
54
62
|
};
|
|
55
63
|
const pl = {
|
|
56
64
|
chooseLanguage: "Wybierz język",
|
|
@@ -74,6 +82,10 @@ const pl = {
|
|
|
74
82
|
ofTotal: (d, t) => `${d} z ${t} wydrukowanych`,
|
|
75
83
|
auctionLetterMissing: "Brak listu aukcyjnego",
|
|
76
84
|
printDialogHint: "Wskazówka: włącz tryb kiosk, aby drukować bez dialogu.",
|
|
85
|
+
confirmPrintedTitle: "Czy list przewozowy został wydrukowany?",
|
|
86
|
+
confirmPrintedBody: "Potwierdź, że list przewozowy i ewentualny list aukcyjny wydrukowały się poprawnie. Dopiero wtedy zamówienie zostanie oznaczone jako wydrukowane.",
|
|
87
|
+
confirmYes: "Tak, wydrukowano",
|
|
88
|
+
confirmNo: "Nie, anuluj",
|
|
77
89
|
};
|
|
78
90
|
const ro = {
|
|
79
91
|
chooseLanguage: "Alegeți limba",
|
|
@@ -97,6 +109,10 @@ const ro = {
|
|
|
97
109
|
ofTotal: (d, t) => `${d} din ${t} tipărite`,
|
|
98
110
|
auctionLetterMissing: "Nicio scrisoare de licitație disponibilă",
|
|
99
111
|
printDialogHint: "Sfat: activați modul chioșc pentru tipărire silențioasă.",
|
|
112
|
+
confirmPrintedTitle: "Avizul a fost tipărit?",
|
|
113
|
+
confirmPrintedBody: "Confirmați că avizul și eventuala scrisoare de licitație au fost tipărite corect. Doar atunci comanda este marcată ca tipărită.",
|
|
114
|
+
confirmYes: "Da, tipărit",
|
|
115
|
+
confirmNo: "Nu, anulează",
|
|
100
116
|
};
|
|
101
117
|
const bg = {
|
|
102
118
|
chooseLanguage: "Изберете език",
|
|
@@ -120,6 +136,10 @@ const bg = {
|
|
|
120
136
|
ofTotal: (d, t) => `${d} от ${t} отпечатани`,
|
|
121
137
|
auctionLetterMissing: "Няма налично аукционно писмо",
|
|
122
138
|
printDialogHint: "Съвет: включете киоск-печат за безшумен печат.",
|
|
139
|
+
confirmPrintedTitle: "Отпечатана ли е товарителницата?",
|
|
140
|
+
confirmPrintedBody: "Потвърдете, че товарителницата и евентуалното аукционно писмо са отпечатани правилно. Само тогава поръчката се отбелязва като отпечатана.",
|
|
141
|
+
confirmYes: "Да, отпечатано",
|
|
142
|
+
confirmNo: "Не, отказ",
|
|
123
143
|
};
|
|
124
144
|
const uk = {
|
|
125
145
|
chooseLanguage: "Оберіть мову",
|
|
@@ -143,5 +163,9 @@ const uk = {
|
|
|
143
163
|
ofTotal: (d, t) => `${d} з ${t} надруковано`,
|
|
144
164
|
auctionLetterMissing: "Немає аукціонного листа",
|
|
145
165
|
printDialogHint: "Порада: увімкніть кіоск-режим для безшумного друку.",
|
|
166
|
+
confirmPrintedTitle: "Накладна надрукована?",
|
|
167
|
+
confirmPrintedBody: "Підтвердіть, що накладна та аукціонний лист (за наявності) надруковано коректно. Лише тоді замовлення позначається як надруковане.",
|
|
168
|
+
confirmYes: "Так, надруковано",
|
|
169
|
+
confirmNo: "Ні, скасувати",
|
|
146
170
|
};
|
|
147
171
|
export const PICKSTATION_DICT = { nl, pl, ro, bg, uk, en };
|
|
@@ -1,7 +1,7 @@
|
|
|
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(
|
|
4
|
+
export declare function fetchFloridayAuctionLetterPdf(_orderId: string): Promise<{
|
|
5
5
|
base64: string;
|
|
6
6
|
mime: string;
|
|
7
7
|
} | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pickstationOrders.server.d.ts","sourceRoot":"","sources":["../../src/lib/pickstationOrders.server.ts"],"names":[],"mappings":"
|
|
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;AAgO5E,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAkO/E;AAED,wBAAsB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,IAAI,CAAC,CAER;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,CA2Bf"}
|