@flowselections/layout-maker 1.31.0 → 1.36.7
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/ComputersLijst.d.ts.map +1 -1
- package/dist-lib/components/ComputersLijst.js +5 -5
- package/dist-lib/components/DocumentenPage.d.ts.map +1 -1
- package/dist-lib/components/DocumentenPage.js +3 -2
- package/dist-lib/components/LayoutPrinterSelect.d.ts +8 -0
- package/dist-lib/components/LayoutPrinterSelect.d.ts.map +1 -0
- package/dist-lib/components/LayoutPrinterSelect.js +23 -0
- package/dist-lib/components/LayoutsPage.d.ts.map +1 -1
- package/dist-lib/components/LayoutsPage.js +16 -3
- package/dist-lib/components/PakbonBuilderPage.d.ts.map +1 -1
- package/dist-lib/components/PakbonBuilderPage.js +3 -1
- package/dist-lib/components/PakbonSectiesPanel.d.ts.map +1 -1
- package/dist-lib/components/PakbonSectiesPanel.js +6 -2
- package/dist-lib/components/PdfMapAutoSaver.d.ts +6 -0
- package/dist-lib/components/PdfMapAutoSaver.d.ts.map +1 -0
- package/dist-lib/components/PdfMapAutoSaver.js +12 -0
- package/dist-lib/components/PdfMapGlobaleBanner.d.ts +12 -0
- package/dist-lib/components/PdfMapGlobaleBanner.d.ts.map +1 -0
- package/dist-lib/components/PdfMapGlobaleBanner.js +30 -0
- package/dist-lib/components/PdfMapToestemmingBanner.d.ts +7 -0
- package/dist-lib/components/PdfMapToestemmingBanner.d.ts.map +1 -0
- package/dist-lib/components/PdfMapToestemmingBanner.js +139 -0
- package/dist-lib/components/PrintQueuePage.d.ts.map +1 -1
- package/dist-lib/components/PrintQueuePage.js +42 -3
- package/dist-lib/components/PrintenPage.d.ts.map +1 -1
- package/dist-lib/components/PrintenPage.js +3 -2
- package/dist-lib/components/PrinterSetupWizard.d.ts.map +1 -1
- package/dist-lib/components/PrinterSetupWizard.js +25 -2
- package/dist-lib/components/PrintplekDetailPage.d.ts.map +1 -1
- package/dist-lib/components/PrintplekDetailPage.js +30 -4
- package/dist-lib/components/PrintplekWizard.d.ts.map +1 -1
- package/dist-lib/components/PrintplekWizard.js +81 -3
- package/dist-lib/components/ProductiebonBuilderPage.d.ts.map +1 -1
- package/dist-lib/components/ProductiebonBuilderPage.js +3 -1
- package/dist-lib/index.d.ts +6 -0
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/index.js +11 -1
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +293 -8
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +293 -8
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +295 -8
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/aiLayout.functions.d.ts +293 -8
- package/dist-lib/lib/aiLayout.functions.d.ts.map +1 -1
- package/dist-lib/lib/htmlPdf.server.d.ts.map +1 -1
- package/dist-lib/lib/htmlPdf.server.js +43 -6
- package/dist-lib/lib/orderData.server.d.ts.map +1 -1
- package/dist-lib/lib/orderData.server.js +117 -10
- package/dist-lib/lib/pdfJobSaver.d.ts +20 -0
- package/dist-lib/lib/pdfJobSaver.d.ts.map +1 -0
- package/dist-lib/lib/pdfJobSaver.js +173 -0
- package/dist-lib/lib/pdfMap.d.ts +48 -0
- package/dist-lib/lib/pdfMap.d.ts.map +1 -0
- package/dist-lib/lib/pdfMap.js +219 -0
- package/dist-lib/lib/pdfPrinter.d.ts +9 -0
- package/dist-lib/lib/pdfPrinter.d.ts.map +1 -0
- package/dist-lib/lib/pdfPrinter.js +34 -0
- package/dist-lib/lib/previewPdf.d.ts +10 -0
- package/dist-lib/lib/previewPdf.d.ts.map +1 -0
- package/dist-lib/lib/previewPdf.js +202 -0
- package/dist-lib/lib/printApi.d.ts.map +1 -1
- package/dist-lib/lib/printApi.js +9 -1
- package/dist-lib/lib/printQueue.server.d.ts +14 -1
- package/dist-lib/lib/printQueue.server.d.ts.map +1 -1
- package/dist-lib/lib/printQueue.server.js +125 -27
- package/dist-lib/lib/printService.functions.d.ts +1172 -32
- package/dist-lib/lib/printService.functions.d.ts.map +1 -1
- package/dist-lib/lib/useDocumentData.d.ts +10 -0
- package/dist-lib/lib/useDocumentData.d.ts.map +1 -1
- package/dist-lib/lib/useDocumentData.js +19 -0
- package/dist-lib/lib/voorbeeldPrint.d.ts +4 -0
- package/dist-lib/lib/voorbeeldPrint.d.ts.map +1 -1
- package/dist-lib/lib/voorbeeldPrint.js +13 -2
- package/package.json +14 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrinterSetupWizard.d.ts","sourceRoot":"","sources":["../../src/components/PrinterSetupWizard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PrinterSetupWizard.d.ts","sourceRoot":"","sources":["../../src/components/PrinterSetupWizard.tsx"],"names":[],"mappings":"AAoDA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAwCD,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,cAAc,EACd,iBAAsB,EACtB,eAAoB,EACpB,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CACjC,+BAufA"}
|
|
@@ -5,8 +5,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
// ============================================================================
|
|
6
6
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
7
7
|
import { Button, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, Input, Label, toast, } from "@flowselections/core";
|
|
8
|
-
import { Check, CheckCircle2, FileText, Loader2, Printer, RefreshCw, Search, Tag, } from "lucide-react";
|
|
8
|
+
import { Check, CheckCircle2, FileDown, FileText, Loader2, Printer, RefreshCw, Search, Tag, } from "lucide-react";
|
|
9
9
|
import { supabase } from "../lib/supabaseClient.js";
|
|
10
|
+
import { zorgVoorPdfPrinter } from "../lib/pdfPrinter.js";
|
|
10
11
|
import { printHtml, volgJobStatus } from "../lib/printApi.js";
|
|
11
12
|
import { netwerkPrinters } from "../lib/printService.functions.js";
|
|
12
13
|
import { printerFormaatOpties } from "../lib/papierFormaten.js";
|
|
@@ -173,6 +174,28 @@ export function PrinterSetupWizard({ open, onOpenChange, onKlaar, computerFilter
|
|
|
173
174
|
setBezig(false);
|
|
174
175
|
}
|
|
175
176
|
};
|
|
177
|
+
/**
|
|
178
|
+
* Voegt de virtuele "Opslaan als PDF"-printer toe. Documenten die hierheen
|
|
179
|
+
* gaan worden niet geprint maar als downloadbare PDF in de wachtrij bewaard.
|
|
180
|
+
* Er is maar één PDF-printer nodig; een tweede wordt niet aangemaakt.
|
|
181
|
+
*/
|
|
182
|
+
const pdfPrinterToevoegen = async () => {
|
|
183
|
+
setBezig(true);
|
|
184
|
+
try {
|
|
185
|
+
const { alAanwezig } = await zorgVoorPdfPrinter();
|
|
186
|
+
toast.success(alAanwezig
|
|
187
|
+
? "'Opslaan als PDF' stond al tussen uw printers"
|
|
188
|
+
: "'Opslaan als PDF' toegevoegd");
|
|
189
|
+
onKlaar?.();
|
|
190
|
+
onOpenChange(false);
|
|
191
|
+
}
|
|
192
|
+
catch {
|
|
193
|
+
toast.error("Toevoegen mislukt");
|
|
194
|
+
}
|
|
195
|
+
finally {
|
|
196
|
+
setBezig(false);
|
|
197
|
+
}
|
|
198
|
+
};
|
|
176
199
|
const [testStatus, setTestStatus] = useState("leeg");
|
|
177
200
|
const [testMelding, setTestMelding] = useState("");
|
|
178
201
|
const testpagina = async () => {
|
|
@@ -228,7 +251,7 @@ export function PrinterSetupWizard({ open, onOpenChange, onKlaar, computerFilter
|
|
|
228
251
|
: "Kies uw printer, geef hem een herkenbare naam en druk een testpagina af." })] }), !bewerken && _jsx(Stappenbalk, { stap: stap }), stap === 0 && (_jsxs("div", { className: "space-y-4", children: [lijst.length > 6 && (_jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground absolute top-2.5 left-3 h-4 w-4" }), _jsx(Input, { className: "pl-9", value: zoekterm, placeholder: "Zoek op printer of computer", onChange: (e) => setZoekterm(e.target.value) })] })), zoekt && (_jsxs("p", { className: "text-muted-foreground flex items-center gap-2 text-sm", children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin" }), " Printers zoeken\u2026"] })), !zoekt && fout && _jsx("p", { className: "text-destructive text-sm", children: fout }), !zoekt && zichtbaar.length > 0 && (_jsx("div", { className: "grid gap-2 sm:grid-cols-2", children: zichtbaar.map((p) => {
|
|
229
252
|
const al = bekendeExterneIds.includes(p.id);
|
|
230
253
|
return (_jsx("button", { type: "button", disabled: al, onClick: () => kiesPrinter(p), className: `rounded-xl border p-4 text-left transition ${al ? "opacity-60" : "hover:border-primary/50 hover:bg-accent/40"}`, children: _jsxs("div", { className: "flex items-start gap-3", children: [_jsx(Printer, { className: "text-muted-foreground mt-0.5 h-5 w-5 shrink-0" }), _jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "truncate text-sm font-medium", children: p.naam }), _jsx("p", { className: "text-muted-foreground truncate text-xs", children: p.computer }), _jsxs("span", { className: "mt-2 flex items-center gap-1.5 text-xs", children: [_jsx("span", { className: `h-2 w-2 rounded-full ${p.online ? "bg-primary" : "bg-muted-foreground/40"}` }), al ? "Al toegevoegd" : p.online ? "Beschikbaar" : "Niet aan"] })] })] }) }, p.id));
|
|
231
|
-
}) })), !zoekt && zichtbaar.length === 0 && _jsx(PrintProgrammaUitleg, {}), !zoekt && zichtbaar.length > 0 && (_jsxs("div", { className: "space-y-3", children: [_jsx("button", { type: "button", className: "text-muted-foreground hover:text-foreground text-sm underline", onClick: () => setUitlegOpen((v) => !v), children: "Ik zie mijn printer niet" }), uitlegOpen && _jsx(PrintProgrammaUitleg, { compact: true })] })), _jsx("div", { className: "flex justify-between", children: _jsxs(Button, { variant: "ghost", onClick: () => void zoeken(), disabled: zoekt, children: [_jsx(RefreshCw, { className: "mr-2 h-4 w-4" }), " Opnieuw zoeken"] }) })] })), stap === 1 && (_jsxs("div", { className: "grid gap-5 sm:grid-cols-[1fr_200px]", children: [_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Weergavenaam" }), _jsx(Input, { value: naam, placeholder: "Bijvoorbeeld: pakbonprinter voorin", onChange: (e) => setNaam(e.target.value) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Omschrijving (optioneel)" }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Waar staat deze printer? Bijvoorbeeld: magazijn achter." }), _jsx(Input, { value: locatie, placeholder: "Bijvoorbeeld: magazijn achter", onChange: (e) => setLocatie(e.target.value) }), bekendeLocaties.length > 0 && (_jsx("div", { className: "flex flex-wrap gap-2 pt-1", children: bekendeLocaties.slice(0, 6).map((l) => (_jsx("button", { type: "button", onClick: () => setLocatie(l), className: "hover:bg-accent rounded-full border px-3 py-1 text-xs", children: l }, l))) }))] }), formaatOpties.length > 0 ? (_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Standaardformaat van deze printer" }), _jsxs("p", { className: "text-muted-foreground text-xs", children: ["Deze printer kan: ", formaatOpties.map((o) => o.label.split(" (")[0]).join(", "), "."] }), formaatOpties.length === 1 ? (_jsx("p", { className: "text-sm", children: formaatOpties[0].label })) : (_jsx("div", { className: "grid gap-2 sm:grid-cols-2", children: formaatOpties.map((o) => (_jsxs("button", { type: "button", onClick: () => setFormaatCode(o.code), className: `hover:bg-accent rounded-lg border p-3 text-left transition ${formaatCode === o.code ? "border-primary bg-accent" : ""}`, children: [o.breedte <= 120 && o.hoogte <= 220 ? (_jsx(Tag, { className: "text-muted-foreground mb-1 h-4 w-4" })) : (_jsx(FileText, { className: "text-muted-foreground mb-1 h-4 w-4" })), _jsx("p", { className: "text-sm font-medium", children: o.label.split(" (")[0] }), _jsxs("p", { className: "text-muted-foreground text-xs", children: [o.breedte, " \u00D7 ", o.hoogte, " mm"] })] }, o.code))) }))] })) : (_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Wat gaat deze printer afdrukken?" }), _jsx("p", { className: "text-muted-foreground text-xs", children: "De formaten van deze printer konden niet worden opgehaald." }), _jsx("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
254
|
+
}) })), !zoekt && zichtbaar.length === 0 && _jsx(PrintProgrammaUitleg, {}), !zoekt && (_jsxs("button", { type: "button", disabled: bezig, onClick: () => void pdfPrinterToevoegen(), className: "hover:border-primary/50 hover:bg-accent/40 flex w-full items-center gap-3 rounded-xl border border-dashed p-4 text-left transition", children: [bezig ? (_jsx(Loader2, { className: "text-muted-foreground h-5 w-5 shrink-0 animate-spin" })) : (_jsx(FileDown, { className: "text-muted-foreground h-5 w-5 shrink-0" })), _jsxs("div", { children: [_jsx("p", { className: "text-sm font-medium", children: "Opslaan als PDF" }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Geen fysieke printer nodig: het document verschijnt als downloadbare PDF in de printwachtrij. Handig om layouts en routering te testen." })] })] })), !zoekt && zichtbaar.length > 0 && (_jsxs("div", { className: "space-y-3", children: [_jsx("button", { type: "button", className: "text-muted-foreground hover:text-foreground text-sm underline", onClick: () => setUitlegOpen((v) => !v), children: "Ik zie mijn printer niet" }), uitlegOpen && _jsx(PrintProgrammaUitleg, { compact: true })] })), _jsx("div", { className: "flex justify-between", children: _jsxs(Button, { variant: "ghost", onClick: () => void zoeken(), disabled: zoekt, children: [_jsx(RefreshCw, { className: "mr-2 h-4 w-4" }), " Opnieuw zoeken"] }) })] })), stap === 1 && (_jsxs("div", { className: "grid gap-5 sm:grid-cols-[1fr_200px]", children: [_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Weergavenaam" }), _jsx(Input, { value: naam, placeholder: "Bijvoorbeeld: pakbonprinter voorin", onChange: (e) => setNaam(e.target.value) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Omschrijving (optioneel)" }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Waar staat deze printer? Bijvoorbeeld: magazijn achter." }), _jsx(Input, { value: locatie, placeholder: "Bijvoorbeeld: magazijn achter", onChange: (e) => setLocatie(e.target.value) }), bekendeLocaties.length > 0 && (_jsx("div", { className: "flex flex-wrap gap-2 pt-1", children: bekendeLocaties.slice(0, 6).map((l) => (_jsx("button", { type: "button", onClick: () => setLocatie(l), className: "hover:bg-accent rounded-full border px-3 py-1 text-xs", children: l }, l))) }))] }), formaatOpties.length > 0 ? (_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Standaardformaat van deze printer" }), _jsxs("p", { className: "text-muted-foreground text-xs", children: ["Deze printer kan: ", formaatOpties.map((o) => o.label.split(" (")[0]).join(", "), "."] }), formaatOpties.length === 1 ? (_jsx("p", { className: "text-sm", children: formaatOpties[0].label })) : (_jsx("div", { className: "grid gap-2 sm:grid-cols-2", children: formaatOpties.map((o) => (_jsxs("button", { type: "button", onClick: () => setFormaatCode(o.code), className: `hover:bg-accent rounded-lg border p-3 text-left transition ${formaatCode === o.code ? "border-primary bg-accent" : ""}`, children: [o.breedte <= 120 && o.hoogte <= 220 ? (_jsx(Tag, { className: "text-muted-foreground mb-1 h-4 w-4" })) : (_jsx(FileText, { className: "text-muted-foreground mb-1 h-4 w-4" })), _jsx("p", { className: "text-sm font-medium", children: o.label.split(" (")[0] }), _jsxs("p", { className: "text-muted-foreground text-xs", children: [o.breedte, " \u00D7 ", o.hoogte, " mm"] })] }, o.code))) }))] })) : (_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Wat gaat deze printer afdrukken?" }), _jsx("p", { className: "text-muted-foreground text-xs", children: "De formaten van deze printer konden niet worden opgehaald." }), _jsx("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
232
255
|
{ code: "papier", label: "Papier (A4)", sub: "Gewone documenten", Icon: FileText },
|
|
233
256
|
{ code: "etiket", label: "Etiketten", sub: "Stickers en labels", Icon: Tag },
|
|
234
257
|
].map((o) => (_jsxs("button", { type: "button", onClick: () => setGebruik(o.code), className: `hover:bg-accent rounded-lg border p-4 text-left transition ${gebruik === o.code ? "border-primary bg-accent" : ""}`, children: [_jsx(o.Icon, { className: "text-muted-foreground mb-2 h-5 w-5" }), _jsx("p", { className: "text-sm font-medium", children: o.label }), _jsx("p", { className: "text-muted-foreground text-xs", children: o.sub })] }, o.code))) })] })), _jsxs("div", { className: "flex justify-between", children: [!bewerken ? (_jsx(Button, { variant: "ghost", onClick: () => setStap(0), children: "Terug" })) : (_jsx("span", {})), _jsx(Button, { disabled: bezig, onClick: () => void opslaan(), children: bewerken ? "Opslaan" : "Opslaan en verder" })] })] }), _jsxs("div", { className: "hidden sm:block", children: [_jsx("p", { className: "text-muted-foreground mb-2 text-xs", children: "Zo komt hij in de lijst:" }), _jsxs("div", { className: "bg-card rounded-xl border p-3", children: [_jsx(Printer, { className: "text-muted-foreground mb-2 h-4 w-4" }), _jsx("p", { className: "truncate text-sm font-medium", children: naam || "Naam van de printer" }), _jsx("p", { className: "text-muted-foreground truncate text-xs", children: locatie || gekozen?.computer || "Geen omschrijving" })] })] })] })), stap === 2 && (_jsxs("div", { className: "space-y-4 text-center", children: [_jsx(CheckCircle2, { className: "text-primary mx-auto h-10 w-10" }), _jsxs("div", { children: [_jsx("p", { className: "font-medium", children: "De printer is klaar voor gebruik" }), _jsxs("p", { className: "text-muted-foreground text-sm", children: [naam, " ", locatie ? `bij ${locatie}` : "", " drukt voortaan automatisch af."] })] }), testStatus !== "leeg" && (_jsxs("p", { className: "text-muted-foreground text-sm", children: [testStatus === "bezig" && "Onderweg naar de printer…", testStatus === "gelukt" && (testMelding || "De testpagina is afgedrukt."), testStatus === "fout" &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrintplekDetailPage.d.ts","sourceRoot":"","sources":["../../src/components/PrintplekDetailPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PrintplekDetailPage.d.ts","sourceRoot":"","sources":["../../src/components/PrintplekDetailPage.tsx"],"names":[],"mappings":"AAiDA,wBAAgB,mBAAmB,gCAsYlC"}
|
|
@@ -4,7 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
4
4
|
// computers erbij horen, welke printers beschikbaar zijn en welk document naar
|
|
5
5
|
// welke printer gaat.
|
|
6
6
|
// ============================================================================
|
|
7
|
-
import { useMemo, useState } from "react";
|
|
7
|
+
import { useEffect, useMemo, useState } from "react";
|
|
8
8
|
import { Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Input, toast, } from "@flowselections/core";
|
|
9
9
|
import { Link, useParams } from "@tanstack/react-router";
|
|
10
10
|
import { AlertTriangle, ArrowLeft, Check, Link2, Monitor, Plus, Printer, Trash2, Wand2, X, } from "lucide-react";
|
|
@@ -13,9 +13,12 @@ import { usePrinters } from "../lib/useDocumentData.js";
|
|
|
13
13
|
import { useNetwerkPrinters } from "../lib/useNetwerkPrinters.js";
|
|
14
14
|
import { useComputers } from "./ComputersLijst.js";
|
|
15
15
|
import { DOCUMENT_TYPES, documentTypeLabel } from "../lib/documentTypes.js";
|
|
16
|
+
import { pdfMapNaam } from "../lib/pdfMap.js";
|
|
16
17
|
import { drukTestpaginaAf } from "../lib/testpagina.js";
|
|
17
18
|
import { PrintplekWizard } from "./PrintplekWizard.js";
|
|
18
19
|
import { TestprintDialog } from "./TestprintDialog.js";
|
|
20
|
+
import { PdfMapAutoSaver } from "./PdfMapAutoSaver.js";
|
|
21
|
+
import { PdfMapToestemmingBanner } from "./PdfMapToestemmingBanner.js";
|
|
19
22
|
export function PrintplekDetailPage() {
|
|
20
23
|
const params = useParams({ strict: false });
|
|
21
24
|
const plekId = params.printplekId ?? "";
|
|
@@ -44,6 +47,24 @@ export function PrintplekDetailPage() {
|
|
|
44
47
|
const computer = extern ? externOpComputer.get(extern) : undefined;
|
|
45
48
|
return computer ? eigenNamen.has(computer) : false;
|
|
46
49
|
});
|
|
50
|
+
const [pdfMap, setPdfMap] = useState(null);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
let actief = true;
|
|
53
|
+
const pdfPrinter = printers.find((printer) => printer.afdrukmethode === "pdf");
|
|
54
|
+
if (!pdfPrinter) {
|
|
55
|
+
setPdfMap(null);
|
|
56
|
+
return () => {
|
|
57
|
+
actief = false;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
void pdfMapNaam(pdfPrinter.id).then((naam) => {
|
|
61
|
+
if (actief)
|
|
62
|
+
setPdfMap(naam);
|
|
63
|
+
});
|
|
64
|
+
return () => {
|
|
65
|
+
actief = false;
|
|
66
|
+
};
|
|
67
|
+
}, [printers]);
|
|
47
68
|
const regelVoor = (documenttype) => regels.find((r) => r.print_plek_id === plekId && r.documenttype === documenttype) ?? null;
|
|
48
69
|
const inGebruik = DOCUMENT_TYPES.filter((d) => regelVoor(d.value));
|
|
49
70
|
const overige = DOCUMENT_TYPES.filter((d) => !regelVoor(d.value));
|
|
@@ -65,7 +86,7 @@ export function PrintplekDetailPage() {
|
|
|
65
86
|
if (!plek) {
|
|
66
87
|
return (_jsxs("main", { className: "space-y-4 p-6", children: [_jsx(Button, { variant: "ghost", asChild: true, children: _jsxs(Link, { to: "/layouts-printers/printplekken", children: [_jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }), " Terug"] }) }), _jsx("p", { className: "text-muted-foreground text-sm", children: "Deze printplek bestaat niet (meer)." })] }));
|
|
67
88
|
}
|
|
68
|
-
return (_jsxs("main", { className: "space-y-6 p-6", children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-4", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Button, { variant: "ghost", size: "sm", asChild: true, className: "-ml-2", children: _jsxs(Link, { to: "/layouts-printers/printplekken", children: [_jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }), " Alle printplekken"] }) }), naamBewerken ? (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Input, { value: naam, onChange: (e) => setNaam(e.target.value), className: "w-64" }), _jsx(Button, { size: "icon", onClick: async () => {
|
|
89
|
+
return (_jsxs("main", { className: "space-y-6 p-6", children: [_jsx(PdfMapAutoSaver, {}), _jsx(PdfMapToestemmingBanner, {}), _jsxs("div", { className: "flex flex-wrap items-start justify-between gap-4", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Button, { variant: "ghost", size: "sm", asChild: true, className: "-ml-2", children: _jsxs(Link, { to: "/layouts-printers/printplekken", children: [_jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }), " Alle printplekken"] }) }), naamBewerken ? (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Input, { value: naam, onChange: (e) => setNaam(e.target.value), className: "w-64" }), _jsx(Button, { size: "icon", onClick: async () => {
|
|
69
90
|
await bewerkPrintplek(plek.id, { naam: naam.trim() });
|
|
70
91
|
setNaamBewerken(false);
|
|
71
92
|
await reload(true);
|
|
@@ -89,7 +110,12 @@ export function PrintplekDetailPage() {
|
|
|
89
110
|
}
|
|
90
111
|
}, children: "Testpagina" })] }, p.id))) })) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "flex flex-row items-start justify-between gap-3", children: [_jsxs("div", { children: [_jsx(CardTitle, { className: "text-base", children: "Welk document gaat naar welke printer?" }), _jsx(CardDescription, { children: "Alleen wat hier is ingesteld wordt op deze plek afgedrukt. Wijzigen doe je met de wizard." })] }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => setAlleDocumenten((v) => !v), children: alleDocumenten ? "Alleen ingestelde" : (_jsxs(_Fragment, { children: [_jsx(Plus, { className: "mr-1 h-4 w-4" }), " Meer documenten"] })) })] }), _jsxs(CardContent, { className: "space-y-2", children: [zichtbaar.length === 0 ? (_jsx("p", { className: "text-muted-foreground text-sm", children: "Nog niets ingesteld. Gebruik de wizard bovenaan deze pagina." })) : null, zichtbaar.map((d) => {
|
|
91
112
|
const regel = regelVoor(d.value);
|
|
92
|
-
|
|
93
|
-
|
|
113
|
+
// Let op: de virtuele PDF-printer hangt niet aan een computer, dus
|
|
114
|
+
// eerst binnen deze plek zoeken en anders in álle printers.
|
|
115
|
+
const printer = eigenPrinters.find((p) => p.id === regel?.printer_id) ??
|
|
116
|
+
printers.find((p) => p.id === regel?.printer_id) ??
|
|
117
|
+
null;
|
|
118
|
+
const isPdf = printer?.afdrukmethode === "pdf";
|
|
119
|
+
return (_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3 rounded-lg border p-2", children: [_jsx("div", { className: "text-sm font-medium", children: documentTypeLabel(d.value) }), printer ? (_jsxs("span", { className: "text-muted-foreground text-sm", children: [printer.naam, isPdf && pdfMap ? (_jsxs("span", { className: "ml-2 text-xs", children: ["\u2192 map \u201C", pdfMap, "\u201D"] })) : null] })) : (_jsxs("span", { className: "text-destructive flex items-center gap-1 text-xs", children: [_jsx(AlertTriangle, { className: "h-3.5 w-3.5" }), " Geen printer"] }))] }, d.value));
|
|
94
120
|
}), !alleDocumenten && overige.length > 0 ? (_jsxs("p", { className: "text-muted-foreground text-xs", children: [overige.length, " documentsoort", overige.length === 1 ? "" : "en", " nog niet ingesteld."] })) : null] })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsxs(CardTitle, { className: "flex items-center gap-2 text-base", children: [_jsx(Link2, { className: "h-4 w-4" }), " Gekoppeld aan"] }), _jsx(CardDescription, { children: "Andere modules (bijvoorbeeld pickstations) kunnen zich aan deze printplek koppelen." })] }), _jsxs(CardContent, { className: "space-y-4", children: [bronnen.length === 0 ? (_jsx("p", { className: "text-muted-foreground text-sm", children: "Nog niets gekoppeld. Kies deze printplek in de andere module (bijvoorbeeld bij een pickstation); de koppeling verschijnt hier vanzelf." })) : (_jsx("div", { className: "space-y-2", children: bronnen.map((b) => (_jsxs("div", { className: "flex flex-wrap items-center gap-3 rounded-lg border px-3 py-2 text-sm", children: [_jsx(Badge, { variant: "secondary", children: b.bron }), _jsxs("span", { className: "min-w-0 flex-1 truncate", children: [b.label ?? b.bron_id, _jsx("span", { className: "text-muted-foreground ml-2 text-xs", children: b.bron_id })] }), _jsxs(Button, { variant: "ghost", size: "sm", onClick: () => void ontkoppel(b.bron, b.bron_id), children: [_jsx(X, { className: "mr-1 h-3.5 w-3.5" }), " Ontkoppelen"] })] }, b.id))) })), weeskoppelingen.length > 0 ? (_jsxs("div", { className: "space-y-2 rounded-lg border border-dashed p-3", children: [_jsxs("p", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(AlertTriangle, { className: "h-3.5 w-3.5" }), " Koppelingen zonder bestaande printplek:"] }), weeskoppelingen.map((b) => (_jsxs("div", { className: "flex flex-wrap items-center gap-3 text-sm", children: [_jsx("span", { className: "min-w-0 flex-1 truncate", children: b.label ?? `${b.bron} ${b.bron_id}` }), _jsxs(Button, { variant: "ghost", size: "sm", onClick: () => void ontkoppel(b.bron, b.bron_id), children: [_jsx(Trash2, { className: "mr-1 h-3.5 w-3.5" }), " Opruimen"] })] }, b.id)))] })) : null] })] })] }));
|
|
95
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrintplekWizard.d.ts","sourceRoot":"","sources":["../../src/components/PrintplekWizard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PrintplekWizard.d.ts","sourceRoot":"","sources":["../../src/components/PrintplekWizard.tsx"],"names":[],"mappings":"AAiEA,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,OAAO,GACR,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,+BAsjBA"}
|
|
@@ -6,7 +6,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
6
6
|
// ============================================================================
|
|
7
7
|
import { useEffect, useMemo, useState } from "react";
|
|
8
8
|
import { Badge, Button, Checkbox, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, toast, } from "@flowselections/core";
|
|
9
|
-
import { AlertTriangle, ArrowLeft, ArrowRight, Check, Monitor, Printer, RefreshCw, } from "lucide-react";
|
|
9
|
+
import { AlertTriangle, ArrowLeft, ArrowRight, Check, FileDown, FolderOpen, Monitor, Printer, RefreshCw, } from "lucide-react";
|
|
10
|
+
import { zorgVoorPdfPrinter } from "../lib/pdfPrinter.js";
|
|
11
|
+
import { kiesPdfMap, mapKiezenMogelijk, draaitInIframe, openInEigenTabblad } from "../lib/pdfMap.js";
|
|
12
|
+
import { supabase } from "../lib/supabaseClient.js";
|
|
10
13
|
import { bewerkPrintplek, koppelComputerAanPrintplek, maakPrintplek, ontkoppelComputer, usePrintplekken, zetPrintplekPrinter, } from "../lib/printplekken.js";
|
|
11
14
|
import { usePrinters, useLayouts } from "../lib/useDocumentData.js";
|
|
12
15
|
import { useNetwerkPrinters } from "../lib/useNetwerkPrinters.js";
|
|
@@ -18,7 +21,7 @@ const GEEN = "geen";
|
|
|
18
21
|
export function PrintplekWizard({ open, onOpenChange, printplekId, onKlaar, }) {
|
|
19
22
|
const { plekken, computers: plekComputers, regels, reload } = usePrintplekken();
|
|
20
23
|
const { computers, reload: herlaadComputers } = useComputers();
|
|
21
|
-
const { printers } = usePrinters();
|
|
24
|
+
const { printers, reload: herlaadPrinters } = usePrinters();
|
|
22
25
|
const { layouts } = useLayouts();
|
|
23
26
|
const { gevonden } = useNetwerkPrinters();
|
|
24
27
|
const [stap, setStap] = useState(1);
|
|
@@ -31,6 +34,54 @@ export function PrintplekWizard({ open, onOpenChange, printplekId, onKlaar, }) {
|
|
|
31
34
|
const [alleDocumenten, setAlleDocumenten] = useState(false);
|
|
32
35
|
const [voorstelGedaan, setVoorstelGedaan] = useState(false);
|
|
33
36
|
const [geinitialiseerd, setGeinitialiseerd] = useState(false);
|
|
37
|
+
const [pdfMap, setPdfMap] = useState({});
|
|
38
|
+
/** Opent de mappenverkenner en bewaart de keuze direct. */
|
|
39
|
+
async function mapKiezen(printerId) {
|
|
40
|
+
const uitkomst = await kiesPdfMap(printerId);
|
|
41
|
+
if (uitkomst.status === "gekozen") {
|
|
42
|
+
setPdfMap((m) => ({ ...m, [printerId]: uitkomst.naam }));
|
|
43
|
+
await bewaarPdfMap(printerId, uitkomst.naam);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (uitkomst.status === "niet-ondersteund") {
|
|
47
|
+
toast.error("Uw browser kan geen mappenvenster openen. Gebruik Chrome of Edge, of typ het pad links zelf in.");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (uitkomst.status === "iframe-geblokkeerd") {
|
|
51
|
+
toast.error("De mappenverkenner is geblokkeerd omdat de app in een voorbeeldvenster (iframe) draait.", {
|
|
52
|
+
description: "Open de app in een eigen tabblad — daar werkt Map kiezen wel. U kunt het pad ook handmatig intypen.",
|
|
53
|
+
action: {
|
|
54
|
+
label: "Open in eigen tabblad",
|
|
55
|
+
onClick: () => openInEigenTabblad(),
|
|
56
|
+
},
|
|
57
|
+
duration: 10000,
|
|
58
|
+
});
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (uitkomst.status === "fout") {
|
|
62
|
+
toast.error(`De mappenverkenner kon niet worden geopend: ${uitkomst.melding}`);
|
|
63
|
+
}
|
|
64
|
+
// "geannuleerd": bewust geen melding — de gebruiker koos zelf voor Annuleren.
|
|
65
|
+
}
|
|
66
|
+
async function bewaarPdfMap(printerId, waarde) {
|
|
67
|
+
setBezig(true);
|
|
68
|
+
try {
|
|
69
|
+
const { error } = await supabase
|
|
70
|
+
.from("printers")
|
|
71
|
+
.update({ pdf_map: waarde.trim() || null })
|
|
72
|
+
.eq("id", printerId);
|
|
73
|
+
if (error)
|
|
74
|
+
throw error;
|
|
75
|
+
toast.success(waarde.trim() ? `PDF-map ingesteld: ${waarde.trim()}` : "PDF-map gewist");
|
|
76
|
+
await herlaadPrinters(true);
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
toast.error("De map kon niet worden opgeslagen");
|
|
80
|
+
}
|
|
81
|
+
finally {
|
|
82
|
+
setBezig(false);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
34
85
|
// --- printers die bij de gekozen computers horen -------------------------
|
|
35
86
|
const computerVanPrinter = useMemo(() => {
|
|
36
87
|
const map = new Map();
|
|
@@ -40,7 +91,13 @@ export function PrintplekWizard({ open, onOpenChange, printplekId, onKlaar, }) {
|
|
|
40
91
|
return map;
|
|
41
92
|
}, [gevonden]);
|
|
42
93
|
const gekozenSet = useMemo(() => new Set(gekozenComputers), [gekozenComputers]);
|
|
94
|
+
// De virtuele "Opslaan als PDF"-printer hoort niet bij een computer en is
|
|
95
|
+
// daarom altijd beschikbaar, op elke printplek.
|
|
96
|
+
const isPdfPrinter = (p) => String(p.afdrukmethode ?? "") === "pdf";
|
|
97
|
+
const pdfPrinterAanwezig = useMemo(() => (Array.isArray(printers) ? printers : []).some((p) => isPdfPrinter(p) && p.actief), [printers]);
|
|
43
98
|
const plekPrinters = useMemo(() => (Array.isArray(printers) ? printers : []).filter((p) => {
|
|
99
|
+
if (isPdfPrinter(p))
|
|
100
|
+
return p.actief;
|
|
44
101
|
const extern = p.extern_printer_id;
|
|
45
102
|
const computer = extern ? computerVanPrinter.get(extern) : undefined;
|
|
46
103
|
return computer ? gekozenSet.has(computer) : false;
|
|
@@ -107,6 +164,23 @@ export function PrintplekWizard({ open, onOpenChange, printplekId, onKlaar, }) {
|
|
|
107
164
|
setVoorstelGedaan(true);
|
|
108
165
|
}, [stap, voorstelGedaan, plekPrinters, relevant]);
|
|
109
166
|
// --- opslaan per stap ----------------------------------------------------
|
|
167
|
+
/** Voegt de virtuele PDF-printer toe zodat die op deze plek kiesbaar is. */
|
|
168
|
+
async function pdfPrinterToevoegen() {
|
|
169
|
+
setBezig(true);
|
|
170
|
+
try {
|
|
171
|
+
const { alAanwezig } = await zorgVoorPdfPrinter();
|
|
172
|
+
toast.success(alAanwezig
|
|
173
|
+
? "'Opslaan als PDF' stond al tussen uw printers"
|
|
174
|
+
: "'Opslaan als PDF' toegevoegd");
|
|
175
|
+
await herlaadPrinters(true);
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
toast.error("Toevoegen mislukt");
|
|
179
|
+
}
|
|
180
|
+
finally {
|
|
181
|
+
setBezig(false);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
110
184
|
async function bewaarStap1() {
|
|
111
185
|
if (plekId) {
|
|
112
186
|
await bewerkPrintplek(plekId, { naam: naam.trim(), omschrijving: omschrijving.trim() || null });
|
|
@@ -188,7 +262,11 @@ export function PrintplekWizard({ open, onOpenChange, printplekId, onKlaar, }) {
|
|
|
188
262
|
: null;
|
|
189
263
|
const aangevinkt = gekozenComputers.includes(c.naam);
|
|
190
264
|
return (_jsxs("label", { className: `flex items-center gap-3 rounded-lg border p-3 ${bezetNaam ? "opacity-60" : "cursor-pointer"}`, children: [_jsx(Checkbox, { checked: aangevinkt, disabled: Boolean(bezetNaam), onCheckedChange: (v) => setGekozenComputers((lijst) => v ? [...new Set([...lijst, c.naam])] : lijst.filter((n) => n !== c.naam)) }), _jsx(Monitor, { className: "text-muted-foreground h-4 w-4" }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block truncate text-sm font-medium", children: c.naam }), _jsxs("span", { className: "text-muted-foreground text-xs", children: [c.online ? "aan" : "uit", " \u00B7 ", c.aantalGevonden, " printer", c.aantalGevonden === 1 ? "" : "s", bezetNaam ? ` · hoort al bij ${bezetNaam}` : ""] })] }), _jsx("span", { className: `h-2.5 w-2.5 rounded-full ${c.online ? "bg-emerald-500" : "bg-muted-foreground"}` })] }, c.id));
|
|
191
|
-
})] })) : null, stap === 3 ? (
|
|
265
|
+
})] })) : null, stap === 3 ? (_jsxs("div", { className: "space-y-2", children: [plekPrinters.filter((p) => !isPdfPrinter(p)).length === 0 ? (_jsxs("div", { className: "flex items-start gap-2 rounded-lg border p-3 text-sm", children: [_jsx(AlertTriangle, { className: "text-muted-foreground mt-0.5 h-4 w-4" }), _jsx("span", { children: "Op deze computers zijn nog geen fysieke printers ingesteld. Ga terug en kies een andere computer, of stel de printers eerst in bij Werkplekken. \"Opslaan als PDF\" werkt altijd, ook zonder fysieke printer." })] })) : null, plekPrinters.map((p) => (_jsxs("div", { className: "rounded-lg border p-3", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsxs("span", { className: "flex items-center gap-2 text-sm", children: [isPdfPrinter(p) ? (_jsx(FileDown, { className: "text-muted-foreground h-4 w-4" })) : (_jsx(Printer, { className: "text-muted-foreground h-4 w-4" })), _jsx("span", { className: "font-medium", children: p.naam }), p.papierformaat ? (_jsx(Badge, { variant: "secondary", children: p.papierformaat })) : null, isPdfPrinter(p) ? _jsx(Badge, { variant: "outline", children: "PDF" }) : null] }), isPdfPrinter(p) ? null : (_jsx(Button, { size: "sm", variant: "ghost", onClick: () => void drukTestpaginaAf(p.id, p.naam), children: "Testpagina" }))] }), isPdfPrinter(p) ? (_jsxs("div", { className: "mt-3 space-y-2 border-t pt-3", children: [_jsx(Label, { className: "text-xs", children: "Map op deze computer" }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("div", { className: "min-w-48 rounded-md border bg-muted/30 px-3 py-2 text-sm", children: pdfMap[p.id] ??
|
|
266
|
+
(p.pdf_map ??
|
|
267
|
+
"Nog geen echte map gekozen") }), _jsxs(Button, { size: "sm", variant: "outline", disabled: bezig, title: mapKiezenMogelijk()
|
|
268
|
+
? "Open de mappenverkenner"
|
|
269
|
+
: "Werkt in Chrome of Edge", onClick: () => void mapKiezen(p.id), children: [_jsx(FolderOpen, { className: "mr-2 h-4 w-4" }), " Map kiezen"] })] }), _jsxs("p", { className: "text-muted-foreground text-xs", children: ["Kies de map met ", _jsx("strong", { children: "Map kiezen" }), ". Alleen een mapnaam of pad intypen geeft de browser geen schrijftoegang. Gereedstaande PDF's worden na de keuze automatisch opnieuw verwerkt."] }), draaitInIframe() ? (_jsxs("div", { className: "rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-xs text-amber-900", children: ["De app draait nu in een voorbeeldvenster, waarin de browser de mappenverkenner blokkeert.", " ", _jsx("button", { type: "button", className: "font-medium underline", onClick: () => openInEigenTabblad(), children: "Open de app in een eigen tabblad" }), " ", "om Map kiezen te gebruiken, of typ het pad handmatig in."] })) : null] })) : null] }, p.id))), !pdfPrinterAanwezig ? (_jsxs("button", { type: "button", disabled: bezig, onClick: () => void pdfPrinterToevoegen(), className: "hover:border-primary/50 hover:bg-muted/50 flex w-full items-center gap-3 rounded-lg border border-dashed p-3 text-left", children: [_jsx(FileDown, { className: "text-muted-foreground h-4 w-4" }), _jsxs("span", { children: [_jsx("span", { className: "block text-sm font-medium", children: "Opslaan als PDF" }), _jsx("span", { className: "text-muted-foreground text-xs", children: "Geen fysieke printer nodig: het document verschijnt als downloadbare PDF in de printwachtrij." })] })] })) : null] })) : null, stap === 4 ? (_jsxs("div", { className: "space-y-2", children: [_jsx("p", { className: "text-muted-foreground text-sm", children: "We hebben alvast een verstandige keuze gemaakt. Pas aan wat er niet klopt." }), zichtbareDocumenten.map((d) => (_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3 rounded-lg border p-2", children: [_jsx("span", { className: "text-sm font-medium", children: documentTypeLabel(d) }), _jsxs(Select, { value: documentPrinters[d] || GEEN, onValueChange: (v) => setDocumentPrinters((m) => ({ ...m, [d]: v === GEEN ? "" : v })), children: [_jsx(SelectTrigger, { className: "w-64", children: _jsx(SelectValue, { placeholder: "Kies printer" }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: GEEN, children: "Niet op deze plek printen" }), plekPrinters.map((p) => (_jsx(SelectItem, { value: p.id, children: p.naam }, p.id)))] })] })] }, d))), overig.length > 0 ? (_jsx(Button, { variant: "ghost", size: "sm", onClick: () => setAlleDocumenten((v) => !v), children: alleDocumenten
|
|
192
270
|
? "Minder documenten"
|
|
193
271
|
: `Meer documenten (${overig.length})` })) : null] })) : null, stap === 5 ? (_jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "rounded-lg border p-3 text-sm", children: [_jsx("p", { className: "font-medium", children: naam.trim() }), _jsxs("p", { className: "text-muted-foreground", children: [gekozenComputers.length, " computer", gekozenComputers.length === 1 ? "" : "s", " \u00B7", " ", plekPrinters.length, " printer", plekPrinters.length === 1 ? "" : "s", " \u00B7", " ", Object.values(documentPrinters).filter(Boolean).length, " documentregel", Object.values(documentPrinters).filter(Boolean).length === 1 ? "" : "s"] })] }), _jsxs(Button, { variant: "outline", onClick: () => void testprint(), disabled: bezig, children: [_jsx(Printer, { className: "mr-2 h-4 w-4" }), " Testpagina versturen"] }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Komt de pagina eruit? Dan is deze plek klaar voor gebruik." })] })) : null] }), _jsxs(DialogFooter, { className: "flex-row justify-between gap-2 sm:justify-between", children: [_jsx(Button, { variant: "ghost", onClick: () => (stap === 1 ? onOpenChange(false) : setStap((s) => s - 1)), disabled: bezig, children: stap === 1 ? ("Annuleren") : (_jsxs(_Fragment, { children: [_jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }), " Terug"] })) }), _jsxs("div", { className: "flex items-center gap-2", children: [stap > 1 && stap < 5 ? (_jsx(Button, { variant: "ghost", onClick: () => onOpenChange(false), disabled: bezig, children: "Later afmaken" })) : null, stap === 5 ? (_jsxs(Button, { onClick: afronden, children: [_jsx(Check, { className: "mr-2 h-4 w-4" }), " Klaar"] })) : (_jsxs(Button, { onClick: () => void volgende(), disabled: bezig || !magVerder, children: ["Volgende ", _jsx(ArrowRight, { className: "ml-2 h-4 w-4" })] }))] })] })] }) }));
|
|
194
272
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductiebonBuilderPage.d.ts","sourceRoot":"","sources":["../../src/components/ProductiebonBuilderPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductiebonBuilderPage.d.ts","sourceRoot":"","sources":["../../src/components/ProductiebonBuilderPage.tsx"],"names":[],"mappings":"AAuBA,+EAA+E;AAC/E,wBAAgB,uBAAuB,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,+BA6I7F"}
|
|
@@ -8,6 +8,7 @@ import { ProductiebonPreview } from "./ProductiebonPreview.js";
|
|
|
8
8
|
import { FormaatOrientatieBar } from "./FormaatOrientatieBar.js";
|
|
9
9
|
import { leesProductiebonConfig } from "../lib/productiebonBuilder.js";
|
|
10
10
|
import { updateLayout, useLayoutDetail } from "../lib/useDocumentData.js";
|
|
11
|
+
import { LayoutPrinterSelect } from "./LayoutPrinterSelect.js";
|
|
11
12
|
import { useLayoutIdParam } from "../lib/useLayoutIdParam.js";
|
|
12
13
|
import { renderProductiebonDocument } from "../lib/productiebonHtml.js";
|
|
13
14
|
import { voorbeeldPrint } from "../lib/voorbeeldPrint.js";
|
|
@@ -48,6 +49,7 @@ export function ProductiebonBuilderPage({ layoutId: layoutIdProp } = {}) {
|
|
|
48
49
|
try {
|
|
49
50
|
const html = renderProductiebonDocument({ productiebon: config }, {}, { breedteMm: breedte, hoogteMm: hoogte, titel: layout?.naam ?? "Productiebon" });
|
|
50
51
|
await voorbeeldPrint({
|
|
52
|
+
...(layout ?? {}),
|
|
51
53
|
id: layout?.id ?? layoutId,
|
|
52
54
|
naam: layout?.naam,
|
|
53
55
|
documenttype: layout?.documenttype ?? "productiebon",
|
|
@@ -67,5 +69,5 @@ export function ProductiebonBuilderPage({ layoutId: layoutIdProp } = {}) {
|
|
|
67
69
|
return _jsx("main", { className: "p-6 text-sm text-muted-foreground", children: "Layout laden\u2026" });
|
|
68
70
|
if (!layout || !config)
|
|
69
71
|
return _jsx("main", { className: "p-6 text-sm text-muted-foreground", children: "Layout niet gevonden." });
|
|
70
|
-
return (_jsxs("main", { className: "space-y-4 p-6", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Button, { variant: "ghost", size: "sm", asChild: true, children: _jsxs(Link, { to: "/layouts-printers", children: [_jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }), " Layouts"] }) }), _jsxs("div", { children: [_jsx("h1", { className: "text-lg font-semibold", children: layout.naam }), _jsxs("p", { className: "text-xs text-muted-foreground", children: ["Productiebon opbouwen uit blokken \u00B7 ", config.blokken.length, " blokken"] })] })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs(Button, { size: "sm", variant: "outline", onClick: voorbeeldPrinten, disabled: printen, children: [printen ? (_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" })) : (_jsx(Printer, { className: "mr-2 h-4 w-4" })), "Voorbeeld printen"] }), _jsxs(Button, { size: "sm", onClick: opslaan, disabled: bezig, children: [_jsx(Save, { className: "mr-2 h-4 w-4" }), " Opslaan"] })] })] }), _jsx(FormaatOrientatieBar, { layout: layout, onChange: (patch) => setLayout((l) => (l ? { ...l, ...patch } : l)) }), _jsxs("div", { className: "grid items-start gap-4 lg:grid-cols-[400px_1fr]", children: [_jsxs(Card, { className: "flex h-[calc(100vh-14rem)] min-h-[420px] flex-col overflow-hidden lg:sticky lg:top-4", children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsx(CardTitle, { className: "text-base", children: "Blokken" }), _jsx(CardDescription, { children: "Voeg blokken toe, wijzig de volgorde en stel elk blok afzonderlijk in." })] }), _jsx(CardContent, { className: "min-h-0 flex-1 overflow-y-auto", children: _jsx(ProductiebonBlokkenPanel, { config: config, onChange: setConfig }) })] }), _jsxs(Card, { className: "flex h-[calc(100vh-14rem)] min-h-[420px] flex-col overflow-hidden", children: [_jsxs(CardHeader, { className: "flex-row items-center justify-between space-y-0 pb-3", children: [_jsxs("div", { children: [_jsx(CardTitle, { className: "text-base", children: "Live voorbeeld" }), _jsx(CardDescription, { children: "Voorbeeldproductieorder met samenstelling en belading." })] }), _jsx(Badge, { variant: "secondary", children: "Direct bijgewerkt" })] }), _jsx(CardContent, { className: "min-h-0 flex-1 overflow-hidden", children: _jsx("div", { className: "h-full overflow-auto rounded-md border bg-muted/30 p-2", children: _jsx(ProductiebonPreview, { config: config, breedteMm: breedte, hoogteMm: hoogte }) }) })] })] })] }));
|
|
72
|
+
return (_jsxs("main", { className: "space-y-4 p-6", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Button, { variant: "ghost", size: "sm", asChild: true, children: _jsxs(Link, { to: "/layouts-printers", children: [_jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }), " Layouts"] }) }), _jsxs("div", { children: [_jsx("h1", { className: "text-lg font-semibold", children: layout.naam }), _jsxs("p", { className: "text-xs text-muted-foreground", children: ["Productiebon opbouwen uit blokken \u00B7 ", config.blokken.length, " blokken"] })] })] }), _jsxs("div", { className: "flex items-center gap-2", children: [layoutId ? _jsx(LayoutPrinterSelect, { layoutId: layoutId }) : null, _jsxs(Button, { size: "sm", variant: "outline", onClick: voorbeeldPrinten, disabled: printen, children: [printen ? (_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" })) : (_jsx(Printer, { className: "mr-2 h-4 w-4" })), "Voorbeeld printen"] }), _jsxs(Button, { size: "sm", onClick: opslaan, disabled: bezig, children: [_jsx(Save, { className: "mr-2 h-4 w-4" }), " Opslaan"] })] })] }), _jsx(FormaatOrientatieBar, { layout: layout, onChange: (patch) => setLayout((l) => (l ? { ...l, ...patch } : l)) }), _jsxs("div", { className: "grid items-start gap-4 lg:grid-cols-[400px_1fr]", children: [_jsxs(Card, { className: "flex h-[calc(100vh-14rem)] min-h-[420px] flex-col overflow-hidden lg:sticky lg:top-4", children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsx(CardTitle, { className: "text-base", children: "Blokken" }), _jsx(CardDescription, { children: "Voeg blokken toe, wijzig de volgorde en stel elk blok afzonderlijk in." })] }), _jsx(CardContent, { className: "min-h-0 flex-1 overflow-y-auto", children: _jsx(ProductiebonBlokkenPanel, { config: config, onChange: setConfig }) })] }), _jsxs(Card, { className: "flex h-[calc(100vh-14rem)] min-h-[420px] flex-col overflow-hidden", children: [_jsxs(CardHeader, { className: "flex-row items-center justify-between space-y-0 pb-3", children: [_jsxs("div", { children: [_jsx(CardTitle, { className: "text-base", children: "Live voorbeeld" }), _jsx(CardDescription, { children: "Voorbeeldproductieorder met samenstelling en belading." })] }), _jsx(Badge, { variant: "secondary", children: "Direct bijgewerkt" })] }), _jsx(CardContent, { className: "min-h-0 flex-1 overflow-hidden", children: _jsx("div", { className: "h-full overflow-auto rounded-md border bg-muted/30 p-2", children: _jsx(ProductiebonPreview, { config: config, breedteMm: breedte, hoogteMm: hoogte }) }) })] })] })] }));
|
|
71
73
|
}
|
package/dist-lib/index.d.ts
CHANGED
|
@@ -17,6 +17,11 @@ export type { TestprintContext, TestprintRegel, TestprintResultaat } from './lib
|
|
|
17
17
|
export { bedoeldePrinter, formaatDef, paginaCss } from './lib/browserPrint.js';
|
|
18
18
|
export type { Orientatie, PrinterKeuze } from './lib/browserPrint.js';
|
|
19
19
|
export { PrintQueuePage } from './components/PrintQueuePage.js';
|
|
20
|
+
export { PdfMapAutoSaver } from './components/PdfMapAutoSaver.js';
|
|
21
|
+
export { PdfMapToestemmingBanner } from './components/PdfMapToestemmingBanner.js';
|
|
22
|
+
export { startPdfMapGlobaleBanner } from './components/PdfMapGlobaleBanner.js';
|
|
23
|
+
export { bewaarPdfJobZodraKlaar, startPdfMapService } from './lib/pdfJobSaver.js';
|
|
24
|
+
export { bewaarInPdfMap, draaitInIframe, herstelPdfMapToestemming, heeftPdfMap, kiesPdfMap, luisterNaarPdfMapWijziging, mapKiezenMogelijk, openInEigenTabblad, pdfMapNaam, pdfMapToestemming } from './lib/pdfMap.js';
|
|
20
25
|
export { AiLayoutImportDialog } from './components/AiLayoutImportDialog.js';
|
|
21
26
|
export { LogosPage, LogoThumbnail } from './components/LogosPage.js';
|
|
22
27
|
export { PakbonBuilderPage } from './components/PakbonBuilderPage.js';
|
|
@@ -80,4 +85,5 @@ export type { Printplek, PrintplekComputer, PrintplekDocumentPrinter, PrintplekK
|
|
|
80
85
|
export { GeenPrinterFout } from './lib/printApi.js';
|
|
81
86
|
export declare const layoutmodule: FlowModule;
|
|
82
87
|
export { voorbeeldPrint } from './lib/voorbeeldPrint.js';
|
|
88
|
+
export { LayoutPrinterSelect } from './components/LayoutPrinterSelect.js';
|
|
83
89
|
//# sourceMappingURL=index.d.ts.map
|
package/dist-lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,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CAAC"}
|
package/dist-lib/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// src/index.ts — MODULE CONTRACT (layout-maker)
|
|
3
3
|
// ============================================================================
|
|
4
4
|
import { LayoutTemplate, Printer, FileText, ListChecks } from "lucide-react";
|
|
5
|
+
import { startPdfMapService } from './lib/pdfJobSaver.js';
|
|
5
6
|
import './_core-safelist.js';
|
|
6
7
|
export { LayoutsPage } from './components/LayoutsPage.js';
|
|
7
8
|
export { PrintProgrammaUitleg, WerktHetNiet } from './components/PrintProgrammaUitleg.js';
|
|
@@ -17,6 +18,11 @@ export { TestprintDialog } from './components/TestprintDialog.js';
|
|
|
17
18
|
export { bepaalTestOverzicht, verstuurTestprint } from './lib/testprint.js';
|
|
18
19
|
export { bedoeldePrinter, formaatDef, paginaCss } from './lib/browserPrint.js';
|
|
19
20
|
export { PrintQueuePage } from './components/PrintQueuePage.js';
|
|
21
|
+
export { PdfMapAutoSaver } from './components/PdfMapAutoSaver.js';
|
|
22
|
+
export { PdfMapToestemmingBanner } from './components/PdfMapToestemmingBanner.js';
|
|
23
|
+
export { startPdfMapGlobaleBanner } from './components/PdfMapGlobaleBanner.js';
|
|
24
|
+
export { bewaarPdfJobZodraKlaar, startPdfMapService } from './lib/pdfJobSaver.js';
|
|
25
|
+
export { bewaarInPdfMap, draaitInIframe, herstelPdfMapToestemming, heeftPdfMap, kiesPdfMap, luisterNaarPdfMapWijziging, mapKiezenMogelijk, openInEigenTabblad, pdfMapNaam, pdfMapToestemming } from './lib/pdfMap.js';
|
|
20
26
|
export { AiLayoutImportDialog } from './components/AiLayoutImportDialog.js';
|
|
21
27
|
export { LogosPage, LogoThumbnail } from './components/LogosPage.js';
|
|
22
28
|
export { PakbonBuilderPage } from './components/PakbonBuilderPage.js';
|
|
@@ -63,7 +69,7 @@ export { GeenPrinterFout } from './lib/printApi.js';
|
|
|
63
69
|
export const layoutmodule = {
|
|
64
70
|
id: "layout-maker",
|
|
65
71
|
name: "Layouts en printers",
|
|
66
|
-
version: "1.
|
|
72
|
+
version: "1.36.3",
|
|
67
73
|
nav: {
|
|
68
74
|
label: "Layouts en printers",
|
|
69
75
|
href: "/layouts-printers/documenten",
|
|
@@ -76,4 +82,8 @@ export const layoutmodule = {
|
|
|
76
82
|
},
|
|
77
83
|
settingsCards: [],
|
|
78
84
|
};
|
|
85
|
+
// De shell importeert dit modulecontract op iedere pagina. Daardoor blijft de
|
|
86
|
+
// lokale PDF-afhandelaar actief, ook buiten de Layout Maker-routes.
|
|
87
|
+
startPdfMapService();
|
|
79
88
|
export { voorbeeldPrint } from './lib/voorbeeldPrint.js';
|
|
89
|
+
export { LayoutPrinterSelect } from './components/LayoutPrinterSelect.js';
|