@flowselections/scan-module 1.0.3 → 1.0.5
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.d.ts.map +1 -1
- package/dist-lib/components/ScanModulePage.js +57 -24
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +116 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +116 -0
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +116 -0
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +120 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/shellHost.functions.d.ts +3 -0
- package/dist-lib/lib/shellHost.functions.d.ts.map +1 -0
- package/dist-lib/lib/shellHost.functions.js +5 -0
- package/dist-lib/lib/shellHost.server.d.ts +12 -0
- package/dist-lib/lib/shellHost.server.d.ts.map +1 -0
- package/dist-lib/lib/shellHost.server.js +91 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScanModulePage.d.ts","sourceRoot":"","sources":["../../src/components/ScanModulePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScanModulePage.d.ts","sourceRoot":"","sources":["../../src/components/ScanModulePage.tsx"],"names":[],"mappings":"AA0bA,wBAAgB,cAAc,gCAkH7B"}
|
|
@@ -5,36 +5,49 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
5
5
|
// Overzicht van alle scanners + aanmaken van nieuwe scanners.
|
|
6
6
|
// Elke scanner heeft een eigen openbare link: /scanner/<slug>
|
|
7
7
|
// ============================================================================
|
|
8
|
-
import { useEffect, useState } from "react";
|
|
8
|
+
import { createContext, useContext, useEffect, useState } from "react";
|
|
9
9
|
import { Badge, Button, Card, CardContent, CardHeader, CardTitle, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Input, Label, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, cn, toast, } from "@flowselections/core";
|
|
10
10
|
import { Check, Copy, ExternalLink, Loader2, Pencil, Plus, ScanLine, Trash2, } from "lucide-react";
|
|
11
11
|
import { useScanners, slugify, } from "../hooks/useScanners";
|
|
12
12
|
import { KarHistorie } from "./scanners/KarHistorie";
|
|
13
13
|
import { ScanMonitoring } from "./scanners/ScanMonitoring";
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
function
|
|
25
|
-
const
|
|
26
|
-
return basis ? `${basis}/scanner/${slug}` : null;
|
|
27
|
-
}
|
|
28
|
-
function OntbrekendeBasisUrl({ compact = false }) {
|
|
29
|
-
const tekst = `Geen scannerlink beschikbaar: de omgevingsvariabele ${ONTBREKENDE_SECRET} is niet ingesteld voor deze omgeving. Dit is geen bug in de module — vraag de beheerder deze secret te zetten en de shell opnieuw te publiceren (VITE_-variabelen worden bij de build ingebakken).`;
|
|
14
|
+
import { haalShellHost } from "../lib/shellHost.functions";
|
|
15
|
+
// De publieke basis-URL komt van central-auth (GET /api/shell-host): één bron
|
|
16
|
+
// per tenant. FAIL-CLOSED: lukt dat niet, dan bouwen we géén link — een link
|
|
17
|
+
// naar de verkeerde omgeving is erger dan geen link. Geen hardcoded fallback.
|
|
18
|
+
const FOUT_TEKST = {
|
|
19
|
+
"geen-config": "Geen scannerlink beschikbaar: central-auth is niet geconfigureerd in deze omgeving (CENTRAL_AUTH_URL en/of CENTRAL_AUTH_SECRET ontbreekt). Actie: beheerder zet beide secrets op deze shell en publiceert opnieuw.",
|
|
20
|
+
onbereikbaar: "Geen scannerlink beschikbaar: central-auth is op dit moment niet bereikbaar. Dit is een tijdelijke storing, geen fout in deze module. Actie: probeer het straks opnieuw.",
|
|
21
|
+
unauthorized: "Geen scannerlink beschikbaar: central-auth wees de aanvraag af (401). Dat betekent een verkeerd of ontbrekend tenant-secret — CENTRAL_AUTH_SECRET in deze shell hoort het secret van deze klant te zijn. Dit is geen fout in de scan-module. Actie: beheerder corrigeert het secret en publiceert opnieuw.",
|
|
22
|
+
"geen-shell-host": "Geen scannerlink beschikbaar: deze tenant heeft in central-auth geen (geldige) shell-host ingesteld. Actie: beheerder zet de shell-host van deze klant in central-auth, inclusief https://.",
|
|
23
|
+
};
|
|
24
|
+
function OntbrekendeBasisUrl({ reden, compact = false, }) {
|
|
25
|
+
const tekst = FOUT_TEKST[reden];
|
|
30
26
|
if (compact) {
|
|
31
27
|
return _jsx("p", { className: "break-words text-xs text-destructive", children: tekst });
|
|
32
28
|
}
|
|
33
29
|
return (_jsx("div", { className: "rounded-xl border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive", children: tekst }));
|
|
34
30
|
}
|
|
31
|
+
const BasisUrlContext = createContext({ staat: "laden" });
|
|
32
|
+
function useScannerUrl(slug) {
|
|
33
|
+
const status = useContext(BasisUrlContext);
|
|
34
|
+
return {
|
|
35
|
+
url: status.staat === "ok" ? `${status.basis}/scanner/${slug}` : null,
|
|
36
|
+
status,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function BasisUrlMelding({ status, compact }) {
|
|
40
|
+
if (status.staat === "laden") {
|
|
41
|
+
return (_jsx("p", { className: "text-xs text-muted-foreground", children: "Scannerlink ophalen bij central-auth\u2026" }));
|
|
42
|
+
}
|
|
43
|
+
if (status.staat === "fout") {
|
|
44
|
+
return _jsx(OntbrekendeBasisUrl, { reden: status.reden, compact: compact });
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
35
48
|
function ScannerKaart({ scanner, onVerwijder, onBewerk, }) {
|
|
36
49
|
const [gekopieerd, setGekopieerd] = useState(false);
|
|
37
|
-
const url =
|
|
50
|
+
const { url, status } = useScannerUrl(scanner.slug);
|
|
38
51
|
const kopieer = async () => {
|
|
39
52
|
if (!url)
|
|
40
53
|
return;
|
|
@@ -48,7 +61,7 @@ function ScannerKaart({ scanner, onVerwijder, onBewerk, }) {
|
|
|
48
61
|
toast.error("Kopiëren mislukt — selecteer de link handmatig");
|
|
49
62
|
}
|
|
50
63
|
};
|
|
51
|
-
return (_jsxs(Card, { className: cn("h-full", scanner.actief ? "border-primary/40" : "opacity-60"), children: [_jsxs(CardHeader, { className: "grid grid-cols-[auto_minmax(0,1fr)] items-center gap-3 pb-2", children: [_jsx("span", { className: "grid h-11 w-11 shrink-0 place-items-center rounded-xl bg-primary/10 text-primary", children: _jsx(ScanLine, { className: "h-6 w-6" }) }), _jsxs("div", { className: "min-w-0", children: [_jsx(CardTitle, { className: "truncate text-base", children: scanner.naam }), _jsx(Badge, { variant: scanner.actief ? "default" : "secondary", className: "mt-1", children: scanner.actief ? "Actief" : "Uit" })] })] }), _jsxs(CardContent, { className: "space-y-3", children: [scanner.omschrijving ? (_jsx("p", { className: "text-sm text-muted-foreground", children: scanner.omschrijving })) : null, url ? (_jsxs(_Fragment, { children: [_jsx(Input, { readOnly: true, value: url, onFocus: (e) => e.currentTarget.select(), className: "h-11 font-mono text-xs" }), _jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsxs(Button, { className: "h-11", onClick: () => void kopieer(), children: [gekopieerd ? _jsx(Check, { className: "mr-2 h-4 w-4" }) : _jsx(Copy, { className: "mr-2 h-4 w-4" }), gekopieerd ? "Gekopieerd" : "Link kopiëren"] }), _jsx(Button, { variant: "outline", className: "h-11", asChild: true, children: _jsxs("a", { href: url, target: "_blank", rel: "noreferrer", children: [_jsx(ExternalLink, { className: "mr-2 h-4 w-4" }), " Openen"] }) })] })] })) : (_jsx(
|
|
64
|
+
return (_jsxs(Card, { className: cn("h-full", scanner.actief ? "border-primary/40" : "opacity-60"), children: [_jsxs(CardHeader, { className: "grid grid-cols-[auto_minmax(0,1fr)] items-center gap-3 pb-2", children: [_jsx("span", { className: "grid h-11 w-11 shrink-0 place-items-center rounded-xl bg-primary/10 text-primary", children: _jsx(ScanLine, { className: "h-6 w-6" }) }), _jsxs("div", { className: "min-w-0", children: [_jsx(CardTitle, { className: "truncate text-base", children: scanner.naam }), _jsx(Badge, { variant: scanner.actief ? "default" : "secondary", className: "mt-1", children: scanner.actief ? "Actief" : "Uit" })] })] }), _jsxs(CardContent, { className: "space-y-3", children: [scanner.omschrijving ? (_jsx("p", { className: "text-sm text-muted-foreground", children: scanner.omschrijving })) : null, url ? (_jsxs(_Fragment, { children: [_jsx(Input, { readOnly: true, value: url, onFocus: (e) => e.currentTarget.select(), className: "h-11 font-mono text-xs" }), _jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsxs(Button, { className: "h-11", onClick: () => void kopieer(), children: [gekopieerd ? _jsx(Check, { className: "mr-2 h-4 w-4" }) : _jsx(Copy, { className: "mr-2 h-4 w-4" }), gekopieerd ? "Gekopieerd" : "Link kopiëren"] }), _jsx(Button, { variant: "outline", className: "h-11", asChild: true, children: _jsxs("a", { href: url, target: "_blank", rel: "noreferrer", children: [_jsx(ExternalLink, { className: "mr-2 h-4 w-4" }), " Openen"] }) })] })] })) : (_jsx(BasisUrlMelding, { status: status })), _jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsxs(Button, { variant: "outline", className: "h-9", onClick: () => onBewerk(scanner), children: [_jsx(Pencil, { className: "mr-2 h-4 w-4" }), " Wijzigen"] }), _jsxs(Button, { variant: "ghost", className: "h-9 text-destructive hover:text-destructive", onClick: () => onVerwijder(scanner.id), children: [_jsx(Trash2, { className: "mr-2 h-4 w-4" }), " Verwijderen"] })] })] })] }));
|
|
52
65
|
}
|
|
53
66
|
function NieuweScannerDialog({ open, onOpenChange, onMaak, bezig, }) {
|
|
54
67
|
const [naam, setNaam] = useState("");
|
|
@@ -56,6 +69,7 @@ function NieuweScannerDialog({ open, onOpenChange, onMaak, bezig, }) {
|
|
|
56
69
|
const [werkplek, setWerkplek] = useState("");
|
|
57
70
|
const [slug, setSlug] = useState("");
|
|
58
71
|
const effectieveSlug = slugify(slug || naam);
|
|
72
|
+
const { url: voorbeeldUrl, status: basisStatus } = useScannerUrl(effectieveSlug || "…");
|
|
59
73
|
const opslaan = async () => {
|
|
60
74
|
await onMaak({ naam, omschrijving, slug, werkplek });
|
|
61
75
|
setNaam("");
|
|
@@ -63,7 +77,7 @@ function NieuweScannerDialog({ open, onOpenChange, onMaak, bezig, }) {
|
|
|
63
77
|
setWerkplek("");
|
|
64
78
|
setSlug("");
|
|
65
79
|
};
|
|
66
|
-
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: "sm:max-w-md", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Nieuwe scanner" }), _jsx(DialogDescription, { children: "Elke scanner krijgt een eigen openbare link die je naar een medewerker kunt sturen." })] }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "scanner-naam", children: "Naam" }), _jsx(Input, { id: "scanner-naam", value: naam, onChange: (e) => setNaam(e.target.value), placeholder: "Bijv. Karscanner hal 2", className: "h-11" })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "scanner-omschrijving", children: "Omschrijving (optioneel)" }), _jsx(Textarea, { id: "scanner-omschrijving", value: omschrijving, onChange: (e) => setOmschrijving(e.target.value), placeholder: "Waarvoor wordt deze scanner gebruikt?" })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "scanner-werkplek", children: "Werkplek (voor printen)" }), _jsx(Input, { id: "scanner-werkplek", value: werkplek, onChange: (e) => setWerkplek(e.target.value), placeholder: "Bijv. Hal 2", className: "h-11" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "De werkplek moet exact gelijk zijn aan de locatie- of systeemnaam van de printer in Layouts & printers." })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "scanner-slug", children: "Link" }), _jsx(Input, { id: "scanner-slug", value: slug, onChange: (e) => setSlug(e.target.value), placeholder: "automatisch op basis van de naam", className: "h-11 font-mono text-sm" }),
|
|
80
|
+
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: "sm:max-w-md", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Nieuwe scanner" }), _jsx(DialogDescription, { children: "Elke scanner krijgt een eigen openbare link die je naar een medewerker kunt sturen." })] }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "scanner-naam", children: "Naam" }), _jsx(Input, { id: "scanner-naam", value: naam, onChange: (e) => setNaam(e.target.value), placeholder: "Bijv. Karscanner hal 2", className: "h-11" })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "scanner-omschrijving", children: "Omschrijving (optioneel)" }), _jsx(Textarea, { id: "scanner-omschrijving", value: omschrijving, onChange: (e) => setOmschrijving(e.target.value), placeholder: "Waarvoor wordt deze scanner gebruikt?" })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "scanner-werkplek", children: "Werkplek (voor printen)" }), _jsx(Input, { id: "scanner-werkplek", value: werkplek, onChange: (e) => setWerkplek(e.target.value), placeholder: "Bijv. Hal 2", className: "h-11" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "De werkplek moet exact gelijk zijn aan de locatie- of systeemnaam van de printer in Layouts & printers." })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "scanner-slug", children: "Link" }), _jsx(Input, { id: "scanner-slug", value: slug, onChange: (e) => setSlug(e.target.value), placeholder: "automatisch op basis van de naam", className: "h-11 font-mono text-sm" }), voorbeeldUrl ? (_jsx("p", { className: "break-all text-xs text-muted-foreground", children: voorbeeldUrl })) : (_jsx(BasisUrlMelding, { status: basisStatus, compact: true }))] })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", onClick: () => onOpenChange(false), children: "Annuleren" }), _jsxs(Button, { onClick: () => void opslaan(), disabled: bezig || !naam.trim(), children: [bezig ? _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }) : _jsx(Plus, { className: "mr-2 h-4 w-4" }), "Scanner aanmaken"] })] })] }) }));
|
|
67
81
|
}
|
|
68
82
|
function BewerkScannerDialog({ scanner, onOpenChange, onOpslaan, }) {
|
|
69
83
|
const [naam, setNaam] = useState("");
|
|
@@ -116,8 +130,27 @@ export function ScanModulePage() {
|
|
|
116
130
|
await wijzigScanner(id, waarden);
|
|
117
131
|
setBewerkScanner(null);
|
|
118
132
|
};
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
133
|
+
const [basisStatus, setBasisStatus] = useState({ staat: "laden" });
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
let actief = true;
|
|
136
|
+
void haalShellHost()
|
|
137
|
+
.then((resultaat) => {
|
|
138
|
+
if (!actief)
|
|
139
|
+
return;
|
|
140
|
+
setBasisStatus(resultaat.ok
|
|
141
|
+
? { staat: "ok", basis: resultaat.host }
|
|
142
|
+
: { staat: "fout", reden: resultaat.reden });
|
|
143
|
+
})
|
|
144
|
+
.catch(() => {
|
|
145
|
+
if (actief)
|
|
146
|
+
setBasisStatus({ staat: "fout", reden: "onbereikbaar" });
|
|
147
|
+
});
|
|
148
|
+
return () => {
|
|
149
|
+
actief = false;
|
|
150
|
+
};
|
|
151
|
+
}, []);
|
|
152
|
+
return (_jsx(BasisUrlContext.Provider, { value: basisStatus, children: _jsxs("main", { className: "space-y-6 p-4 sm:p-6", children: [_jsxs(Tabs, { defaultValue: "scanners", className: "space-y-4", children: [_jsxs(TabsList, { children: [_jsx(TabsTrigger, { value: "scanners", children: "Scanners" }), _jsx(TabsTrigger, { value: "monitoring", children: "Monitoring" }), _jsx(TabsTrigger, { value: "historie", children: "Historie karren" })] }), _jsxs(TabsContent, { value: "scanners", className: "space-y-4", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [_jsx("p", { className: "text-sm text-muted-foreground", children: "Elke scanner heeft een eigen openbare link \u2014 deel die met de juiste medewerker." }), _jsxs(Button, { className: "h-11", onClick: () => setDialoogOpen(true), children: [_jsx(Plus, { className: "mr-2 h-5 w-5" }), " Nieuwe scanner"] })] }), laden ? (_jsx("div", { className: "grid place-items-center py-16", children: _jsx(Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })) : scanners.length === 0 ? (_jsx(Card, { children: _jsxs(CardContent, { className: "grid place-items-center gap-3 py-12 text-center", children: [_jsx(ScanLine, { className: "h-10 w-10 text-muted-foreground" }), _jsx("p", { className: "text-sm text-muted-foreground", children: "Nog geen scanners. Maak je eerste scanner aan." }), _jsxs(Button, { onClick: () => setDialoogOpen(true), children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), " Nieuwe scanner"] })] }) })) : (_jsx("div", { className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3", children: scanners.map((scanner) => (_jsx(ScannerKaart, { scanner: scanner, onVerwijder: (id) => void verwijderScanner(id), onBewerk: (s) => setBewerkScanner(s) }, scanner.id))) }))] }), _jsx(TabsContent, { value: "monitoring", children: _jsx(ScanMonitoring, {}) }), _jsx(TabsContent, { value: "historie", children: _jsx(KarHistorie, {}) })] }), _jsx(NieuweScannerDialog, { open: dialoogOpen, onOpenChange: setDialoogOpen, onMaak: maak, bezig: bezig }), _jsx(BewerkScannerDialog, { scanner: bewerkScanner, onOpenChange: (v) => {
|
|
153
|
+
if (!v)
|
|
154
|
+
setBewerkScanner(null);
|
|
155
|
+
}, onOpslaan: bewaar })] }) }));
|
|
123
156
|
}
|
|
@@ -10385,6 +10385,63 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
10385
10385
|
referencedColumns: ["id"];
|
|
10386
10386
|
}];
|
|
10387
10387
|
};
|
|
10388
|
+
medewerker_details: {
|
|
10389
|
+
Row: {
|
|
10390
|
+
color: string | null;
|
|
10391
|
+
created_at: string;
|
|
10392
|
+
hours_fri: number | null;
|
|
10393
|
+
hours_mon: number | null;
|
|
10394
|
+
hours_thu: number | null;
|
|
10395
|
+
hours_tue: number | null;
|
|
10396
|
+
hours_wed: number | null;
|
|
10397
|
+
id: string;
|
|
10398
|
+
is_active: boolean;
|
|
10399
|
+
leave_balance_hours: number;
|
|
10400
|
+
persnr: string | null;
|
|
10401
|
+
phone: string | null;
|
|
10402
|
+
profile_id: string;
|
|
10403
|
+
updated_at: string;
|
|
10404
|
+
};
|
|
10405
|
+
Insert: {
|
|
10406
|
+
color?: string | null;
|
|
10407
|
+
created_at?: string;
|
|
10408
|
+
hours_fri?: number | null;
|
|
10409
|
+
hours_mon?: number | null;
|
|
10410
|
+
hours_thu?: number | null;
|
|
10411
|
+
hours_tue?: number | null;
|
|
10412
|
+
hours_wed?: number | null;
|
|
10413
|
+
id?: string;
|
|
10414
|
+
is_active?: boolean;
|
|
10415
|
+
leave_balance_hours?: number;
|
|
10416
|
+
persnr?: string | null;
|
|
10417
|
+
phone?: string | null;
|
|
10418
|
+
profile_id: string;
|
|
10419
|
+
updated_at?: string;
|
|
10420
|
+
};
|
|
10421
|
+
Update: {
|
|
10422
|
+
color?: string | null;
|
|
10423
|
+
created_at?: string;
|
|
10424
|
+
hours_fri?: number | null;
|
|
10425
|
+
hours_mon?: number | null;
|
|
10426
|
+
hours_thu?: number | null;
|
|
10427
|
+
hours_tue?: number | null;
|
|
10428
|
+
hours_wed?: number | null;
|
|
10429
|
+
id?: string;
|
|
10430
|
+
is_active?: boolean;
|
|
10431
|
+
leave_balance_hours?: number;
|
|
10432
|
+
persnr?: string | null;
|
|
10433
|
+
phone?: string | null;
|
|
10434
|
+
profile_id?: string;
|
|
10435
|
+
updated_at?: string;
|
|
10436
|
+
};
|
|
10437
|
+
Relationships: [{
|
|
10438
|
+
foreignKeyName: "medewerker_details_profile_id_fkey";
|
|
10439
|
+
columns: ["profile_id"];
|
|
10440
|
+
isOneToOne: true;
|
|
10441
|
+
referencedRelation: "profiles";
|
|
10442
|
+
referencedColumns: ["id"];
|
|
10443
|
+
}];
|
|
10444
|
+
};
|
|
10388
10445
|
module_features: {
|
|
10389
10446
|
Row: {
|
|
10390
10447
|
created_at: string;
|
|
@@ -15035,6 +15092,42 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
15035
15092
|
};
|
|
15036
15093
|
Relationships: [];
|
|
15037
15094
|
};
|
|
15095
|
+
sick_periods: {
|
|
15096
|
+
Row: {
|
|
15097
|
+
created_at: string;
|
|
15098
|
+
employee_id: string;
|
|
15099
|
+
end_date: string | null;
|
|
15100
|
+
id: string;
|
|
15101
|
+
notes: string | null;
|
|
15102
|
+
start_date: string;
|
|
15103
|
+
updated_at: string;
|
|
15104
|
+
};
|
|
15105
|
+
Insert: {
|
|
15106
|
+
created_at?: string;
|
|
15107
|
+
employee_id: string;
|
|
15108
|
+
end_date?: string | null;
|
|
15109
|
+
id?: string;
|
|
15110
|
+
notes?: string | null;
|
|
15111
|
+
start_date: string;
|
|
15112
|
+
updated_at?: string;
|
|
15113
|
+
};
|
|
15114
|
+
Update: {
|
|
15115
|
+
created_at?: string;
|
|
15116
|
+
employee_id?: string;
|
|
15117
|
+
end_date?: string | null;
|
|
15118
|
+
id?: string;
|
|
15119
|
+
notes?: string | null;
|
|
15120
|
+
start_date?: string;
|
|
15121
|
+
updated_at?: string;
|
|
15122
|
+
};
|
|
15123
|
+
Relationships: [{
|
|
15124
|
+
foreignKeyName: "sick_periods_employee_id_fkey";
|
|
15125
|
+
columns: ["employee_id"];
|
|
15126
|
+
isOneToOne: false;
|
|
15127
|
+
referencedRelation: "profiles";
|
|
15128
|
+
referencedColumns: ["id"];
|
|
15129
|
+
}];
|
|
15130
|
+
};
|
|
15038
15131
|
sidebar_config: {
|
|
15039
15132
|
Row: {
|
|
15040
15133
|
id: string;
|
|
@@ -19719,6 +19812,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
19719
19812
|
};
|
|
19720
19813
|
Returns: string;
|
|
19721
19814
|
};
|
|
19815
|
+
employee_day_hours: {
|
|
19816
|
+
Args: {
|
|
19817
|
+
_day: string;
|
|
19818
|
+
_employee_id: string;
|
|
19819
|
+
};
|
|
19820
|
+
Returns: number;
|
|
19821
|
+
};
|
|
19722
19822
|
enqueue_cart_replan_if_unlocked: {
|
|
19723
19823
|
Args: {
|
|
19724
19824
|
p_order_id: string;
|
|
@@ -20095,9 +20195,19 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
20095
20195
|
Args: never;
|
|
20096
20196
|
Returns: {
|
|
20097
20197
|
avatar_url: string;
|
|
20198
|
+
color: string;
|
|
20098
20199
|
display_name: string;
|
|
20099
20200
|
email: string;
|
|
20201
|
+
hours_fri: number;
|
|
20202
|
+
hours_mon: number;
|
|
20203
|
+
hours_thu: number;
|
|
20204
|
+
hours_tue: number;
|
|
20205
|
+
hours_wed: number;
|
|
20100
20206
|
id: string;
|
|
20207
|
+
is_active: boolean;
|
|
20208
|
+
leave_balance_hours: number;
|
|
20209
|
+
persnr: string;
|
|
20210
|
+
phone: string;
|
|
20101
20211
|
roles: string[];
|
|
20102
20212
|
}[];
|
|
20103
20213
|
};
|
|
@@ -21803,6 +21913,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
|
|
|
21803
21913
|
};
|
|
21804
21914
|
Returns: undefined;
|
|
21805
21915
|
};
|
|
21916
|
+
sync_sick_time_off: {
|
|
21917
|
+
Args: {
|
|
21918
|
+
_period_id: string;
|
|
21919
|
+
};
|
|
21920
|
+
Returns: number;
|
|
21921
|
+
};
|
|
21806
21922
|
trade_item_stock_duplicates: {
|
|
21807
21923
|
Args: never;
|
|
21808
21924
|
Returns: {
|