@flowselections/floriday-afhandeling-module 1.0.40 → 1.0.41
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/ControleLijstPrint.js +54 -54
- package/dist-lib/components/afhandeling/ControlePage.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/ControlePage.js +36 -2
- package/dist-lib/components/afhandeling/DagDetailDialog.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/DagDetailDialog.js +3 -2
- package/dist-lib/components/afhandeling/WeekAgendaView.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/WeekAgendaView.js +38 -45
- package/dist-lib/components/pickstation/PakbonTemplate.js +70 -70
- package/dist-lib/hooks/useCartIndex.d.ts +11 -0
- package/dist-lib/hooks/useCartIndex.d.ts.map +1 -0
- package/dist-lib/hooks/useCartIndex.js +56 -0
- package/dist-lib/hooks/useConsistencyCheck.d.ts +8 -0
- package/dist-lib/hooks/useConsistencyCheck.d.ts.map +1 -0
- package/dist-lib/hooks/useConsistencyCheck.js +22 -0
- package/dist-lib/hooks/useOrderPlanning.d.ts.map +1 -1
- package/dist-lib/hooks/useOrderPlanning.js +6 -2
- package/dist-lib/hooks/usePickAgenda.d.ts +32 -0
- package/dist-lib/hooks/usePickAgenda.d.ts.map +1 -0
- package/dist-lib/hooks/usePickAgenda.js +75 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +164 -1
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +164 -1
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/moduleClient.d.ts +164 -1
- package/dist-lib/integrations/supabase/moduleClient.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +164 -1
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/afhandelingSettings.functions.d.ts +330 -4
- package/dist-lib/lib/afhandelingSettings.functions.d.ts.map +1 -1
- package/dist-lib/lib/carrierSignupMail.server.js +26 -26
- package/dist-lib/lib/carriers.functions.d.ts +820 -5
- package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
- package/dist-lib/lib/cartAssignments.functions.d.ts +820 -5
- package/dist-lib/lib/cartAssignments.functions.d.ts.map +1 -1
- package/dist-lib/lib/cartControl.functions.d.ts +1743 -124
- package/dist-lib/lib/cartControl.functions.d.ts.map +1 -1
- package/dist-lib/lib/cartControl.functions.js +92 -127
- package/dist-lib/lib/floriday.functions.d.ts +165 -2
- package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,6 @@ function toIso(d) {
|
|
|
7
7
|
const day = String(d.getDate()).padStart(2, "0");
|
|
8
8
|
return `${y}-${m}-${day}`;
|
|
9
9
|
}
|
|
10
|
-
const APPROVED_STATUSES = new Set(["ready", "shipped", "delivered"]);
|
|
11
10
|
async function loadControlPlanningSettings(supabase, userId) {
|
|
12
11
|
const { data: settings } = await supabase
|
|
13
12
|
.from("afhandeling_settings")
|
|
@@ -20,126 +19,101 @@ async function loadControlPlanningSettings(supabase, userId) {
|
|
|
20
19
|
const minWorkdays = Math.max(0, Number(settings?.pick_days_before_transport ?? 1));
|
|
21
20
|
return { pickWeekdays, minWorkdays };
|
|
22
21
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
* De Engine is leidend: alleen orders met een `load.compose`-taak waarvan
|
|
27
|
-
* `planned_start` vandaag (Europe/Amsterdam) valt, staan op de controlelijst,
|
|
28
|
-
* en het aantal karren komt uit `payload.loadCarriers` — nooit meer uit de
|
|
29
|
-
* eigen stuks/fust-berekening.
|
|
30
|
-
*/
|
|
31
|
-
function amsterdamDay(iso) {
|
|
32
|
-
if (!iso)
|
|
33
|
-
return null;
|
|
34
|
-
const d = new Date(iso);
|
|
35
|
-
if (Number.isNaN(d.getTime()))
|
|
36
|
-
return null;
|
|
37
|
-
return new Intl.DateTimeFormat("en-CA", {
|
|
38
|
-
timeZone: "Europe/Amsterdam",
|
|
39
|
-
year: "numeric",
|
|
40
|
-
month: "2-digit",
|
|
41
|
-
day: "2-digit",
|
|
42
|
-
}).format(d);
|
|
22
|
+
export function controlCartKey(cart) {
|
|
23
|
+
return cart.cartNumberId ?? `${cart.orderSource}#${cart.orderId}#${cart.cartIndex}`;
|
|
43
24
|
}
|
|
44
|
-
async function
|
|
45
|
-
const
|
|
46
|
-
const { data, error } = await supabase
|
|
47
|
-
.from("logistics_tasks")
|
|
48
|
-
.select("order_ref, payload, planned_start, sequence, status")
|
|
49
|
-
.eq("owner_module", "afhandeling")
|
|
50
|
-
.eq("task_type", "load.compose")
|
|
51
|
-
.in("status", ["planned", "ready", "in_progress"])
|
|
52
|
-
.limit(1000);
|
|
25
|
+
async function loadControlCarts(supabase) {
|
|
26
|
+
const { data, error } = await supabase.rpc("control_get_todays_carts");
|
|
53
27
|
if (error)
|
|
54
28
|
throw new Error(error.message);
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
29
|
+
const rows = (data ?? []);
|
|
30
|
+
if (rows.length === 0)
|
|
31
|
+
return [];
|
|
32
|
+
// --- Verrijking 1: ordergegevens ---
|
|
33
|
+
const orderIds = Array.from(new Set(rows.map((r) => r.order_id).filter(Boolean)));
|
|
34
|
+
const orderMap = new Map();
|
|
35
|
+
if (orderIds.length > 0) {
|
|
36
|
+
const { data: orderRows } = await supabase
|
|
37
|
+
.from("orders")
|
|
38
|
+
.select("id, order_number, customer_name, delivery_date")
|
|
39
|
+
.in("id", orderIds);
|
|
40
|
+
for (const o of (orderRows ?? [])) {
|
|
41
|
+
orderMap.set(o.id, {
|
|
42
|
+
orderNumber: o.order_number ?? "",
|
|
43
|
+
customerName: o.customer_name ?? "",
|
|
44
|
+
deliveryDate: o.delivery_date ?? null,
|
|
71
45
|
});
|
|
72
46
|
}
|
|
73
47
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const orderNumbers = Array.from(new Set([o.orderNumber, ...refs].filter((v) => Boolean(v))));
|
|
90
|
-
if (orderNumbers.length > 1) {
|
|
91
|
-
// Kar met meerdere orders: maar één regel tonen.
|
|
92
|
-
const key = `${[...orderNumbers].sort().join("|")}#${o.cartIndex}`;
|
|
93
|
-
if (seenSharedCarts.has(key))
|
|
94
|
-
continue;
|
|
95
|
-
seenSharedCarts.add(key);
|
|
48
|
+
const extras = new Map();
|
|
49
|
+
try {
|
|
50
|
+
const { loadTodaysPickstationOrders } = await import("./pickstationOrders.server");
|
|
51
|
+
const psOrders = await loadTodaysPickstationOrders();
|
|
52
|
+
for (const o of psOrders) {
|
|
53
|
+
extras.set(`${o.orderId}#${o.cartIndex - 1}`, {
|
|
54
|
+
cartNumber: o.cartNumber,
|
|
55
|
+
carrierName: o.carrierName,
|
|
56
|
+
pickupDate: o.pickupDate,
|
|
57
|
+
pickupTime: o.pickupTime,
|
|
58
|
+
country: o.country,
|
|
59
|
+
cratesOnCart: o.cratesOnCart,
|
|
60
|
+
printedCount: o.printedCount,
|
|
61
|
+
orderNumbers: o.orderNumber ? [o.orderNumber] : [],
|
|
62
|
+
});
|
|
96
63
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
// Verrijking is optioneel: zonder deze gegevens blijft de kar zichtbaar.
|
|
67
|
+
}
|
|
68
|
+
const carts = [];
|
|
69
|
+
const seen = new Set();
|
|
70
|
+
for (const r of rows) {
|
|
71
|
+
const orderSource = (r.order_source ?? "manual");
|
|
72
|
+
const cartNumberId = r.cart_number_id ?? null;
|
|
73
|
+
const key = controlCartKey({
|
|
74
|
+
cartNumberId,
|
|
75
|
+
orderSource,
|
|
76
|
+
orderId: r.order_id,
|
|
77
|
+
cartIndex: r.cart_index,
|
|
78
|
+
});
|
|
79
|
+
if (seen.has(key))
|
|
80
|
+
continue;
|
|
81
|
+
seen.add(key);
|
|
82
|
+
const order = orderMap.get(r.order_id);
|
|
83
|
+
const extra = extras.get(`${r.order_id}#${r.cart_index}`) ??
|
|
84
|
+
extras.get(`${r.order_id}#${r.cart_index - 1}`);
|
|
85
|
+
const orderNumber = order?.orderNumber ?? "";
|
|
86
|
+
const orderNumbers = Array.from(new Set([orderNumber, ...(extra?.orderNumbers ?? [])].filter(Boolean)));
|
|
87
|
+
carts.push({
|
|
88
|
+
cartNumberId,
|
|
89
|
+
cartNumber: r.cart_number ?? extra?.cartNumber ?? null,
|
|
90
|
+
orderId: r.order_id,
|
|
91
|
+
orderSource,
|
|
92
|
+
cartIndex: r.cart_index,
|
|
93
|
+
orderNumber,
|
|
103
94
|
orderNumbers,
|
|
104
|
-
customerName:
|
|
105
|
-
carrierName:
|
|
106
|
-
deliveryDate:
|
|
107
|
-
pickupDate:
|
|
108
|
-
pickupTime:
|
|
109
|
-
country:
|
|
110
|
-
cratesOnCart:
|
|
111
|
-
pickDate:
|
|
112
|
-
printedCount:
|
|
113
|
-
|
|
95
|
+
customerName: order?.customerName ?? "",
|
|
96
|
+
carrierName: extra?.carrierName ?? null,
|
|
97
|
+
deliveryDate: order?.deliveryDate ?? null,
|
|
98
|
+
pickupDate: extra?.pickupDate ?? null,
|
|
99
|
+
pickupTime: extra?.pickupTime ?? null,
|
|
100
|
+
country: extra?.country ?? null,
|
|
101
|
+
cratesOnCart: extra?.cratesOnCart ?? null,
|
|
102
|
+
pickDate: r.pick_date,
|
|
103
|
+
printedCount: r.printed_today ? Math.max(1, extra?.printedCount ?? 1) : 0,
|
|
104
|
+
printedToday: Boolean(r.printed_today),
|
|
105
|
+
printedAt: r.printed_at ?? null,
|
|
106
|
+
status: r.status ?? "pending",
|
|
114
107
|
});
|
|
115
108
|
}
|
|
116
|
-
return
|
|
109
|
+
return carts;
|
|
117
110
|
}
|
|
118
|
-
/** Haal alle karren op die vandaag
|
|
111
|
+
/** Haal alle karren op die vandaag gecontroleerd moeten worden (RPC is leidend). */
|
|
119
112
|
export const getTodaysControlCarts = createServerFn({ method: "GET" })
|
|
120
113
|
.middleware([requireSupabaseAuth])
|
|
121
114
|
.handler(async ({ context }) => {
|
|
122
115
|
const supabase = context.supabase;
|
|
123
|
-
const
|
|
124
|
-
const carts = orders.map((o) => ({
|
|
125
|
-
cartNumberId: null, // will be resolved below via cart_numbers lookup
|
|
126
|
-
cartNumber: o.cartNumber,
|
|
127
|
-
orderId: o.orderId,
|
|
128
|
-
orderSource: o.orderSource,
|
|
129
|
-
cartIndex: o.cartIndex - 1, // pickstation uses 1-based, DB is 0-based
|
|
130
|
-
orderNumber: o.orderNumber,
|
|
131
|
-
orderNumbers: o.orderNumbers,
|
|
132
|
-
customerName: o.customerName,
|
|
133
|
-
carrierName: o.carrierName,
|
|
134
|
-
deliveryDate: o.deliveryDate,
|
|
135
|
-
pickupDate: o.pickupDate,
|
|
136
|
-
pickupTime: o.pickupTime,
|
|
137
|
-
country: o.country,
|
|
138
|
-
cratesOnCart: o.cratesOnCart,
|
|
139
|
-
pickDate: o.pickDate,
|
|
140
|
-
printedCount: o.printedCount,
|
|
141
|
-
status: o.status,
|
|
142
|
-
}));
|
|
116
|
+
const carts = await loadControlCarts(supabase);
|
|
143
117
|
return { carts };
|
|
144
118
|
});
|
|
145
119
|
export const getControlRescheduleProposals = createServerFn({ method: "POST" })
|
|
@@ -147,13 +121,13 @@ export const getControlRescheduleProposals = createServerFn({ method: "POST" })
|
|
|
147
121
|
.inputValidator((d) => d)
|
|
148
122
|
.handler(async ({ data, context }) => {
|
|
149
123
|
const supabase = context.supabase;
|
|
150
|
-
const pendingOrders = await
|
|
124
|
+
const pendingOrders = await loadControlCarts(supabase);
|
|
151
125
|
const { pickWeekdays, minWorkdays } = await loadControlPlanningSettings(supabase, context.userId);
|
|
152
126
|
const checkedSet = new Set(data.checkedCartKeys);
|
|
153
127
|
const proposals = [];
|
|
154
128
|
const blocked = [];
|
|
155
129
|
for (const o of pendingOrders) {
|
|
156
|
-
const key =
|
|
130
|
+
const key = controlCartKey(o);
|
|
157
131
|
if (checkedSet.has(key))
|
|
158
132
|
continue;
|
|
159
133
|
const currentIso = o.pickDate || toIso(new Date());
|
|
@@ -181,11 +155,11 @@ export const getControlRescheduleProposals = createServerFn({ method: "POST" })
|
|
|
181
155
|
}
|
|
182
156
|
else {
|
|
183
157
|
blocked.push({
|
|
184
|
-
cartNumberId:
|
|
158
|
+
cartNumberId: o.cartNumberId,
|
|
185
159
|
cartNumber: o.cartNumber,
|
|
186
160
|
orderId: o.orderId,
|
|
187
161
|
orderSource: o.orderSource,
|
|
188
|
-
cartIndex: o.cartIndex
|
|
162
|
+
cartIndex: o.cartIndex,
|
|
189
163
|
orderNumber: o.orderNumber,
|
|
190
164
|
customerName: o.customerName,
|
|
191
165
|
carrierName: o.carrierName,
|
|
@@ -202,8 +176,8 @@ export const submitControlSession = createServerFn({ method: "POST" })
|
|
|
202
176
|
.inputValidator((d) => d)
|
|
203
177
|
.handler(async ({ data, context }) => {
|
|
204
178
|
const supabase = context.supabase;
|
|
205
|
-
// 1) Laad
|
|
206
|
-
const pendingOrders = await
|
|
179
|
+
// 1) Laad exact dezelfde karren als het scherm toont (RPC is leidend)
|
|
180
|
+
const pendingOrders = await loadControlCarts(supabase);
|
|
207
181
|
const { pickWeekdays, minWorkdays } = await loadControlPlanningSettings(supabase, context.userId);
|
|
208
182
|
// 2) Maak sessie aan
|
|
209
183
|
const { data: session, error: sessErr } = await supabase
|
|
@@ -224,25 +198,16 @@ export const submitControlSession = createServerFn({ method: "POST" })
|
|
|
224
198
|
const rescheduled = [];
|
|
225
199
|
const blocked = [];
|
|
226
200
|
let checkedCount = 0;
|
|
227
|
-
// Lookup cart_numbers row ids
|
|
228
|
-
const { data: cnRows } = await supabase
|
|
229
|
-
.from("cart_numbers")
|
|
230
|
-
.select("id, order_source, order_id, cart_index")
|
|
231
|
-
.in("order_id", Array.from(new Set(pendingOrders.map((o) => o.orderId))));
|
|
232
|
-
const cnMap = new Map();
|
|
233
|
-
for (const r of (cnRows ?? [])) {
|
|
234
|
-
cnMap.set(`${r.order_source}#${r.order_id}#${r.cart_index}`, r.id);
|
|
235
|
-
}
|
|
236
201
|
for (const o of pendingOrders) {
|
|
237
|
-
const key =
|
|
238
|
-
const cartNumberId =
|
|
202
|
+
const key = controlCartKey(o);
|
|
203
|
+
const cartNumberId = o.cartNumberId;
|
|
239
204
|
const baseFields = {
|
|
240
205
|
session_id: session.id,
|
|
241
206
|
cart_number_id: cartNumberId,
|
|
242
207
|
cart_number_label: o.cartNumber,
|
|
243
208
|
order_id: o.orderId,
|
|
244
209
|
order_source: o.orderSource,
|
|
245
|
-
cart_index: o.cartIndex
|
|
210
|
+
cart_index: o.cartIndex,
|
|
246
211
|
order_number: o.orderNumber,
|
|
247
212
|
customer_name: o.customerName,
|
|
248
213
|
carrier_name: o.carrierName,
|
|
@@ -254,7 +219,7 @@ export const submitControlSession = createServerFn({ method: "POST" })
|
|
|
254
219
|
await supabase.rpc("pickstation_set_cart_status", {
|
|
255
220
|
p_order_source: o.orderSource,
|
|
256
221
|
p_order_id: o.orderId,
|
|
257
|
-
p_cart_index: o.cartIndex
|
|
222
|
+
p_cart_index: o.cartIndex,
|
|
258
223
|
p_status: "ready",
|
|
259
224
|
});
|
|
260
225
|
items.push({ ...baseFields, action: "checked" });
|
|
@@ -278,7 +243,7 @@ export const submitControlSession = createServerFn({ method: "POST" })
|
|
|
278
243
|
.upsert({
|
|
279
244
|
order_id: o.orderId,
|
|
280
245
|
order_source: o.orderSource,
|
|
281
|
-
cart_index: o.cartIndex
|
|
246
|
+
cart_index: o.cartIndex,
|
|
282
247
|
pick_date: newIso,
|
|
283
248
|
moved_from_date: toIso(new Date()),
|
|
284
249
|
}, { onConflict: "order_id,order_source,cart_index" });
|
|
@@ -309,7 +274,7 @@ export const submitControlSession = createServerFn({ method: "POST" })
|
|
|
309
274
|
cartNumber: o.cartNumber,
|
|
310
275
|
orderId: o.orderId,
|
|
311
276
|
orderSource: o.orderSource,
|
|
312
|
-
cartIndex: o.cartIndex
|
|
277
|
+
cartIndex: o.cartIndex,
|
|
313
278
|
orderNumber: o.orderNumber,
|
|
314
279
|
customerName: o.customerName,
|
|
315
280
|
carrierName: o.carrierName,
|
|
@@ -185,7 +185,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
185
185
|
id?: string;
|
|
186
186
|
linked_data?: import("../integrations/supabase/types").Json;
|
|
187
187
|
location?: string | null;
|
|
188
|
-
notes
|
|
188
|
+
notes? /** Ondergrens leverdatum (YYYY-MM-DD). */: string | null;
|
|
189
189
|
recurrence?: string | null;
|
|
190
190
|
reminders?: import("../integrations/supabase/types").Json;
|
|
191
191
|
source_id?: string | null;
|
|
@@ -13708,6 +13708,9 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
13708
13708
|
is_herprint: boolean;
|
|
13709
13709
|
kopieen: number;
|
|
13710
13710
|
layout_id: string | null;
|
|
13711
|
+
lokaal_opgeslagen_op: string | null;
|
|
13712
|
+
lokale_pdf_fout: string | null;
|
|
13713
|
+
lokale_pdf_status: string | null;
|
|
13711
13714
|
opgepakt_op: string | null;
|
|
13712
13715
|
paginas: number;
|
|
13713
13716
|
payload: import("../integrations/supabase/types").Json;
|
|
@@ -13716,6 +13719,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
13716
13719
|
pogingen: number;
|
|
13717
13720
|
printer_id: string | null;
|
|
13718
13721
|
render_html: string | null;
|
|
13722
|
+
resultaat_pdf_base64: string | null;
|
|
13719
13723
|
status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
|
|
13720
13724
|
updated_at: string;
|
|
13721
13725
|
volgende_poging: string | null;
|
|
@@ -13740,6 +13744,9 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
13740
13744
|
is_herprint?: boolean;
|
|
13741
13745
|
kopieen?: number;
|
|
13742
13746
|
layout_id?: string | null;
|
|
13747
|
+
lokaal_opgeslagen_op?: string | null;
|
|
13748
|
+
lokale_pdf_fout?: string | null;
|
|
13749
|
+
lokale_pdf_status?: string | null;
|
|
13743
13750
|
opgepakt_op?: string | null;
|
|
13744
13751
|
paginas?: number;
|
|
13745
13752
|
payload?: import("../integrations/supabase/types").Json;
|
|
@@ -13748,6 +13755,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
13748
13755
|
pogingen?: number;
|
|
13749
13756
|
printer_id?: string | null;
|
|
13750
13757
|
render_html?: string | null;
|
|
13758
|
+
resultaat_pdf_base64?: string | null;
|
|
13751
13759
|
status?: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
|
|
13752
13760
|
updated_at?: string;
|
|
13753
13761
|
volgende_poging?: string | null;
|
|
@@ -13772,6 +13780,9 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
13772
13780
|
is_herprint?: boolean;
|
|
13773
13781
|
kopieen?: number;
|
|
13774
13782
|
layout_id?: string | null;
|
|
13783
|
+
lokaal_opgeslagen_op?: string | null;
|
|
13784
|
+
lokale_pdf_fout?: string | null;
|
|
13785
|
+
lokale_pdf_status?: string | null;
|
|
13775
13786
|
opgepakt_op?: string | null;
|
|
13776
13787
|
paginas?: number;
|
|
13777
13788
|
payload?: import("../integrations/supabase/types").Json;
|
|
@@ -13780,6 +13791,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
13780
13791
|
pogingen?: number;
|
|
13781
13792
|
printer_id?: string | null;
|
|
13782
13793
|
render_html?: string | null;
|
|
13794
|
+
resultaat_pdf_base64?: string | null;
|
|
13783
13795
|
status?: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
|
|
13784
13796
|
updated_at?: string;
|
|
13785
13797
|
volgende_poging?: string | null;
|
|
@@ -14170,6 +14182,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
14170
14182
|
ondersteunde_laden: import("../integrations/supabase/types").Json | null;
|
|
14171
14183
|
online: boolean;
|
|
14172
14184
|
papierformaat: string;
|
|
14185
|
+
pdf_map: string | null;
|
|
14173
14186
|
poort: number | null;
|
|
14174
14187
|
soort: import("../integrations/supabase/types").Database["public"]["Enums"]["printer_kind"];
|
|
14175
14188
|
systeemnaam: string;
|
|
@@ -14195,6 +14208,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
14195
14208
|
ondersteunde_laden?: import("../integrations/supabase/types").Json | null;
|
|
14196
14209
|
online?: boolean;
|
|
14197
14210
|
papierformaat?: string;
|
|
14211
|
+
pdf_map?: string | null;
|
|
14198
14212
|
poort?: number | null;
|
|
14199
14213
|
soort?: import("../integrations/supabase/types").Database["public"]["Enums"]["printer_kind"];
|
|
14200
14214
|
systeemnaam?: string;
|
|
@@ -14220,6 +14234,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
14220
14234
|
ondersteunde_laden?: import("../integrations/supabase/types").Json | null;
|
|
14221
14235
|
online?: boolean;
|
|
14222
14236
|
papierformaat?: string;
|
|
14237
|
+
pdf_map?: string | null;
|
|
14223
14238
|
poort?: number | null;
|
|
14224
14239
|
soort?: import("../integrations/supabase/types").Database["public"]["Enums"]["printer_kind"];
|
|
14225
14240
|
systeemnaam?: string;
|
|
@@ -20476,6 +20491,9 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
20476
20491
|
is_herprint: boolean;
|
|
20477
20492
|
kopieen: number;
|
|
20478
20493
|
layout_id: string | null;
|
|
20494
|
+
lokaal_opgeslagen_op: string | null;
|
|
20495
|
+
lokale_pdf_fout: string | null;
|
|
20496
|
+
lokale_pdf_status: string | null;
|
|
20479
20497
|
opgepakt_op: string | null;
|
|
20480
20498
|
paginas: number;
|
|
20481
20499
|
payload: import("../integrations/supabase/types").Json;
|
|
@@ -20484,6 +20502,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
20484
20502
|
pogingen: number;
|
|
20485
20503
|
printer_id: string | null;
|
|
20486
20504
|
render_html: string | null;
|
|
20505
|
+
resultaat_pdf_base64: string | null;
|
|
20487
20506
|
status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
|
|
20488
20507
|
updated_at: string;
|
|
20489
20508
|
volgende_poging: string | null;
|
|
@@ -20575,6 +20594,53 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
20575
20594
|
isSetofReturn: true;
|
|
20576
20595
|
};
|
|
20577
20596
|
};
|
|
20597
|
+
claim_pdf_print_jobs: {
|
|
20598
|
+
Args: {
|
|
20599
|
+
_max?: number;
|
|
20600
|
+
};
|
|
20601
|
+
Returns: {
|
|
20602
|
+
agent_id: string | null;
|
|
20603
|
+
bron_job_id: string | null;
|
|
20604
|
+
created_at: string;
|
|
20605
|
+
documentnaam: string;
|
|
20606
|
+
documenttype: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
|
|
20607
|
+
extern_job_id: string | null;
|
|
20608
|
+
foutmelding: string | null;
|
|
20609
|
+
gebruiker_id: string | null;
|
|
20610
|
+
gebruiker_naam: string;
|
|
20611
|
+
gebruikte_bron: string | null;
|
|
20612
|
+
gebruikte_layout_id: string | null;
|
|
20613
|
+
gestart_op: string | null;
|
|
20614
|
+
herkomst: string | null;
|
|
20615
|
+
id: string;
|
|
20616
|
+
idempotentie_sleutel: string | null;
|
|
20617
|
+
is_herprint: boolean;
|
|
20618
|
+
kopieen: number;
|
|
20619
|
+
layout_id: string | null;
|
|
20620
|
+
lokaal_opgeslagen_op: string | null;
|
|
20621
|
+
lokale_pdf_fout: string | null;
|
|
20622
|
+
lokale_pdf_status: string | null;
|
|
20623
|
+
opgepakt_op: string | null;
|
|
20624
|
+
paginas: number;
|
|
20625
|
+
payload: import("../integrations/supabase/types").Json;
|
|
20626
|
+
pdf_base64: string | null;
|
|
20627
|
+
pdf_url: string | null;
|
|
20628
|
+
pogingen: number;
|
|
20629
|
+
printer_id: string | null;
|
|
20630
|
+
render_html: string | null;
|
|
20631
|
+
resultaat_pdf_base64: string | null;
|
|
20632
|
+
status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
|
|
20633
|
+
updated_at: string;
|
|
20634
|
+
volgende_poging: string | null;
|
|
20635
|
+
voltooid_op: string | null;
|
|
20636
|
+
}[];
|
|
20637
|
+
SetofOptions: {
|
|
20638
|
+
from: "*";
|
|
20639
|
+
to: "print_jobs";
|
|
20640
|
+
isOneToOne: false;
|
|
20641
|
+
isSetofReturn: true;
|
|
20642
|
+
};
|
|
20643
|
+
};
|
|
20578
20644
|
claim_print_jobs: {
|
|
20579
20645
|
Args: {
|
|
20580
20646
|
_agent_id: string;
|
|
@@ -20599,6 +20665,9 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
20599
20665
|
is_herprint: boolean;
|
|
20600
20666
|
kopieen: number;
|
|
20601
20667
|
layout_id: string | null;
|
|
20668
|
+
lokaal_opgeslagen_op: string | null;
|
|
20669
|
+
lokale_pdf_fout: string | null;
|
|
20670
|
+
lokale_pdf_status: string | null;
|
|
20602
20671
|
opgepakt_op: string | null;
|
|
20603
20672
|
paginas: number;
|
|
20604
20673
|
payload: import("../integrations/supabase/types").Json;
|
|
@@ -20607,6 +20676,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
20607
20676
|
pogingen: number;
|
|
20608
20677
|
printer_id: string | null;
|
|
20609
20678
|
render_html: string | null;
|
|
20679
|
+
resultaat_pdf_base64: string | null;
|
|
20610
20680
|
status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
|
|
20611
20681
|
updated_at: string;
|
|
20612
20682
|
volgende_poging: string | null;
|
|
@@ -20747,6 +20817,8 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
20747
20817
|
order_id: string;
|
|
20748
20818
|
order_source: string;
|
|
20749
20819
|
pick_date: string;
|
|
20820
|
+
printed_at: string;
|
|
20821
|
+
printed_today: boolean;
|
|
20750
20822
|
status: string;
|
|
20751
20823
|
}[];
|
|
20752
20824
|
};
|
|
@@ -21455,6 +21527,10 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
21455
21527
|
};
|
|
21456
21528
|
Returns: number;
|
|
21457
21529
|
};
|
|
21530
|
+
logistics_cancel_orphan_tasks: {
|
|
21531
|
+
Args: never;
|
|
21532
|
+
Returns: number;
|
|
21533
|
+
};
|
|
21458
21534
|
logistics_capacity_day_check: {
|
|
21459
21535
|
Args: {
|
|
21460
21536
|
p_from?: string;
|
|
@@ -21475,6 +21551,25 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
21475
21551
|
};
|
|
21476
21552
|
Returns: number;
|
|
21477
21553
|
};
|
|
21554
|
+
logistics_cart_index: {
|
|
21555
|
+
Args: {
|
|
21556
|
+
p_from?: string;
|
|
21557
|
+
p_to?: string;
|
|
21558
|
+
};
|
|
21559
|
+
Returns: {
|
|
21560
|
+
cart_id: string;
|
|
21561
|
+
cart_index: number;
|
|
21562
|
+
cart_label: string;
|
|
21563
|
+
is_shared: boolean;
|
|
21564
|
+
order_number: string;
|
|
21565
|
+
order_source: string;
|
|
21566
|
+
order_uuid: string;
|
|
21567
|
+
pick_date: string;
|
|
21568
|
+
printed_at: string;
|
|
21569
|
+
shifted: boolean;
|
|
21570
|
+
task_status: string;
|
|
21571
|
+
}[];
|
|
21572
|
+
};
|
|
21478
21573
|
logistics_check_order_allowed: {
|
|
21479
21574
|
Args: {
|
|
21480
21575
|
p_lines: import("../integrations/supabase/types").Json;
|
|
@@ -21623,6 +21718,17 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
21623
21718
|
isSetofReturn: false;
|
|
21624
21719
|
};
|
|
21625
21720
|
};
|
|
21721
|
+
logistics_consistency_check: {
|
|
21722
|
+
Args: never;
|
|
21723
|
+
Returns: {
|
|
21724
|
+
agenda_carts: number;
|
|
21725
|
+
control_carts: number;
|
|
21726
|
+
ok: boolean;
|
|
21727
|
+
orphan_tasks: number;
|
|
21728
|
+
pick_date: string;
|
|
21729
|
+
raw_carts: number;
|
|
21730
|
+
}[];
|
|
21731
|
+
};
|
|
21626
21732
|
logistics_delay_customer_email: {
|
|
21627
21733
|
Args: {
|
|
21628
21734
|
p_customer: string;
|
|
@@ -21816,6 +21922,25 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
21816
21922
|
};
|
|
21817
21923
|
Returns: number;
|
|
21818
21924
|
};
|
|
21925
|
+
logistics_order_overview: {
|
|
21926
|
+
Args: {
|
|
21927
|
+
p_from?: string;
|
|
21928
|
+
p_to?: string;
|
|
21929
|
+
};
|
|
21930
|
+
Returns: {
|
|
21931
|
+
cart_count: number;
|
|
21932
|
+
customer_name: string;
|
|
21933
|
+
delivery_date: string;
|
|
21934
|
+
order_number: string;
|
|
21935
|
+
order_source: string;
|
|
21936
|
+
order_uuid: string;
|
|
21937
|
+
pick_date: string;
|
|
21938
|
+
plant_count: number;
|
|
21939
|
+
printed_at: string;
|
|
21940
|
+
shifted: boolean;
|
|
21941
|
+
status: string;
|
|
21942
|
+
}[];
|
|
21943
|
+
};
|
|
21819
21944
|
logistics_order_pick_day: {
|
|
21820
21945
|
Args: {
|
|
21821
21946
|
p_order_ref: string;
|
|
@@ -21828,6 +21953,22 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
21828
21953
|
};
|
|
21829
21954
|
Returns: string;
|
|
21830
21955
|
};
|
|
21956
|
+
logistics_pick_agenda: {
|
|
21957
|
+
Args: {
|
|
21958
|
+
p_from?: string;
|
|
21959
|
+
p_to?: string;
|
|
21960
|
+
};
|
|
21961
|
+
Returns: {
|
|
21962
|
+
cart_count: number;
|
|
21963
|
+
in_preparation: number;
|
|
21964
|
+
order_count: number;
|
|
21965
|
+
orders: import("../integrations/supabase/types").Json;
|
|
21966
|
+
pick_date: string;
|
|
21967
|
+
plant_count: number;
|
|
21968
|
+
ready: number;
|
|
21969
|
+
shifted_count: number;
|
|
21970
|
+
}[];
|
|
21971
|
+
};
|
|
21831
21972
|
logistics_pick_email_purpose: {
|
|
21832
21973
|
Args: never;
|
|
21833
21974
|
Returns: string;
|
|
@@ -21987,6 +22128,15 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
21987
22128
|
};
|
|
21988
22129
|
Returns: import("../integrations/supabase/types").Json;
|
|
21989
22130
|
};
|
|
22131
|
+
logistics_resolve_pick_document: {
|
|
22132
|
+
Args: {
|
|
22133
|
+
_is_herprint: boolean;
|
|
22134
|
+
_queue_item_id: string;
|
|
22135
|
+
_session_id: string;
|
|
22136
|
+
_voorbeeld: boolean;
|
|
22137
|
+
};
|
|
22138
|
+
Returns: import("../integrations/supabase/types").Json;
|
|
22139
|
+
};
|
|
21990
22140
|
logistics_resolve_settings: {
|
|
21991
22141
|
Args: {
|
|
21992
22142
|
p_config_id: string;
|
|
@@ -22441,6 +22591,13 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
22441
22591
|
};
|
|
22442
22592
|
Returns: import("../integrations/supabase/types").Json;
|
|
22443
22593
|
};
|
|
22594
|
+
pick_preview_job: {
|
|
22595
|
+
Args: {
|
|
22596
|
+
_queue_item_id: string;
|
|
22597
|
+
_station_slug: string;
|
|
22598
|
+
};
|
|
22599
|
+
Returns: import("../integrations/supabase/types").Json;
|
|
22600
|
+
};
|
|
22444
22601
|
pick_print_job_status: {
|
|
22445
22602
|
Args: {
|
|
22446
22603
|
_job_id: string;
|
|
@@ -22790,6 +22947,12 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
22790
22947
|
};
|
|
22791
22948
|
Returns: string;
|
|
22792
22949
|
};
|
|
22950
|
+
resolve_print_job_printer_id: {
|
|
22951
|
+
Args: {
|
|
22952
|
+
_job: import("../integrations/supabase/types").Database["public"]["Tables"]["print_jobs"]["Row"];
|
|
22953
|
+
};
|
|
22954
|
+
Returns: string;
|
|
22955
|
+
};
|
|
22793
22956
|
resolve_product_id_for_item: {
|
|
22794
22957
|
Args: {
|
|
22795
22958
|
p_product_name: string;
|
|
@@ -23381,7 +23544,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
|
|
|
23381
23544
|
};
|
|
23382
23545
|
CompositeTypes: { [_ in never]: never; };
|
|
23383
23546
|
}, {
|
|
23384
|
-
PostgrestVersion: "14.
|
|
23547
|
+
PostgrestVersion: "14.5";
|
|
23385
23548
|
}>;
|
|
23386
23549
|
userId: string;
|
|
23387
23550
|
claims: import("@supabase/auth-js").JwtPayload;
|