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:
Jose Selesan
2026-04-10 15:36:15 -03:00
parent 77004b14b0
commit 9ee98a4cb4
129 changed files with 2929 additions and 3186 deletions

View File

@@ -1,28 +1,28 @@
import { useState } from 'react'
import { Link, useNavigate } from '@tanstack/react-router'
import { zodResolver } from '@hookform/resolvers/zod'
import { useForm } from 'react-hook-form'
import { z } from 'zod'
import { Button } from '@/components/ui/button'
import { Field, FieldError, FieldLabel } from '@/components/ui/field'
import { Input } from '@/components/ui/input'
import { useAuth } from '@/lib/auth'
import { Button } from '@/components/ui/button';
import { Field, FieldError, FieldLabel } from '@/components/ui/field';
import { Input } from '@/components/ui/input';
import { useAuth } from '@/lib/auth';
import { zodResolver } from '@hookform/resolvers/zod';
import { Link, useNavigate } from '@tanstack/react-router';
import { useState } from 'react';
import { useForm } from 'react-hook-form';
import { z } from 'zod';
const loginSchema = z.object({
email: z.string().email('Ingresá un email válido.'),
password: z.string().min(6, 'La contraseña debe tener al menos 6 caracteres.'),
})
});
type LoginForm = z.infer<typeof loginSchema>
type LoginForm = z.infer<typeof loginSchema>;
type LoginPageProps = {
redirectTo?: string
}
redirectTo?: string;
};
export function LoginPage({ redirectTo = '/' }: LoginPageProps) {
const navigate = useNavigate()
const { signInWithPassword } = useAuth()
const [submitError, setSubmitError] = useState<string | null>(null)
const navigate = useNavigate();
const { signInWithPassword } = useAuth();
const [submitError, setSubmitError] = useState<string | null>(null);
const {
register,
@@ -35,18 +35,18 @@ export function LoginPage({ redirectTo = '/' }: LoginPageProps) {
email: '',
password: '',
},
})
});
const onSubmit = async (values: LoginForm) => {
setSubmitError(null)
setSubmitError(null);
try {
await signInWithPassword(values)
await navigate({ to: redirectTo })
await signInWithPassword(values);
await navigate({ to: redirectTo });
} catch {
setSubmitError('No pudimos iniciar sesión. Verificá tus credenciales.')
setSubmitError('No pudimos iniciar sesión. Verificá tus credenciales.');
}
}
};
return (
<main className="mx-auto flex min-h-screen w-full max-w-6xl items-center px-6">
@@ -96,5 +96,5 @@ export function LoginPage({ redirectTo = '/' }: LoginPageProps) {
</p>
</section>
</main>
)
);
}