@flowselections/scan-module 1.0.15 → 1.0.19

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.
Files changed (40) hide show
  1. package/dist-lib/components/ScanModulePage.js +4 -4
  2. package/dist-lib/components/scanners/EindcontroleScanner.d.ts.map +1 -1
  3. package/dist-lib/components/scanners/EindcontroleScanner.js +84 -11
  4. package/dist-lib/components/scanners/KarHistorie.d.ts.map +1 -1
  5. package/dist-lib/components/scanners/KarHistorie.js +2 -1
  6. package/dist-lib/components/scanners/KarIndelingScanner.d.ts.map +1 -1
  7. package/dist-lib/components/scanners/KarIndelingScanner.js +1 -1
  8. package/dist-lib/components/scanners/ScanMonitoring.js +1 -1
  9. package/dist-lib/components/scanners/ScannerBySlug.js +2 -2
  10. package/dist-lib/components/scanners/Veilingbrief.js +1 -1
  11. package/dist-lib/components/settings/ScanModuleSettingsCard.d.ts.map +1 -1
  12. package/dist-lib/components/settings/ScanModuleSettingsCard.js +1 -1
  13. package/dist-lib/hooks/useKarIndeling.d.ts +4 -1
  14. package/dist-lib/hooks/useKarIndeling.d.ts.map +1 -1
  15. package/dist-lib/hooks/useKarIndeling.js +8 -7
  16. package/dist-lib/hooks/useKarScanner.d.ts.map +1 -1
  17. package/dist-lib/hooks/useKarScanner.js +3 -2
  18. package/dist-lib/hooks/useScanEngine.js +1 -1
  19. package/dist-lib/hooks/useScanModuleData.d.ts.map +1 -1
  20. package/dist-lib/hooks/useScanModuleData.js +2 -1
  21. package/dist-lib/hooks/useScanStats.js +1 -1
  22. package/dist-lib/hooks/useScanners.d.ts.map +1 -1
  23. package/dist-lib/hooks/useScanners.js +2 -1
  24. package/dist-lib/integrations/supabase/client.d.ts +2 -2
  25. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  26. package/dist-lib/integrations/supabase/client.js +4 -13
  27. package/dist-lib/integrations/supabase/previewAuthStorage.d.ts.map +1 -1
  28. package/dist-lib/integrations/supabase/previewAuthStorage.js +22 -4
  29. package/dist-lib/integrations/supabase/types.d.ts +464 -2
  30. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  31. package/dist-lib/integrations/supabase/types.js +1 -0
  32. package/dist-lib/lib/datum.d.ts +3 -0
  33. package/dist-lib/lib/datum.d.ts.map +1 -0
  34. package/dist-lib/lib/datum.js +28 -0
  35. package/dist-lib/lib/pakbonScan.js +1 -1
  36. package/dist-lib/lib/scanI18n.js +15 -15
  37. package/dist-lib/lib/scannerTypes.js +1 -1
  38. package/dist-lib/lib/scanners.js +1 -1
  39. package/dist-lib/lib/veilingbonPrint.js +2 -2
  40. package/package.json +4 -4
@@ -39,6 +39,7 @@ export const Constants = {
39
39
  "veilingbon",
40
40
  "afleverbrief",
41
41
  "veilingbrief",
42
+ "traysticker",
42
43
  ],
43
44
  doc_orientation: ["portrait", "landscape"],
44
45
  exact_env: ["staging", "live"],
@@ -0,0 +1,3 @@
1
+ export declare function formatDag(waarde: string | null | undefined): string | null;
2
+ export declare function formatTijd(iso: string | null | undefined, tijdzone: string | null | undefined): string | null;
3
+ //# sourceMappingURL=datum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datum.d.ts","sourceRoot":"","sources":["../../src/lib/datum.ts"],"names":[],"mappings":"AAOA,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAM1E;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAW7G"}
@@ -0,0 +1,28 @@
1
+ // Datums voor gebruikers: "di 13 okt". Een kale datum (YYYY-MM-DD) heeft geen
2
+ // tijdzone nodig; een tijdstip alleen met de tijdzone uit Werktijden. Ontbreekt
3
+ // die, dan tonen we geen gegokte tijd (fail closed).
4
+ const DAGEN = ["zo", "ma", "di", "wo", "do", "vr", "za"];
5
+ const MAANDEN = ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"];
6
+ export function formatDag(waarde) {
7
+ const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(waarde ?? "");
8
+ if (!m)
9
+ return null;
10
+ const d = new Date(Date.UTC(Number(m[1]), Number(m[2]) - 1, Number(m[3])));
11
+ if (Number.isNaN(d.getTime()))
12
+ return null;
13
+ return `${DAGEN[d.getUTCDay()]} ${d.getUTCDate()} ${MAANDEN[d.getUTCMonth()]}`;
14
+ }
15
+ export function formatTijd(iso, tijdzone) {
16
+ if (!iso || !tijdzone)
17
+ return null;
18
+ try {
19
+ return new Intl.DateTimeFormat("nl-NL", {
20
+ hour: "2-digit",
21
+ minute: "2-digit",
22
+ timeZone: tijdzone,
23
+ }).format(new Date(iso));
24
+ }
25
+ catch {
26
+ return null;
27
+ }
28
+ }
@@ -8,7 +8,7 @@
8
8
  // Alleen als de Engine de code niet als pakbon kent (errorCode "onbekend" of
