fix(admin): nav issues and blank screens fix
This commit is contained in:
@ -399,14 +399,16 @@ async function loadData() {
|
||||
isLoading.value = true
|
||||
try {
|
||||
// Load drivers from Supabase
|
||||
const { data: drivers } = await supabase.from('users').select('*, driver_profiles(*)').eq('role', 'DRIVER')
|
||||
const { data: drivers, error: errorDrivers } = await supabase.from('users').select('*, driver_profiles(*)').eq('role', 'DRIVER')
|
||||
if (errorDrivers) throw errorDrivers
|
||||
activeDrivers.value = drivers || []
|
||||
|
||||
// Load taxis from Supabase
|
||||
const { data: taxisData } = await supabase.from('taxis').select('*').order('owner_name')
|
||||
const { data: taxisData, error: errorTaxis } = await supabase.from('taxis').select('*').order('owner_name')
|
||||
if (errorTaxis) throw errorTaxis
|
||||
taxis.value = taxisData || []
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
console.error('Error cargando datos:', e)
|
||||
} finally {
|
||||
isLoading.value = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user