diff --git a/src/routes/cases.index.tsx b/src/routes/cases.index.tsx index 05849d3..885d091 100644 --- a/src/routes/cases.index.tsx +++ b/src/routes/cases.index.tsx @@ -96,8 +96,18 @@ function CasesList() { setCases(enriched); }; + const loadAux = async () => { + const [{ data: usr }, { data: cli }] = await Promise.all([ + supabase.from("profiles").select("id, full_name, email").order("full_name", { ascending: true }), + supabase.from("clients").select("id, name").order("name", { ascending: true }), + ]); + setUsers(usr ?? []); + setClientList(cli ?? []); + }; + useEffect(() => { load(); + loadAux(); }, []); const visible = cases.filter((c) =>