@flowselections/floriday-voorraad 1.0.46 → 1.0.48
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/voorraad/AdditionalPackagingDialog.d.ts +1 -1
- package/dist-lib/components/voorraad/AdditionalPackagingDialog.d.ts.map +1 -1
- package/dist-lib/components/voorraad/ArtikelCompositionCard.d.ts +1 -1
- package/dist-lib/components/voorraad/ArtikelCompositionCard.d.ts.map +1 -1
- package/dist-lib/components/voorraad/ArtikelWizard.d.ts +1 -1
- package/dist-lib/components/voorraad/ArtikelWizard.d.ts.map +1 -1
- package/dist-lib/components/voorraad/ArtikelWizard.js +159 -11
- package/dist-lib/components/voorraad/EditArtikelPage.d.ts +1 -1
- package/dist-lib/components/voorraad/EditArtikelPage.d.ts.map +1 -1
- package/dist-lib/components/voorraad/EditArtikelPage.js +2 -1
- package/dist-lib/components/voorraad/ExcelExportButton.d.ts +1 -1
- package/dist-lib/components/voorraad/ExcelExportButton.d.ts.map +1 -1
- package/dist-lib/components/voorraad/FloridayInfoCard.d.ts +1 -1
- package/dist-lib/components/voorraad/FloridayInfoCard.d.ts.map +1 -1
- package/dist-lib/components/voorraad/FustenPage.d.ts +1 -1
- package/dist-lib/components/voorraad/FustenPage.d.ts.map +1 -1
- package/dist-lib/components/voorraad/InventorySettingsDrawer.d.ts +1 -1
- package/dist-lib/components/voorraad/InventorySettingsDrawer.d.ts.map +1 -1
- package/dist-lib/components/voorraad/InventoryStatusBadge.d.ts +1 -1
- package/dist-lib/components/voorraad/InventoryStatusBadge.d.ts.map +1 -1
- package/dist-lib/components/voorraad/NieuwArtikelPage.d.ts +1 -1
- package/dist-lib/components/voorraad/NieuwArtikelPage.d.ts.map +1 -1
- package/dist-lib/components/voorraad/OrderHistoryCard.d.ts +1 -1
- package/dist-lib/components/voorraad/OrderHistoryCard.d.ts.map +1 -1
- package/dist-lib/components/voorraad/PriceStatusBadge.d.ts +1 -1
- package/dist-lib/components/voorraad/PriceStatusBadge.d.ts.map +1 -1
- package/dist-lib/components/voorraad/PriceStatusBadge.js +1 -1
- package/dist-lib/components/voorraad/ProductCustomFieldsCard.d.ts +1 -1
- package/dist-lib/components/voorraad/ProductCustomFieldsCard.d.ts.map +1 -1
- package/dist-lib/components/voorraad/ProductLinkCard.d.ts +1 -1
- package/dist-lib/components/voorraad/ProductLinkCard.d.ts.map +1 -1
- package/dist-lib/components/voorraad/PublicatiesPage.d.ts +1 -1
- package/dist-lib/components/voorraad/PublicatiesPage.d.ts.map +1 -1
- package/dist-lib/components/voorraad/PublishProgressCard.d.ts +1 -1
- package/dist-lib/components/voorraad/PublishProgressCard.d.ts.map +1 -1
- package/dist-lib/components/voorraad/PublishReadinessCard.d.ts +1 -1
- package/dist-lib/components/voorraad/PublishReadinessCard.d.ts.map +1 -1
- package/dist-lib/components/voorraad/StepSamenstelling.d.ts +1 -1
- package/dist-lib/components/voorraad/StepSamenstelling.d.ts.map +1 -1
- package/dist-lib/components/voorraad/StockBulkButtons.d.ts +1 -1
- package/dist-lib/components/voorraad/StockBulkButtons.d.ts.map +1 -1
- package/dist-lib/components/voorraad/StockHistoryChart.d.ts +1 -1
- package/dist-lib/components/voorraad/StockHistoryChart.d.ts.map +1 -1
- package/dist-lib/components/voorraad/StockMutationHistoryCard.d.ts +1 -1
- package/dist-lib/components/voorraad/StockMutationHistoryCard.d.ts.map +1 -1
- package/dist-lib/components/voorraad/StockPushMonitor.d.ts +1 -1
- package/dist-lib/components/voorraad/StockPushMonitor.d.ts.map +1 -1
- package/dist-lib/components/voorraad/StockSyncStatus.d.ts +1 -1
- package/dist-lib/components/voorraad/StockSyncStatus.d.ts.map +1 -1
- package/dist-lib/components/voorraad/TrayStickerCard.d.ts +5 -0
- package/dist-lib/components/voorraad/TrayStickerCard.d.ts.map +1 -0
- package/dist-lib/components/voorraad/TrayStickerCard.js +100 -0
- package/dist-lib/components/voorraad/ValidationOverviewTable.d.ts +1 -1
- package/dist-lib/components/voorraad/ValidationOverviewTable.d.ts.map +1 -1
- package/dist-lib/components/voorraad/ValidationPage.d.ts +1 -1
- package/dist-lib/components/voorraad/ValidationPage.d.ts.map +1 -1
- package/dist-lib/components/voorraad/VoorraadPage.d.ts +1 -1
- package/dist-lib/components/voorraad/VoorraadPage.d.ts.map +1 -1
- package/dist-lib/components/voorraad/VoorraadPagination.d.ts +1 -1
- package/dist-lib/components/voorraad/VoorraadPagination.d.ts.map +1 -1
- package/dist-lib/components/voorraad/VoorraadStockCard.d.ts +1 -1
- package/dist-lib/components/voorraad/VoorraadStockCard.d.ts.map +1 -1
- package/dist-lib/components/voorraad/VoorraadTable.d.ts +1 -1
- package/dist-lib/components/voorraad/VoorraadTable.d.ts.map +1 -1
- package/dist-lib/components/voorraad/VoorraadVeldenCard.d.ts +1 -1
- package/dist-lib/components/voorraad/VoorraadVeldenCard.d.ts.map +1 -1
- package/dist-lib/hooks/useTradeItemSupplyLine.js +1 -1
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +3255 -199
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +3255 -199
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.js +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +3255 -199
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.js +1 -1
- package/dist-lib/integrations/supabase/previewAuthStorage.d.ts +1 -1
- package/dist-lib/integrations/supabase/previewAuthStorage.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/previewAuthStorage.js +8 -1
- package/dist-lib/integrations/supabase/types.d.ts +3287 -192
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/floricode-required-features.functions.d.ts +3267 -217
- package/dist-lib/lib/floricode-required-features.functions.d.ts.map +1 -1
- package/dist-lib/lib/floricode-required-features.functions.js +1 -1
- package/dist-lib/lib/floriday-customer-offer.functions.d.ts +3267 -211
- package/dist-lib/lib/floriday-customer-offer.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-env.functions.d.ts +6126 -14
- package/dist-lib/lib/floriday-env.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-gateway.functions.d.ts +18378 -42
- package/dist-lib/lib/floriday-gateway.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-vbn-required.functions.d.ts +6126 -14
- package/dist-lib/lib/floriday-vbn-required.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-warehouse.functions.d.ts +9189 -21
- package/dist-lib/lib/floriday-warehouse.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-writes.functions.d.ts +6126 -14
- package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
- package/dist-lib/lib/inventory-settings.functions.d.ts +6126 -14
- package/dist-lib/lib/inventory-settings.functions.d.ts.map +1 -1
- package/dist-lib/lib/inventory-settings.functions.js +3 -3
- package/dist-lib/lib/logistics-buffer-events.server.js +1 -1
- package/dist-lib/lib/logistics-tasks.server.js +2 -2
- package/dist-lib/lib/module-runtime.server.js +1 -1
- package/dist-lib/lib/product-packing.d.ts +28 -0
- package/dist-lib/lib/product-packing.d.ts.map +1 -0
- package/dist-lib/lib/product-packing.js +90 -0
- package/dist-lib/lib/stock-sync.functions.d.ts +6126 -14
- package/dist-lib/lib/stock-sync.functions.d.ts.map +1 -1
- package/dist-lib/lib/stock-sync.functions.js +3 -3
- package/package.json +2 -2
- package/dist-lib/components/TemplatePage.d.ts +0 -2
- package/dist-lib/components/TemplatePage.d.ts.map +0 -1
- package/dist-lib/components/TemplatePage.js +0 -4
- package/dist-lib/components/settings/VoorraadSettingsCard.d.ts +0 -2
- package/dist-lib/components/settings/VoorraadSettingsCard.d.ts.map +0 -1
- package/dist-lib/components/settings/VoorraadSettingsCard.js +0 -39
- package/dist-lib/components/voorraad/ConnectionBadge.d.ts +0 -6
- package/dist-lib/components/voorraad/ConnectionBadge.d.ts.map +0 -1
- package/dist-lib/components/voorraad/ConnectionBadge.js +0 -12
- package/dist-lib/components/voorraad/ConnectionPicker.d.ts +0 -8
- package/dist-lib/components/voorraad/ConnectionPicker.d.ts.map +0 -1
- package/dist-lib/components/voorraad/ConnectionPicker.js +0 -8
- package/dist-lib/components/voorraad/FloridayStatusBadge.d.ts +0 -4
- package/dist-lib/components/voorraad/FloridayStatusBadge.d.ts.map +0 -1
- package/dist-lib/components/voorraad/FloridayStatusBadge.js +0 -8
- package/dist-lib/components/voorraad/ModuleHealthCard.d.ts +0 -2
- package/dist-lib/components/voorraad/ModuleHealthCard.d.ts.map +0 -1
- package/dist-lib/components/voorraad/ModuleHealthCard.js +0 -40
- package/dist-lib/components/voorraad/VoorraadDashboard.d.ts +0 -10
- package/dist-lib/components/voorraad/VoorraadDashboard.d.ts.map +0 -1
- package/dist-lib/components/voorraad/VoorraadDashboard.js +0 -53
- package/dist-lib/lib/floriday-field-sources.d.ts +0 -18
- package/dist-lib/lib/floriday-field-sources.d.ts.map +0 -1
- package/dist-lib/lib/floriday-field-sources.js +0 -45
- package/dist-lib/lib/floriday-schema-to-zod.d.ts +0 -9
- package/dist-lib/lib/floriday-schema-to-zod.d.ts.map +0 -1
- package/dist-lib/lib/floriday-schema-to-zod.js +0 -53
- package/dist-lib/lib/merge-products.d.ts +0 -8
- package/dist-lib/lib/merge-products.d.ts.map +0 -1
- package/dist-lib/lib/merge-products.js +0 -17
- package/dist-lib/lib/module-health.functions.d.ts +0 -53497
- package/dist-lib/lib/module-health.functions.d.ts.map +0 -1
- package/dist-lib/lib/module-health.functions.js +0 -261
- package/dist-lib/lib/validationSchemas.d.ts +0 -15
- package/dist-lib/lib/validationSchemas.d.ts.map +0 -1
- package/dist-lib/lib/validationSchemas.js +0 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepSamenstelling.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StepSamenstelling.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAsB5E,UAAU,KAAK;IACb,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,yBAAyB,EAAE,CAAC;IACtC,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAC9C;AAUD,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,UAAU,EACV,QAAQ,EACR,kBAAkB,GACnB,EAAE,KAAK
|
|
1
|
+
{"version":3,"file":"StepSamenstelling.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StepSamenstelling.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAsB5E,UAAU,KAAK;IACb,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,yBAAyB,EAAE,CAAC;IACtC,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAC9C;AAUD,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,UAAU,EACV,QAAQ,EACR,kBAAkB,GACnB,EAAE,KAAK,+BA+ZP"}
|
|
@@ -3,5 +3,5 @@ export declare function StockBulkButtons({ items, activeConnectionId, onImported
|
|
|
3
3
|
items: TradeItem[];
|
|
4
4
|
activeConnectionId: string | null;
|
|
5
5
|
onImported: () => void | Promise<void>;
|
|
6
|
-
}): import("react
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
7
|
//# sourceMappingURL=StockBulkButtons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StockBulkButtons.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StockBulkButtons.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAyF3D,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,kBAAkB,EAClB,UAAU,GACX,EAAE;IACD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,UAAU,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC
|
|
1
|
+
{"version":3,"file":"StockBulkButtons.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StockBulkButtons.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAyF3D,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,kBAAkB,EAClB,UAAU,GACX,EAAE;IACD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,UAAU,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC,+BAmoBA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StockHistoryChart.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StockHistoryChart.tsx"],"names":[],"mappings":"AA0BA,wBAAgB,iBAAiB,CAAC,EAAE,YAAY,EAAE,EAAE;IAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE
|
|
1
|
+
{"version":3,"file":"StockHistoryChart.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StockHistoryChart.tsx"],"names":[],"mappings":"AA0BA,wBAAgB,iBAAiB,CAAC,EAAE,YAAY,EAAE,EAAE;IAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,+BAoGlF"}
|
|
@@ -2,6 +2,6 @@ interface Props {
|
|
|
2
2
|
tradeItemKey: string | null;
|
|
3
3
|
productId?: string | null;
|
|
4
4
|
}
|
|
5
|
-
export declare function StockMutationHistoryCard({ tradeItemKey, productId }: Props): import("react
|
|
5
|
+
export declare function StockMutationHistoryCard({ tradeItemKey, productId }: Props): import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=StockMutationHistoryCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StockMutationHistoryCard.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StockMutationHistoryCard.tsx"],"names":[],"mappings":"AAUA,UAAU,KAAK;IACb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AA8CD,wBAAgB,wBAAwB,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,KAAK
|
|
1
|
+
{"version":3,"file":"StockMutationHistoryCard.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StockMutationHistoryCard.tsx"],"names":[],"mappings":"AAUA,UAAU,KAAK;IACb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AA8CD,wBAAgB,wBAAwB,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,KAAK,+BAiM1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StockPushMonitor.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StockPushMonitor.tsx"],"names":[],"mappings":"AAmMA,wBAAgB,gBAAgB,CAAC,EAAE,YAAY,EAAE,EAAE;IAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE
|
|
1
|
+
{"version":3,"file":"StockPushMonitor.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StockPushMonitor.tsx"],"names":[],"mappings":"AAmMA,wBAAgB,gBAAgB,CAAC,EAAE,YAAY,EAAE,EAAE;IAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,+BA2MjF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function StockSyncStatus(): import("react
|
|
1
|
+
export declare function StockSyncStatus(): import("react").JSX.Element | null;
|
|
2
2
|
//# sourceMappingURL=StockSyncStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StockSyncStatus.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StockSyncStatus.tsx"],"names":[],"mappings":"AAYA,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"StockSyncStatus.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StockSyncStatus.tsx"],"names":[],"mappings":"AAYA,wBAAgB,eAAe,uCA8D9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrayStickerCard.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/TrayStickerCard.tsx"],"names":[],"mappings":"AAyBA,mGAAmG;AACnG,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,+BA+HnE"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { Button, Card, CardContent, CardDescription, CardHeader, CardTitle, toast, } from "@flowselections/core";
|
|
4
|
+
import { Loader2, Trash2, Upload } from "lucide-react";
|
|
5
|
+
import { supabase } from "../../integrations/supabase/client.js";
|
|
6
|
+
const BUCKET = "product-tray-stickers";
|
|
7
|
+
// Bucket is privé (publieke buckets zijn geblokkeerd): lange signed URL voor de logistiek-engine.
|
|
8
|
+
const SIGNED_URL_SECONDS = 60 * 60 * 24 * 365 * 10;
|
|
9
|
+
/** Traysticker-afbeelding per product — los van de Floriday-productfoto (`products.image_url`). */
|
|
10
|
+
export function TrayStickerCard({ productId }) {
|
|
11
|
+
const [row, setRow] = useState(null);
|
|
12
|
+
const [loading, setLoading] = useState(true);
|
|
13
|
+
const [busy, setBusy] = useState(false);
|
|
14
|
+
const inputRef = useRef(null);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
let cancelled = false;
|
|
17
|
+
setLoading(true);
|
|
18
|
+
supabase
|
|
19
|
+
.from("product_tray_stickers")
|
|
20
|
+
.select("*")
|
|
21
|
+
.eq("product_id", productId)
|
|
22
|
+
.maybeSingle()
|
|
23
|
+
.then(({ data }) => {
|
|
24
|
+
if (!cancelled)
|
|
25
|
+
setRow(data ?? null);
|
|
26
|
+
if (!cancelled)
|
|
27
|
+
setLoading(false);
|
|
28
|
+
});
|
|
29
|
+
return () => {
|
|
30
|
+
cancelled = true;
|
|
31
|
+
};
|
|
32
|
+
}, [productId]);
|
|
33
|
+
const upload = async (file) => {
|
|
34
|
+
setBusy(true);
|
|
35
|
+
try {
|
|
36
|
+
const ext = file.name.includes(".") ? file.name.slice(file.name.lastIndexOf(".")) : "";
|
|
37
|
+
const path = `${productId}/${crypto.randomUUID()}${ext}`;
|
|
38
|
+
const up = await supabase.storage.from(BUCKET).upload(path, file, {
|
|
39
|
+
contentType: file.type || undefined,
|
|
40
|
+
});
|
|
41
|
+
if (up.error)
|
|
42
|
+
throw up.error;
|
|
43
|
+
const signed = await supabase.storage.from(BUCKET).createSignedUrl(path, SIGNED_URL_SECONDS);
|
|
44
|
+
if (signed.error || !signed.data)
|
|
45
|
+
throw signed.error ?? new Error("Geen URL");
|
|
46
|
+
const next = {
|
|
47
|
+
product_id: productId,
|
|
48
|
+
bestand_url: signed.data.signedUrl,
|
|
49
|
+
bestandspad: path,
|
|
50
|
+
bestandsnaam: file.name,
|
|
51
|
+
bestandsgrootte: file.size,
|
|
52
|
+
};
|
|
53
|
+
const { error } = await supabase
|
|
54
|
+
.from("product_tray_stickers")
|
|
55
|
+
.upsert(next, { onConflict: "product_id" });
|
|
56
|
+
if (error)
|
|
57
|
+
throw error;
|
|
58
|
+
if (row?.bestandspad)
|
|
59
|
+
await supabase.storage.from(BUCKET).remove([row.bestandspad]);
|
|
60
|
+
setRow(next);
|
|
61
|
+
toast.success("Traysticker-afbeelding opgeslagen");
|
|
62
|
+
}
|
|
63
|
+
catch (e) {
|
|
64
|
+
toast.error(`Uploaden mislukt: ${e.message}`);
|
|
65
|
+
}
|
|
66
|
+
finally {
|
|
67
|
+
setBusy(false);
|
|
68
|
+
if (inputRef.current)
|
|
69
|
+
inputRef.current.value = "";
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const remove = async () => {
|
|
73
|
+
if (!row)
|
|
74
|
+
return;
|
|
75
|
+
setBusy(true);
|
|
76
|
+
try {
|
|
77
|
+
const { error } = await supabase
|
|
78
|
+
.from("product_tray_stickers")
|
|
79
|
+
.delete()
|
|
80
|
+
.eq("product_id", productId);
|
|
81
|
+
if (error)
|
|
82
|
+
throw error;
|
|
83
|
+
if (row.bestandspad)
|
|
84
|
+
await supabase.storage.from(BUCKET).remove([row.bestandspad]);
|
|
85
|
+
setRow(null);
|
|
86
|
+
toast.success("Traysticker-afbeelding verwijderd");
|
|
87
|
+
}
|
|
88
|
+
catch (e) {
|
|
89
|
+
toast.error(`Verwijderen mislukt: ${e.message}`);
|
|
90
|
+
}
|
|
91
|
+
finally {
|
|
92
|
+
setBusy(false);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
return (_jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Traysticker-afbeelding" }), _jsx(CardDescription, { children: "Afbeelding die op het traysticker-etiket bij de pakbon op het pickstation wordt geprint. Dit staat los van de productfoto uit Floriday." })] }), _jsxs(CardContent, { className: "space-y-4", children: [loading ? (_jsx(Loader2, { className: "h-4 w-4 animate-spin text-muted-foreground" })) : row ? (_jsxs("div", { className: "flex items-center gap-4", children: [_jsx("img", { src: row.bestand_url, alt: "Traysticker", className: "h-24 w-24 rounded border object-contain bg-muted" }), _jsxs("div", { className: "text-sm text-muted-foreground", children: [_jsx("div", { children: row.bestandsnaam }), row.bestandsgrootte != null && _jsxs("div", { children: [Math.round(row.bestandsgrootte / 1024), " KB"] })] })] })) : (_jsx("p", { className: "text-sm text-muted-foreground", children: "Nog geen traysticker-afbeelding ge\u00FCpload." })), _jsx("input", { ref: inputRef, type: "file", accept: "image/*", className: "hidden", onChange: (e) => {
|
|
96
|
+
const f = e.target.files?.[0];
|
|
97
|
+
if (f)
|
|
98
|
+
void upload(f);
|
|
99
|
+
} }), _jsxs("div", { className: "flex gap-2", children: [_jsxs(Button, { onClick: () => inputRef.current?.click(), disabled: busy || loading, children: [busy ? _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }) : _jsx(Upload, { className: "mr-2 h-4 w-4" }), row ? "Vervangen" : "Afbeelding uploaden"] }), row && (_jsxs(Button, { variant: "outline", onClick: remove, disabled: busy, children: [_jsx(Trash2, { className: "mr-2 h-4 w-4" }), "Verwijderen"] }))] })] })] }));
|
|
100
|
+
}
|
|
@@ -8,5 +8,5 @@ export declare function ValidationOverviewTable({ items, connectionId, onChanged
|
|
|
8
8
|
items: TradeItem[];
|
|
9
9
|
connectionId: string | null;
|
|
10
10
|
onChanged: () => void | Promise<void>;
|
|
11
|
-
}): import("react
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
12
|
//# sourceMappingURL=ValidationOverviewTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationOverviewTable.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/ValidationOverviewTable.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAQ3D;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,YAAY,EACZ,SAAS,GACV,EAAE;IACD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC
|
|
1
|
+
{"version":3,"file":"ValidationOverviewTable.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/ValidationOverviewTable.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAQ3D;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,YAAY,EACZ,SAAS,GACV,EAAE;IACD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC,+BA2KA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function ValidationPage(): import("react
|
|
1
|
+
export declare function ValidationPage(): import("react").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=ValidationPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationPage.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/ValidationPage.tsx"],"names":[],"mappings":"AAOA,wBAAgB,cAAc,
|
|
1
|
+
{"version":3,"file":"ValidationPage.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/ValidationPage.tsx"],"names":[],"mappings":"AAOA,wBAAgB,cAAc,gCAiC7B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function VoorraadPage(): import("react
|
|
1
|
+
export declare function VoorraadPage(): import("react").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=VoorraadPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoorraadPage.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/VoorraadPage.tsx"],"names":[],"mappings":"AAqGA,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"VoorraadPage.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/VoorraadPage.tsx"],"names":[],"mappings":"AAqGA,wBAAgB,YAAY,gCAqT3B"}
|
|
@@ -6,5 +6,5 @@ export interface VoorraadPaginationProps {
|
|
|
6
6
|
onPageChange: (page: number) => void;
|
|
7
7
|
onPageSizeChange: (size: number) => void;
|
|
8
8
|
}
|
|
9
|
-
export declare function VoorraadPagination({ total, page, pageSize, pageSizeOptions, onPageChange, onPageSizeChange, }: VoorraadPaginationProps): import("react
|
|
9
|
+
export declare function VoorraadPagination({ total, page, pageSize, pageSizeOptions, onPageChange, onPageSizeChange, }: VoorraadPaginationProps): import("react").JSX.Element;
|
|
10
10
|
//# sourceMappingURL=VoorraadPagination.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoorraadPagination.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/VoorraadPagination.tsx"],"names":[],"mappings":"AASA,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,eAAmC,EACnC,YAAY,EACZ,gBAAgB,GACjB,EAAE,uBAAuB
|
|
1
|
+
{"version":3,"file":"VoorraadPagination.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/VoorraadPagination.tsx"],"names":[],"mappings":"AASA,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,eAAmC,EACnC,YAAY,EACZ,gBAAgB,GACjB,EAAE,uBAAuB,+BAuDzB"}
|
|
@@ -4,6 +4,6 @@ interface Props {
|
|
|
4
4
|
draftId?: string | null;
|
|
5
5
|
productId?: string | null;
|
|
6
6
|
}
|
|
7
|
-
export declare function VoorraadStockCard({ connectionId, tradeItemId, draftId, productId }: Props): import("react
|
|
7
|
+
export declare function VoorraadStockCard({ connectionId, tradeItemId, draftId, productId }: Props): import("react").JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=VoorraadStockCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoorraadStockCard.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/VoorraadStockCard.tsx"],"names":[],"mappings":"AAeA,UAAU,KAAK;IACb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,wBAAgB,iBAAiB,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,KAAK
|
|
1
|
+
{"version":3,"file":"VoorraadStockCard.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/VoorraadStockCard.tsx"],"names":[],"mappings":"AAeA,UAAU,KAAK;IACb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,wBAAgB,iBAAiB,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,KAAK,+BAkQzF"}
|
|
@@ -10,5 +10,5 @@ export declare function VoorraadTable({ items, loading, settingsByKey, selected,
|
|
|
10
10
|
onToggleSelect?: (productId: string) => void;
|
|
11
11
|
onToggleAll?: (productIds: string[]) => void;
|
|
12
12
|
onOpenSettings?: (productId: string) => void;
|
|
13
|
-
}): import("react
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
14
|
//# sourceMappingURL=VoorraadTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoorraadTable.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/VoorraadTable.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAI3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAiBzE,oFAAoF;AACpF,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAE3D;AAED,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,OAAO,EACP,aAAa,EACb,QAAQ,EACR,cAAc,EACd,WAAW,EACX,cAAc,GACf,EAAE;IACD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC9C,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C
|
|
1
|
+
{"version":3,"file":"VoorraadTable.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/VoorraadTable.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAI3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAiBzE,oFAAoF;AACpF,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAE3D;AAED,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,OAAO,EACP,aAAa,EACb,QAAQ,EACR,cAAc,EACd,WAAW,EACX,cAAc,GACf,EAAE;IACD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC9C,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C,+BAoNA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function VoorraadVeldenCard(): import("react
|
|
1
|
+
export declare function VoorraadVeldenCard(): import("react").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=VoorraadVeldenCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoorraadVeldenCard.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/VoorraadVeldenCard.tsx"],"names":[],"mappings":"AAoCA,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"VoorraadVeldenCard.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/VoorraadVeldenCard.tsx"],"names":[],"mappings":"AAoCA,wBAAgB,kBAAkB,gCAqOjC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
2
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
|
-
import { supabase } from "../integrations/supabase/client";
|
|
3
|
+
import { supabase } from "../integrations/supabase/client.js";
|
|
4
4
|
/**
|
|
5
5
|
* Leest de meest recente supply-line voor een trade item en luistert realtime
|
|
6
6
|
* op wijzigingen zodat de UI direct meebeweegt na een push naar Floriday.
|