@flowselections/floriday-voorraad 1.0.92 → 1.0.94

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.
@@ -1 +1 @@
1
- {"version":3,"file":"StockIntegrityAlert.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StockIntegrityAlert.tsx"],"names":[],"mappings":"AAoCA,wBAAgB,mBAAmB,uCA2GlC"}
1
+ {"version":3,"file":"StockIntegrityAlert.d.ts","sourceRoot":"","sources":["../../../src/components/voorraad/StockIntegrityAlert.tsx"],"names":[],"mappings":"AAqCA,wBAAgB,mBAAmB,uCAiIlC"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /**
3
3
  * Rode melding wanneer in één transactie twee of meer artikelen van een
4
4
  * positieve fysieke voorraad naar 0 zijn gegaan (bewaking in de database:
@@ -23,11 +23,11 @@ export function StockIntegrityAlert() {
23
23
  const load = useCallback(async () => {
24
24
  const { data, error } = await supabase
25
25
  .from("stock_integrity_alerts")
26
- .select("id, created_at, item_count, items")
26
+ .select("id, created_at, item_count, items, alert_kind")
27
27
  .is("acknowledged_at", null)
28
- .gte("item_count", 2)
28
+ .or("alert_kind.eq.FLORIDAY_NOT_UPDATED,item_count.gte.2")
29
29
  .order("created_at", { ascending: false })
30
- .limit(5);
30
+ .limit(10);
31
31
  if (error) {
32
32
  console.error("Voorraadbewaking laden mislukt:", error.message);
33
33
  return;
@@ -83,5 +83,5 @@ export function StockIntegrityAlert() {
83
83
  };
84
84
  if (alerts.length === 0)
85
85
  return null;
86
- return (_jsx("div", { className: "space-y-2", children: alerts.map((a) => (_jsxs("div", { className: "flex items-start gap-3 rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive", children: [_jsx(AlertOctagon, { className: "mt-0.5 h-4 w-4 shrink-0" }), _jsxs("div", { className: "flex-1 space-y-1", children: [_jsxs("p", { className: "font-medium", children: [a.item_count, " artikelen gingen tegelijk naar voorraad 0 (", new Date(a.created_at).toLocaleString("nl-NL"), "). Controleer of dit klopt."] }), _jsx("ul", { className: "text-xs text-foreground/80", children: (Array.isArray(a.items) ? a.items : []).slice(0, 10).map((it, i) => (_jsxs("li", { children: [label(it, names), ": was ", it.physical_before, it.change_source ? ` (bron ${it.change_source})` : " (bron onbekend)"] }, `${it.trade_item_key}-${i}`))) })] }), _jsx("button", { type: "button", className: "rounded-md border border-destructive/40 bg-background px-3 py-1 text-xs font-medium text-foreground hover:bg-muted", onClick: () => void acknowledge(a.id), children: "Gezien" })] }, a.id))) }));
86
+ return (_jsx("div", { className: "space-y-2", children: alerts.map((a) => (_jsxs("div", { className: "flex items-start gap-3 rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive", children: [_jsx(AlertOctagon, { className: "mt-0.5 h-4 w-4 shrink-0" }), _jsx("div", { className: "flex-1 space-y-1", children: a.alert_kind === "FLORIDAY_NOT_UPDATED" ? (_jsxs(_Fragment, { children: [_jsxs("p", { className: "font-medium", children: ["Verkoop niet in Floriday verwerkt \u2013 pas de Floriday-voorraad aan (", new Date(a.created_at).toLocaleString("nl-NL"), ")."] }), _jsx("p", { className: "text-xs text-foreground/80", children: "Floriday leidt deze artikelen. Deze verkoop kwam niet via Floriday, dus Floriday weet er niets van." }), _jsx("ul", { className: "text-xs text-foreground/80", children: (Array.isArray(a.items) ? a.items : []).slice(0, 10).map((it, i) => (_jsxs("li", { children: [label(it, names), ": ", it.qty ?? "?", " stuks", it.order_number ? ` (order ${it.order_number})` : ""] }, `${it.trade_item_key}-${i}`))) })] })) : (_jsxs(_Fragment, { children: [_jsxs("p", { className: "font-medium", children: [a.item_count, " artikelen gingen tegelijk naar voorraad 0 (", new Date(a.created_at).toLocaleString("nl-NL"), "). Controleer of dit klopt."] }), _jsx("ul", { className: "text-xs text-foreground/80", children: (Array.isArray(a.items) ? a.items : []).slice(0, 10).map((it, i) => (_jsxs("li", { children: [label(it, names), ": was ", it.physical_before, it.change_source ? ` (bron ${it.change_source})` : " (bron onbekend)"] }, `${it.trade_item_key}-${i}`))) })] })) }), _jsx("button", { type: "button", className: "rounded-md border border-destructive/40 bg-background px-3 py-1 text-xs font-medium text-foreground hover:bg-muted", onClick: () => void acknowledge(a.id), children: "Gezien" })] }, a.id))) }));
87
87
  }
@@ -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;
@@ -24640,6 +24643,10 @@ export type Database = {
24640
24643
  superseded_at: string | null;
24641
24644
  updated_at: string;
24642
24645
  user_id: string;
24646
+ write_enabled: boolean;
24647
+ write_enabled_at: string | null;
24648
+ write_enabled_by: string | null;
24649
+ write_enabled_reason: string | null;
24643
24650
  };
24644
24651
  Insert: {
24645
24652
  account_key?: string | null;
@@ -24666,6 +24673,10 @@ export type Database = {
24666
24673
  superseded_at?: string | null;
24667
24674
  updated_at?: string;
24668
24675
  user_id: string;
24676
+ write_enabled?: boolean;
24677
+ write_enabled_at?: string | null;
24678
+ write_enabled_by?: string | null;
24679
+ write_enabled_reason?: string | null;
24669
24680
  };
24670
24681
  Update: {
24671
24682
  account_key?: string | null;
@@ -24692,6 +24703,10 @@ export type Database = {
24692
24703
  superseded_at?: string | null;
24693
24704
  updated_at?: string;
24694
24705
  user_id?: string;
24706
+ write_enabled?: boolean;
24707
+ write_enabled_at?: string | null;
24708
+ write_enabled_by?: string | null;
24709
+ write_enabled_reason?: string | null;
24695
24710
  };
24696
24711
  Relationships: [];
24697
24712
  };
@@ -25580,6 +25595,21 @@ export type Database = {
25580
25595
  };
25581
25596
  Relationships: [];
25582
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
+ };
25583
25613
  twinfield_session_cache: {
25584
25614
  Row: {
25585
25615
  cluster: string;
@@ -31871,10 +31901,29 @@ export type Database = {
31871
31901
  };
31872
31902
  Returns: boolean;
31873
31903
  };
31904
+ klanten_auto_promote_status: {
31905
+ Args: never;
31906
+ Returns: Json;
31907
+ };
31874
31908
  klanten_install_check: {
31875
31909
  Args: never;
31876
31910
  Returns: Json;
31877
31911
  };
31912
+ klanten_promote_round: {
31913
+ Args: never;
31914
+ Returns: Json;
31915
+ };
31916
+ klanten_refresh_grouped_if_stale: {
31917
+ Args: never;
31918
+ Returns: boolean;
31919
+ };
31920
+ klanten_set_auto_promote: {
31921
+ Args: {
31922
+ p_kind: string;
31923
+ p_on: boolean;
31924
+ };
31925
+ Returns: Json;
31926
+ };
31878
31927
  layout_print_document: {
31879
31928
  Args: {
31880
31929
  _documentnaam: string;
@@ -33020,6 +33069,13 @@ export type Database = {
33020
33069
  };
33021
33070
  Returns: Json;
33022
33071
  };
33072
+ logistics_document_for_order: {
33073
+ Args: {
33074
+ p_documenttype: string;
33075
+ p_order_id: string;
33076
+ };
33077
+ Returns: Json;
33078
+ };
33023
33079
  logistics_document_layout: {
33024
33080
  Args: {
33025
33081
  _document_code: string;
@@ -33033,6 +33089,10 @@ export type Database = {
33033
33089
  };
33034
33090
  Returns: Json;
33035
33091
  };
33092
+ logistics_document_selection_status: {
33093
+ Args: never;
33094
+ Returns: Json;
33095
+ };
33036
33096
  logistics_document_station: {
33037
33097
  Args: {
33038
33098
  _document_code: string;
@@ -33851,6 +33911,12 @@ export type Database = {
33851
33911
  Args: never;
33852
33912
  Returns: Json;
33853
33913
  };
33914
+ logistics_own_sticker_sync: {
33915
+ Args: {
33916
+ p_limit?: number;
33917
+ };
33918
+ Returns: Json;
33919
+ };
33854
33920
  logistics_own_transport_departure: {
33855
33921
  Args: {
33856
33922
  p_delivery_date: string;
@@ -37896,6 +37962,12 @@ export type Database = {
37896
37962
  };
37897
37963
  Returns: boolean;
37898
37964
  };
37965
+ twinfield_cancel_queue_item: {
37966
+ Args: {
37967
+ p_id: string;
37968
+ };
37969
+ Returns: boolean;
37970
+ };
37899
37971
  twinfield_connection_offices: {
37900
37972
  Args: never;
37901
37973
  Returns: {
@@ -37925,6 +37997,19 @@ export type Database = {
37925
37997
  };
37926
37998
  Returns: Json;
37927
37999
  };
38000
+ twinfield_gated_queue: {
38001
+ Args: {
38002
+ p_connection_id: string;
38003
+ };
38004
+ Returns: {
38005
+ action: string;
38006
+ created_at: string;
38007
+ customer_id: string;
38008
+ id: string;
38009
+ payload: Json;
38010
+ status: string;
38011
+ }[];
38012
+ };
37928
38013
  twinfield_handle_administration_change: {
37929
38014
  Args: {
37930
38015
  _administration_code: string;
@@ -37932,6 +38017,10 @@ export type Database = {
37932
38017
  };
37933
38018
  Returns: undefined;
37934
38019
  };
38020
+ twinfield_is_admin: {
38021
+ Args: never;
38022
+ Returns: boolean;
38023
+ };
37935
38024
  twinfield_prune_push_queue: {
37936
38025
  Args: never;
37937
38026
  Returns: number;
@@ -37943,6 +38032,13 @@ export type Database = {
37943
38032
  };
37944
38033
  Returns: Json;
37945
38034
  };
38035
+ twinfield_set_write_enabled: {
38036
+ Args: {
38037
+ p_connection_id: string;
38038
+ p_enabled: boolean;
38039
+ };
38040
+ Returns: Json;
38041
+ };
37946
38042
  twinfield_sync_apply: {
37947
38043
  Args: {
37948
38044
  _base: Json;
@@ -37979,6 +38075,12 @@ export type Database = {
37979
38075
  };
37980
38076
  Returns: Json;
37981
38077
  };
38078
+ twinfield_write_allowed: {
38079
+ Args: {
38080
+ p_connection_id: string;
38081
+ };
38082
+ Returns: boolean;
38083
+ };
37982
38084
  upsert_auto_fulfillment_log: {
37983
38085
  Args: {
37984
38086
  p_connection_id: string;
@@ -38524,6 +38626,15 @@ export type Database = {
38524
38626
  };
38525
38627
  Returns: Json;
38526
38628
  };
38629
+ voorraad_alert_floriday_not_updated: {
38630
+ Args: {
38631
+ p_key: string;
38632
+ p_order_id: string;
38633
+ p_order_item_id: string;
38634
+ p_qty: number;
38635
+ };
38636
+ Returns: undefined;
38637
+ };
38527
38638
  voorraad_can_write: {
38528
38639
  Args: never;
38529
38640
  Returns: boolean;
@@ -38546,6 +38657,12 @@ export type Database = {
38546
38657
  };
38547
38658
  Returns: string[];
38548
38659
  };
38660
+ voorraad_floriday_leads_key: {
38661
+ Args: {
38662
+ p_key: string;
38663
+ };
38664
+ Returns: boolean;
38665
+ };
38549
38666
  voorraad_hook_base_url: {
38550
38667
  Args: never;
38551
38668
  Returns: string;
@@ -38563,6 +38680,12 @@ export type Database = {
38563
38680
  };
38564
38681
  Returns: undefined;
38565
38682
  };
38683
+ voorraad_mark_floriday_sold_before_switch: {
38684
+ Args: {
38685
+ p_product_id: string;
38686
+ };
38687
+ Returns: number;
38688
+ };
38566
38689
  voorraad_production_enabled: {
38567
38690
  Args: never;
38568
38691
  Returns: boolean;