@flowselections/floriday-klanten-module 1.0.91 → 1.0.93
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/klanten/GroupedKlantDetail.d.ts.map +1 -1
- package/dist-lib/components/klanten/GroupedKlantDetail.js +20 -1
- package/dist-lib/components/klanten/KlantenOverzicht.d.ts.map +1 -1
- package/dist-lib/components/klanten/KlantenOverzicht.js +19 -6
- package/dist-lib/components/klanten/pricegroups/CustomerPriceGroupSelect.d.ts.map +1 -1
- package/dist-lib/components/klanten/pricegroups/CustomerPriceGroupSelect.js +18 -6
- package/dist-lib/components/klanten/pricegroups/PriceGroupFormPage.d.ts.map +1 -1
- package/dist-lib/components/klanten/pricegroups/PriceGroupFormPage.js +26 -2
- package/dist-lib/components/settings/CustomerFieldsCard.d.ts.map +1 -1
- package/dist-lib/components/settings/CustomerFieldsCard.js +25 -6
- package/dist-lib/integrations/supabase/types.d.ts +721 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
- package/dist-lib/lib/carriers.functions.js +5 -4
- package/dist-lib/lib/customer-assortment.functions.d.ts.map +1 -1
- package/dist-lib/lib/customer-assortment.functions.js +7 -6
- package/dist-lib/lib/customer-schemas.d.ts +13 -13
- package/dist-lib/lib/customers.functions.d.ts +37 -7
- package/dist-lib/lib/customers.functions.d.ts.map +1 -1
- package/dist-lib/lib/customers.functions.js +74 -9
- package/dist-lib/lib/delivery-locations.functions.d.ts +3 -3
- package/dist-lib/lib/delivery-locations.functions.d.ts.map +1 -1
- package/dist-lib/lib/delivery-locations.functions.js +9 -8
- package/dist-lib/lib/fetch-all-paged.d.ts +16 -0
- package/dist-lib/lib/fetch-all-paged.d.ts.map +1 -0
- package/dist-lib/lib/fetch-all-paged.js +28 -0
- package/dist-lib/lib/floriday-assortment.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-assortment.functions.js +5 -4
- package/dist-lib/lib/klanten-bron.d.ts +12 -0
- package/dist-lib/lib/klanten-bron.d.ts.map +1 -0
- package/dist-lib/lib/klanten-bron.js +13 -0
- package/dist-lib/lib/logistics-strategy.functions.d.ts +2 -2
- package/dist-lib/lib/price-groups-local.functions.d.ts +43 -0
- package/dist-lib/lib/price-groups-local.functions.d.ts.map +1 -1
- package/dist-lib/lib/price-groups-local.functions.js +121 -20
- package/dist-lib/lib/price-groups.functions.d.ts.map +1 -1
- package/dist-lib/lib/price-groups.functions.js +5 -4
- package/dist-lib/lib/pricing.d.ts.map +1 -1
- package/dist-lib/lib/pricing.js +11 -4
- package/dist-lib/lib/twinfield-adopt.functions.d.ts +2 -2
- package/dist-lib/lib/twinfield-defaults.d.ts +2 -2
- package/package.json +7 -3
- package/schema/klanten.sql +247 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Bronfilter van het klantenoverzicht: Alle / Floriday / Buiten Floriday. */
|
|
2
|
+
export type KlantBron = "all" | "floriday" | "buiten";
|
|
3
|
+
export declare const BRON_LABELS: Record<KlantBron, string>;
|
|
4
|
+
export declare function isFloridayKlant(row: {
|
|
5
|
+
providers?: string[] | null;
|
|
6
|
+
floriday?: boolean | null;
|
|
7
|
+
}): boolean;
|
|
8
|
+
export declare function matchesBron(row: {
|
|
9
|
+
providers?: string[] | null;
|
|
10
|
+
floriday?: boolean | null;
|
|
11
|
+
}, bron: KlantBron): boolean;
|
|
12
|
+
//# sourceMappingURL=klanten-bron.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"klanten-bron.d.ts","sourceRoot":"","sources":["../../src/lib/klanten-bron.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEtD,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAIjD,CAAC;AAEF,wBAAgB,eAAe,CAAC,GAAG,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,GAAG,OAAO,CAExG;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAGrH"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const BRON_LABELS = {
|
|
2
|
+
all: "Alle",
|
|
3
|
+
floriday: "Floriday",
|
|
4
|
+
buiten: "Buiten Floriday",
|
|
5
|
+
};
|
|
6
|
+
export function isFloridayKlant(row) {
|
|
7
|
+
return !!row.floriday || (row.providers ?? []).includes("floriday");
|
|
8
|
+
}
|
|
9
|
+
export function matchesBron(row, bron) {
|
|
10
|
+
if (bron === "all")
|
|
11
|
+
return true;
|
|
12
|
+
return bron === "floriday" ? isFloridayKlant(row) : !isFloridayKlant(row);
|
|
13
|
+
}
|
|
@@ -23,7 +23,7 @@ export declare const getLogisticsStrategyBinding: import("@tanstack/start-client
|
|
|
23
23
|
scope: StrategyScope;
|
|
24
24
|
refKey: string;
|
|
25
25
|
}) => {
|
|
26
|
-
scope: "
|
|
26
|
+
scope: "customer" | "group";
|
|
27
27
|
refKey: string;
|
|
28
28
|
}, Promise<{
|
|
29
29
|
binding: {
|
|
@@ -43,7 +43,7 @@ export declare const setLogisticsStrategyBinding: import("@tanstack/start-client
|
|
|
43
43
|
refKey: string;
|
|
44
44
|
strategyId: string | null;
|
|
45
45
|
}) => {
|
|
46
|
-
scope: "
|
|
46
|
+
scope: "customer" | "group";
|
|
47
47
|
refKey: string;
|
|
48
48
|
strategyId: string | null;
|
|
49
49
|
}, Promise<{
|
|
@@ -51,6 +51,7 @@ export type PriceGroupRow = PriceGroupInput & {
|
|
|
51
51
|
created_at: string;
|
|
52
52
|
updated_at: string;
|
|
53
53
|
};
|
|
54
|
+
export declare const FLORIDAY_GROEP_MELDING = "Deze prijsgroep beheer je in Floriday. Maak een kopie als eigen prijsgroep om hem hier aan te passen.";
|
|
54
55
|
export declare const listCustomerPriceGroups: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
|
|
55
56
|
supabase: import("../integrations/supabase/auth-middleware.js").AuthedSupabaseClient;
|
|
56
57
|
userId: string;
|
|
@@ -339,5 +340,47 @@ export declare const setPriceGroupItemPrice: import("@tanstack/start-client-core
|
|
|
339
340
|
ok: true;
|
|
340
341
|
removed: false;
|
|
341
342
|
}>>;
|
|
343
|
+
/** Maak een eigen kopie van een (Floriday-)prijsgroep: instellingen, leden en artikelprijzen. */
|
|
344
|
+
export declare const copyPriceGroupAsOwn: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
|
|
345
|
+
supabase: import("../integrations/supabase/auth-middleware.js").AuthedSupabaseClient;
|
|
346
|
+
userId: string;
|
|
347
|
+
claims: import("@supabase/auth-js").JwtPayload;
|
|
348
|
+
}, undefined, undefined, undefined>], (input: unknown) => {
|
|
349
|
+
id: string;
|
|
350
|
+
}, Promise<{
|
|
351
|
+
id: string;
|
|
352
|
+
members: number;
|
|
353
|
+
prices: number;
|
|
354
|
+
}>>;
|
|
355
|
+
/** Prijsgroep die de prijs van een klant bepaalt (eigen groep gaat voor Floriday-groep). */
|
|
356
|
+
export declare const getBepalendePrijsgroep: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
|
|
357
|
+
supabase: import("../integrations/supabase/auth-middleware.js").AuthedSupabaseClient;
|
|
358
|
+
userId: string;
|
|
359
|
+
claims: import("@supabase/auth-js").JwtPayload;
|
|
360
|
+
}, undefined, undefined, undefined>], (input: unknown) => {
|
|
361
|
+
customerId: string;
|
|
362
|
+
}, Promise<{
|
|
363
|
+
priceGroupId: string | null;
|
|
364
|
+
naam: string | null;
|
|
365
|
+
bron: "floriday" | "eigen" | null;
|
|
366
|
+
alle: {
|
|
367
|
+
id: string;
|
|
368
|
+
naam: string;
|
|
369
|
+
bron: "eigen" | "floriday";
|
|
370
|
+
}[];
|
|
371
|
+
}>>;
|
|
372
|
+
/**
|
|
373
|
+
* Eerste keer bewerken van een Floriday-klant zonder eigen klantrij: maak de klantrij aan via
|
|
374
|
+
* promote_floriday_customer (het enige aanmaakpad; vult alleen lege velden, nooit naar Twinfield).
|
|
375
|
+
*/
|
|
376
|
+
export declare const ensureKlantRijVoorFloriday: import("@tanstack/start-client-core").OptionalFetcher<readonly [import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
|
|
377
|
+
supabase: import("../integrations/supabase/auth-middleware.js").AuthedSupabaseClient;
|
|
378
|
+
userId: string;
|
|
379
|
+
claims: import("@supabase/auth-js").JwtPayload;
|
|
380
|
+
}, undefined, undefined, undefined>], (input: unknown) => {
|
|
381
|
+
organizationId: string;
|
|
382
|
+
}, Promise<{
|
|
383
|
+
customerId: string;
|
|
384
|
+
}>>;
|
|
342
385
|
export {};
|
|
343
386
|
//# sourceMappingURL=price-groups-local.functions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price-groups-local.functions.d.ts","sourceRoot":"","sources":["../../src/lib/price-groups-local.functions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"price-groups-local.functions.d.ts","sourceRoot":"","sources":["../../src/lib/price-groups-local.functions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA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eAAO,MAAM,6BAA6B;;;;8CAEhB,OAAO;;;;;;GA+B7B,CAAC;AAML,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;8CAEX,OAAO;;;YAGuB,mBAAmB,EAAE;GAazE,CAAC;AAEL,eAAO,MAAM,sBAAsB;;;;8CAET,OAAO;;;;;;;;;;;GAgD7B,CAAC;AAEL,iGAAiG;AACjG,eAAO,MAAM,mBAAmB;;;;8CAEN,OAAO;;;QAgCL,MAAM;;;GAC9B,CAAC;AAEL,4FAA4F;AAC5F,eAAO,MAAM,sBAAsB;;;;8CAET,OAAO;;;;;;;YASa,MAAM;cAAQ,MAAM;cAAQ,OAAO,GAAG,UAAU;;GAE1F,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;8CAEb,OAAO;;;;GAgB7B,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
4
|
+
import { fetchAllPaged, fetchAllPagedResult } from "./fetch-all-paged.js";
|
|
4
5
|
const priceGroupInputSchema = z.object({
|
|
5
6
|
name: z.string().trim().min(1, "Naam is verplicht").max(120),
|
|
6
7
|
currency: z.string().trim().min(3).max(3).default("EUR"),
|
|
@@ -18,6 +19,17 @@ const priceGroupInputSchema = z.object({
|
|
|
18
19
|
rounding_step: z.number().positive().optional(),
|
|
19
20
|
is_active: z.boolean().default(true),
|
|
20
21
|
});
|
|
22
|
+
export const FLORIDAY_GROEP_MELDING = "Deze prijsgroep beheer je in Floriday. Maak een kopie als eigen prijsgroep om hem hier aan te passen.";
|
|
23
|
+
/** Floriday-prijsgroepen zijn alleen-lezen: Floriday heeft geen schrijfroute voor prijsgroepen. */
|
|
24
|
+
async function assertEigenPrijsgroep(sb, id) {
|
|
25
|
+
const { data, error } = await sb.from("customer_price_groups").select("source").eq("id", id).maybeSingle();
|
|
26
|
+
if (error) {
|
|
27
|
+
console.error("[prijsgroepen] controle bron mislukt", error);
|
|
28
|
+
throw new Error("Prijsgroep kon niet worden gecontroleerd. Probeer het opnieuw.");
|
|
29
|
+
}
|
|
30
|
+
if (data?.source === "floriday")
|
|
31
|
+
throw new Error(FLORIDAY_GROEP_MELDING);
|
|
32
|
+
}
|
|
21
33
|
export const listCustomerPriceGroups = createServerFn({ method: "GET" })
|
|
22
34
|
.middleware([requireSupabaseAuth])
|
|
23
35
|
.handler(async ({ context }) => {
|
|
@@ -28,9 +40,7 @@ export const listCustomerPriceGroups = createServerFn({ method: "GET" })
|
|
|
28
40
|
.order("created_at", { ascending: true });
|
|
29
41
|
if (error)
|
|
30
42
|
throw new Error(error.message);
|
|
31
|
-
const
|
|
32
|
-
.from("customer_price_group_members")
|
|
33
|
-
.select("price_group_id");
|
|
43
|
+
const members = await fetchAllPaged((from, to) => context.supabase.from("customer_price_group_members").select("price_group_id").order("id").range(from, to));
|
|
34
44
|
const counts = new Map();
|
|
35
45
|
for (const m of members ?? []) {
|
|
36
46
|
const id = m.price_group_id;
|
|
@@ -54,10 +64,10 @@ export const getCustomerPriceGroup = createServerFn({ method: "GET" })
|
|
|
54
64
|
.single();
|
|
55
65
|
if (error)
|
|
56
66
|
throw new Error(error.message);
|
|
57
|
-
const { data: members } = await context.supabase
|
|
67
|
+
const { data: members } = await fetchAllPagedResult((from, to) => context.supabase
|
|
58
68
|
.from("customer_price_group_members")
|
|
59
69
|
.select("customer_key")
|
|
60
|
-
.eq("price_group_id", data.id);
|
|
70
|
+
.eq("price_group_id", data.id).range(from, to));
|
|
61
71
|
return {
|
|
62
72
|
group: {
|
|
63
73
|
...group,
|
|
@@ -91,6 +101,7 @@ export const updateCustomerPriceGroup = createServerFn({ method: "POST" })
|
|
|
91
101
|
.middleware([requireSupabaseAuth])
|
|
92
102
|
.inputValidator((input) => z.object({ id: z.string().uuid(), input: priceGroupInputSchema }).parse(input))
|
|
93
103
|
.handler(async ({ data, context }) => {
|
|
104
|
+
await assertEigenPrijsgroep(context.supabase, data.id);
|
|
94
105
|
const { data: row, error } = await context.supabase
|
|
95
106
|
.from("customer_price_groups")
|
|
96
107
|
.update(data.input)
|
|
@@ -126,6 +137,7 @@ export const setPriceGroupMembers = createServerFn({ method: "POST" })
|
|
|
126
137
|
.middleware([requireSupabaseAuth])
|
|
127
138
|
.inputValidator((input) => z.object({ id: z.string().uuid(), customerKeys: z.array(z.string().min(1)) }).parse(input))
|
|
128
139
|
.handler(async ({ data, context }) => {
|
|
140
|
+
await assertEigenPrijsgroep(context.supabase, data.id);
|
|
129
141
|
const { error: delErr } = await context.supabase
|
|
130
142
|
.from("customer_price_group_members")
|
|
131
143
|
.delete()
|
|
@@ -153,10 +165,10 @@ export const getPriceGroupsForCustomer = createServerFn({ method: "GET" })
|
|
|
153
165
|
.middleware([requireSupabaseAuth])
|
|
154
166
|
.inputValidator((input) => z.object({ customerKey: z.string().min(1) }).parse(input))
|
|
155
167
|
.handler(async ({ data, context }) => {
|
|
156
|
-
const { data: members, error } = await context.supabase
|
|
168
|
+
const { data: members, error } = await fetchAllPagedResult((from, to) => context.supabase
|
|
157
169
|
.from("customer_price_group_members")
|
|
158
170
|
.select("price_group_id")
|
|
159
|
-
.eq("customer_key", data.customerKey);
|
|
171
|
+
.eq("customer_key", data.customerKey).range(from, to));
|
|
160
172
|
if (error)
|
|
161
173
|
throw new Error(error.message);
|
|
162
174
|
const ids = (members ?? []).map((m) => m.price_group_id);
|
|
@@ -178,9 +190,9 @@ export const resolveCustomerKeyForLocalCustomer = createServerFn({ method: "GET"
|
|
|
178
190
|
.middleware([requireSupabaseAuth])
|
|
179
191
|
.inputValidator((input) => z.object({ customerId: z.string().min(1) }).parse(input))
|
|
180
192
|
.handler(async ({ data, context }) => {
|
|
181
|
-
const { data: rows, error } = await context.supabase
|
|
193
|
+
const { data: rows, error } = await fetchAllPagedResult((from, to) => context.supabase
|
|
182
194
|
.from("external_customers_grouped")
|
|
183
|
-
.select("group_key, sources");
|
|
195
|
+
.select("group_key, sources").range(from, to));
|
|
184
196
|
if (error)
|
|
185
197
|
throw new Error(error.message);
|
|
186
198
|
for (const row of (rows ?? [])) {
|
|
@@ -202,10 +214,23 @@ export const setPriceGroupForCustomer = createServerFn({ method: "POST" })
|
|
|
202
214
|
})
|
|
203
215
|
.parse(input))
|
|
204
216
|
.handler(async ({ data, context }) => {
|
|
205
|
-
|
|
217
|
+
// Alleen eigen prijsgroepen wijzigen; lidmaatschap van Floriday-groepen blijft staan.
|
|
218
|
+
if (data.priceGroupId)
|
|
219
|
+
await assertEigenPrijsgroep(context.supabase, data.priceGroupId);
|
|
220
|
+
const { data: floridayGroups, error: fgErr } = await context.supabase
|
|
221
|
+
.from("customer_price_groups")
|
|
222
|
+
.select("id")
|
|
223
|
+
.eq("source", "floriday");
|
|
224
|
+
if (fgErr)
|
|
225
|
+
throw new Error(fgErr.message);
|
|
226
|
+
const fdIds = (floridayGroups ?? []).map((g) => g.id);
|
|
227
|
+
let del = context.supabase
|
|
206
228
|
.from("customer_price_group_members")
|
|
207
229
|
.delete()
|
|
208
230
|
.eq("customer_key", data.customerKey);
|
|
231
|
+
if (fdIds.length > 0)
|
|
232
|
+
del = del.not("price_group_id", "in", `(${fdIds.join(",")})`);
|
|
233
|
+
const { error: delErr } = await del;
|
|
209
234
|
if (delErr)
|
|
210
235
|
throw new Error(delErr.message);
|
|
211
236
|
if (data.priceGroupId) {
|
|
@@ -240,9 +265,9 @@ export const importFloridayPriceGroups = createServerFn({ method: "POST" })
|
|
|
240
265
|
.inputValidator((input) => z.object({ preview: z.boolean().default(false) }).parse(input ?? {}))
|
|
241
266
|
.handler(async ({ data, context }) => {
|
|
242
267
|
const sb = context.supabase;
|
|
243
|
-
const { data: cacheRows, error: cacheErr } = await sb
|
|
268
|
+
const { data: cacheRows, error: cacheErr } = await fetchAllPagedResult((from, to) => sb
|
|
244
269
|
.from("floriday_price_groups_cache")
|
|
245
|
-
.select("floriday_id, data, is_deleted");
|
|
270
|
+
.select("floriday_id, data, is_deleted").range(from, to));
|
|
246
271
|
if (cacheErr)
|
|
247
272
|
throw new Error(`floriday_price_groups_cache: ${cacheErr.message}`);
|
|
248
273
|
const { data: existingRows, error: exErr } = await sb
|
|
@@ -257,9 +282,9 @@ export const importFloridayPriceGroups = createServerFn({ method: "POST" })
|
|
|
257
282
|
existing.set(String(r.external_id), r);
|
|
258
283
|
// Floriday organizationId → group_key van de klant in dit systeem
|
|
259
284
|
const orgToKey = new Map();
|
|
260
|
-
const { data: grouped } = await sb
|
|
285
|
+
const { data: grouped } = await fetchAllPagedResult((from, to) => sb
|
|
261
286
|
.from("external_customers_grouped")
|
|
262
|
-
.select("group_key, sources");
|
|
287
|
+
.select("group_key, sources").range(from, to));
|
|
263
288
|
for (const row of grouped ?? []) {
|
|
264
289
|
const sources = Array.isArray(row.sources) ? row.sources : [];
|
|
265
290
|
for (const s of sources) {
|
|
@@ -403,11 +428,11 @@ async function describeUnknownOrganizations(sb, orgIds, groupsByOrg) {
|
|
|
403
428
|
return [];
|
|
404
429
|
const info = new Map();
|
|
405
430
|
for (let i = 0; i < orgIds.length; i += 200) {
|
|
406
|
-
const { data: rows } = await sb
|
|
431
|
+
const { data: rows } = await fetchAllPagedResult((from, to) => sb
|
|
407
432
|
.from("floriday_customers_cache")
|
|
408
433
|
.select("organization_id, name, data, fetched_at")
|
|
409
434
|
.in("organization_id", orgIds.slice(i, i + 200))
|
|
410
|
-
.order("fetched_at", { ascending: false });
|
|
435
|
+
.order("fetched_at", { ascending: false }).range(from, to));
|
|
411
436
|
for (const r of rows ?? [])
|
|
412
437
|
if (!info.has(r.organization_id))
|
|
413
438
|
info.set(r.organization_id, r);
|
|
@@ -465,10 +490,10 @@ export const listUnknownFloridayMembers = createServerFn({ method: "GET" })
|
|
|
465
490
|
async function knownFloridayOrgs(sb, orgIds) {
|
|
466
491
|
const out = new Set();
|
|
467
492
|
for (let i = 0; i < orgIds.length; i += 200) {
|
|
468
|
-
const { data: rows } = await sb
|
|
493
|
+
const { data: rows } = await fetchAllPagedResult((from, to) => sb
|
|
469
494
|
.from("customers")
|
|
470
495
|
.select("floriday_organization_id")
|
|
471
|
-
.in("floriday_organization_id", orgIds.slice(i, i + 200));
|
|
496
|
+
.in("floriday_organization_id", orgIds.slice(i, i + 200)).range(from, to));
|
|
472
497
|
for (const r of rows ?? [])
|
|
473
498
|
if (r.floriday_organization_id)
|
|
474
499
|
out.add(String(r.floriday_organization_id));
|
|
@@ -515,10 +540,10 @@ export const listPriceGroupItemPrices = createServerFn({ method: "POST" })
|
|
|
515
540
|
.middleware([requireSupabaseAuth])
|
|
516
541
|
.inputValidator((input) => z.object({ priceGroupId: z.string().uuid() }).parse(input))
|
|
517
542
|
.handler(async ({ data, context }) => {
|
|
518
|
-
const { data: rows, error } = await context.supabase
|
|
543
|
+
const { data: rows, error } = await fetchAllPagedResult((from, to) => context.supabase
|
|
519
544
|
.from("trade_item_prices")
|
|
520
545
|
.select("trade_item_key, price_per_piece, currency")
|
|
521
|
-
.eq("price_group_id", data.priceGroupId);
|
|
546
|
+
.eq("price_group_id", data.priceGroupId).range(from, to));
|
|
522
547
|
if (error)
|
|
523
548
|
throw new Error(error.message);
|
|
524
549
|
return {
|
|
@@ -540,6 +565,7 @@ export const setPriceGroupItemPrice = createServerFn({ method: "POST" })
|
|
|
540
565
|
})
|
|
541
566
|
.parse(input))
|
|
542
567
|
.handler(async ({ data, context }) => {
|
|
568
|
+
await assertEigenPrijsgroep(context.supabase, data.priceGroupId);
|
|
543
569
|
if (data.price == null) {
|
|
544
570
|
const { error } = await context.supabase
|
|
545
571
|
.from("trade_item_prices")
|
|
@@ -581,3 +607,78 @@ export const setPriceGroupItemPrice = createServerFn({ method: "POST" })
|
|
|
581
607
|
}
|
|
582
608
|
return { ok: true, removed: false };
|
|
583
609
|
});
|
|
610
|
+
/** Maak een eigen kopie van een (Floriday-)prijsgroep: instellingen, leden en artikelprijzen. */
|
|
611
|
+
export const copyPriceGroupAsOwn = createServerFn({ method: "POST" })
|
|
612
|
+
.middleware([requireSupabaseAuth])
|
|
613
|
+
.inputValidator((input) => z.object({ id: z.string().uuid() }).parse(input))
|
|
614
|
+
.handler(async ({ data, context }) => {
|
|
615
|
+
const sb = context.supabase;
|
|
616
|
+
const { data: src, error } = await sb.from("customer_price_groups").select("*").eq("id", data.id).single();
|
|
617
|
+
if (error)
|
|
618
|
+
throw new Error(error.message);
|
|
619
|
+
const { data: maxRow } = await sb
|
|
620
|
+
.from("customer_price_groups").select("sort_order").order("sort_order", { ascending: false }).limit(1).maybeSingle();
|
|
621
|
+
const { id: _id, created_at: _c, updated_at: _u, external_id: _e, external_synced_at: _s, source: _src, ...rest } = src;
|
|
622
|
+
const { data: copy, error: insErr } = await sb
|
|
623
|
+
.from("customer_price_groups")
|
|
624
|
+
.insert({ ...rest, name: `${src.name} (eigen)`, source: "local", owner_id: context.userId, sort_order: (maxRow?.sort_order ?? 0) + 1 })
|
|
625
|
+
.select("id")
|
|
626
|
+
.single();
|
|
627
|
+
if (insErr)
|
|
628
|
+
throw new Error(insErr.message);
|
|
629
|
+
const members = await fetchAllPaged((from, to) => sb.from("customer_price_group_members").select("customer_key").eq("price_group_id", data.id).order("id").range(from, to));
|
|
630
|
+
if (members.length > 0) {
|
|
631
|
+
const { error: mErr } = await sb.from("customer_price_group_members").insert(Array.from(new Set(members.map((m) => m.customer_key))).map((k) => ({ price_group_id: copy.id, customer_key: k, owner_id: context.userId })));
|
|
632
|
+
if (mErr)
|
|
633
|
+
throw new Error(mErr.message);
|
|
634
|
+
}
|
|
635
|
+
const prices = await fetchAllPaged((from, to) => sb.from("trade_item_prices").select("trade_item_key, price_per_piece, currency").eq("price_group_id", data.id).is("supply_line_id", null).order("id").range(from, to));
|
|
636
|
+
if (prices.length > 0) {
|
|
637
|
+
const { error: pErr } = await sb.from("trade_item_prices").insert(prices.map((p) => ({ ...p, price_group_id: copy.id, user_id: context.userId })));
|
|
638
|
+
if (pErr)
|
|
639
|
+
throw new Error(pErr.message);
|
|
640
|
+
}
|
|
641
|
+
return { id: copy.id, members: members.length, prices: prices.length };
|
|
642
|
+
});
|
|
643
|
+
/** Prijsgroep die de prijs van een klant bepaalt (eigen groep gaat voor Floriday-groep). */
|
|
644
|
+
export const getBepalendePrijsgroep = createServerFn({ method: "POST" })
|
|
645
|
+
.middleware([requireSupabaseAuth])
|
|
646
|
+
.inputValidator((input) => z.object({ customerId: z.string().uuid() }).parse(input))
|
|
647
|
+
.handler(async ({ data, context }) => {
|
|
648
|
+
const { data: rows, error } = await context.supabase.rpc("klanten_prijsgroep_voor_klant", { p_customer_id: data.customerId });
|
|
649
|
+
if (error)
|
|
650
|
+
throw new Error(error.message);
|
|
651
|
+
const r = (rows ?? [])[0] ?? null;
|
|
652
|
+
return {
|
|
653
|
+
priceGroupId: r?.price_group_id ?? null,
|
|
654
|
+
naam: r?.naam ?? null,
|
|
655
|
+
bron: r?.bron ?? null,
|
|
656
|
+
alle: (r?.alle_groepen ?? []),
|
|
657
|
+
};
|
|
658
|
+
});
|
|
659
|
+
/**
|
|
660
|
+
* Eerste keer bewerken van een Floriday-klant zonder eigen klantrij: maak de klantrij aan via
|
|
661
|
+
* promote_floriday_customer (het enige aanmaakpad; vult alleen lege velden, nooit naar Twinfield).
|
|
662
|
+
*/
|
|
663
|
+
export const ensureKlantRijVoorFloriday = createServerFn({ method: "POST" })
|
|
664
|
+
.middleware([requireSupabaseAuth])
|
|
665
|
+
.inputValidator((input) => z.object({ organizationId: z.string().min(1).max(64) }).parse(input))
|
|
666
|
+
.handler(async ({ data, context }) => {
|
|
667
|
+
const sb = context.supabase;
|
|
668
|
+
const { data: bestaand, error: bErr } = await sb
|
|
669
|
+
.from("customers").select("id").eq("floriday_organization_id", data.organizationId).limit(1).maybeSingle();
|
|
670
|
+
if (bErr)
|
|
671
|
+
throw new Error(bErr.message);
|
|
672
|
+
if (bestaand?.id)
|
|
673
|
+
return { customerId: String(bestaand.id) };
|
|
674
|
+
const { supabaseAdmin } = await import("../integrations/supabase/client.server.js");
|
|
675
|
+
const { data: customerId, error } = await supabaseAdmin.rpc("promote_floriday_customer", { _org_id: data.organizationId });
|
|
676
|
+
if (error) {
|
|
677
|
+
console.error("[klanten] klantrij aanmaken voor Floriday-klant mislukt", error);
|
|
678
|
+
throw new Error("Deze klant kan nu niet worden bewerkt. Probeer het opnieuw.");
|
|
679
|
+
}
|
|
680
|
+
if (!customerId)
|
|
681
|
+
throw new Error("Deze klant kan nu niet worden bewerkt. Probeer het opnieuw.");
|
|
682
|
+
await sb.from("customers").update({ twinfield_create_on_insert: false }).eq("id", customerId).is("twinfield_code", null);
|
|
683
|
+
return { customerId: String(customerId) };
|
|
684
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price-groups.functions.d.ts","sourceRoot":"","sources":["../../src/lib/price-groups.functions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"price-groups.functions.d.ts","sourceRoot":"","sources":["../../src/lib/price-groups.functions.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;AAwC5D;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;8CAElB;IAAE,eAAe,EAAE,MAAM,EAAE,CAAA;CAAE;;;oBAKS,gBAAgB;GA4B5E,CAAC;AAEL,sEAAsE;AACtE,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,GAAG,EACb,eAAe,EAAE,MAAM,EAAE,GACxB,OAAO,CAAC,gBAAgB,CAAC,CAqD3B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fetchAllPagedResult } from "./fetch-all-paged.js";
|
|
1
2
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
3
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
3
4
|
function extractName(data, fallbackId) {
|
|
@@ -46,10 +47,10 @@ export const listPriceGroupsForOrganizations = createServerFn({ method: "POST" }
|
|
|
46
47
|
.handler(async ({ data, context }) => {
|
|
47
48
|
if (data.organizationIds.length === 0)
|
|
48
49
|
return { byOrganization: {} };
|
|
49
|
-
const { data: rows, error } = await context.supabase
|
|
50
|
+
const { data: rows, error } = await fetchAllPagedResult((from, to) => context.supabase
|
|
50
51
|
.from("floriday_price_groups_cache")
|
|
51
52
|
.select("floriday_id, data, is_deleted")
|
|
52
|
-
.eq("is_deleted", false);
|
|
53
|
+
.eq("is_deleted", false).range(from, to));
|
|
53
54
|
if (error)
|
|
54
55
|
throw new Error(`floriday_price_groups_cache: ${error.message}`);
|
|
55
56
|
const wanted = new Set(data.organizationIds);
|
|
@@ -82,10 +83,10 @@ export async function buildPriceGroupsMap(supabase, organizationIds) {
|
|
|
82
83
|
const ids = Array.from(new Set(organizationIds.filter((v) => typeof v === "string" && v)));
|
|
83
84
|
if (ids.length === 0)
|
|
84
85
|
return {};
|
|
85
|
-
const { data: rows, error } = await supabase
|
|
86
|
+
const { data: rows, error } = await fetchAllPagedResult((from, to) => supabase
|
|
86
87
|
.from("floriday_price_groups_cache")
|
|
87
88
|
.select("floriday_id, data, is_deleted")
|
|
88
|
-
.eq("is_deleted", false);
|
|
89
|
+
.eq("is_deleted", false).range(from, to));
|
|
89
90
|
if (error)
|
|
90
91
|
throw new Error(`floriday_price_groups_cache: ${error.message}`);
|
|
91
92
|
const wanted = new Set(ids);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../src/lib/pricing.ts"],"names":[],"m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AAE,MAAM,EACjB,KAAK,EAAE,cAAc,EACrB,IAAI,CAAC,EAAE;IACL,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GACA;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAyCzG"}
|
package/dist-lib/lib/pricing.js
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
// Gedeelde prijsberekening voor prijsgroepen — pure functie, ook bruikbaar
|
|
2
2
|
// vanuit andere modules (facturatie, orderberekening).
|
|
3
|
+
const half = (v) => Math.sign(v) * Math.round(Math.abs(v)); // half away from zero, zoals Postgres
|
|
4
|
+
const fix = (v, d) => { const f = 10 ** d; return half(v * f) / f; };
|
|
5
|
+
// Zelfde regel als public.klanten_afronden/klanten_groepsprijs in de database:
|
|
6
|
+
// eerst op 9 decimalen, dan afronden op de stap, uitkomst op 4 decimalen.
|
|
7
|
+
// Kommagetallen worden vóór ceil/floor rechtgezet (1,10 / 0,05 = 22, niet 22,0000000004).
|
|
3
8
|
export function roundTo(value, mode, step = 0.05) {
|
|
4
9
|
const s = step && step > 0 ? step : 0.05;
|
|
10
|
+
const v = fix(value, 9);
|
|
11
|
+
const q = fix(v / s, 8);
|
|
5
12
|
switch (mode) {
|
|
6
|
-
case "up": return Math.ceil(
|
|
7
|
-
case "down": return Math.floor(
|
|
8
|
-
case "nearest": return
|
|
9
|
-
default: return
|
|
13
|
+
case "up": return fix(Math.ceil(q) * s, 4);
|
|
14
|
+
case "down": return fix(Math.floor(q) * s, 4);
|
|
15
|
+
case "nearest": return fix(half(q) * s, 4);
|
|
16
|
+
default: return fix(v, 4);
|
|
10
17
|
}
|
|
11
18
|
}
|
|
12
19
|
export function computePrice(basePrice, group, opts) {
|
|
@@ -110,12 +110,12 @@ export declare const adoptTwinfieldCustomer: import("@tanstack/start-client-core
|
|
|
110
110
|
force: boolean;
|
|
111
111
|
twinfield_create: boolean;
|
|
112
112
|
credit_limit: number;
|
|
113
|
-
send_reminder: "
|
|
113
|
+
send_reminder: "file" | "file_email" | "no";
|
|
114
114
|
payment_spec_method: "email" | "file";
|
|
115
115
|
invoice_send_as: "link" | "pdf" | "print";
|
|
116
116
|
e_invoicing: boolean;
|
|
117
117
|
blocked: boolean;
|
|
118
|
-
discount_surcharge: "
|
|
118
|
+
discount_surcharge: "discount" | "none" | "surcharge";
|
|
119
119
|
company_name: string;
|
|
120
120
|
postal_code: string | undefined;
|
|
121
121
|
bank_postal_code: string | undefined;
|
|
@@ -64,8 +64,8 @@ export declare const DISCOUNT_SURCHARGE_OPTIONS: readonly [{
|
|
|
64
64
|
export declare const VAT_DISPLAY_VALUES: ("Exclusief" | "Inclusief")[];
|
|
65
65
|
export declare const PAYMENT_SPEC_METHOD_VALUES: ("email" | "file")[];
|
|
66
66
|
export declare const INVOICE_SEND_AS_VALUES: ("link" | "pdf" | "print")[];
|
|
67
|
-
export declare const SEND_REMINDER_VALUES: ("
|
|
68
|
-
export declare const DISCOUNT_SURCHARGE_VALUES: ("
|
|
67
|
+
export declare const SEND_REMINDER_VALUES: ("file" | "file_email" | "no")[];
|
|
68
|
+
export declare const DISCOUNT_SURCHARGE_VALUES: ("discount" | "none" | "surcharge")[];
|
|
69
69
|
/** Schrijfrichting: ERP-waarde naar Twinfield sendreminder. */
|
|
70
70
|
export declare function toTwinfieldReminder(value: string | null | undefined): {
|
|
71
71
|
sendreminder: "true" | "email" | "false";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowselections/floriday-klanten-module",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.93",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -103,7 +103,11 @@
|
|
|
103
103
|
"path": "/api/public/twinfield/run-queue",
|
|
104
104
|
"auth": "twinfield_cron_auth"
|
|
105
105
|
}
|
|
106
|
-
]
|
|
106
|
+
],
|
|
107
|
+
"install": {
|
|
108
|
+
"ensureDefaults": "klanten_ensure_defaults",
|
|
109
|
+
"installCheck": "klanten_install_check"
|
|
110
|
+
}
|
|
107
111
|
},
|
|
108
112
|
"files": [
|
|
109
113
|
"dist-lib",
|
|
@@ -145,7 +149,7 @@
|
|
|
145
149
|
"@cloudflare/vite-plugin": "^1.25.5",
|
|
146
150
|
"@electric-sql/pglite": "^0.5.11",
|
|
147
151
|
"@eslint/js": "^9.32.0",
|
|
148
|
-
"@flowselections/core": "1.0.
|
|
152
|
+
"@flowselections/core": "1.0.37",
|
|
149
153
|
"@lovable.dev/vite-tanstack-config": "2.26.5",
|
|
150
154
|
"@rsbuild/core": "^1.0.0",
|
|
151
155
|
"@tailwindcss/vite": "^4.2.1",
|