Commit Graph

11 Commits

Author SHA1 Message Date
ce2cd6b397 Eliminada dependencia de llave de servicio para el manejo de usuarios y eliminado el hard-code de los roles
supabase.tsx
Se añadieron los roles al contexto de autenticación. Se modificó la interfaz de UserClaims que consiste en la información que se obtiene de los usuarios. Se obtienen los roles desde la base de datos.

_authenticated.tsx
Ya todos pueden ver el enlace a la página de facultades.

login.tsx
Se movió el enlace de '¿Olvidaste tu contraseña?' a después del input de la contraseña, para mejorar la usabilidad.

usuarios.tsx
- La obtención de los usuarios ahora se hace a con el cliente de llave anónima de supabase y se obtiene de tablas en el esquema public a través de una función de PostgreSQL.
- La información de los roles se obtiene del contexto de autenticación para mostrarla en la página.
- El RolePill se movió a dentro del componente para poder usar la información del contexto.
- Se añadieron validaciones para poder crear un usuario.
- Se muestra la información para editar los usuarios y se actualiza en la BDD con una función de PostgreSQL.
2025-10-20 17:09:14 -06:00
f2b3010ac9 Ahora se obtienen claims de las tablas en el esquema public, en vez de la información de sesion del usuario, que se obtiene de la tabla auth.users
En supabase.tsx se sustituyó la manera de obtener los claims del usuario, utilizando ahora un rpc de una función en supabase.
2025-10-10 17:23:37 -06:00
6c3dd54d5f refactor: update navigation links and search parameters across authenticated routes 2025-08-29 16:51:22 -06:00
7d5db6bb2f refactor: update imports in various components for consistency and remove unused imports 2025-08-27 10:08:41 -06:00
602c5dbb31 feat: update API endpoints to use production URL and enhance UI components in authenticated routes 2025-08-25 15:07:09 -06:00
012a5a58b0 feat: add AI-generated study plan creation dialog and API integration
- Implemented CreatePlanDialog component for generating study plans using AI.
- Integrated postAPI function for handling API requests.
- Updated planes.tsx to include AI plan generation logic.
- Modified usuarios.tsx to enable email confirmation for new users.
- Added Switch component for UI consistency.
- Created api.ts for centralized API handling.
- Developed carreras.tsx for managing career data with filtering and CRUD operations.
- Added CarreraFormDialog and CarreraDetailDialog for creating and editing career details.
- Implemented CriterioFormDialog for adding criteria to careers.
2025-08-25 09:29:22 -06:00
02ad043ed6 feat: add Usuarios route and user management functionality
- Introduced a new route for user management under /usuarios.
- Implemented user listing with search and edit capabilities.
- Added role management with visual indicators for user roles.
- Created a modal for editing user details, including role and permissions.
- Integrated Supabase for user data retrieval and updates.
- Enhanced UI components for better user experience.
- Removed unused planes route and related components.
- Added a new plan detail modal for displaying plan information.
- Updated navigation to include new Usuarios link.
2025-08-21 15:30:50 -06:00
fe471bcfc2 feat: Add dashboard and asignaturas routes with corresponding components 2025-08-21 07:49:01 -06:00
51faa98022 feat: Implement faculty management routes and UI components
- Added a new route for managing faculties with a grid display of faculties.
- Created a detailed view for each faculty including metrics and recent activities.
- Introduced a new loader for fetching faculty data and associated plans and subjects.
- Enhanced the existing plans route to include a modal for plan details.
- Updated the login and index pages with improved UI and styling.
- Integrated a progress ring component to visualize the quality of plans.
- Applied a new font style across the application for consistency.
2025-08-20 19:09:31 -06:00
559514d7b4 feat: add UI components and improve layout
- Introduced new UI components: Input, Label, ScrollArea, Separator, Sheet, Skeleton, Table.
- Implemented utility function for class name merging.
- Enhanced the authenticated layout with a sidebar and user menu.
- Added login functionality with improved UI and error handling.
- Integrated theme provider for consistent theming across the application.
- Updated styles with Tailwind CSS and custom properties for dark mode support.
- Refactored routes to utilize new components and improve user experience.
2025-08-20 07:59:52 -06:00
a52259451c feat: add Supabase authentication context and routes
- Implemented Supabase authentication context in `supabase.tsx` for managing user login and logout.
- Created a new SVG logo file for branding.
- Set up main application entry point in `main.tsx` with router integration.
- Added web vitals reporting in `reportWebVitals.ts`.
- Generated route tree in `routeTree.gen.ts` for application routing.
- Established root route in `__root.tsx` with TanStack Router Devtools integration.
- Created authenticated route in `_authenticated.tsx` to protect routes.
- Developed planes route under authenticated section in `planes.tsx`.
- Implemented login route with form handling in `login.tsx`.
- Added index route with welcome message in `index.tsx`.
- Included basic styles in `styles.css`.
- Configured TypeScript settings in `tsconfig.json`.
- Set up Vite configuration with React and TanStack Router plugins in `vite.config.ts`.
2025-08-19 15:38:37 -06:00