@flowselections/scan-module 1.0.17 → 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.
- package/dist-lib/components/ScanModulePage.js +4 -4
- package/dist-lib/components/scanners/EindcontroleScanner.d.ts.map +1 -1
- package/dist-lib/components/scanners/EindcontroleScanner.js +56 -12
- package/dist-lib/components/scanners/KarHistorie.d.ts.map +1 -1
- package/dist-lib/components/scanners/KarHistorie.js +2 -1
- package/dist-lib/components/scanners/KarIndelingScanner.d.ts.map +1 -1
- package/dist-lib/components/scanners/KarIndelingScanner.js +1 -1
- package/dist-lib/components/scanners/ScanMonitoring.js +1 -1
- package/dist-lib/components/scanners/ScannerBySlug.js +2 -2
- package/dist-lib/components/scanners/Veilingbrief.js +1 -1
- package/dist-lib/components/settings/ScanModuleSettingsCard.d.ts.map +1 -1
- package/dist-lib/components/settings/ScanModuleSettingsCard.js +1 -1
- package/dist-lib/hooks/useKarIndeling.d.ts.map +1 -1
- package/dist-lib/hooks/useKarIndeling.js +8 -7
- package/dist-lib/hooks/useKarScanner.d.ts.map +1 -1
- package/dist-lib/hooks/useKarScanner.js +3 -2
- package/dist-lib/hooks/useScanEngine.js +1 -1
- package/dist-lib/hooks/useScanModuleData.d.ts.map +1 -1
- package/dist-lib/hooks/useScanModuleData.js +2 -1
- package/dist-lib/hooks/useScanStats.js +1 -1
- package/dist-lib/hooks/useScanners.d.ts.map +1 -1
- package/dist-lib/hooks/useScanners.js +2 -1
- package/dist-lib/integrations/supabase/client.d.ts +2 -2
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.js +4 -13
- package/dist-lib/integrations/supabase/types.d.ts +167 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/datum.d.ts +3 -0
- package/dist-lib/lib/datum.d.ts.map +1 -0
- package/dist-lib/lib/datum.js +28 -0
- package/dist-lib/lib/pakbonScan.js +1 -1
- package/dist-lib/lib/scanI18n.js +15 -15
- package/dist-lib/lib/scannerTypes.js +1 -1
- package/dist-lib/lib/scanners.js +1 -1
- package/dist-lib/lib/veilingbonPrint.js +2 -2
- package/package.json +1 -1
|
@@ -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 "
|
|
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;
|
package/dist-lib/lib/scanI18n.js
CHANGED
|
@@ -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: "
|
|
83
|
+
pickStation: "pickstation",
|
|
84
84
|
sentToPrinter: "Veilingbon naar printer gestuurd",
|
|
85
|
-
sentToPick: "Veilingbon doorgestuurd naar het
|
|
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: "
|
|
149
|
+
pickStation: "pickstation",
|
|
150
150
|
sentToPrinter: "Auction note sent to the printer",
|
|
151
|
-
sentToPick: "Auction note forwarded to the
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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: "Аукционната бележка е препратена към
|
|
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: "Аукціонну накладну надіслано до
|
|
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: "
|
|
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: "
|
|
20
|
+
omschrijving: "Scan de pakbon bij de karrencontrole; de kar wordt dan afgemeld.",
|
|
21
21
|
icon: ClipboardCheck,
|
|
22
22
|
printerVereist: false,
|
|
23
23
|
},
|
package/dist-lib/lib/scanners.js
CHANGED
|
@@ -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
|
|
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 "
|
|
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("
|
|
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",
|