fix(process-repo): getAll() incluye JOIN con org y area para populear names
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -121,7 +121,7 @@ export const supabaseProcessRepo = {
|
|||||||
async getAll(): Promise<ProcessWithUserNames[]> {
|
async getAll(): Promise<ProcessWithUserNames[]> {
|
||||||
const { data, error } = await supabase
|
const { data, error } = await supabase
|
||||||
.from('processes')
|
.from('processes')
|
||||||
.select('*, owner:users!owner_id(name, avatar_url), updater:users!updated_by(name)')
|
.select('*, owner:users!owner_id(name, avatar_url), updater:users!updated_by(name), org:organizations!org_id(name), area:areas!area_id(name)')
|
||||||
.order('updated_at', { ascending: false })
|
.order('updated_at', { ascending: false })
|
||||||
if (error) throw error
|
if (error) throw error
|
||||||
return (data ?? []).map((row) => fromRowWithUsers(row as Record<string, unknown>))
|
return (data ?? []).map((row) => fromRowWithUsers(row as Record<string, unknown>))
|
||||||
|
|||||||
Reference in New Issue
Block a user