@flowselections/layout-maker 1.68.1 → 1.69.3

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.
@@ -0,0 +1,3 @@
1
+ /** Melding bovenaan Layouts en printers zolang de bedrijfsgegevens leeg zijn. */
2
+ export declare function BedrijfsgegevensMelding(): import("react").JSX.Element | null;
3
+ //# sourceMappingURL=BedrijfsgegevensMelding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BedrijfsgegevensMelding.d.ts","sourceRoot":"","sources":["../../src/components/BedrijfsgegevensMelding.tsx"],"names":[],"mappings":"AAOA,iFAAiF;AACjF,wBAAgB,uBAAuB,uCAyBtC"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ import { Link } from "@tanstack/react-router";
4
+ import { Button } from "@flowselections/core";
5
+ import { AlertTriangle } from "lucide-react";
6
+ import { haalBedrijfsgegevens } from "../lib/bedrijfsgegevens.functions.js";
7
+ import { heeftBedrijfsgegevens } from "../lib/bedrijfsgegevens.js";
8
+ /** Melding bovenaan Layouts en printers zolang de bedrijfsgegevens leeg zijn. */
9
+ export function BedrijfsgegevensMelding() {
10
+ const [leeg, setLeeg] = useState(false);
11
+ useEffect(() => {
12
+ let weg = false;
13
+ haalBedrijfsgegevens()
14
+ .then((r) => {
15
+ if (!weg && r?.ok)
16
+ setLeeg(!heeftBedrijfsgegevens(r.gegevens) && !r.gegevens?.logoId);
17
+ })
18
+ .catch(() => { });
19
+ return () => {
20
+ weg = true;
21
+ };
22
+ }, []);
23
+ if (!leeg)
24
+ return null;
25
+ return (_jsxs("div", { className: "flex flex-wrap items-center gap-3 rounded-md border border-border bg-muted/40 px-4 py-3 text-sm", children: [_jsx(AlertTriangle, { className: "h-4 w-4 text-primary" }), _jsx("span", { className: "flex-1", children: "Vul je bedrijfsgegevens in (naam, adres, telefoon, e-mail, KvK, btw, logo); ze komen op al je documenten." }), _jsx(Button, { asChild: true, size: "sm", children: _jsx(Link, { to: "/instellingen", children: "Bedrijfsgegevens invullen" }) })] }));
26
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutsPage.d.ts","sourceRoot":"","sources":["../../src/components/LayoutsPage.tsx"],"names":[],"mappings":"AAkFA,wBAAgB,WAAW,CAAC,EAAE,OAAe,EAAE,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,+BAipB1E"}
1
+ {"version":3,"file":"LayoutsPage.d.ts","sourceRoot":"","sources":["../../src/components/LayoutsPage.tsx"],"names":[],"mappings":"AAmFA,wBAAgB,WAAW,CAAC,EAAE,OAAe,EAAE,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,+BAkpB1E"}
@@ -6,6 +6,7 @@ import { Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitl
6
6
  import { AlertTriangle, Copy, FileText, Pencil, Plus, Search, Settings2, Trash2 } from "lucide-react";
7
7
  import { LayoutVerwijzingenKaart } from "./LayoutVerwijzingenKaart.js";
8
8
  import { StandaardLayoutActies } from "./StandaardLayoutActies.js";
9
+ import { BedrijfsgegevensMelding } from "./BedrijfsgegevensMelding.js";
9
10
  import { supabase as moduleDb } from "../lib/supabaseClient.js";
10
11
  import { maakStandaardLayout } from "../lib/useDocumentData.js";
11
12
  import { ontbrekendeStandaarden, soortenZonderKeuze } from "../lib/klaarOmTePrinten.js";
@@ -167,7 +168,7 @@ export function LayoutsPage({ ingebed = false } = {}) {
167
168
  }
168
169
  };
169
170
  const Wrapper = ingebed ? "div" : "main";
170
- return (_jsxs(Wrapper, { className: ingebed ? "space-y-6" : "p-6 space-y-6", children: [_jsxs("div", { className: "flex flex-wrap items-end justify-between gap-4", children: [!ingebed && (_jsxs("div", { children: [_jsx("h1", { className: "text-xl font-semibold", children: "Documentlayouts" }), _jsx("p", { className: "text-sm text-muted-foreground", children: "Ontwerp pakbonnen, facturen, etiketten en alle andere documenten." })] })), _jsx("div", { className: "ml-auto flex gap-2", children: _jsxs(Button, { onClick: () => setWizardOpen(true), children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), " Nieuwe layout"] }) })] }), !loading && laatsteLayoutBeheerMelding() && (_jsxs("details", { className: "rounded-md border border-border bg-muted/40 px-3 py-2 text-xs text-muted-foreground", children: [_jsx("summary", { className: "cursor-pointer", children: "Details voor beheer" }), _jsx("p", { className: "mt-2", children: laatsteLayoutBeheerMelding() })] })), ontbrekendeStandaarden(layouts).map((o) => (_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3 rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm", children: [_jsxs("span", { children: ["Geen standaardlayout voor ", soortLabel(o.soort), " \u2013 maak deze standaard: ", _jsx("strong", { children: o.naam || "naamloos" })] }), _jsx(Button, { size: "sm", onClick: async () => {
171
+ return (_jsxs(Wrapper, { className: ingebed ? "space-y-6" : "p-6 space-y-6", children: [_jsx(BedrijfsgegevensMelding, {}), _jsxs("div", { className: "flex flex-wrap items-end justify-between gap-4", children: [!ingebed && (_jsxs("div", { children: [_jsx("h1", { className: "text-xl font-semibold", children: "Documentlayouts" }), _jsx("p", { className: "text-sm text-muted-foreground", children: "Ontwerp pakbonnen, facturen, etiketten en alle andere documenten." })] })), _jsx("div", { className: "ml-auto flex gap-2", children: _jsxs(Button, { onClick: () => setWizardOpen(true), children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), " Nieuwe layout"] }) })] }), !loading && laatsteLayoutBeheerMelding() && (_jsxs("details", { className: "rounded-md border border-border bg-muted/40 px-3 py-2 text-xs text-muted-foreground", children: [_jsx("summary", { className: "cursor-pointer", children: "Details voor beheer" }), _jsx("p", { className: "mt-2", children: laatsteLayoutBeheerMelding() })] })), ontbrekendeStandaarden(layouts).map((o) => (_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3 rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm", children: [_jsxs("span", { children: ["Geen standaardlayout voor ", soortLabel(o.soort), " \u2013 maak deze standaard: ", _jsx("strong", { children: o.naam || "naamloos" })] }), _jsx(Button, { size: "sm", onClick: async () => {
171
172
  try {
172
173
  await maakStandaardLayout(o.layoutId);
173
174
  toast.success(`${o.naam || "Layout"} is nu de standaard voor ${soortLabel(o.soort)}`);
@@ -14188,6 +14188,7 @@ export type Database = {
14188
14188
  bron_id: string;
14189
14189
  cart_id: string | null;
14190
14190
  created_at: string;
14191
+ eigen_sticker_id: string | null;
14191
14192
  fulfillment_order_id: string | null;
14192
14193
  handled_at: string | null;
14193
14194
  handled_error: string | null;
@@ -14214,6 +14215,7 @@ export type Database = {
14214
14215
  bron_id: string;
14215
14216
  cart_id?: string | null;
14216
14217
  created_at?: string;
14218
+ eigen_sticker_id?: string | null;
14217
14219
  fulfillment_order_id?: string | null;
14218
14220
  handled_at?: string | null;
14219
14221
  handled_error?: string | null;
@@ -14240,6 +14242,7 @@ export type Database = {
14240
14242
  bron_id?: string;
14241
14243
  cart_id?: string | null;
14242
14244
  created_at?: string;
14245
+ eigen_sticker_id?: string | null;
14243
14246
  fulfillment_order_id?: string | null;
14244
14247
  handled_at?: string | null;
14245
14248
  handled_error?: string | null;
@@ -24643,6 +24646,7 @@ export type Database = {
24643
24646
  write_enabled: boolean;
24644
24647
  write_enabled_at: string | null;
24645
24648
  write_enabled_by: string | null;
24649
+ write_enabled_reason: string | null;
24646
24650
  };
24647
24651
  Insert: {
24648
24652
  account_key?: string | null;
@@ -24672,6 +24676,7 @@ export type Database = {
24672
24676
  write_enabled?: boolean;
24673
24677
  write_enabled_at?: string | null;
24674
24678
  write_enabled_by?: string | null;
24679
+ write_enabled_reason?: string | null;
24675
24680
  };
24676
24681
  Update: {
24677
24682
  account_key?: string | null;
@@ -24701,6 +24706,7 @@ export type Database = {
24701
24706
  write_enabled?: boolean;
24702
24707
  write_enabled_at?: string | null;
24703
24708
  write_enabled_by?: string | null;
24709
+ write_enabled_reason?: string | null;
24704
24710
  };
24705
24711
  Relationships: [];
24706
24712
  };
@@ -25589,6 +25595,21 @@ export type Database = {
25589
25595
  };
25590
25596
  Relationships: [];
25591
25597
  };
25598
+ twinfield_schema_upgrades: {
25599
+ Row: {
25600
+ applied_at: string;
25601
+ key: string;
25602
+ };
25603
+ Insert: {
25604
+ applied_at?: string;
25605
+ key: string;
25606
+ };
25607
+ Update: {
25608
+ applied_at?: string;
25609
+ key?: string;
25610
+ };
25611
+ Relationships: [];
25612
+ };
25592
25613
  twinfield_session_cache: {
25593
25614
  Row: {
25594
25615
  cluster: string;
@@ -31892,6 +31913,10 @@ export type Database = {
31892
31913
  Args: never;
31893
31914
  Returns: Json;
31894
31915
  };
31916
+ klanten_refresh_grouped_if_stale: {
31917
+ Args: never;
31918
+ Returns: boolean;
31919
+ };
31895
31920
  klanten_set_auto_promote: {
31896
31921
  Args: {
31897
31922
  p_kind: string;
@@ -31950,6 +31975,13 @@ export type Database = {
31950
31975
  Args: never;
31951
31976
  Returns: Json;
31952
31977
  };
31978
+ layout_voor_document: {
31979
+ Args: {
31980
+ p_documenttype: string;
31981
+ p_order_id: string;
31982
+ };
31983
+ Returns: Json;
31984
+ };
31953
31985
  layout_zorg_systeemlayouts: {
31954
31986
  Args: never;
31955
31987
  Returns: number;
@@ -33044,6 +33076,13 @@ export type Database = {
33044
33076
  };
33045
33077
  Returns: Json;
33046
33078
  };
33079
+ logistics_document_for_order: {
33080
+ Args: {
33081
+ p_documenttype: string;
33082
+ p_order_id: string;
33083
+ };
33084
+ Returns: Json;
33085
+ };
33047
33086
  logistics_document_layout: {
33048
33087
  Args: {
33049
33088
  _document_code: string;
@@ -33057,6 +33096,10 @@ export type Database = {
33057
33096
  };
33058
33097
  Returns: Json;
33059
33098
  };
33099
+ logistics_document_selection_status: {
33100
+ Args: never;
33101
+ Returns: Json;
33102
+ };
33060
33103
  logistics_document_station: {
33061
33104
  Args: {
33062
33105
  _document_code: string;
@@ -33362,6 +33405,12 @@ export type Database = {
33362
33405
  Args: never;
33363
33406
  Returns: Json;
33364
33407
  };
33408
+ logistics_floriday_shipping_document: {
33409
+ Args: {
33410
+ p_order_id: string;
33411
+ };
33412
+ Returns: Json;
33413
+ };
33365
33414
  logistics_floriday_status_updates_enabled: {
33366
33415
  Args: never;
33367
33416
  Returns: boolean;
@@ -33875,6 +33924,21 @@ export type Database = {
33875
33924
  Args: never;
33876
33925
  Returns: Json;
33877
33926
  };
33927
+ logistics_own_sticker_count: {
33928
+ Args: {
33929
+ p_ppc_product: number;
33930
+ p_ppc_regel: number;
33931
+ p_quantity: number;
33932
+ p_unit: string;
33933
+ };
33934
+ Returns: number;
33935
+ };
33936
+ logistics_own_sticker_sync: {
33937
+ Args: {
33938
+ p_limit?: number;
33939
+ };
33940
+ Returns: Json;
33941
+ };
33878
33942
  logistics_own_transport_departure: {
33879
33943
  Args: {
33880
33944
  p_delivery_date: string;
@@ -36261,6 +36325,13 @@ export type Database = {
36261
36325
  };
36262
36326
  Returns: Json;
36263
36327
  };
36328
+ pickstation_document_for_order: {
36329
+ Args: {
36330
+ p_queue_item_id: string;
36331
+ p_slug: string;
36332
+ };
36333
+ Returns: Json;
36334
+ };
36264
36335
  pickstation_get_orders_raw: {
36265
36336
  Args: never;
36266
36337
  Returns: Json;
@@ -38584,6 +38655,15 @@ export type Database = {
38584
38655
  };
38585
38656
  Returns: Json;
38586
38657
  };
38658
+ voorraad_alert_floriday_not_updated: {
38659
+ Args: {
38660
+ p_key: string;
38661
+ p_order_id: string;
38662
+ p_order_item_id: string;
38663
+ p_qty: number;
38664
+ };
38665
+ Returns: undefined;
38666
+ };
38587
38667
  voorraad_can_write: {
38588
38668
  Args: never;
38589
38669
  Returns: boolean;
@@ -38606,6 +38686,12 @@ export type Database = {
38606
38686
  };
38607
38687
  Returns: string[];
38608
38688
  };
38689
+ voorraad_floriday_leads_key: {
38690
+ Args: {
38691
+ p_key: string;
38692
+ };
38693
+ Returns: boolean;
38694
+ };
38609
38695
  voorraad_hook_base_url: {
38610
38696
  Args: never;
38611
38697
  Returns: string;
@@ -38623,6 +38709,12 @@ export type Database = {
38623
38709
  };
38624
38710
  Returns: undefined;
38625
38711
  };
38712
+ voorraad_mark_floriday_sold_before_switch: {
38713
+ Args: {
38714
+ p_product_id: string;
38715
+ };
38716
+ Returns: number;
38717
+ };
38626
38718
  voorraad_production_enabled: {
38627
38719
  Args: never;
38628
38720
  Returns: boolean;