@flowselections/floriday-klanten-module 1.0.96 → 1.0.98
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/BulkStickerUploadDialog.d.ts.map +1 -1
- package/dist-lib/components/klanten/BulkStickerUploadDialog.js +57 -37
- package/dist-lib/integrations/supabase/types.d.ts +1950 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/sticker-porties.d.ts +5 -0
- package/dist-lib/lib/sticker-porties.d.ts.map +1 -0
- package/dist-lib/lib/sticker-porties.js +13 -0
- package/dist-lib/lib/voorraad-assortiment.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const MAX_STICKER_BESTANDEN = 1000;
|
|
2
|
+
export declare const STICKER_PORTIE = 200;
|
|
3
|
+
export declare function teVeelStickerBestanden(aantal: number): string | null;
|
|
4
|
+
export declare function inPorties<T>(items: T[], grootte?: number): T[][];
|
|
5
|
+
//# sourceMappingURL=sticker-porties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sticker-porties.d.ts","sourceRoot":"","sources":["../../src/lib/sticker-porties.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAC1C,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGpE;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,OAAO,SAAiB,GAAG,CAAC,EAAE,EAAE,CAIxE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const MAX_STICKER_BESTANDEN = 1000;
|
|
2
|
+
export const STICKER_PORTIE = 200;
|
|
3
|
+
export function teVeelStickerBestanden(aantal) {
|
|
4
|
+
if (aantal <= MAX_STICKER_BESTANDEN)
|
|
5
|
+
return null;
|
|
6
|
+
return `Je kunt niet meer dan ${MAX_STICKER_BESTANDEN} bestanden tegelijk analyseren. Je hebt er ${aantal} gekozen. Kies er minder en probeer het opnieuw.`;
|
|
7
|
+
}
|
|
8
|
+
export function inPorties(items, grootte = STICKER_PORTIE) {
|
|
9
|
+
const out = [];
|
|
10
|
+
for (let i = 0; i < items.length; i += grootte)
|
|
11
|
+
out.push(items.slice(i, i + grootte));
|
|
12
|
+
return out;
|
|
13
|
+
}
|
|
@@ -72,10 +72,10 @@ export async function leesOptioneleTabel(page) {
|
|
|
72
72
|
return Array.isArray(data) ? data : [];
|
|
73
73
|
}
|
|
74
74
|
export async function laadVoorraadAssortiment(sb) {
|
|
75
|
-
const products = await leesOptioneleTabel((from, to) => sb.from("products").select("*").range(from, to));
|
|
75
|
+
const products = await leesOptioneleTabel((from, to) => sb.from("products").select("*").order("id").range(from, to));
|
|
76
76
|
if (products === null)
|
|
77
77
|
return { rijen: [], geenVoorraadModule: true };
|
|
78
|
-
const cache = await leesOptioneleTabel((from, to) => sb.from("floriday_trade_items_cache").select("floriday_id").eq("is_deleted", false).range(from, to));
|
|
78
|
+
const cache = await leesOptioneleTabel((from, to) => sb.from("floriday_trade_items_cache").select("floriday_id").eq("is_deleted", false).order("floriday_id").range(from, to));
|
|
79
79
|
const geldig = new Set();
|
|
80
80
|
for (const r of cache ?? [])
|
|
81
81
|
if (r?.floriday_id)
|