@flowselections/mailbox-orders 1.0.57 → 1.0.58
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/EmailPreview.d.ts.map +1 -1
- package/dist-lib/components/EmailPreview.js +2 -1
- package/dist-lib/components/MailboxPageFrame.js +1 -1
- package/dist-lib/components/MailboxProposalsPage.js +3 -3
- package/dist-lib/components/MailboxSkippedPage.d.ts.map +1 -1
- package/dist-lib/components/MailboxSkippedPage.js +4 -4
- package/dist-lib/components/fs-ui/DataTable.js +3 -3
- package/dist-lib/integrations/supabase/types.d.ts +76 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailPreview.d.ts","sourceRoot":"","sources":["../../src/components/EmailPreview.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmailPreview.d.ts","sourceRoot":"","sources":["../../src/components/EmailPreview.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAC7E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC;IACtB,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAsEF,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,SAAS,EACT,UAAU,EACV,EAAO,EACP,EAAO,EACP,QAAQ,EACR,QAAQ,EACR,WAAgB,EAChB,cAAc,GACf,EAAE,KAAK,+BAsHP"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { fmtDayTime } from "../lib/format-date.js";
|
|
2
3
|
import { useEffect, useMemo, useState } from "react";
|
|
3
4
|
import { Button, Badge } from "@flowselections/core";
|
|
4
5
|
import { Paperclip, Download, Code, FileText, ShieldOff, Shield } from "lucide-react";
|
|
@@ -52,5 +53,5 @@ export function EmailPreview({ subject, fromName, fromEmail, receivedAt, to = []
|
|
|
52
53
|
const rendered = blockRemoteContent ? blockRemote(html) : html;
|
|
53
54
|
const safeAttachments = Array.isArray(attachments) ? attachments : [];
|
|
54
55
|
const inlineOnly = safeAttachments.every((a) => !!a.contentId);
|
|
55
|
-
return (_jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [_jsxs("div", { className: "shrink-0 space-y-1 border-b pb-3", children: [_jsx("div", { className: "text-base font-semibold leading-snug", children: subject || "(geen onderwerp)" }), _jsxs("div", { className: "text-xs text-muted-foreground", children: [_jsx("span", { className: "font-medium text-foreground", children: fromName || fromEmail }), fromName && fromEmail ? ` <${fromEmail}>` : "", receivedAt ? ` · ${
|
|
56
|
+
return (_jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [_jsxs("div", { className: "shrink-0 space-y-1 border-b pb-3", children: [_jsx("div", { className: "text-base font-semibold leading-snug", children: subject || "(geen onderwerp)" }), _jsxs("div", { className: "text-xs text-muted-foreground", children: [_jsx("span", { className: "font-medium text-foreground", children: fromName || fromEmail }), fromName && fromEmail ? ` <${fromEmail}>` : "", receivedAt ? ` · ${fmtDayTime(receivedAt)}` : ""] }), _jsx(AddressLine, { label: "Aan", list: to }), _jsx(AddressLine, { label: "CC", list: cc }), (safeAttachments.length > 0 || hasAttachments) && (_jsxs("div", { className: "flex flex-wrap items-center gap-2 pt-2", children: [safeAttachments.length === 0 ? (_jsxs(Badge, { variant: "outline", className: "gap-1 font-normal", children: [_jsx(Paperclip, { className: "h-3 w-3" }), " Deze mail bevat bijlagen (nog niet opgehaald)"] })) : (safeAttachments.map((a, i) => (_jsxs("span", { className: "inline-flex items-center gap-1 rounded border bg-muted/40 px-2 py-1 text-xs", children: [_jsx(Paperclip, { className: "h-3 w-3 shrink-0" }), _jsx("span", { className: "max-w-[16rem] truncate", children: a.name }), formatSize(a.size) && (_jsx("span", { className: "text-muted-foreground", children: formatSize(a.size) })), a.url && (_jsx("a", { href: a.url, target: "_blank", rel: "noopener noreferrer", className: "text-primary", "aria-label": `Download ${a.name}`, children: _jsx(Download, { className: "h-3 w-3" }) }))] }, `${a.name}-${i}`)))), safeAttachments.length > 0 && inlineOnly && (_jsx("span", { className: "text-[11px] text-muted-foreground", children: "(in de mail ingesloten afbeeldingen)" }))] })), _jsxs("div", { className: "flex flex-wrap items-center gap-2 pt-2", children: [_jsx(Button, { type: "button", size: "sm", variant: "outline", onClick: () => setMode(mode === "html" ? "text" : "html"), disabled: !html, children: mode === "html" ? (_jsxs(_Fragment, { children: [_jsx(FileText, { className: "mr-1 h-3.5 w-3.5" }), " Platte tekst"] })) : (_jsxs(_Fragment, { children: [_jsx(Code, { className: "mr-1 h-3.5 w-3.5" }), " Opgemaakte mail"] })) }), _jsx(Button, { type: "button", size: "sm", variant: "ghost", disabled: mode !== "html" || !html, onClick: () => setBlockRemoteContent((v) => !v), children: blockRemoteContent ? (_jsxs(_Fragment, { children: [_jsx(Shield, { className: "mr-1 h-3.5 w-3.5" }), " Externe inhoud tonen"] })) : (_jsxs(_Fragment, { children: [_jsx(ShieldOff, { className: "mr-1 h-3.5 w-3.5" }), " Externe inhoud blokkeren"] })) })] })] }), _jsx("div", { className: "min-h-0 flex-1 overflow-hidden pt-3", children: mode === "html" && html ? (_jsx(EmailFrame, { html: rendered })) : (_jsx("div", { className: "h-full w-full overflow-y-auto overscroll-contain rounded border bg-white p-3", children: _jsx("pre", { className: "whitespace-pre-wrap break-words font-sans text-sm leading-relaxed text-[#111]", children: bodyText || "(geen tekst)" }) })) })] }));
|
|
56
57
|
}
|
|
@@ -95,7 +95,7 @@ export function MailboxPageFrame({ tab, children, onKpi, activeKpi, notices = []
|
|
|
95
95
|
if (tab !== "voorstellen")
|
|
96
96
|
go("voorstellen");
|
|
97
97
|
};
|
|
98
|
-
return (_jsxs("main", { className: "flex
|
|
98
|
+
return (_jsxs("main", { className: "flex w-full min-w-0 flex-col gap-4 overflow-x-clip p-4 pb-24 sm:p-6 md:pb-6", children: [_jsx(PageHeader, { title: "Mailbox bestellingen", meta: _jsx(UpdatedAt, { at: kpiQ.dataUpdatedAt || null, stale: kpiQ.isError, info: statusInfo(status) }) }), _jsx(NoticeBar, { notices: allNotices }), _jsxs(KpiRow, { children: [_jsx(KpiTile, { title: "Te controleren", value: k?.pending ?? 0, sub: "Bestellingen uit e-mail", icon: _jsx(ClipboardCheck, {}), loading: loading, active: activeKpi === "pending", onClick: () => kpi("pending") }), _jsx(KpiTile, { title: "Vandaag binnen", value: k?.pending_today ?? 0, sub: "Nog te controleren", icon: _jsx(CalendarClock, {}), loading: loading, active: activeKpi === "today", onClick: () => kpi("today") }), _jsx(KpiTile, { title: "Vandaag verwerkt", value: k?.approved_today ?? 0, sub: "Orders aangemaakt", icon: _jsx(CheckCircle2, {}), loading: loading, active: activeKpi === "approved_today", onClick: () => kpi("approved_today") }), _jsx(KpiTile, { title: "Klant onbekend", value: k?.customer_unknown ?? 0, sub: (k?.customer_unknown ?? 0) > 0 ? _jsx("span", { className: "text-destructive", children: "Kies of maak de klant" }) : "Alles herkend", icon: _jsx(UserX, {}), tone: "warning", loading: loading, active: activeKpi === "customer_unknown", onClick: () => kpi("customer_unknown") })] }), _jsx(PillTabs, { ariaLabel: "Mailbox", active: tab, onSelect: (t) => go(t), tabs: [
|
|
99
99
|
{ key: "voorstellen", label: "Te controleren", icon: _jsx(Inbox, {}), count: k ? k.pending : null },
|
|
100
100
|
{ key: "verwerkt", label: "Verwerkt", icon: _jsx(CheckCircle2, {}), count: k ? k.processed : null },
|
|
101
101
|
{ key: "overgeslagen", label: "Overgeslagen", icon: _jsx(MailX, {}), count: k ? k.skipped : null },
|
|
@@ -15,7 +15,7 @@ import { listProposalsPage } from "../lib/mailbox-list.functions.js";
|
|
|
15
15
|
import { MailboxPageFrame, browserTz } from "./MailboxPageFrame.js";
|
|
16
16
|
import { DataTable, InitialsAvatar, CellText } from "./fs-ui/DataTable.js";
|
|
17
17
|
import { FilterPanel, FilterOptions, PERIOD_OPTIONS } from "./fs-ui/FilterPanel.js";
|
|
18
|
-
import { fmtDayTime } from "../lib/format-date.js";
|
|
18
|
+
import { fmtDay, fmtDayTime } from "../lib/format-date.js";
|
|
19
19
|
import { StatusIcon } from "./fs-ui/StatusIcon.js";
|
|
20
20
|
import { EmptyState } from "./fs-ui/EmptyState.js";
|
|
21
21
|
import { TableSkeleton } from "./fs-ui/TableSkeleton.js";
|
|
@@ -705,8 +705,8 @@ function ProposalEditor({ proposal, template, customers, products, allowBackorde
|
|
|
705
705
|
const preview = (previewData?.ok ? previewData.preview : null);
|
|
706
706
|
const previewError = previewData?.ok === false ? String(previewData.error ?? "") : null;
|
|
707
707
|
const dateFeasible = preview?.ok === true && preview?.deliveryDateFeasible === true;
|
|
708
|
-
const fmtDate = (iso) => iso ?
|
|
709
|
-
const fmtDateTime = (iso) => iso ?
|
|
708
|
+
const fmtDate = (iso) => iso ? fmtDay(iso) : "";
|
|
709
|
+
const fmtDateTime = (iso) => iso ? fmtDayTime(iso) : "";
|
|
710
710
|
// ─── Prijsafspraak ter vergelijking ───────────────────────────────────────
|
|
711
711
|
const fetchAgreement = useServerFn(getAgreementPrices);
|
|
712
712
|
const agreementKey = lines.map((l) => `${l.product_id}:${l.quantity}`).join(",");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MailboxSkippedPage.d.ts","sourceRoot":"","sources":["../../src/components/MailboxSkippedPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MailboxSkippedPage.d.ts","sourceRoot":"","sources":["../../src/components/MailboxSkippedPage.tsx"],"names":[],"mappings":"AA0CA,wBAAgB,kBAAkB,gCAoKjC"}
|
|
@@ -19,6 +19,7 @@ import { Toolbar } from "./fs-ui/Toolbar.js";
|
|
|
19
19
|
import { SearchInput } from "./fs-ui/SearchInput.js";
|
|
20
20
|
import { FilterChips } from "./fs-ui/FilterChips.js";
|
|
21
21
|
import { useListHotkeys } from "./fs-ui/useListHotkeys.js";
|
|
22
|
+
import { RowMenu } from "./fs-ui/RowMenu.js";
|
|
22
23
|
const statusOf = (m) => m.analysis_state === "wacht"
|
|
23
24
|
? { label: label(ANALYSIS_STATE, "wacht"), tone: "amber" }
|
|
24
25
|
: m.filter_outcome === "te_oud" || m.filter_outcome === "geen_bestelling"
|
|
@@ -115,7 +116,7 @@ export function MailboxSkippedPage() {
|
|
|
115
116
|
onEscape: hasActiveFilters ? clearFilters : undefined,
|
|
116
117
|
onHelp: () => setHelpOpen(true),
|
|
117
118
|
});
|
|
118
|
-
const
|
|
119
|
+
const rowAction = (m) => (_jsx(RowMenu, { label: `Acties voor ${m.from_name || m.from_email || "mail"}`, items: [{ label: busyId === m.id ? "Bezig…" : m.analysis_state === "wacht" ? "Nu uitlezen" : "Toch uitlezen", disabled: busyId === m.id, onSelect: () => void run(m.id) }] }));
|
|
119
120
|
const columns = [
|
|
120
121
|
{
|
|
121
122
|
key: "afzender", header: "Afzender", width: 200,
|
|
@@ -136,7 +137,6 @@ export function MailboxSkippedPage() {
|
|
|
136
137
|
return (_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx(StatusIcon, { tone: st.tone === "amber" ? "busy" : "open", label: st.label, detail: reasonText(m) || undefined }), _jsx(CellText, { primary: st.label, secondary: reasonText(m) })] }));
|
|
137
138
|
},
|
|
138
139
|
},
|
|
139
|
-
{ key: "actie", header: "Actie", width: 136, cell: (m) => actionBtn(m) },
|
|
140
140
|
];
|
|
141
141
|
const chips = period !== "all" ? [{ key: "period", label: PERIOD_LABEL[period] ?? period, icon: _jsx(CalendarClock, {}), onRemove: () => setPeriod("all") }] : [];
|
|
142
142
|
const notices = waiting > 0 ? [{
|
|
@@ -145,7 +145,7 @@ export function MailboxSkippedPage() {
|
|
|
145
145
|
title: `${waiting} ${waiting === 1 ? "mail wacht" : "mails wachten"} op uitlezen.`,
|
|
146
146
|
details: "De limiet voor vandaag is bereikt of automatisch uitlezen staat uit. Je kunt een mail ook zelf laten uitlezen.",
|
|
147
147
|
}] : [];
|
|
148
|
-
return (_jsxs(MailboxPageFrame, { tab: "overgeslagen", helpOpen: helpOpen, onHelpOpenChange: setHelpOpen, notices: notices, children: [_jsx(Toolbar, { onOpenFilters: () => setFiltersOpen(true), filterCount: chips.length, chips: _jsx(FilterChips, { chips: chips, onClearAll: clearFilters }), children: _jsx(SearchInput, { ref: searchRef, value: search, onChange: setSearch, placeholder: "Zoek op afzender, onderwerp of reden" }) }), _jsx(FilterPanel, { open: filtersOpen, onOpenChange: setFiltersOpen, onClear: clearFilters, children: _jsx(FilterOptions, { label: "Periode", value: period, options: PERIOD_OPTIONS, onChange: (v) => setPeriod(v) }) }), isLoading && !data ? (_jsx(TableSkeleton, { columns: [200, 300, 132, 200
|
|
148
|
+
return (_jsxs(MailboxPageFrame, { tab: "overgeslagen", helpOpen: helpOpen, onHelpOpenChange: setHelpOpen, notices: notices, children: [_jsx(Toolbar, { onOpenFilters: () => setFiltersOpen(true), filterCount: chips.length, chips: _jsx(FilterChips, { chips: chips, onClearAll: clearFilters }), children: _jsx(SearchInput, { ref: searchRef, value: search, onChange: setSearch, placeholder: "Zoek op afzender, onderwerp of reden" }) }), _jsx(FilterPanel, { open: filtersOpen, onOpenChange: setFiltersOpen, onClear: clearFilters, children: _jsx(FilterOptions, { label: "Periode", value: period, options: PERIOD_OPTIONS, onChange: (v) => setPeriod(v) }) }), isLoading && !data ? (_jsx(TableSkeleton, { columns: [200, 300, 132, 200] })) : error && !data ? (_jsx("div", { className: "rounded-xl border border-border bg-card shadow-sm", children: _jsx(EmptyState, { icon: _jsx(MailX, { className: "h-6 w-6" }), title: "De lijst kon niet worden geladen", text: "Probeer het opnieuw.", action: _jsx(Button, { size: "sm", variant: "outline", onClick: () => void refetch(), children: "Opnieuw proberen" }) }) })) : filtered.length === 0 ? (_jsx("div", { className: "rounded-xl border border-border bg-card shadow-sm", children: hasActiveFilters
|
|
149
149
|
? _jsx(EmptyState, { icon: _jsx(Search, { className: "h-6 w-6" }), title: "Niets gevonden", text: "Er zijn geen overgeslagen mails die bij je zoekopdracht passen.", action: _jsx(Button, { size: "sm", variant: "outline", onClick: clearFilters, children: "Filters wissen" }) })
|
|
150
|
-
: _jsx(EmptyState, { icon: _jsx(MailX, { className: "h-6 w-6" }), title: "Geen overgeslagen mails", text: "Mails die geen bestelling lijken, verschijnen hier met de reden." }) })) : (_jsx(DataTable, { rows: paged, columns: columns, rowKey: (m) => m.id, activeIndex: cursor, sort: { key: "datum", dir: sortOrder === "date-asc" ? "asc" : "desc" }, onSortChange: () => setSortOrder(sortOrder === "date-asc" ? "date-desc" : "date-asc"), mobileCard: (m) => (_jsxs("div", { className: "min-w-0 space-y-1", children: [_jsx("div", { className: "truncate font-semibold", children: m.from_name || m.from_email || "Onbekend" }), _jsx("div", { className: "truncate text-muted-foreground", children: m.subject || "(geen onderwerp)" }), _jsxs("div", { className: "text-xs text-muted-foreground", children: [fmtDayTime(m.received_at), " \u00B7 ", statusOf(m).label] })
|
|
150
|
+
: _jsx(EmptyState, { icon: _jsx(MailX, { className: "h-6 w-6" }), title: "Geen overgeslagen mails", text: "Mails die geen bestelling lijken, verschijnen hier met de reden." }) })) : (_jsx(DataTable, { rows: paged, columns: columns, rowKey: (m) => m.id, activeIndex: cursor, rowAction: rowAction, sort: { key: "datum", dir: sortOrder === "date-asc" ? "asc" : "desc" }, onSortChange: () => setSortOrder(sortOrder === "date-asc" ? "date-desc" : "date-asc"), mobileCard: (m) => (_jsxs("div", { className: "min-w-0 space-y-1", children: [_jsx("div", { className: "truncate font-semibold", children: m.from_name || m.from_email || "Onbekend" }), _jsx("div", { className: "truncate text-muted-foreground", children: m.subject || "(geen onderwerp)" }), _jsxs("div", { className: "text-xs text-muted-foreground", children: [fmtDayTime(m.received_at), " \u00B7 ", statusOf(m).label] })] })), footer: _jsx(TablePagination, { total: filtered.length, page: current, pageSize: pageSize, onPageChange: setPage, onPageSizeChange: setPageSize }) }))] }));
|
|
151
151
|
}
|
|
@@ -3,7 +3,7 @@ import { useEffect, useRef } from "react";
|
|
|
3
3
|
import { ArrowDown, ArrowUp, ChevronRight } from "lucide-react";
|
|
4
4
|
const TABLE_CLS = "w-full [&_thead_th]:h-10 [&_thead_th]:text-[11px] [&_thead_th]:font-semibold [&_thead_th]:uppercase [&_thead_th]:tracking-wide [&_thead_th]:text-muted-foreground min-w-[900px] table-fixed caption-bottom text-sm [&_thead_th]:sticky [&_thead_th]:top-0 [&_thead_th]:z-10 [&_thead_th]:bg-card [&_tbody_tr]:transition-colors";
|
|
5
5
|
/** Kop- en celruimte zijn gelijk, zodat koptekst en celtekst op dezelfde x beginnen. */
|
|
6
|
-
const PAD = "px-
|
|
6
|
+
const PAD = "px-2";
|
|
7
7
|
/**
|
|
8
8
|
* Tabel exact als Verkooporders: eigen <table> met table-fixed en colgroup in px,
|
|
9
9
|
* kop 40 px die plakt, rij 60 px, geselecteerde rij met 3 px groene streep.
|
|
@@ -13,7 +13,7 @@ export function DataTable({ rows, columns, rowKey, onRowClick, activeIndex, mobi
|
|
|
13
13
|
const hasEnd = !!(rowAction || onRowClick);
|
|
14
14
|
const activeRef = useRef(null);
|
|
15
15
|
useEffect(() => { activeRef.current?.scrollIntoView({ block: "nearest" }); }, [activeIndex]);
|
|
16
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex
|
|
16
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex w-full min-w-0 flex-col overflow-clip rounded-xl border border-border bg-card shadow-sm", children: [_jsx("div", { className: "hidden md:block", children: _jsxs("table", { className: TABLE_CLS, children: [_jsxs("colgroup", { children: [columns.map((c) => _jsx("col", { style: { width: `${c.width}px` } }, c.key)), hasEnd && _jsx("col", { style: { width: "56px" } })] }), _jsx("thead", { className: "[&_tr]:border-b", children: _jsxs("tr", { className: "border-b border-border", children: [columns.map((c) => {
|
|
17
17
|
const active = sort?.key === c.key;
|
|
18
18
|
return (_jsx("th", { scope: "col", className: PAD + " text-left align-middle", "aria-sort": active ? (sort.dir === "asc" ? "ascending" : "descending") : undefined, children: c.sortable && onSortChange ? (_jsxs("button", { type: "button", onClick: () => onSortChange(c.key), className: "inline-flex max-w-full items-center gap-1 rounded-sm uppercase focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "aria-label": `Sorteer op ${c.header}`, children: [_jsx("span", { className: "truncate", children: c.header }), active && (sort.dir === "asc" ? _jsx(ArrowUp, { className: "h-3 w-3 shrink-0", "aria-hidden": true }) : _jsx(ArrowDown, { className: "h-3 w-3 shrink-0", "aria-hidden": true }))] })) : _jsx("span", { className: "block truncate", children: c.header }) }, c.key));
|
|
19
19
|
}), hasEnd && _jsx("th", { scope: "col", className: PAD, children: _jsx("span", { className: "sr-only", children: "Acties" }) })] }) }), _jsx("tbody", { children: rows.map((r, i) => {
|
|
@@ -24,7 +24,7 @@ export function DataTable({ rows, columns, rowKey, onRowClick, activeIndex, mobi
|
|
|
24
24
|
} } : undefined, style: { height: 60 }, className: "group border-b border-border text-foreground last:border-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring " +
|
|
25
25
|
(onRowClick ? "cursor-pointer hover:bg-muted/50 " : "") +
|
|
26
26
|
(active ? "bg-muted/60" : ""), children: [columns.map((c, ci) => (_jsxs("td", { className: PAD + " relative overflow-hidden py-0 align-middle", children: [ci === 0 && active && _jsx("span", { "aria-hidden": true, className: "absolute inset-y-0 left-0 w-[3px] bg-primary" }), c.cell(r)] }, c.key))), hasEnd && (_jsx("td", { className: PAD + " py-0 text-right align-middle", onClick: rowAction ? (e) => e.stopPropagation() : undefined, children: rowAction ? rowAction(r) : (_jsx(ChevronRight, { className: "ml-auto h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100", "aria-hidden": true })) }))] }, rowKey(r)));
|
|
27
|
-
}) })] }) }), _jsx("div", { className: "
|
|
27
|
+
}) })] }) }), _jsx("div", { className: "divide-y divide-border md:hidden", children: rows.map((r, i) => (_jsxs("div", { role: onRowClick ? "button" : undefined, tabIndex: onRowClick ? 0 : undefined, onClick: onRowClick ? () => onRowClick(r, i) : undefined, className: "relative min-h-11 p-4 text-sm transition-colors active:bg-muted " + (activeIndex === i ? "bg-muted/60" : ""), children: [activeIndex === i && _jsx("span", { "aria-hidden": true, className: "absolute inset-y-0 left-0 w-[3px] bg-primary" }), _jsxs("div", { className: "flex items-start gap-3", children: [_jsx("div", { className: "min-w-0 flex-1", children: mobileCard(r) }), rowAction && _jsx("div", { onClick: (e) => e.stopPropagation(), children: rowAction(r) })] })] }, rowKey(r)))) })] }), footer] }));
|
|
28
28
|
}
|
|
29
29
|
/** Cel met hooguit twee regels: 14 px en 12 px grijs; afkappen met volledige tekst als infoballon. */
|
|
30
30
|
export function CellText({ primary, secondary, strong }) {
|
|
@@ -33210,6 +33210,25 @@ export type Database = {
|
|
|
33210
33210
|
};
|
|
33211
33211
|
Returns: undefined;
|
|
33212
33212
|
};
|
|
33213
|
+
aanbiedingsmail_campagnes_lijst: {
|
|
33214
|
+
Args: {
|
|
33215
|
+
p_limit?: number;
|
|
33216
|
+
p_offset?: number;
|
|
33217
|
+
p_status?: string;
|
|
33218
|
+
p_tot?: string;
|
|
33219
|
+
p_van?: string;
|
|
33220
|
+
p_zoek?: string;
|
|
33221
|
+
};
|
|
33222
|
+
Returns: Json;
|
|
33223
|
+
};
|
|
33224
|
+
aanbiedingsmail_campagnes_tellers: {
|
|
33225
|
+
Args: {
|
|
33226
|
+
p_tot?: string;
|
|
33227
|
+
p_van?: string;
|
|
33228
|
+
p_zoek?: string;
|
|
33229
|
+
};
|
|
33230
|
+
Returns: Json;
|
|
33231
|
+
};
|
|
33213
33232
|
aanbiedingsmail_create_order: {
|
|
33214
33233
|
Args: {
|
|
33215
33234
|
p_offer_order_id: string;
|
|
@@ -33246,6 +33265,15 @@ export type Database = {
|
|
|
33246
33265
|
};
|
|
33247
33266
|
Returns: Json;
|
|
33248
33267
|
};
|
|
33268
|
+
aanbiedingsmail_ontvangers_lijst: {
|
|
33269
|
+
Args: {
|
|
33270
|
+
p_campaign_id: string;
|
|
33271
|
+
p_limit?: number;
|
|
33272
|
+
p_offset?: number;
|
|
33273
|
+
p_zoek?: string;
|
|
33274
|
+
};
|
|
33275
|
+
Returns: Json;
|
|
33276
|
+
};
|
|
33249
33277
|
aanbiedingsmail_place_offer_order: {
|
|
33250
33278
|
Args: {
|
|
33251
33279
|
p_code: string;
|
|
@@ -33265,6 +33293,12 @@ export type Database = {
|
|
|
33265
33293
|
};
|
|
33266
33294
|
Returns: string;
|
|
33267
33295
|
};
|
|
33296
|
+
aanbiedingsmail_status_sleutel: {
|
|
33297
|
+
Args: {
|
|
33298
|
+
p_status: string;
|
|
33299
|
+
};
|
|
33300
|
+
Returns: string;
|
|
33301
|
+
};
|
|
33268
33302
|
aanbiedingsmail_stock_key: {
|
|
33269
33303
|
Args: {
|
|
33270
33304
|
p_ref: string;
|
|
@@ -35882,6 +35916,19 @@ export type Database = {
|
|
|
35882
35916
|
};
|
|
35883
35917
|
Returns: Json;
|
|
35884
35918
|
};
|
|
35919
|
+
inkoop_artikelen_page: {
|
|
35920
|
+
Args: {
|
|
35921
|
+
_asc?: boolean;
|
|
35922
|
+
_limit?: number;
|
|
35923
|
+
_location?: string;
|
|
35924
|
+
_offset?: number;
|
|
35925
|
+
_search?: string;
|
|
35926
|
+
_sort?: string;
|
|
35927
|
+
_tab?: string;
|
|
35928
|
+
_unit?: string;
|
|
35929
|
+
};
|
|
35930
|
+
Returns: Json;
|
|
35931
|
+
};
|
|
35885
35932
|
inkoop_cancel_line: {
|
|
35886
35933
|
Args: {
|
|
35887
35934
|
_item_id: string;
|
|
@@ -35931,6 +35978,18 @@ export type Database = {
|
|
|
35931
35978
|
Args: never;
|
|
35932
35979
|
Returns: string;
|
|
35933
35980
|
};
|
|
35981
|
+
inkoop_orders_page: {
|
|
35982
|
+
Args: {
|
|
35983
|
+
_delivery_from?: string;
|
|
35984
|
+
_delivery_to?: string;
|
|
35985
|
+
_limit?: number;
|
|
35986
|
+
_offset?: number;
|
|
35987
|
+
_search?: string;
|
|
35988
|
+
_supplier_id?: string;
|
|
35989
|
+
_tab?: string;
|
|
35990
|
+
};
|
|
35991
|
+
Returns: Json;
|
|
35992
|
+
};
|
|
35934
35993
|
inkoop_process_request: {
|
|
35935
35994
|
Args: {
|
|
35936
35995
|
_request_id: string;
|
|
@@ -44758,6 +44817,12 @@ export type Database = {
|
|
|
44758
44817
|
};
|
|
44759
44818
|
Returns: Json;
|
|
44760
44819
|
};
|
|
44820
|
+
scan_kar_scans_lezen: {
|
|
44821
|
+
Args: {
|
|
44822
|
+
p_kar_id: string;
|
|
44823
|
+
};
|
|
44824
|
+
Returns: Json;
|
|
44825
|
+
};
|
|
44761
44826
|
scan_kar_voortgang: {
|
|
44762
44827
|
Args: {
|
|
44763
44828
|
p_cart_id: string;
|
|
@@ -44774,6 +44839,17 @@ export type Database = {
|
|
|
44774
44839
|
};
|
|
44775
44840
|
Returns: Json;
|
|
44776
44841
|
};
|
|
44842
|
+
scan_karren_overzicht: {
|
|
44843
|
+
Args: {
|
|
44844
|
+
p_limit?: number;
|
|
44845
|
+
p_offset?: number;
|
|
44846
|
+
p_status?: string;
|
|
44847
|
+
p_tot?: string;
|
|
44848
|
+
p_van?: string;
|
|
44849
|
+
p_zoek?: string;
|
|
44850
|
+
};
|
|
44851
|
+
Returns: Json;
|
|
44852
|
+
};
|
|
44777
44853
|
scan_koppelcode_maken: {
|
|
44778
44854
|
Args: {
|
|
44779
44855
|
p_scanner_id: string;
|