9
9
  // "ongeldig") mag de gewone productlookup volgen.
10
10
  // ============================================================================
11
- import { supabase } from "@flowselections/core";
11
+ import { supabase } from "../integrations/supabase/client";
12
12
  import { leesStationNaam } from "./stationNaam";
13
13
  /* eslint-disable @typescript-eslint/no-explicit-any */
14
14
  const db = supabase;
@@ -80,9 +80,9 @@ const nl = {
80
80
  newCart: "Nieuwe kar starten",
81
81
  historyNote: "Alle scans zijn vastgelegd in de historie.",
82
82
  print: "Printen",
83
- pickStation: "Pick Station",
83
+ pickStation: "pickstation",
84
84
  sentToPrinter: "Veilingbon naar printer gestuurd",
85
- sentToPick: "Veilingbon doorgestuurd naar het Pick Station",
85
+ sentToPick: "Veilingbon doorgestuurd naar het pickstation",
86
86
  };
87
87
  const en = {
88
88
  chooseLanguage: "Choose your language",
@@ -146,9 +146,9 @@ const en = {
146
146
  newCart: "Start new trolley",
147
147
  historyNote: "All scans are recorded in the history.",
148
148
  print: "Print",
149
- pickStation: "Pick Station",
149
+ pickStation: "pickstation",
150
150
  sentToPrinter: "Auction note sent to the printer",
151
- sentToPick: "Auction note forwarded to the Pick Station",
151
+ sentToPick: "Auction note forwarded to the pickstation",
152
152
  };
153
153
  const de = {
154
154
  ...en,
@@ -212,7 +212,7 @@ const de = {
212
212
  historyNote: "Alle Scans werden im Verlauf gespeichert.",
213
213
  print: "Drucken",
214
214
  sentToPrinter: "Auktionsbeleg an den Drucker gesendet",
215
- sentToPick: "Auktionsbeleg an die Pick Station gesendet",
215
+ sentToPick: "Auktionsbeleg an die pickstation gesendet",
216
216
  };
217
217
  const fr = {
218
218
  ...en,
@@ -276,7 +276,7 @@ const fr = {
276
276
  historyNote: "Tous les scans sont enregistrés dans l'historique.",
277
277
  print: "Imprimer",
278
278
  sentToPrinter: "Bon de vente envoyé à l'imprimante",
279
- sentToPick: "Bon de vente transmis au Pick Station",
279
+ sentToPick: "Bon de vente transmis au pickstation",
280
280
  };
281
281
  const it = {
282
282
  ...en,
@@ -340,7 +340,7 @@ const it = {
340
340
  historyNote: "Tutte le scansioni sono registrate nello storico.",
341
341
  print: "Stampa",
342
342
  sentToPrinter: "Nota d'asta inviata alla stampante",
343
- sentToPick: "Nota d'asta inoltrata al Pick Station",
343
+ sentToPick: "Nota d'asta inoltrata al pickstation",
344
344
  };
345
345
  const es = {
346
346
  ...en,
@@ -404,7 +404,7 @@ const es = {
404
404
  historyNote: "Todos los escaneos quedan registrados en el historial.",
405
405
  print: "Imprimir",
406
406
  sentToPrinter: "Nota de subasta enviada a la impresora",
407
- sentToPick: "Nota de subasta enviada al Pick Station",
407
+ sentToPick: "Nota de subasta enviada al pickstation",
408
408
  };
409
409
  const da = {
410
410
  ...en,
@@ -468,7 +468,7 @@ const da = {
468
468
  historyNote: "Alle scanninger gemmes i historikken.",
469
469
  print: "Print",
470
470
  sentToPrinter: "Auktionsseddel sendt til printeren",
471
- sentToPick: "Auktionsseddel sendt til Pick Station",
471
+ sentToPick: "Auktionsseddel sendt til pickstation",
472
472
  };
473
473
  const sv = {
474
474
  ...en,
@@ -532,7 +532,7 @@ const sv = {
532
532
  historyNote: "Alla skanningar sparas i historiken.",
533
533
  print: "Skriv ut",
534
534
  sentToPrinter: "Auktionssedel skickad till skrivaren",
535
- sentToPick: "Auktionssedel skickad till Pick Station",
535
+ sentToPick: "Auktionssedel skickad till pickstation",
536
536
  };
537
537
  const pl = {
538
538
  ...en,
@@ -596,7 +596,7 @@ const pl = {
596
596
  historyNote: "Wszystkie skany są zapisywane w historii.",
597
597
  print: "Drukuj",
598
598
  sentToPrinter: "Nota aukcyjna wysłana do drukarki",
599
- sentToPick: "Nota aukcyjna przekazana do Pick Station",
599
+ sentToPick: "Nota aukcyjna przekazana do pickstation",
600
600
  };
601
601
  const ro = {
602
602
  ...en,
@@ -660,7 +660,7 @@ const ro = {
660
660
  historyNote: "Toate scanările sunt înregistrate în istoric.",
661
661
  print: "Printați",
662
662
  sentToPrinter: "Nota de licitație a fost trimisă la imprimantă",
663
- sentToPick: "Nota de licitație a fost trimisă la Pick Station",
663
+ sentToPick: "Nota de licitație a fost trimisă la pickstation",
664
664
  };
665
665
  const bg = {
666
666
  ...en,
@@ -724,7 +724,7 @@ const bg = {
724
724
  historyNote: "Всички сканирания се записват в историята.",
725
725
  print: "Печат",
726
726
  sentToPrinter: "Аукционната бележка е изпратена към принтера",
727
- sentToPick: "Аукционната бележка е препратена към Pick Station",
727
+ sentToPick: "Аукционната бележка е препратена към pickstation",
728
728
  };
729
729
  const uk = {
730
730
  ...en,
@@ -788,13 +788,13 @@ const uk = {
788
788
  historyNote: "Усі сканування зберігаються в історії.",
789
789
  print: "Друк",
790
790
  sentToPrinter: "Аукціонну накладну надіслано на принтер",
791
- sentToPick: "Аукціонну накладну надіслано до Pick Station",
791
+ sentToPick: "Аукціонну накладну надіслано до pickstation",
792
792
  };
793
793
  // ── Printteksten (centrale print-API) ───────────────────────────────────────
794
794
  const PRINT_TEXTS = {
795
795
  nl: {
796
796
  printNoWorkplace: "Geen werkplek ingesteld voor deze scanner",
797
- printNoPrinter: "Geen printer gekoppeld aan werkplek {n} — stel dit in bij Layouts & printers",
797
+ printNoPrinter: "Er is geen printer voor deze scanner (printplek {n}). Vraag kantoor een printer te koppelen.",
798
798
  printSending: "Bezig met versturen…",
799
799
  printQueued: "Staat in de wachtrij",
800
800
  printBusy: "Wordt geprint…",
@@ -17,7 +17,7 @@ export const SCANNER_TYPES = [
17
17
  {
18
18
  id: "eindcontrole",
19
19
  label: "Eindcontrole scanner",
20
- omschrijving: "Pakbon scannen bij de karrencontrole en de fysieke kar afmelden bij de Logistiek Engine.",
20
+ omschrijving: "Scan de pakbon bij de karrencontrole; de kar wordt dan afgemeld.",
21
21
  icon: ClipboardCheck,
22
22
  printerVereist: false,
23
23
  },
@@ -10,7 +10,7 @@ export const SCANNERS = [
10
10
  {
11
11
  key: "kar",
12
12
  title: "Karscanner",
13
- description: "Pakbonnen koppelen aan een kar, producten scannen en automatisch een veilingbrief aanmaken.",
13
+ description: "Pakbonnen koppelen aan een kar, producten scannen en automatisch een veilingbon aanmaken.",
14
14
  href: "/scanner/kar",
15
15
  icon: ScanLine,
16
16
  status: "actief",
@@ -6,7 +6,7 @@
6
6
  // in zit, wordt een read-only vervanger gebruikt (printerlijst / statuslezen).
7
7
  // ============================================================================
8
8
  import * as layoutMaker from "@flowselections/layout-maker";
9
- import { supabase } from "@flowselections/core";
9
+ import { supabase } from "../integrations/supabase/client";
10
10
  /* eslint-disable @typescript-eslint/no-explicit-any */
11
11
  const lm = layoutMaker;
12
12
  const db = supabase;
@@ -166,7 +166,7 @@ export async function printRestpakbon(opties) {
166
166
  throw new Error("Geen printer gekoppeld aan deze scanner. Kies een printer bij de scannerinstellingen.");
167
167
  }
168
168
  if (typeof lm.printHtml !== "function") {
169
- throw new Error("Geen pakbon-layout gevonden en geen noodvariant beschikbaar.");
169
+ throw new Error("Er is nog geen pakbon-ontwerp ingesteld. Vraag kantoor dit in te stellen bij Printen.");
170
170
  }
171
171
  const res = await lm.printHtml({
172
172
  documenttype: "pakbon",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowselections/scan-module",
3
- "version": "1.0.15",
3
+ "version": "1.0.19",
4
4
  "flowselections": {
5
5
  "moduleId": "scan-module",
6
6
  "pages": [
@@ -78,9 +78,9 @@
78
78
  "@rsbuild/core": "^1.0.0",
79
79
  "@tailwindcss/vite": "^4.2.1",
80
80
  "@tanstack/react-query": "^5.83.0",
81
- "@tanstack/react-router": "^1.168.0",
82
- "@tanstack/react-start": "^1.167.14",
83
- "@tanstack/router-plugin": "^1.167.10",
81
+ "@tanstack/react-router": "1.169.1",
82
+ "@tanstack/react-start": "1.167.63",
83
+ "@tanstack/router-plugin": "1.167.33",
84
84
  "@types/node": "^22.16.5",
85
85
  "@types/react": "^19.2.0",
86
86
  "@types/react-dom": "^19.2.0",