feat: add city/state/country to complex, new settings page with sidebar, and Biome linting
- Added city, state, and country optional fields to Complex model - Updated onboarding to include optional location fields - Created new settings page with sidebar navigation (Datos del Complejo, Canchas) - Replaced ESLint with Biome for frontend and backend linting - Added parallel dev script with concurrently - Migrated register-routes to use direct app.route() pattern
This commit is contained in:
@@ -1,21 +1,16 @@
|
||||
import type { AuthUser } from '@/types/auth-user'
|
||||
import type { UserProfile } from '@repo/api-contract'
|
||||
import type { AuthUser } from '@/types/auth-user';
|
||||
import type { UserProfile } from '@repo/api-contract';
|
||||
|
||||
export function getUserProfile(user: AuthUser): UserProfile {
|
||||
const fullName =
|
||||
(typeof user.user_metadata?.full_name === 'string' &&
|
||||
user.user_metadata.full_name) ||
|
||||
(typeof user.user_metadata?.full_name === 'string' && user.user_metadata.full_name) ||
|
||||
(typeof user.user_metadata?.name === 'string' && user.user_metadata.name) ||
|
||||
(user.email ?? 'Usuario')
|
||||
(user.email ?? 'Usuario');
|
||||
|
||||
const role =
|
||||
(typeof user.app_metadata?.role === 'string' && user.app_metadata.role) ||
|
||||
'member'
|
||||
const role = (typeof user.app_metadata?.role === 'string' && user.app_metadata.role) || 'member';
|
||||
|
||||
const avatarUrl =
|
||||
(typeof user.user_metadata?.avatar_url === 'string' &&
|
||||
user.user_metadata.avatar_url) ||
|
||||
null
|
||||
(typeof user.user_metadata?.avatar_url === 'string' && user.user_metadata.avatar_url) || null;
|
||||
|
||||
return {
|
||||
id: user.id,
|
||||
@@ -24,5 +19,5 @@ export function getUserProfile(user: AuthUser): UserProfile {
|
||||
role,
|
||||
avatarUrl,
|
||||
createdAt: user.created_at,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user