@flowselections/admin-installatietechniek 1.0.10 → 1.0.11

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":"AdminForInstallatieTechniek.d.ts","sourceRoot":"","sources":["../../src/components/AdminForInstallatieTechniek.tsx"],"names":[],"mappings":"AA+FA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,gCAAgC;IAC/C,8EAA8E;IAC9E,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAsFD,wBAAgB,2BAA2B,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,GAAE,gCAAqC,+BA8kDtG"}
1
+ {"version":3,"file":"AdminForInstallatieTechniek.d.ts","sourceRoot":"","sources":["../../src/components/AdminForInstallatieTechniek.tsx"],"names":[],"mappings":"AAgGA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,gCAAgC;IAC/C,8EAA8E;IAC9E,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAsFD,wBAAgB,2BAA2B,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,GAAE,gCAAqC,+BA8lDtG"}
@@ -4,6 +4,7 @@ import { useAuth, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialog
4
4
  import { ChevronDown, ChevronRight, Copy, FlaskConical, MoreVertical, Plus, Pencil, Shield, UserPlus, UserX, AlertTriangle, } from "lucide-react";
5
5
  import { assignRole, createRole, createTestUser, deleteRole, deleteUser, duplicateRole, getRoles, getUserModulePermissions, getUsersWithRoles, inviteUser, removeRole, setModuleEnforce, setUserModulePermission, syncModuleRegistry, updateRole, updateUserName, updateUserContact, } from "../lib/admin.functions";
6
6
  import { useDiscoveredModules } from "../lib/moduleDiscovery";
7
+ import { useShellModules, moduleKey, moduleFeatures } from "@flowselections/core";
7
8
  import { supabase } from "../integrations/supabase/client";
8
9
  const CONTACT_ROLE_KEYS = ["monteur", "planner", "administratie"];
9
10
  const PHONE_RE = /^[0-9+()\-\s]{8,25}$/;
@@ -93,12 +94,29 @@ export function AdminForInstallatieTechniek({ modules, shellId } = {}) {
93
94
  const [userPermModules, setUserPermModules] = useState([]);
94
95
  const [userPermMap, setUserPermMap] = useState({});
95
96
  const [userPermLoading, setUserPermLoading] = useState(false);
97
+ // Bron 1: de shell (core ≥1.0.26). Bron 2: props. Bron 3: routeboom.
98
+ const shellCtx = useShellModules();
96
99
  const discoveredModules = useDiscoveredModules();
97
100
  const shellModules = useMemo(() => {
98
- const source = Array.isArray(modules) && modules.length > 0 ? modules : discoveredModules;
101
+ const fromShell = Array.isArray(shellCtx?.modules)
102
+ ? shellCtx.modules.map((m) => ({
103
+ id: moduleKey(m),
104
+ name: m.name,
105
+ features: (Array.isArray(moduleFeatures(m)) ? moduleFeatures(m) : []).map((f) => ({
106
+ id: f.id,
107
+ name: f.label,
108
+ })),
109
+ }))
110
+ : [];
111
+ const source = fromShell.length > 0
112
+ ? fromShell
113
+ : Array.isArray(modules) && modules.length > 0
114
+ ? modules
115
+ : discoveredModules;
99
116
  return source.filter((m) => Boolean(m?.id) && Boolean(m?.name));
100
- }, [modules, discoveredModules]);
101
- const effectiveShellId = shellId ?? (typeof window !== "undefined" ? window.location.host : "unknown-shell");
117
+ }, [shellCtx, modules, discoveredModules]);
118
+ // Nooit de hostnaam: zonder shellId wordt shell_id niet bijgewerkt.
119
+ const effectiveShellId = shellCtx?.shellId ?? shellId ?? undefined;
102
120
  const shellModulesKey = shellModules
103
121
  .map((m) => `${m.id}:${m.name}:${(m.features ?? []).map((f) => `${f.id}=${f.name}`).join(",")}`)
104
122
  .join("|");
@@ -9467,6 +9467,57 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9467
9467
  };
9468
9468
  Relationships: [];
9469
9469
  };
