@flowselections/floriday-verkoop-module 1.0.109 → 1.0.111
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/CreateOrderPage.d.ts.map +1 -1
- package/dist-lib/components/verkoop/CreateOrderPage.js +6 -0
- package/dist-lib/integrations/supabase/types.d.ts +8 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/create-order.functions.d.ts +6 -0
- package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
- package/dist-lib/lib/create-order.functions.js +40 -12
- package/dist-lib/lib/customer-stickers.check.js +4 -1
- package/dist-lib/lib/customer-stickers.d.ts +10 -0
- package/dist-lib/lib/customer-stickers.d.ts.map +1 -1
- package/dist-lib/lib/customer-stickers.js +6 -1
- package/dist-lib/lib/module-version.d.ts +1 -1
- package/dist-lib/lib/module-version.js +1 -1
- package/package.json +1 -1
- package/schema/verkoop.sql +85 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateOrderPage.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/CreateOrderPage.tsx"],"names":[],"mappings":"AAkGA,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"CreateOrderPage.d.ts","sourceRoot":"","sources":["../../../src/components/verkoop/CreateOrderPage.tsx"],"names":[],"mappings":"AAkGA,wBAAgB,eAAe,gCA+/B9B"}
|
|
@@ -336,6 +336,9 @@ export function CreateOrderPage() {
|
|
|
336
336
|
if ([".", ",", "e", "E", "+", "-"].includes(e.key))
|
|
337
337
|
e.preventDefault();
|
|
338
338
|
};
|
|
339
|
+
// Eén kenmerk per formulier: dubbel klikken of opnieuw proberen geeft
|
|
340
|
+
// dezelfde bestelling terug in plaats van een tweede.
|
|
341
|
+
const idempotencyKeyRef = useRef(null);
|
|
339
342
|
const createMut = useMutation({
|
|
340
343
|
mutationFn: async (opts) => {
|
|
341
344
|
if (!customerId)
|
|
@@ -392,7 +395,10 @@ export function CreateOrderPage() {
|
|
|
392
395
|
].join("\n"));
|
|
393
396
|
}
|
|
394
397
|
const customer = customers.find((c) => c.id === customerId);
|
|
398
|
+
if (!idempotencyKeyRef.current)
|
|
399
|
+
idempotencyKeyRef.current = crypto.randomUUID();
|
|
395
400
|
const payload = {
|
|
401
|
+
idempotencyKey: idempotencyKeyRef.current,
|
|
396
402
|
customerId,
|
|
397
403
|
customerName: customer?.company_name ?? "Onbekende klant",
|
|
398
404
|
deliveryLocationId,
|
|
@@ -38917,6 +38917,14 @@ export type Database = {
|
|
|
38917
38917
|
};
|
|
38918
38918
|
Returns: Json;
|
|
38919
38919
|
};
|
|
38920
|
+
verkoop_insert_manual_order: {
|
|
38921
|
+
Args: {
|
|
38922
|
+
p_idempotency_key: string;
|
|
38923
|
+
p_items: Json;
|
|
38924
|
+
p_order: Json;
|
|
38925
|
+
};
|
|
38926
|
+
Returns: Json;
|
|
38927
|
+
};
|
|
38920
38928
|
verkoop_packing_drift_apply: {
|
|
38921
38929
|
Args: {
|
|
38922
38930
|
p_order_ids: string[];
|