@flowselections/floriday-verkoop-module 1.0.53 → 1.0.55
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/verkoop/OrderKarindelingCard.d.ts.map +1 -1
- package/dist-lib/components/verkoop/OrderKarindelingCard.js +68 -183
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +42 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +42 -0
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +42 -0
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +42 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/cart-lock.functions.d.ts +42 -0
- package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
- package/dist-lib/lib/cart-planning-settings.functions.d.ts +462 -0
- package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -1
- package/dist-lib/lib/cart-replan.functions.d.ts +141 -23
- package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
- package/dist-lib/lib/cart-replan.functions.js +111 -15
- package/dist-lib/lib/create-order.functions.d.ts +714 -0
- package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +126 -0
- package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +42 -0
- package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-mirror.functions.d.ts +42 -0
- package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-public.functions.d.ts +294 -0
- package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-writes.functions.d.ts +210 -0
- package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
- package/dist-lib/lib/invoice-timing.functions.d.ts +168 -0
- package/dist-lib/lib/invoice-timing.functions.d.ts.map +1 -1
- package/dist-lib/lib/invoice-timing.functions.js +12 -6
- package/dist-lib/lib/load-carriers.functions.d.ts +42 -0
- package/dist-lib/lib/load-carriers.functions.d.ts.map +1 -1
- package/dist-lib/lib/logistics-engine.functions.d.ts +210 -0
- package/dist-lib/lib/logistics-engine.functions.d.ts.map +1 -1
- package/dist-lib/lib/logistics-engine.functions.js +10 -5
- package/dist-lib/lib/logistics-stock.functions.d.ts +84 -0
- package/dist-lib/lib/logistics-stock.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-addresses.functions.d.ts +42 -0
- package/dist-lib/lib/order-addresses.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-addresses.functions.js +15 -9
- package/dist-lib/lib/order-buffers.functions.d.ts +126 -0
- package/dist-lib/lib/order-buffers.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-buffers.functions.js +10 -10
- package/dist-lib/lib/order-carrier.functions.d.ts +84 -0
- package/dist-lib/lib/order-carrier.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-carrier.functions.js +20 -11
- package/dist-lib/lib/order-pickup.functions.d.ts +84 -0
- package/dist-lib/lib/order-pickup.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-pickup.functions.js +20 -11
- package/dist-lib/lib/order-row.server.d.ts +24 -0
- package/dist-lib/lib/order-row.server.d.ts.map +1 -0
- package/dist-lib/lib/order-row.server.js +58 -0
- package/dist-lib/lib/order-shipments.functions.d.ts +168 -0
- package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-shipments.functions.js +11 -6
- package/dist-lib/lib/salesorders-list.functions.d.ts +42 -0
- package/dist-lib/lib/salesorders-list.functions.d.ts.map +1 -1
- package/dist-lib/lib/salesorders.functions.d.ts +210 -0
- package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
- package/dist-lib/lib/stock-consumption-alerts.functions.d.ts +84 -0
- package/dist-lib/lib/stock-consumption-alerts.functions.d.ts.map +1 -1
- package/dist-lib/lib/tradeitems.functions.d.ts +42 -0
- package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
import { createServerFn } from "@tanstack/react-start";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware";
|
|
5
|
-
|
|
5
|
+
import { assertRowsAffected, resolveOrderRow } from "./order-row.server";
|
|
6
6
|
async function findOrder(supabase, orderId) {
|
|
7
|
-
|
|
8
|
-
const
|
|
7
|
+
// DTO-id kan een Floriday salesOrderId zijn; resolveOrderRow vertaalt dat.
|
|
8
|
+
const row = await resolveOrderRow(supabase, orderId);
|
|
9
|
+
const { data, error } = await supabase
|
|
9
10
|
.from("orders")
|
|
10
11
|
.select("id, buffer_id, custom_fields, is_reservation")
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return (
|
|
12
|
+
.eq("id", row.id)
|
|
13
|
+
.maybeSingle();
|
|
14
|
+
if (error)
|
|
15
|
+
throw new Error(error.message);
|
|
16
|
+
return (data ?? null);
|
|
16
17
|
}
|
|
17
18
|
export const getOrderCarrier = createServerFn({ method: "GET" })
|
|
18
19
|
.middleware([requireSupabaseAuth])
|
|
@@ -28,7 +29,13 @@ export const getOrderCarrier = createServerFn({ method: "GET" })
|
|
|
28
29
|
id: String(c.id),
|
|
29
30
|
name: String(c.name ?? "Onbekend"),
|
|
30
31
|
}));
|
|
31
|
-
|
|
32
|
+
let order = null;
|
|
33
|
+
try {
|
|
34
|
+
order = await findOrder(supabase, data.orderId);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
order = null;
|
|
38
|
+
}
|
|
32
39
|
if (!order) {
|
|
33
40
|
return { carrierId: null, carrierName: null, bufferId: null, options };
|
|
34
41
|
}
|
|
@@ -78,11 +85,13 @@ export const setOrderCarrier = createServerFn({ method: "POST" })
|
|
|
78
85
|
cf.carrier = data.carrierId;
|
|
79
86
|
else
|
|
80
87
|
delete cf.carrier;
|
|
81
|
-
const { error } = await supabase.from("orders")
|
|
88
|
+
const { data: updated, error } = await supabase.from("orders")
|
|
82
89
|
.update({ custom_fields: cf })
|
|
83
|
-
.eq("id", t.id)
|
|
90
|
+
.eq("id", t.id)
|
|
91
|
+
.select("id");
|
|
84
92
|
if (error)
|
|
85
93
|
throw new Error(error.message);
|
|
94
|
+
assertRowsAffected(updated, "Vervoerder opslaan");
|
|
86
95
|
}
|
|
87
96
|
return { ok: true, updated: targets.length };
|
|
88
97
|
});
|
|
@@ -10745,6 +10745,24 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
10745
10745
|
};
|
|
10746
10746
|
Relationships: [];
|
|
10747
10747
|
};
|
|
10748
|
+
maps_job_lease: {
|
|
10749
|
+
Row: {
|
|
10750
|
+
job: string;
|
|
10751
|
+
locked_until: string;
|
|
10752
|
+
updated_at: string;
|
|
10753
|
+
};
|
|
10754
|
+
Insert: {
|
|
10755
|
+
job: string;
|
|
10756
|
+
locked_until?: string;
|
|
10757
|
+
updated_at?: string;
|
|
10758
|
+
};
|
|
10759
|
+
Update: {
|
|
10760
|
+
job?: string;
|
|
10761
|
+
locked_until?: string;
|
|
10762
|
+
updated_at?: string;
|
|
10763
|
+
};
|
|
10764
|
+
Relationships: [];
|
|
10765
|
+
};
|
|
10748
10766
|
maps_request_queue: {
|
|
10749
10767
|
Row: {
|
|
10750
10768
|
attempts: number;
|
|
@@ -13606,6 +13624,8 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
13606
13624
|
foutmelding: string | null;
|
|
13607
13625
|
gebruiker_id: string | null;
|
|
13608
13626
|
gebruiker_naam: string;
|
|
13627
|
+
gebruikte_bron: string | null;
|
|
13628
|
+
gebruikte_layout_id: string | null;
|
|
13609
13629
|
gestart_op: string | null;
|
|
13610
13630
|
herkomst: string | null;
|
|
13611
13631
|
id: string;
|
|
@@ -13636,6 +13656,8 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
13636
13656
|
foutmelding?: string | null;
|
|
13637
13657
|
gebruiker_id?: string | null;
|
|
13638
13658
|
gebruiker_naam?: string;
|
|
13659
|
+
gebruikte_bron?: string | null;
|
|
13660
|
+
gebruikte_layout_id?: string | null;
|
|
13639
13661
|
gestart_op?: string | null;
|
|
13640
13662
|
herkomst?: string | null;
|
|
13641
13663
|
id?: string;
|
|
@@ -13666,6 +13688,8 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
13666
13688
|
foutmelding?: string | null;
|
|
13667
13689
|
gebruiker_id?: string | null;
|
|
13668
13690
|
gebruiker_naam?: string;
|
|
13691
|
+
gebruikte_bron?: string | null;
|
|
13692
|
+
gebruikte_layout_id?: string | null;
|
|
13669
13693
|
gestart_op?: string | null;
|
|
13670
13694
|
herkomst?: string | null;
|
|
13671
13695
|
id?: string;
|
|
@@ -20335,6 +20359,8 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
20335
20359
|
foutmelding: string | null;
|
|
20336
20360
|
gebruiker_id: string | null;
|
|
20337
20361
|
gebruiker_naam: string;
|
|
20362
|
+
gebruikte_bron: string | null;
|
|
20363
|
+
gebruikte_layout_id: string | null;
|
|
20338
20364
|
gestart_op: string | null;
|
|
20339
20365
|
herkomst: string | null;
|
|
20340
20366
|
id: string;
|
|
@@ -20456,6 +20482,8 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
20456
20482
|
foutmelding: string | null;
|
|
20457
20483
|
gebruiker_id: string | null;
|
|
20458
20484
|
gebruiker_naam: string;
|
|
20485
|
+
gebruikte_bron: string | null;
|
|
20486
|
+
gebruikte_layout_id: string | null;
|
|
20459
20487
|
gestart_op: string | null;
|
|
20460
20488
|
herkomst: string | null;
|
|
20461
20489
|
id: string;
|
|
@@ -21512,6 +21540,12 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
21512
21540
|
};
|
|
21513
21541
|
Returns: string;
|
|
21514
21542
|
};
|
|
21543
|
+
logistics_document_type_map: {
|
|
21544
|
+
Args: {
|
|
21545
|
+
_document_code: string;
|
|
21546
|
+
};
|
|
21547
|
+
Returns: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"][];
|
|
21548
|
+
};
|
|
21515
21549
|
logistics_emit_event: {
|
|
21516
21550
|
Args: {
|
|
21517
21551
|
p_event_type: string;
|
|
@@ -21975,6 +22009,14 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
21975
22009
|
};
|
|
21976
22010
|
Returns: string;
|
|
21977
22011
|
};
|
|
22012
|
+
maps_cron_token: {
|
|
22013
|
+
Args: never;
|
|
22014
|
+
Returns: string;
|
|
22015
|
+
};
|
|
22016
|
+
maps_kick_queue: {
|
|
22017
|
+
Args: never;
|
|
22018
|
+
Returns: undefined;
|
|
22019
|
+
};
|
|
21978
22020
|
mark_offer_clicked: {
|
|
21979
22021
|
Args: {
|
|
21980
22022
|
p_code: string;
|
|
@@ -33966,6 +34008,24 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
33966
34008
|
};
|
|
33967
34009
|
Relationships: [];
|
|
33968
34010
|
};
|
|
34011
|
+
maps_job_lease: {
|
|
34012
|
+
Row: {
|
|
34013
|
+
job: string;
|
|
34014
|
+
locked_until: string;
|
|
34015
|
+
updated_at: string;
|
|
34016
|
+
};
|
|
34017
|
+
Insert: {
|
|
34018
|
+
job: string;
|
|
34019
|
+
locked_until?: string;
|
|
34020
|
+
updated_at?: string;
|
|
34021
|
+
};
|
|
34022
|
+
Update: {
|
|
34023
|
+
job?: string;
|
|
34024
|
+
locked_until?: string;
|
|
34025
|
+
updated_at?: string;
|
|
34026
|
+
};
|
|
34027
|
+
Relationships: [];
|
|
34028
|
+
};
|
|
33969
34029
|
maps_request_queue: {
|
|
33970
34030
|
Row: {
|
|
33971
34031
|
attempts: number;
|
|
@@ -36827,6 +36887,8 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
36827
36887
|
foutmelding: string | null;
|
|
36828
36888
|
gebruiker_id: string | null;
|
|
36829
36889
|
gebruiker_naam: string;
|
|
36890
|
+
gebruikte_bron: string | null;
|
|
36891
|
+
gebruikte_layout_id: string | null;
|
|
36830
36892
|
gestart_op: string | null;
|
|
36831
36893
|
herkomst: string | null;
|
|
36832
36894
|
id: string;
|
|
@@ -36857,6 +36919,8 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
36857
36919
|
foutmelding?: string | null;
|
|
36858
36920
|
gebruiker_id?: string | null;
|
|
36859
36921
|
gebruiker_naam?: string;
|
|
36922
|
+
gebruikte_bron?: string | null;
|
|
36923
|
+
gebruikte_layout_id?: string | null;
|
|
36860
36924
|
gestart_op?: string | null;
|
|
36861
36925
|
herkomst?: string | null;
|
|
36862
36926
|
id?: string;
|
|
@@ -36887,6 +36951,8 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
36887
36951
|
foutmelding?: string | null;
|
|
36888
36952
|
gebruiker_id?: string | null;
|
|
36889
36953
|
gebruiker_naam?: string;
|
|
36954
|
+
gebruikte_bron?: string | null;
|
|
36955
|
+
gebruikte_layout_id?: string | null;
|
|
36890
36956
|
gestart_op?: string | null;
|
|
36891
36957
|
herkomst?: string | null;
|
|
36892
36958
|
id?: string;
|
|
@@ -43556,6 +43622,8 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
43556
43622
|
foutmelding: string | null;
|
|
43557
43623
|
gebruiker_id: string | null;
|
|
43558
43624
|
gebruiker_naam: string;
|
|
43625
|
+
gebruikte_bron: string | null;
|
|
43626
|
+
gebruikte_layout_id: string | null;
|
|
43559
43627
|
gestart_op: string | null;
|
|
43560
43628
|
herkomst: string | null;
|
|
43561
43629
|
id: string;
|
|
@@ -43677,6 +43745,8 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
43677
43745
|
foutmelding: string | null;
|
|
43678
43746
|
gebruiker_id: string | null;
|
|
43679
43747
|
gebruiker_naam: string;
|
|
43748
|
+
gebruikte_bron: string | null;
|
|
43749
|
+
gebruikte_layout_id: string | null;
|
|
43680
43750
|
gestart_op: string | null;
|
|
43681
43751
|
herkomst: string | null;
|
|
43682
43752
|
id: string;
|
|
@@ -44733,6 +44803,12 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
44733
44803
|
};
|
|
44734
44804
|
Returns: string;
|
|
44735
44805
|
};
|
|
44806
|
+
logistics_document_type_map: {
|
|
44807
|
+
Args: {
|
|
44808
|
+
_document_code: string;
|
|
44809
|
+
};
|
|
44810
|
+
Returns: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"][];
|
|
44811
|
+
};
|
|
44736
44812
|
logistics_emit_event: {
|
|
44737
44813
|
Args: {
|
|
44738
44814
|
p_event_type: string;
|
|
@@ -45196,6 +45272,14 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
|
|
|
45196
45272
|
};
|
|
45197
45273
|
Returns: string;
|
|
45198
45274
|
};
|
|
45275
|
+
maps_cron_token: {
|
|
45276
|
+
Args: never;
|
|
45277
|
+
Returns: string;
|
|
45278
|
+
};
|
|
45279
|
+
maps_kick_queue: {
|
|
45280
|
+
Args: never;
|
|
45281
|
+
Returns: undefined;
|
|
45282
|
+
};
|
|
45199
45283
|
mark_offer_clicked: {
|
|
45200
45284
|
Args: {
|
|
45201
45285
|
p_code: string;
|