)
}
diff --git a/src/web/src/layouts/PublicLayout.tsx b/src/web/src/layouts/PublicLayout.tsx
index 0526116..11731a8 100644
--- a/src/web/src/layouts/PublicLayout.tsx
+++ b/src/web/src/layouts/PublicLayout.tsx
@@ -6,7 +6,7 @@ interface PublicLayoutProps {
export function PublicLayout({ children }: PublicLayoutProps) {
return (
-
+
{children}
)
diff --git a/src/web/src/lib/utils.ts b/src/web/src/lib/utils.ts
new file mode 100644
index 0000000..d32b0fe
--- /dev/null
+++ b/src/web/src/lib/utils.ts
@@ -0,0 +1,6 @@
+import { type ClassValue, clsx } from 'clsx'
+import { twMerge } from 'tailwind-merge'
+
+export function cn(...inputs: ClassValue[]) {
+ return twMerge(clsx(inputs))
+}
diff --git a/src/web/src/pages/HomePage.tsx b/src/web/src/pages/HomePage.tsx
index 452ea85..f41bf41 100644
--- a/src/web/src/pages/HomePage.tsx
+++ b/src/web/src/pages/HomePage.tsx
@@ -1,8 +1,109 @@
+import {
+ TrendingUp,
+ Calculator,
+ Zap,
+ Settings,
+ LayoutDashboard,
+} from 'lucide-react'
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from '@/components/ui/card'
+import { Badge } from '@/components/ui/badge'
+import { useAuthStore } from '@/stores/authStore'
+
+interface ModuleCard {
+ title: string
+ description: string
+ icon: React.ElementType
+ available: boolean
+}
+
+const modules: ModuleCard[] = [
+ {
+ title: 'Dashboard',
+ description: 'Vista general del sistema y métricas principales.',
+ icon: LayoutDashboard,
+ available: true,
+ },
+ {
+ title: 'Ventas',
+ description: 'Gestión de ventas, presupuestos y seguimiento de clientes.',
+ icon: TrendingUp,
+ available: false,
+ },
+ {
+ title: 'Tasación',
+ description: 'Herramientas de valuación y tasación de propiedades.',
+ icon: Calculator,
+ available: false,
+ },
+ {
+ title: 'Integraciones',
+ description: 'Conectores con portales inmobiliarios y servicios externos.',
+ icon: Zap,
+ available: false,
+ },
+ {
+ title: 'Administración',
+ description: 'Gestión de usuarios, roles y configuración del sistema.',
+ icon: Settings,
+ available: false,
+ },
+]
+
export function HomePage() {
+ const user = useAuthStore((s) => s.user)
+
return (
-
-
Dashboard
-
Bienvenido al SIG-CM2.
+
+ {/* Welcome */}
+
+
+ Panel principal
+
+
+ {user?.nombre
+ ? `Bienvenido, ${user.nombre}. Seleccioná un módulo para comenzar.`
+ : 'Bienvenido al SIG-CM 2.0. Seleccioná un módulo para comenzar.'}
+
+
+
+ {/* Module grid */}
+
+ {modules.map((mod) => {
+ const Icon = mod.icon
+ return (
+
+
+
+
+ {mod.title}
+
+
+
+ {mod.description}
+
+
+ {mod.available ? (
+ Disponible
+ ) : (
+ Próximamente
+ )}
+
+
+ )
+ })}
+
)
}
diff --git a/src/web/tsconfig.app.json b/src/web/tsconfig.app.json
index 44370da..0ef22ca 100644
--- a/src/web/tsconfig.app.json
+++ b/src/web/tsconfig.app.json
@@ -2,6 +2,11 @@
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "es2023",
+ "baseUrl": ".",
+ "paths": {
+ "@/*": ["./src/*"]
+ },
+ "ignoreDeprecations": "6.0",
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"module": "esnext",
"types": ["vite/client", "vitest/globals"],
diff --git a/src/web/vite.config.ts b/src/web/vite.config.ts
index 3d15f68..3571c8c 100644
--- a/src/web/vite.config.ts
+++ b/src/web/vite.config.ts
@@ -1,6 +1,7 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
+import path from 'path'
// https://vite.dev/config/
export default defineConfig({
@@ -8,4 +9,9 @@ export default defineConfig({
react(),
tailwindcss(),
],
+ resolve: {
+ alias: {
+ '@': path.resolve(__dirname, './src'),
+ },
+ },
})
diff --git a/src/web/vitest.config.ts b/src/web/vitest.config.ts
index 798b64b..8bd1858 100644
--- a/src/web/vitest.config.ts
+++ b/src/web/vitest.config.ts
@@ -1,12 +1,21 @@
import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
+import path from 'path'
export default defineConfig({
plugins: [react()],
+ resolve: {
+ alias: {
+ '@': path.resolve(__dirname, './src'),
+ },
+ },
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['./src/tests/setup.ts'],
+ env: {
+ VITE_API_URL: 'http://localhost:5000',
+ },
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],