@flowselections/floriday-klanten-module 1.0.90 → 1.0.92
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/assets/floriday-logo.png.asset.json +11 -0
- package/dist-lib/components/fs-ui/DataTable.d.ts +1 -1
- package/dist-lib/components/fs-ui/DataTable.js +1 -1
- package/dist-lib/components/klanten/BewerkKlant.js +3 -3
- package/dist-lib/components/klanten/CarrierPicker.d.ts +43 -19
- package/dist-lib/components/klanten/CarrierPicker.d.ts.map +1 -1
- package/dist-lib/components/klanten/DeliveryLocationsTab.js +1 -1
- package/dist-lib/components/klanten/GroupedKlantDetail.js +13 -13
- package/dist-lib/components/klanten/ImportKlanten.js +1 -1
- package/dist-lib/components/klanten/KlantDetail.js +17 -17
- package/dist-lib/components/klanten/KlantFormulier.js +2 -2
- package/dist-lib/components/klanten/KlantenOverzicht.js +3 -3
- package/dist-lib/components/klanten/LocationGlns.d.ts +2 -2
- package/dist-lib/components/klanten/LocationGlns.d.ts.map +1 -1
- package/dist-lib/components/klanten/LogisticsStrategyCard.d.ts +7 -0
- package/dist-lib/components/klanten/LogisticsStrategyCard.d.ts.map +1 -0
- package/dist-lib/components/klanten/LogisticsStrategyCard.js +35 -0
- package/dist-lib/components/klanten/NetwerkPagina.js +1 -1
- package/dist-lib/components/klanten/NieuweKlant.js +3 -3
- package/dist-lib/components/klanten/OvernemenTwinfieldKlant.js +2 -2
- package/dist-lib/integrations/supabase/client.js +1 -1
- package/dist-lib/integrations/supabase/client.server.js +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +76 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/accounting/twinfield/sandbox-rmw.server.d.ts +2 -2
- package/dist-lib/lib/accounting/twinfield/sandbox-rmw.server.js +2 -2
- package/dist-lib/lib/floriday.server.d.ts +55 -0
- package/dist-lib/lib/floriday.server.d.ts.map +1 -0
- package/dist-lib/lib/floriday.server.js +765 -0
- package/package.json +2 -2
- package/dist-lib/components/klanten/CarrierAdminCard.d.ts +0 -3
- package/dist-lib/components/klanten/CarrierAdminCard.d.ts.map +0 -1
- package/dist-lib/components/klanten/CarrierAdminCard.js +0 -23
- package/dist-lib/components/klanten/FloridayAutoPromoteCard.d.ts +0 -3
- package/dist-lib/components/klanten/FloridayAutoPromoteCard.d.ts.map +0 -1
- package/dist-lib/components/klanten/FloridayAutoPromoteCard.js +0 -31
- package/dist-lib/components/klanten/StickerSizePreviewCard.d.ts +0 -3
- package/dist-lib/components/klanten/StickerSizePreviewCard.d.ts.map +0 -1
- package/dist-lib/components/klanten/StickerSizePreviewCard.js +0 -27
- package/dist-lib/components/klanten/TwinfieldQueueAdminCard.d.ts +0 -3
- package/dist-lib/components/klanten/TwinfieldQueueAdminCard.d.ts.map +0 -1
- package/dist-lib/components/klanten/TwinfieldQueueAdminCard.js +0 -36
- package/dist-lib/lib/accounting/twinfield/field-coverage.test.d.ts +0 -2
- package/dist-lib/lib/accounting/twinfield/field-coverage.test.d.ts.map +0 -1
- package/dist-lib/lib/accounting/twinfield/field-coverage.test.js +0 -179
- package/dist-lib/lib/countries.test.d.ts +0 -2
- package/dist-lib/lib/countries.test.d.ts.map +0 -1
- package/dist-lib/lib/countries.test.js +0 -13
- package/dist-lib/lib/customer-defaults.test.d.ts +0 -2
- package/dist-lib/lib/customer-defaults.test.d.ts.map +0 -1
- package/dist-lib/lib/customer-defaults.test.js +0 -26
- package/dist-lib/lib/customer-schemas.test.d.ts +0 -2
- package/dist-lib/lib/customer-schemas.test.d.ts.map +0 -1
- package/dist-lib/lib/customer-schemas.test.js +0 -22
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"asset_id": "3e27c03f-e308-40e7-ac35-07bf1161c1e2",
|
|
4
|
+
"project_id": "dfdc14cf-30fe-4e0b-8abc-a3ae973943d8",
|
|
5
|
+
"url": "/__l5e/assets-v1/3e27c03f-e308-40e7-ac35-07bf1161c1e2/floriday-logo.png",
|
|
6
|
+
"r2_key": "a/v1/dfdc14cf-30fe-4e0b-8abc-a3ae973943d8/3e27c03f-e308-40e7-ac35-07bf1161c1e2/floriday-logo.png",
|
|
7
|
+
"original_filename": "floriday-logo.png",
|
|
8
|
+
"size": 6921,
|
|
9
|
+
"content_type": "image/png",
|
|
10
|
+
"created_at": "2026-07-07T13:17:11Z"
|
|
11
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
/** Horizontale celruimte; kop en cel gebruiken exact dezelfde waarde (0 px verschil). */
|
|
3
|
-
export declare const CELL_X = "px-
|
|
3
|
+
export declare const CELL_X = "px-2";
|
|
4
4
|
/**
|
|
5
5
|
* Tabelvlak exact als Verkooporders: eigen table-fixed met colgroup in px,
|
|
6
6
|
* minimaal 900 px, kop 40 px/11 px hoofdletters, sticky. Onder 768 px wordt
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { ArrowDown, ArrowUp, ChevronLeft, ChevronRight } from "lucide-react";
|
|
3
3
|
import { Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@flowselections/core";
|
|
4
4
|
/** Horizontale celruimte; kop en cel gebruiken exact dezelfde waarde (0 px verschil). */
|
|
5
|
-
export const CELL_X = "px-
|
|
5
|
+
export const CELL_X = "px-2";
|
|
6
6
|
/**
|
|
7
7
|
* Tabelvlak exact als Verkooporders: eigen table-fixed met colgroup in px,
|
|
8
8
|
* minimaal 900 px, kop 40 px/11 px hoofdletters, sticky. Onder 768 px wordt
|
|
@@ -9,11 +9,11 @@ import { useServerFn } from "@tanstack/react-start";
|
|
|
9
9
|
import { toast } from "@flowselections/core";
|
|
10
10
|
import { getCustomer, updateCustomer } from "../../lib/customers.functions.js";
|
|
11
11
|
import { decodeDeep } from "../../lib/decode-html.js";
|
|
12
|
-
import { BackLink } from "
|
|
13
|
-
import { KlantFormulier, emptyKlantFormValues, } from "
|
|
12
|
+
import { BackLink } from "../../components/klanten/BackLink.js";
|
|
13
|
+
import { KlantFormulier, emptyKlantFormValues, } from "../../components/klanten/KlantFormulier.js";
|
|
14
14
|
import { resolveCustomerKeyForLocalCustomer } from "../../lib/price-groups-local.functions.js";
|
|
15
15
|
import { getCustomerStickerSettings } from "../../lib/customer-stickers.functions.js";
|
|
16
|
-
import { CustomerStickerFormatDialog } from "
|
|
16
|
+
import { CustomerStickerFormatDialog } from "../../components/klanten/CustomerStickerFormatDialog.js";
|
|
17
17
|
function StickerFormatSection({ customerId }) {
|
|
18
18
|
const resolveKey = useServerFn(resolveCustomerKeyForLocalCustomer);
|
|
19
19
|
const getFormat = useServerFn(getCustomerStickerSettings);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type LocationCarrierChoice, type ProposalResult } from "../../lib/carrier-choice.js";
|
|
2
2
|
export declare function useCarrierOptions(): {
|
|
3
3
|
ordered: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
4
|
-
data: {
|
|
4
|
+
data: NoInfer<{
|
|
5
5
|
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
6
6
|
usage: Record<string, number>;
|
|
7
|
-
}
|
|
7
|
+
}>;
|
|
8
8
|
error: Error;
|
|
9
9
|
isError: true;
|
|
10
10
|
isPending: false;
|
|
@@ -27,17 +27,21 @@ export declare function useCarrierOptions(): {
|
|
|
27
27
|
isRefetching: boolean;
|
|
28
28
|
isStale: boolean;
|
|
29
29
|
isEnabled: boolean;
|
|
30
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
30
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<{
|
|
31
31
|
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
32
32
|
usage: Record<string, number>;
|
|
33
|
-
}
|
|
33
|
+
}>, Error>>;
|
|
34
34
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
35
|
+
promise: Promise<NoInfer<{
|
|
36
|
+
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
37
|
+
usage: Record<string, number>;
|
|
38
|
+
}>>;
|
|
35
39
|
} | {
|
|
36
40
|
ordered: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
37
|
-
data: {
|
|
41
|
+
data: NoInfer<{
|
|
38
42
|
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
39
43
|
usage: Record<string, number>;
|
|
40
|
-
}
|
|
44
|
+
}>;
|
|
41
45
|
error: null;
|
|
42
46
|
isError: false;
|
|
43
47
|
isPending: false;
|
|
@@ -60,11 +64,15 @@ export declare function useCarrierOptions(): {
|
|
|
60
64
|
isRefetching: boolean;
|
|
61
65
|
isStale: boolean;
|
|
62
66
|
isEnabled: boolean;
|
|
63
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
67
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<{
|
|
64
68
|
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
65
69
|
usage: Record<string, number>;
|
|
66
|
-
}
|
|
70
|
+
}>, Error>>;
|
|
67
71
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
72
|
+
promise: Promise<NoInfer<{
|
|
73
|
+
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
74
|
+
usage: Record<string, number>;
|
|
75
|
+
}>>;
|
|
68
76
|
} | {
|
|
69
77
|
ordered: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
70
78
|
data: undefined;
|
|
@@ -90,11 +98,15 @@ export declare function useCarrierOptions(): {
|
|
|
90
98
|
isRefetching: boolean;
|
|
91
99
|
isStale: boolean;
|
|
92
100
|
isEnabled: boolean;
|
|
93
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
101
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<{
|
|
94
102
|
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
95
103
|
usage: Record<string, number>;
|
|
96
|
-
}
|
|
104
|
+
}>, Error>>;
|
|
97
105
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
106
|
+
promise: Promise<NoInfer<{
|
|
107
|
+
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
108
|
+
usage: Record<string, number>;
|
|
109
|
+
}>>;
|
|
98
110
|
} | {
|
|
99
111
|
ordered: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
100
112
|
data: undefined;
|
|
@@ -120,11 +132,15 @@ export declare function useCarrierOptions(): {
|
|
|
120
132
|
isRefetching: boolean;
|
|
121
133
|
isStale: boolean;
|
|
122
134
|
isEnabled: boolean;
|
|
123
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
135
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<{
|
|
124
136
|
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
125
137
|
usage: Record<string, number>;
|
|
126
|
-
}
|
|
138
|
+
}>, Error>>;
|
|
127
139
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
140
|
+
promise: Promise<NoInfer<{
|
|
141
|
+
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
142
|
+
usage: Record<string, number>;
|
|
143
|
+
}>>;
|
|
128
144
|
} | {
|
|
129
145
|
ordered: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
130
146
|
data: undefined;
|
|
@@ -150,17 +166,21 @@ export declare function useCarrierOptions(): {
|
|
|
150
166
|
isRefetching: boolean;
|
|
151
167
|
isStale: boolean;
|
|
152
168
|
isEnabled: boolean;
|
|
153
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
169
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<{
|
|
154
170
|
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
155
171
|
usage: Record<string, number>;
|
|
156
|
-
}
|
|
172
|
+
}>, Error>>;
|
|
157
173
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
174
|
+
promise: Promise<NoInfer<{
|
|
175
|
+
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
176
|
+
usage: Record<string, number>;
|
|
177
|
+
}>>;
|
|
158
178
|
} | {
|
|
159
179
|
ordered: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
160
|
-
data: {
|
|
180
|
+
data: NoInfer<{
|
|
161
181
|
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
162
182
|
usage: Record<string, number>;
|
|
163
|
-
}
|
|
183
|
+
}>;
|
|
164
184
|
isError: false;
|
|
165
185
|
error: null;
|
|
166
186
|
isPending: false;
|
|
@@ -183,11 +203,15 @@ export declare function useCarrierOptions(): {
|
|
|
183
203
|
isRefetching: boolean;
|
|
184
204
|
isStale: boolean;
|
|
185
205
|
isEnabled: boolean;
|
|
186
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
206
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<{
|
|
187
207
|
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
188
208
|
usage: Record<string, number>;
|
|
189
|
-
}
|
|
209
|
+
}>, Error>>;
|
|
190
210
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
211
|
+
promise: Promise<NoInfer<{
|
|
212
|
+
carriers: import("../../lib/carrier-choice.js").CarrierOption[];
|
|
213
|
+
usage: Record<string, number>;
|
|
214
|
+
}>>;
|
|
191
215
|
};
|
|
192
216
|
export type ProposalItem = {
|
|
193
217
|
key: string;
|
|
@@ -195,7 +219,7 @@ export type ProposalItem = {
|
|
|
195
219
|
customer_id: string | null;
|
|
196
220
|
};
|
|
197
221
|
/** Live voorstel van de Logistieke Engine; wordt nooit opgeslagen. */
|
|
198
|
-
export declare function useCarrierProposals(items: ProposalItem[], enabled?: boolean): import("@tanstack/react-query").UseQueryResult<Record<string, ProposalResult
|
|
222
|
+
export declare function useCarrierProposals(items: ProposalItem[], enabled?: boolean): import("@tanstack/react-query").UseQueryResult<NoInfer<Record<string, ProposalResult>>, Error>;
|
|
199
223
|
/** Eén regel: welke vervoerder het wordt en waarom, plus de waarschuwing van de Engine. */
|
|
200
224
|
export declare function ProposalLine({ result, loading, error, onRetry, compact, }: {
|
|
201
225
|
result: ProposalResult | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarrierPicker.d.ts","sourceRoot":"","sources":["../../../src/components/klanten/CarrierPicker.tsx"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACpB,MAAM,0BAA0B,CAAC;AAGlC,wBAAgB,iBAAiB
|
|
1
|
+
{"version":3,"file":"CarrierPicker.d.ts","sourceRoot":"","sources":["../../../src/components/klanten/CarrierPicker.tsx"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACpB,MAAM,0BAA0B,CAAC;AAGlC,wBAAgB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQhC;AAED,MAAM,MAAM,YAAY,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAEnG,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,OAAO,UAAO,kGAQxE;AAED,2FAA2F;AAC3F,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,GACR,EAAE;IACD,MAAM,EAAE,cAAc,GAAG,SAAS,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,+BAmCA;AAMD;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EACD;IACE,OAAO,EAAE,UAAU,CAAC;IACpB,KAAK,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC7C,SAAS,EAAE,MAAM,CAAC;CACnB,GACD;IACE,OAAO,EAAE,UAAU,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACtC,+BA+CN"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { friendlyError } from "../../lib/errors.js";
|
|
3
|
-
import { useCustomerDefaults } from "
|
|
3
|
+
import { useCustomerDefaults } from "../../components/klanten/useCustomerDefaults.js";
|
|
4
4
|
import { useMemo, useRef, useState } from "react";
|
|
5
5
|
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
|
6
6
|
import { useServerFn } from "@tanstack/react-start";
|
|
@@ -8,27 +8,27 @@ import { useEffect, useState } from "react";
|
|
|
8
8
|
import { Card, CardContent, Badge, Button, toast, Tabs, TabsList, TabsTrigger, TabsContent, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@flowselections/core";
|
|
9
9
|
import { Mail, MapPin, Phone, Pencil, UserX } from "lucide-react";
|
|
10
10
|
import { TableSkeleton, InlineAlert, EmptyState as FsEmptyState } from "../fs-ui/index.js";
|
|
11
|
-
import { BackLink } from "
|
|
11
|
+
import { BackLink } from "../../components/klanten/BackLink.js";
|
|
12
12
|
import { getGroupedCustomerDetail, } from "../../lib/external-customers.functions.js";
|
|
13
|
-
import { ProfileCard, KpiStrip, BadgeList, EmptyState, adaptGroupedToProfile, } from "
|
|
13
|
+
import { ProfileCard, KpiStrip, BadgeList, EmptyState, adaptGroupedToProfile, } from "../../components/klanten/KlantDetailLayout.js";
|
|
14
14
|
import { countryNameToFlag } from "../../lib/countries.js";
|
|
15
|
-
import { DiscountsTab } from "
|
|
16
|
-
import { PriceGroupBadges } from "
|
|
17
|
-
import { CustomerPriceGroupSelect } from "
|
|
15
|
+
import { DiscountsTab } from "../../components/klanten/DiscountsTab.js";
|
|
16
|
+
import { PriceGroupBadges } from "../../components/klanten/PriceGroupBadges.js";
|
|
17
|
+
import { CustomerPriceGroupSelect } from "../../components/klanten/pricegroups/CustomerPriceGroupSelect.js";
|
|
18
18
|
import { listPriceGroupsForOrganizations } from "../../lib/price-groups.functions.js";
|
|
19
|
-
import { FloridayDeeplinkButton } from "
|
|
20
|
-
import { CustomerAssortmentTab } from "
|
|
21
|
-
import { FloridayAssortmentTab } from "
|
|
19
|
+
import { FloridayDeeplinkButton } from "../../components/klanten/FloridayDeeplinkButton.js";
|
|
20
|
+
import { CustomerAssortmentTab } from "../../components/klanten/CustomerAssortmentTab.js";
|
|
21
|
+
import { FloridayAssortmentTab } from "../../components/klanten/FloridayAssortmentTab.js";
|
|
22
22
|
import { decodeDeep } from "../../lib/decode-html.js";
|
|
23
|
-
import { DeliveryLocationsTab } from "
|
|
24
|
-
import { KlantBewerkenDialog } from "
|
|
25
|
-
import { FactureringKredietCard, hasBillingInfo, useLocalCustomer } from "
|
|
23
|
+
import { DeliveryLocationsTab } from "../../components/klanten/DeliveryLocationsTab.js";
|
|
24
|
+
import { KlantBewerkenDialog } from "../../components/klanten/KlantBewerkenDialog.js";
|
|
25
|
+
import { FactureringKredietCard, hasBillingInfo, useLocalCustomer } from "../../components/klanten/FactureringKredietCard.js";
|
|
26
26
|
import { getCustomerNote, upsertCustomerNote } from "../../lib/customer-notes.functions.js";
|
|
27
27
|
import { supabase } from "../../integrations/supabase/client.js";
|
|
28
28
|
import { formatPaymentMethodLabel } from "../../lib/payment-method.js";
|
|
29
|
-
import { CustomerOrdersTab } from "
|
|
29
|
+
import { CustomerOrdersTab } from "../../components/klanten/CustomerOrdersTab.js";
|
|
30
30
|
import { listCustomerOrders } from "../../lib/customer-orders.functions.js";
|
|
31
|
-
import { FloridayTradeSettingsCard } from "
|
|
31
|
+
import { FloridayTradeSettingsCard } from "../../components/klanten/FloridayTradeSettingsCard.js";
|
|
32
32
|
export function GroupedKlantDetail({ groupKey }) {
|
|
33
33
|
const navigate = useNavigate();
|
|
34
34
|
const qc = useQueryClient();
|
|
@@ -7,7 +7,7 @@ import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
|
7
7
|
import { useServerFn } from "@tanstack/react-start";
|
|
8
8
|
import { Button, Card, CardContent, CardHeader, CardTitle, Input, Label, toast, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Badge, Checkbox, } from "@flowselections/core";
|
|
9
9
|
import { Upload, Download, FileText, CheckCircle2, AlertTriangle, XCircle } from "lucide-react";
|
|
10
|
-
import { BackLink } from "
|
|
10
|
+
import { BackLink } from "../../components/klanten/BackLink.js";
|
|
11
11
|
import * as XLSX from "xlsx";
|
|
12
12
|
import { bulkImportCustomers } from "../../lib/customers.functions.js";
|
|
13
13
|
import { customerImportRowSchema } from "../../lib/customer-schemas.js";
|
|
@@ -7,33 +7,33 @@ import { useEffect, useState } from "react";
|
|
|
7
7
|
import { Card, CardContent, CardHeader, CardTitle, Badge, Button, toast, Tabs, TabsContent, TabsList, TabsTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, } from "@flowselections/core";
|
|
8
8
|
import { Trash2, Mail, Phone, Power, Pencil, MoreHorizontal, } from "lucide-react";
|
|
9
9
|
import { getCustomer, deleteCustomer, updateCustomer } from "../../lib/customers.functions.js";
|
|
10
|
-
import { ProfileCard, BadgeList, EmptyState, ActivityItem, adaptLocalToProfile, } from "
|
|
11
|
-
import { DeliveryLocationsTab } from "
|
|
12
|
-
import { CustomerCarrierCard } from "
|
|
13
|
-
import { BackLink } from "
|
|
10
|
+
import { ProfileCard, BadgeList, EmptyState, ActivityItem, adaptLocalToProfile, } from "../../components/klanten/KlantDetailLayout.js";
|
|
11
|
+
import { DeliveryLocationsTab } from "../../components/klanten/DeliveryLocationsTab.js";
|
|
12
|
+
import { CustomerCarrierCard } from "../../components/klanten/CustomerCarrierCard.js";
|
|
13
|
+
import { BackLink } from "../../components/klanten/BackLink.js";
|
|
14
14
|
import { NoticeBar, TableSkeleton, EmptyState as FsEmptyState } from "../fs-ui/index.js";
|
|
15
15
|
import { UserX } from "lucide-react";
|
|
16
|
-
import { CustomerAnalyticsTab } from "
|
|
17
|
-
import { LocalDiscountsTab } from "
|
|
18
|
-
import { PriceGroupBadges } from "
|
|
19
|
-
import { CustomerPriceGroupSelect } from "
|
|
16
|
+
import { CustomerAnalyticsTab } from "../../components/klanten/CustomerAnalyticsTab.js";
|
|
17
|
+
import { LocalDiscountsTab } from "../../components/klanten/LocalDiscountsTab.js";
|
|
18
|
+
import { PriceGroupBadges } from "../../components/klanten/PriceGroupBadges.js";
|
|
19
|
+
import { CustomerPriceGroupSelect } from "../../components/klanten/pricegroups/CustomerPriceGroupSelect.js";
|
|
20
20
|
import { resolveCustomerKeyForLocalCustomer } from "../../lib/price-groups-local.functions.js";
|
|
21
|
-
import { FloridayDeeplinkButton } from "
|
|
22
|
-
import { FloridayAssortmentTab } from "
|
|
23
|
-
import { CustomerAssortmentTab } from "
|
|
24
|
-
import { SyncStatusChip } from "
|
|
21
|
+
import { FloridayDeeplinkButton } from "../../components/klanten/FloridayDeeplinkButton.js";
|
|
22
|
+
import { FloridayAssortmentTab } from "../../components/klanten/FloridayAssortmentTab.js";
|
|
23
|
+
import { CustomerAssortmentTab } from "../../components/klanten/CustomerAssortmentTab.js";
|
|
24
|
+
import { SyncStatusChip } from "../../components/klanten/SyncStatusChip.js";
|
|
25
25
|
import { decodeDeep } from "../../lib/decode-html.js";
|
|
26
26
|
import { getMissingTwinfieldFields } from "../../lib/twinfield-required-fields.js";
|
|
27
27
|
import { missingInvoiceAddressFields } from "../../lib/invoice-address.js";
|
|
28
|
-
import { FactureringKredietCard, hasBillingInfo, BlockedBadge } from "
|
|
28
|
+
import { FactureringKredietCard, hasBillingInfo, BlockedBadge } from "../../components/klanten/FactureringKredietCard.js";
|
|
29
29
|
import { getCustomerNote, upsertCustomerNote } from "../../lib/customer-notes.functions.js";
|
|
30
30
|
import { supabase } from "../../integrations/supabase/client.js";
|
|
31
|
-
import { KlantBewerkenDialog } from "
|
|
32
|
-
import { CustomerOrdersTab } from "
|
|
31
|
+
import { KlantBewerkenDialog } from "../../components/klanten/KlantBewerkenDialog.js";
|
|
32
|
+
import { CustomerOrdersTab } from "../../components/klanten/CustomerOrdersTab.js";
|
|
33
33
|
import { formatDateTime } from "../../lib/format-date.js";
|
|
34
34
|
import { listCustomerOrders } from "../../lib/customer-orders.functions.js";
|
|
35
|
-
import { CustomerKpis } from "
|
|
36
|
-
import { FloridayTradeSettingsCard } from "
|
|
35
|
+
import { CustomerKpis } from "../../components/klanten/CustomerKpis.js";
|
|
36
|
+
import { FloridayTradeSettingsCard } from "../../components/klanten/FloridayTradeSettingsCard.js";
|
|
37
37
|
export function KlantDetail({ id }) {
|
|
38
38
|
const navigate = useNavigate();
|
|
39
39
|
const qc = useQueryClient();
|
|
@@ -7,14 +7,14 @@ import { useServerFn } from "@tanstack/react-start";
|
|
|
7
7
|
import { Button, Card, CardContent, Input, Label, Textarea, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@flowselections/core";
|
|
8
8
|
import { MapPin, Landmark, ReceiptText, ChevronDown, Check, AlertCircle, Users, BookOpen, } from "lucide-react";
|
|
9
9
|
import { PageHeader, NoticeBar } from "../fs-ui/index.js";
|
|
10
|
-
import { BackLink } from "
|
|
10
|
+
import { BackLink } from "../../components/klanten/BackLink.js";
|
|
11
11
|
import { listCustomerClasses } from "../../lib/customers.functions.js";
|
|
12
12
|
import { listTwinfieldLedgerAccounts } from "../../lib/twinfield-ledger.functions.js";
|
|
13
13
|
import { customerCreateSchema } from "../../lib/customer-schemas.js";
|
|
14
14
|
import { requiresVatNumber } from "../../lib/twinfield-required-fields.js";
|
|
15
15
|
import { TWINFIELD_FIELD_MAX, TWINFIELD_READONLY_FIELDS, TWINFIELD_READONLY_HINT } from "../../lib/twinfield-limits.js";
|
|
16
16
|
import { countryNameToFlag, COUNTRY_NAMES, toIsoCountry } from "../../lib/countries.js";
|
|
17
|
-
import { SearchableSelect } from "
|
|
17
|
+
import { SearchableSelect } from "../../components/klanten/SearchableSelect.js";
|
|
18
18
|
import { checkVatFormat, isTwinfieldVatError } from "../../lib/vat-format.js";
|
|
19
19
|
import { creditManagerDisplay } from "../../lib/credit-management.js";
|
|
20
20
|
import { TWINFIELD_DEFAULTS, VAT_DISPLAY_OPTIONS, PAYMENT_SPEC_METHOD_OPTIONS, INVOICE_SEND_AS_OPTIONS, SEND_REMINDER_OPTIONS, DISCOUNT_SURCHARGE_OPTIONS, } from "../../lib/twinfield-defaults.js";
|
|
@@ -558,14 +558,14 @@ export function KlantenOverzicht() {
|
|
|
558
558
|
setEditTarget(null); }, customerId: editTarget?.customerId ?? null, twinfieldCode: editTarget?.twinfieldCode ?? null, twinfieldConnectionId: editTarget?.twinfieldConnectionId ?? null, onSaved: () => queryClient.invalidateQueries() }), _jsxs(MobilePrimaryAction, { onClick: () => goTo({ to: "/klanten/nieuw" }), children: [_jsx(Plus, { className: "h-4 w-4" }), " Nieuwe klant"] }), _jsx(ShortcutHelp, { open: help.open, onOpenChange: help.setOpen, canCreate: true })] }) }));
|
|
559
559
|
}
|
|
560
560
|
const COL_DEFS = [
|
|
561
|
-
{ key: "company", width:
|
|
562
|
-
{ key: "contact", width:
|
|
561
|
+
{ key: "company", width: 192, label: "Bedrijf", locked: true },
|
|
562
|
+
{ key: "contact", width: 134, label: "Contact" },
|
|
563
563
|
{ key: "pricegroup", width: 104, label: "Prijscategorie" },
|
|
564
564
|
{ key: "payment", width: 80, label: "Betaalvorm" },
|
|
565
565
|
{ key: "revenue", width: 104, label: "Omzet 12 mnd" },
|
|
566
566
|
{ key: "country", width: 92, label: "Land" },
|
|
567
567
|
{ key: "carrier", width: 98, label: "Vervoerder" },
|
|
568
|
-
{ key: "status", width:
|
|
568
|
+
{ key: "status", width: 64, label: "Status", locked: true },
|
|
569
569
|
{ key: "actions", width: 32 },
|
|
570
570
|
];
|
|
571
571
|
function displayName(c) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type LocationGln } from "../../lib/delivery-locations.functions.js";
|
|
2
2
|
import { type DupLocation, type GlnAdd, type LinkedGln, type PendingGlns } from "../../lib/delivery-gln.js";
|
|
3
|
-
export declare function useLocationGlns(locationIds: string[]): import("@tanstack/react-query").UseQueryResult<{
|
|
3
|
+
export declare function useLocationGlns(locationIds: string[]): import("@tanstack/react-query").UseQueryResult<NoInfer<{
|
|
4
4
|
glns: LocationGln[];
|
|
5
5
|
mergeEnabled: boolean;
|
|
6
|
-
}
|
|
6
|
+
}>, Error>;
|
|
7
7
|
/** Zoekbare keuzelijst "GLN koppelen…": vrije GLN's van deze klant + "Andere GLN invoeren…". */
|
|
8
8
|
export declare function GlnPicker({ customerId, locationId, exclude, onPick, busy }: {
|
|
9
9
|
customerId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocationGlns.d.ts","sourceRoot":"","sources":["../../../src/components/klanten/LocationGlns.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEoD,KAAK,WAAW,EAC1E,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAGL,KAAK,WAAW,EAAqB,KAAK,MAAM,EAAe,KAAK,SAAS,EAAE,KAAK,WAAW,EAChG,MAAM,wBAAwB,CAAC;AAEhC,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE;;;
|
|
1
|
+
{"version":3,"file":"LocationGlns.d.ts","sourceRoot":"","sources":["../../../src/components/klanten/LocationGlns.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEoD,KAAK,WAAW,EAC1E,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAGL,KAAK,WAAW,EAAqB,KAAK,MAAM,EAAe,KAAK,SAAS,EAAE,KAAK,WAAW,EAChG,MAAM,wBAAwB,CAAC;AAEhC,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE;;;WAOpD;AAID,gGAAgG;AAChG,wBAAgB,SAAS,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;IAC3E,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACjF,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B,+BAiFA;AAoCD,mGAAmG;AACnG,wBAAgB,eAAe,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACxF,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,WAAW,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,IAAI,CAAC;CAChH,+BAmCA;AAED,wEAAwE;AACxE,wBAAgB,iBAAiB,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE;IACxF,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,SAAS,EAAE,CAAC;IAAC,OAAO,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;CAC/H,+BAiBA;AAED,8FAA8F;AAC9F,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE;IAC/F,KAAK,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC;IAAC,YAAY,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;CAClF,+BA+DA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type StrategyScope } from "../../lib/logistics-strategy.functions.js";
|
|
2
|
+
export declare function LogisticsStrategyCard({ scope, refKey, description, }: {
|
|
3
|
+
scope: StrategyScope;
|
|
4
|
+
refKey: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=LogisticsStrategyCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogisticsStrategyCard.d.ts","sourceRoot":"","sources":["../../../src/components/klanten/LogisticsStrategyCard.tsx"],"names":[],"mappings":"AAQA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,oCAAoC,CAAC;AAI5C,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,MAAM,EACN,WAAW,GACZ,EAAE;IACD,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,+BAuEA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { friendlyError } from "../../lib/errors.js";
|
|
3
|
+
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
|
4
|
+
import { useServerFn } from "@tanstack/react-start";
|
|
5
|
+
import { Card, CardContent, CardHeader, CardTitle, Badge, toast, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@flowselections/core";
|
|
6
|
+
import { Truck } from "lucide-react";
|
|
7
|
+
import { listLogisticsStrategies, getLogisticsStrategyBinding, setLogisticsStrategyBinding, } from "../../lib/logistics-strategy.functions.js";
|
|
8
|
+
const NONE = "__none__";
|
|
9
|
+
export function LogisticsStrategyCard({ scope, refKey, description, }) {
|
|
10
|
+
const qc = useQueryClient();
|
|
11
|
+
const list = useServerFn(listLogisticsStrategies);
|
|
12
|
+
const get = useServerFn(getLogisticsStrategyBinding);
|
|
13
|
+
const save = useServerFn(setLogisticsStrategyBinding);
|
|
14
|
+
const { data: strategiesData } = useQuery({
|
|
15
|
+
queryKey: ["logistics-strategies"],
|
|
16
|
+
queryFn: () => list({}),
|
|
17
|
+
});
|
|
18
|
+
const { data: bindingData, isLoading } = useQuery({
|
|
19
|
+
queryKey: ["logistics-strategy-binding", scope, refKey],
|
|
20
|
+
queryFn: () => get({ data: { scope, refKey } }),
|
|
21
|
+
enabled: !!refKey,
|
|
22
|
+
});
|
|
23
|
+
const mut = useMutation({
|
|
24
|
+
mutationFn: (strategyId) => save({ data: { scope, refKey, strategyId } }),
|
|
25
|
+
onSuccess: () => {
|
|
26
|
+
toast.success("Logistieke strategie bijgewerkt");
|
|
27
|
+
qc.invalidateQueries({ queryKey: ["logistics-strategy-binding", scope, refKey] });
|
|
28
|
+
},
|
|
29
|
+
onError: (e) => toast.error(friendlyError(e, "Opslaan mislukt")),
|
|
30
|
+
});
|
|
31
|
+
const strategies = strategiesData?.strategies ?? [];
|
|
32
|
+
const current = bindingData?.binding?.strategy_id ?? null;
|
|
33
|
+
return (_jsxs(Card, { children: [_jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0", children: [_jsxs(CardTitle, { className: "flex items-center gap-2", children: [_jsx(Truck, { className: "h-4 w-4 text-muted-foreground" }), "Logistieke strategie"] }), current && _jsx(Badge, { variant: "secondary", children: "Gekoppeld" })] }), _jsxs(CardContent, { className: "space-y-3", children: [_jsx("p", { className: "text-sm text-muted-foreground", children: description ??
|
|
34
|
+
"Bepaalt welke regelset de Logistics Engine gebruikt voor orders van deze klant. Deze keuze wordt als strategyId meegestuurd." }), _jsxs(Select, { value: current ?? NONE, disabled: isLoading || mut.isPending, onValueChange: (v) => mut.mutate(v === NONE ? null : v), children: [_jsx(SelectTrigger, { className: "max-w-md", children: _jsx(SelectValue, { placeholder: "Kies een strategie" }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: NONE, children: "Geen (Engine kiest zelf)" }), strategies.map((s) => (_jsxs(SelectItem, { value: s.id, children: [s.name, s.is_active === false ? " (inactief)" : ""] }, s.id)))] })] }), strategies.length === 0 && (_jsx("p", { className: "text-xs text-muted-foreground", children: "Er zijn nog geen logistieke strategie\u00EBn ingesteld in de Logistics Engine." }))] })] }));
|
|
35
|
+
}
|
|
@@ -6,7 +6,7 @@ import { useServerFn } from "@tanstack/react-start";
|
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { Button, Card, CardContent, Badge, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Switch, Label, } from "@flowselections/core";
|
|
8
8
|
import { MapPin, Globe } from "lucide-react";
|
|
9
|
-
import { BackLink } from "
|
|
9
|
+
import { BackLink } from "../../components/klanten/BackLink.js";
|
|
10
10
|
import { countryNameToFlag } from "../../lib/countries.js";
|
|
11
11
|
import { listFloridayNetwork } from "../../lib/customers.functions.js";
|
|
12
12
|
import { CustomerAvatar } from "../CustomerAvatar.js";
|
|
@@ -8,9 +8,9 @@ import { useServerFn } from "@tanstack/react-start";
|
|
|
8
8
|
import { toast, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "@flowselections/core";
|
|
9
9
|
import { createCustomer, getActiveTwinfieldAdministration } from "../../lib/customers.functions.js";
|
|
10
10
|
import { upsertDeliveryLocation } from "../../lib/delivery-locations.functions.js";
|
|
11
|
-
import { KlantFormulier, emptyKlantFormValues, } from "
|
|
12
|
-
import { useCustomerDefaults, MISSING_DEFAULT_MESSAGE } from "
|
|
13
|
-
import { NieuweKlantLocaties, } from "
|
|
11
|
+
import { KlantFormulier, emptyKlantFormValues, } from "../../components/klanten/KlantFormulier.js";
|
|
12
|
+
import { useCustomerDefaults, MISSING_DEFAULT_MESSAGE } from "../../components/klanten/useCustomerDefaults.js";
|
|
13
|
+
import { NieuweKlantLocaties, } from "../../components/klanten/NieuweKlantLocaties.js";
|
|
14
14
|
export function NieuweKlant() {
|
|
15
15
|
const navigate = useNavigate();
|
|
16
16
|
const qc = useQueryClient();
|
|
@@ -8,8 +8,8 @@ import { useServerFn } from "@tanstack/react-start";
|
|
|
8
8
|
import { toast } from "@flowselections/core";
|
|
9
9
|
import { prepareTwinfieldAdoption, adoptTwinfieldCustomer, } from "../../lib/twinfield-adopt.functions.js";
|
|
10
10
|
import { decodeDeep } from "../../lib/decode-html.js";
|
|
11
|
-
import { BackLink } from "
|
|
12
|
-
import { KlantFormulier, emptyKlantFormValues, } from "
|
|
11
|
+
import { BackLink } from "../../components/klanten/BackLink.js";
|
|
12
|
+
import { KlantFormulier, emptyKlantFormValues, } from "../../components/klanten/KlantFormulier.js";
|
|
13
13
|
/** Zet een tekstwaarde uit de Twinfield-cache om naar een getal (of undefined). */
|
|
14
14
|
function num(v) {
|
|
15
15
|
const s = (v ?? "").trim().replace(",", ".");
|
|
@@ -19,7 +19,7 @@ function createSupabaseClient() {
|
|
|
19
19
|
}
|
|
20
20
|
let _supabase;
|
|
21
21
|
// Import the supabase client like this:
|
|
22
|
-
// import { supabase } from "
|
|
22
|
+
// import { supabase } from "../../integrations/supabase/client.js";
|
|
23
23
|
export const supabase = new Proxy({}, {
|
|
24
24
|
get(_, prop, receiver) {
|
|
25
25
|
if (!_supabase)
|
|
@@ -40,7 +40,7 @@ function createSupabaseAdminClient() {
|
|
|
40
40
|
let _supabaseAdmin;
|
|
41
41
|
// Server-side Supabase client with service role - bypasses RLS
|
|
42
42
|
// SECURITY: Only use this for trusted server-side operations, never expose to client code
|
|
43
|
-
// Import like: import { supabaseAdmin } from "
|
|
43
|
+
// Import like: import { supabaseAdmin } from "../../integrations/supabase/client.server.js";
|
|
44
44
|
export const supabaseAdmin = new Proxy({}, {
|
|
45
45
|
get(_, prop, receiver) {
|
|
46
46
|
if (!_supabaseAdmin)
|
|
@@ -33210,6 +33210,25 @@ export type Database = {
|
|
|
33210
33210
|
};
|
|
33211
33211
|
Returns: undefined;
|
|
33212
33212
|
};
|
|
33213
|
+
aanbiedingsmail_campagnes_lijst: {
|
|
33214
|
+
Args: {
|
|
33215
|
+
p_limit?: number;
|
|
33216
|
+
p_offset?: number;
|
|
33217
|
+
p_status?: string;
|
|
33218
|
+
p_tot?: string;
|
|
33219
|
+
p_van?: string;
|
|
33220
|
+
p_zoek?: string;
|
|
33221
|
+
};
|
|
33222
|
+
Returns: Json;
|
|
33223
|
+
};
|
|
33224
|
+
aanbiedingsmail_campagnes_tellers: {
|
|
33225
|
+
Args: {
|
|
33226
|
+
p_tot?: string;
|
|
33227
|
+
p_van?: string;
|
|
33228
|
+
p_zoek?: string;
|
|
33229
|
+
};
|
|
33230
|
+
Returns: Json;
|
|
33231
|
+
};
|
|
33213
33232
|
aanbiedingsmail_create_order: {
|
|
33214
33233
|
Args: {
|
|
33215
33234
|
p_offer_order_id: string;
|
|
@@ -33246,6 +33265,15 @@ export type Database = {
|
|
|
33246
33265
|
};
|
|
33247
33266
|
Returns: Json;
|
|
33248
33267
|
};
|
|
33268
|
+
aanbiedingsmail_ontvangers_lijst: {
|
|
33269
|
+
Args: {
|
|
33270
|
+
p_campaign_id: string;
|
|
33271
|
+
p_limit?: number;
|
|
33272
|
+
p_offset?: number;
|
|
33273
|
+
p_zoek?: string;
|
|
33274
|
+
};
|
|
33275
|
+
Returns: Json;
|
|
33276
|
+
};
|
|
33249
33277
|
aanbiedingsmail_place_offer_order: {
|
|
33250
33278
|
Args: {
|
|
33251
33279
|
p_code: string;
|
|
@@ -33265,6 +33293,12 @@ export type Database = {
|
|
|
33265
33293
|
};
|
|
33266
33294
|
Returns: string;
|
|
33267
33295
|
};
|
|
33296
|
+
aanbiedingsmail_status_sleutel: {
|
|
33297
|
+
Args: {
|
|
33298
|
+
p_status: string;
|
|
33299
|
+
};
|
|
33300
|
+
Returns: string;
|
|
33301
|
+
};
|
|
33268
33302
|
aanbiedingsmail_stock_key: {
|
|
33269
33303
|
Args: {
|
|
33270
33304
|
p_ref: string;
|
|
@@ -35882,6 +35916,19 @@ export type Database = {
|
|
|
35882
35916
|
};
|
|
35883
35917
|
Returns: Json;
|
|
35884
35918
|
};
|
|
35919
|
+
inkoop_artikelen_page: {
|
|
35920
|
+
Args: {
|
|
35921
|
+
_asc?: boolean;
|
|
35922
|
+
_limit?: number;
|
|
35923
|
+
_location?: string;
|
|
35924
|
+
_offset?: number;
|
|
35925
|
+
_search?: string;
|
|
35926
|
+
_sort?: string;
|
|
35927
|
+
_tab?: string;
|
|
35928
|
+
_unit?: string;
|
|
35929
|
+
};
|
|
35930
|
+
Returns: Json;
|
|
35931
|
+
};
|
|
35885
35932
|
inkoop_cancel_line: {
|
|
35886
35933
|
Args: {
|
|
35887
35934
|
_item_id: string;
|
|
@@ -35931,6 +35978,18 @@ export type Database = {
|
|
|
35931
35978
|
Args: never;
|
|
35932
35979
|
Returns: string;
|
|
35933
35980
|
};
|
|
35981
|
+
inkoop_orders_page: {
|
|
35982
|
+
Args: {
|
|
35983
|
+
_delivery_from?: string;
|
|
35984
|
+
_delivery_to?: string;
|
|
35985
|
+
_limit?: number;
|
|
35986
|
+
_offset?: number;
|
|
35987
|
+
_search?: string;
|
|
35988
|
+
_supplier_id?: string;
|
|
35989
|
+
_tab?: string;
|
|
35990
|
+
};
|
|
35991
|
+
Returns: Json;
|
|
35992
|
+
};
|
|
35934
35993
|
inkoop_process_request: {
|
|
35935
35994
|
Args: {
|
|
35936
35995
|
_request_id: string;
|
|
@@ -44758,6 +44817,12 @@ export type Database = {
|
|
|
44758
44817
|
};
|
|
44759
44818
|
Returns: Json;
|
|
44760
44819
|
};
|
|
44820
|
+
scan_kar_scans_lezen: {
|
|
44821
|
+
Args: {
|
|
44822
|
+
p_kar_id: string;
|
|
44823
|
+
};
|
|
44824
|
+
Returns: Json;
|
|
44825
|
+
};
|
|
44761
44826
|
scan_kar_voortgang: {
|
|
44762
44827
|
Args: {
|
|
44763
44828
|
p_cart_id: string;
|
|
@@ -44774,6 +44839,17 @@ export type Database = {
|
|
|
44774
44839
|
};
|
|
44775
44840
|
Returns: Json;
|
|
44776
44841
|
};
|
|
44842
|
+
scan_karren_overzicht: {
|
|
44843
|
+
Args: {
|
|
44844
|
+
p_limit?: number;
|
|
44845
|
+
p_offset?: number;
|
|
44846
|
+
p_status?: string;
|
|
44847
|
+
p_tot?: string;
|
|
44848
|
+
p_van?: string;
|
|
44849
|
+
p_zoek?: string;
|
|
44850
|
+
};
|
|
44851
|
+
Returns: Json;
|
|
44852
|
+
};
|
|
44777
44853
|
scan_koppelcode_maken: {
|
|
44778
44854
|
Args: {
|
|
44779
44855
|
p_scanner_id: string;
|