9470
+ itk_offerte_acceptaties: {
9471
+ Row: {
9472
+ accepted_at: string;
9473
+ akkoordgever_email: string;
9474
+ akkoordgever_naam: string;
9475
+ akkoordverklaring: string;
9476
+ id: string;
9477
+ inhoud_hash: string;
9478
+ ip_address: unknown;
9479
+ offerte_id: string;
9480
+ offerte_number: string;
9481
+ offerte_snapshot: import("./types").Json;
9482
+ user_agent: string | null;
9483
+ versie: string;
9484
+ };
9485
+ Insert: {
9486
+ accepted_at?: string;
9487
+ akkoordgever_email: string;
9488
+ akkoordgever_naam: string;
9489
+ akkoordverklaring: string;
9490
+ id?: string;
9491
+ inhoud_hash: string;
9492
+ ip_address?: unknown;
9493
+ offerte_id: string;
9494
+ offerte_number: string;
9495
+ offerte_snapshot: import("./types").Json;
9496
+ user_agent?: string | null;
9497
+ versie: string;
9498
+ };
9499
+ Update: {
9500
+ accepted_at?: string;
9501
+ akkoordgever_email?: string;
9502
+ akkoordgever_naam?: string;
9503
+ akkoordverklaring?: string;
9504
+ id?: string;
9505
+ inhoud_hash?: string;
9506
+ ip_address?: unknown;
9507
+ offerte_id?: string;
9508
+ offerte_number?: string;
9509
+ offerte_snapshot?: import("./types").Json;
9510
+ user_agent?: string | null;
9511
+ versie?: string;
9512
+ };
9513
+ Relationships: [{
9514
+ foreignKeyName: "itk_offerte_acceptaties_offerte_id_fkey";
9515
+ columns: ["offerte_id"];
9516
+ isOneToOne: true;
9517
+ referencedRelation: "itk_offertes";
9518
+ referencedColumns: ["id"];
9519
+ }];
9520
+ };
9470
9521
  itk_offerte_events: {
9471
9522
  Row: {
9472
9523
  created_at: string;
@@ -9680,6 +9731,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9680
9731
  itk_offertes: {
9681
9732
  Row: {
9682
9733
  aandachtspunten: string | null;
9734
+ acceptance_id: string | null;
9683
9735
  ai_generated: boolean;
9684
9736
  approved_at: string | null;
9685
9737
  binnen_mandaat: boolean;
@@ -9701,6 +9753,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9701
9753
  sign_token: string;
9702
9754
  signature_data: string | null;
9703
9755
  signed_at: string | null;
9756
+ signer_email: string | null;
9704
9757
  signer_name: string | null;
9705
9758
  source_number: string | null;
9706
9759
  source_ref: string | null;
@@ -9722,6 +9775,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9722
9775
  };
9723
9776
  Insert: {
9724
9777
  aandachtspunten?: string | null;
9778
+ acceptance_id?: string | null;
9725
9779
  ai_generated?: boolean;
9726
9780
  approved_at?: string | null;
9727
9781
  binnen_mandaat?: boolean;
@@ -9743,6 +9797,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9743
9797
  sign_token?: string;
9744
9798
  signature_data?: string | null;
9745
9799
  signed_at?: string | null;
9800
+ signer_email?: string | null;
9746
9801
  signer_name?: string | null;
9747
9802
  source_number?: string | null;
9748
9803
  source_ref?: string | null;
@@ -9764,6 +9819,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9764
9819
  };
9765
9820
  Update: {
9766
9821
  aandachtspunten?: string | null;
9822
+ acceptance_id?: string | null;
9767
9823
  ai_generated?: boolean;
9768
9824
  approved_at?: string | null;
9769
9825
  binnen_mandaat?: boolean;
@@ -9785,6 +9841,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9785
9841
  sign_token?: string;
9786
9842
  signature_data?: string | null;
9787
9843
  signed_at?: string | null;
9844
+ signer_email?: string | null;
9788
9845
  signer_name?: string | null;
9789
9846
  source_number?: string | null;
9790
9847
  source_ref?: string | null;
@@ -9805,6 +9862,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9805
9862
  work_location_id?: string | null;
9806
9863
  };
9807
9864
  Relationships: [{
9865
+ foreignKeyName: "itk_offertes_acceptance_id_fkey";
9866
+ columns: ["acceptance_id"];
9867
+ isOneToOne: false;
9868
+ referencedRelation: "itk_offerte_acceptaties";
9869
+ referencedColumns: ["id"];
9870
+ }, {
9808
9871
  foreignKeyName: "itk_offertes_contact_id_fkey";
9809
9872
  columns: ["contact_id"];
9810
9873
  isOneToOne: false;
@@ -16484,6 +16547,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16484
16547
  cc: string[];
16485
16548
  connection_id: string | null;
16486
16549
  created_at: string;
16550
+ email_purpose: string | null;
16487
16551
  enabled: boolean;
16488
16552
  id: boolean;
16489
16553
  reply_to: string | null;
@@ -16497,6 +16561,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16497
16561
  cc?: string[];
16498
16562
  connection_id?: string | null;
16499
16563
  created_at?: string;
16564
+ email_purpose?: string | null;
16500
16565
  enabled?: boolean;
16501
16566
  id?: boolean;
16502
16567
  reply_to?: string | null;
@@ -16510,6 +16575,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16510
16575
  cc?: string[];
16511
16576
  connection_id?: string | null;
16512
16577
  created_at?: string;
16578
+ email_purpose?: string | null;
16513
16579
  enabled?: boolean;
16514
16580
  id?: boolean;
16515
16581
  reply_to?: string | null;
@@ -21965,6 +22031,30 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
21965
22031
  };
21966
22032
  Relationships: [];
21967
22033
  };
22034
+ uren_pagina_toegang: {
22035
+ Row: {
22036
+ created_at: string;
22037
+ id: string;
22038
+ user_id: string;
22039
+ };
22040
+ Insert: {
22041
+ created_at?: string;
22042
+ id?: string;
22043
+ user_id: string;
22044
+ };
22045
+ Update: {
22046
+ created_at?: string;
22047
+ id?: string;
22048
+ user_id?: string;
22049
+ };
22050
+ Relationships: [{
22051
+ foreignKeyName: "uren_pagina_toegang_user_id_fkey";
22052
+ columns: ["user_id"];
22053
+ isOneToOne: true;
22054
+ referencedRelation: "profiles";
22055
+ referencedColumns: ["id"];
22056
+ }];
22057
+ };
21968
22058
  uren_settings: {
21969
22059
  Row: {
21970
22060
  break_minutes: number;
@@ -30009,6 +30099,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
30009
30099
  };
30010
30100
  Returns: string;
30011
30101
  };
30102
+ printplek_verwijder_impact: {
30103
+ Args: {
30104
+ _id: string;
30105
+ };
30106
+ Returns: import("./types").Json;
30107
+ };
30012
30108
  process_logistics_event: {
30013
30109
  Args: {
30014
30110
  p_event_id: string;
@@ -30112,6 +30208,17 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
30112
30208
  };
30113
30209
  Returns: import("./types").Json;
30114
30210
  };
30211
+ quote_public_accept: {
30212
+ Args: {
30213
+ _akkoord: boolean;
30214
+ _email: string;
30215
+ _ip_address?: string;
30216
+ _naam: string;
30217
+ _token: string;
30218
+ _user_agent?: string;
30219
+ };
30220
+ Returns: import("./types").Json;
30221
+ };
30115
30222
  quote_public_get: {
30116
30223
  Args: {
30117
30224
  _token: string;
@@ -31096,6 +31203,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
31096
31203
  };
31097
31204
  Returns: number;
31098
31205
  };
31206
+ uren_heeft_pagina_toegang: {
31207
+ Args: never;
31208
+ Returns: boolean;
31209
+ };
31099
31210
  uren_is_beheerder: {
31100
31211
  Args: never;
31101
31212
  Returns: boolean;
@@ -31179,6 +31290,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
31179
31290
  Args: never;
31180
31291
  Returns: string;
31181
31292
  };
31293
+ uren_pagina_toegang_instellen: {
31294
+ Args: {
31295
+ _toegang: boolean;
31296
+ _user_id: string;
31297
+ };
31298
+ Returns: undefined;
31299
+ };
31182
31300
  uren_planning_dagagenda: {
31183
31301
  Args: {
31184
31302
  _tot: string;
@@ -31430,6 +31548,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
31430
31548
  };
31431
31549
  Returns: import("./types").Json;
31432
31550
  };
31551
+ verwijder_printplek: {
31552
+ Args: {
31553
+ _id: string;
31554
+ };
31555
+ Returns: import("./types").Json;
31556
+ };
31433
31557
  voorraad_cleanup_old_rows: {
31434
31558
  Args: never;
31435
31559
  Returns: import("./types").Json;