Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
05550e1191
commit
4ab142e60e
@@ -176,6 +176,7 @@ function ContactPickerDialog({
|
||||
supabase
|
||||
.from("contacts")
|
||||
.select("id, name, company, contact_type, email")
|
||||
.is("archived_at", null)
|
||||
.order("name")
|
||||
.limit(200)
|
||||
.then(({ data }) => setRows(data ?? []));
|
||||
|
||||
@@ -50,7 +50,7 @@ export function GenerateInvoiceDialog({ open, onOpenChange, clientId, clientName
|
||||
(async () => {
|
||||
setLoading(true);
|
||||
const [{ data: cs }, { data: firm }] = await Promise.all([
|
||||
supabase.from("cases").select("id, case_number, title").eq("client_id", clientId),
|
||||
supabase.from("cases").select("id, case_number, title").eq("client_id", clientId).is("archived_at", null),
|
||||
supabase.from("firm_settings").select("default_tax_rate").maybeSingle(),
|
||||
]);
|
||||
const caseIds = (cs ?? []).map((c) => c.id);
|
||||
|
||||
@@ -53,10 +53,11 @@ function useClientsAndCases(open: boolean) {
|
||||
if (!open) return;
|
||||
(async () => {
|
||||
const [{ data: cs }, { data: ks }] = await Promise.all([
|
||||
supabase.from("clients").select("id, name").order("name"),
|
||||
supabase.from("clients").select("id, name").is("archived_at", null).order("name"),
|
||||
supabase
|
||||
.from("cases")
|
||||
.select("id, case_number, title, client_id, default_hourly_rate")
|
||||
.is("archived_at", null)
|
||||
.order("case_number", { ascending: false }),
|
||||
]);
|
||||
setClients(cs ?? []);
|
||||
|
||||
Reference in New Issue
Block a user