Commit Graph

79 Commits

Author SHA1 Message Date
Exteban08
e1d4db96fe Change connector sync time from 2:00 AM to 9:00 AM
Updated SHMetersPage and XMetersPage to reflect new daily
sync schedule at 9:00 AM instead of 2:00 AM.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 22:16:11 +00:00
Exteban08
14e7f8d743 Update favicon and connector pages last connection time
- Replace Vite favicon with GRH logo (white background)
- Update SHMetersPage and XMetersPage to show dynamic last connection time
  - Today (Feb 4, 2026): 2:32 PM
  - After today: 2:00 AM

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:59:25 +00:00
Exteban08
9f1ab4115e Add Analytics section and improve Connectors pages
- Add Analytics pages: Map (Leaflet), Reports, and Server metrics
- Add Analytics section to sidebar (Admin only)
- Improve SHMetersPage and XMetersPage with real API data
- Add analytics API service for connector stats and server metrics
- Register system routes in backend

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 21:07:00 +00:00
Exteban08
27494e7868 Fix dark mode for ConsumptionPage cards and AuditoriaPage table
- ConsumptionPage: Add dark mode to StatCard, filters panel, pagination,
  TypeBadge, BatteryIndicator, and SignalIndicator components
- AuditoriaPage: Add dark mode to table tbody, details modal, action
  badges, success/failure badges, and pagination elements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 12:07:01 +00:00
Exteban08
3087af11e1 Add dark mode styling to modals and form elements
- Add global CSS overrides for input, select, textarea in dark mode
- Update MetersModal with dark mode classes
- Update ConcentratorsModal with dark mode classes
- Update ProjectsPage modal with dark mode classes
- Update RolesPage modal with dark mode classes
- Update ConfirmModal with dark mode styling
- Update ProfileModal with dark mode styling
- All form labels, inputs, selects, and buttons now properly styled

Dark mode elements:
- Modal backgrounds: zinc-900 with zinc-700 border
- Inputs/selects: zinc-800 background, zinc-700 border
- Labels: zinc-400 text color
- Cancel buttons: zinc-800 hover background

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 12:01:08 +00:00
Exteban08
0142ba740f Add dark mode support for tables and data pages
- Add CSS overrides for MaterialTable in dark mode
- Update page containers with dark:bg-zinc-950
- Update sidebars with dark mode (MetersSidebar, ConcentratorsSidebar)
- Update tables in AuditoriaPage, UsersPage, RolesPage
- Update ConsumptionPage with dark gradient background
- Update search inputs, select elements, and modals
- Add dark borders for card separation

Affected pages:
- MeterPage, ConcentratorsPage, ProjectsPage
- UsersPage, RolesPage, AuditoriaPage
- ConsumptionPage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 11:58:10 +00:00
Exteban08
c741b697d9 Improve dark mode with Zinc color palette
- Change from gray to zinc colors for a neutral cool aesthetic
- Use zinc-950 for main background, zinc-900 for cards
- Add subtle borders to cards in dark mode for better separation
- Update all components: Home, TopMenu, connector pages
- More elegant and minimalist dark mode appearance

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 11:51:03 +00:00
Exteban08
9b8d6c4e45 Add dark/light theme toggle and Conectores section
- Add theme toggle button in TopMenu with Sun/Moon icons
- Save theme preference to localStorage
- Add dark mode CSS configuration with Tailwind @custom-variant
- Apply dark mode classes to Home.tsx, TopMenu, and connector pages
- Add new Conectores section in sidebar with Cable icon
- Create placeholder pages for SH-METERS, XMETERS, and TTS connectors
- Update App.tsx page types and routing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 11:47:42 +00:00
7301be7544 Meter fix 2026-02-03 03:02:19 -06:00
0f8f73ea2a Delete project logic 2026-02-03 02:17:14 -06:00
35c44ed13c fix 2026-02-03 01:56:44 -06:00
040f3f97dd Project deleting 2026-02-03 01:53:49 -06:00
5529739749 project service 2026-02-03 01:39:48 -06:00
31ab977f97 Rows per page standarized 2026-02-03 01:26:59 -06:00
d1770b550a Users filter in dashboard as organismos operadores 2026-02-03 01:06:40 -06:00
23c3a19209 Operator project fix 2026-02-03 00:39:08 -06:00
6124bedb8a Operator permissions 2026-02-03 00:28:58 -06:00
5a062ce3a1 Project id for user 2026-02-02 23:55:41 -06:00
9ab1beeef7 Audito dashboard and OPERATOR permissions 2026-02-02 23:23:45 -06:00
b273003366 Meter tyoe logic for projects in concentrators page 2026-02-02 19:01:02 -06:00
6cc4ee0901 meter types 2026-02-02 17:54:01 -06:00
e06941fd02 prueba columns 2026-02-02 01:58:30 -06:00
46aab5fbba Projects view by user 2026-02-02 01:27:15 -06:00
8ca10d0b35 Notifications cronjob 2026-02-01 22:29:48 -06:00
48e0884bf7 Notifications 2026-02-01 20:54:13 -06:00
6c02bd5448 Changes 2026-02-01 18:30:28 -06:00
b5ea12dd27 Meter changes 2026-01-29 18:10:37 -06:00
33b072436d Roles section 2026-01-29 16:41:21 -06:00
6b9f6810ab audit logic 2026-01-26 20:39:23 -06:00
2d977b13b4 Convert user and role IDs from number to UUID string
Updated backend and frontend to use UUID strings instead of integers for user and role IDs
to match PostgreSQL database schema (UUID type).

Backend changes:
- Updated User and UserPublic interfaces: id and role_id now string (UUID)
- Updated JwtPayload: userId and roleId now string
- Updated user validators: role_id validation changed from number to UUID string
- Removed parseInt() calls in user controller (getUserById, updateUser, deleteUser, changePassword)
- Updated all user service function signatures to accept string IDs
- Updated create() and update() functions to accept role_id as string

Frontend changes:
- Updated User interface in users API: role_id is string
- Updated CreateUserInput and UpdateUserInput: role_id is string
- Added role filter in UsersPage sidebar
- Removed number conversion logic (parseInt)

This fixes the "invalid input syntax for type uuid" error when creating/updating users.
2026-01-26 19:49:15 -06:00
6d25f5103b Add users and roles API integration to UsersPage
Created API modules for users and roles management:
- Added src/api/roles.ts with getAllRoles, getRoleById, createRole, etc.
- Added src/api/users.ts with getAllUsers, createUser, updateUser, etc.

Updated UsersPage to fetch data from backend:
- Fetch roles from /api/roles endpoint on mount
- Fetch users from /api/users endpoint on mount
- Integrated createUser API call with form submission
- Added proper validation and error handling
- Split name field into firstName and lastName for API compatibility
- Added loading states and refresh functionality
2026-01-26 11:45:01 -06:00
Exteban08
6c7d448b2f Fix: Corregir pantalla blanca y mejorar carga masiva
- Fix error .toFixed() con valores DECIMAL de PostgreSQL (string vs number)
- Fix modal de carga masiva que se cerraba sin mostrar resultados
- Validar fechas antes de insertar en BD (evita error con "Installed")
- Agregar mapeos de columnas comunes (device_status, device_name, etc.)
- Normalizar valores de status (Installed -> ACTIVE, New_LoRa -> ACTIVE)
- Actualizar documentación del proyecto

Archivos modificados:
- src/pages/meters/MetersTable.tsx
- src/pages/consumption/ConsumptionPage.tsx
- src/pages/meters/MeterPage.tsx
- water-api/src/services/bulk-upload.service.ts
- ESTADO_ACTUAL.md
- CAMBIOS_SESION.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 23:13:48 +00:00
Exteban08
ab97987c6a Agregar carga masiva de lecturas y corregir manejo de respuestas paginadas
- Implementar carga masiva de lecturas via Excel (backend y frontend)
- Corregir cliente API para manejar respuestas con paginación
- Eliminar referencias a device_id (columna inexistente)
- Cambiar areaName por meterLocation en lecturas
- Actualizar fetchProjects y fetchConcentrators para paginación
- Agregar documentación del estado actual y cambios

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:23:41 +00:00
Exteban08
c81a18987f Migrar backend a PostgreSQL + Node.js/Express con nuevas funcionalidades
Backend (water-api/):
- Crear API REST completa con Express + TypeScript
- Implementar autenticación JWT con refresh tokens
- CRUD completo para: projects, concentrators, meters, gateways, devices, users, roles
- Agregar validación con Zod para todas las entidades
- Implementar webhooks para The Things Stack (LoRaWAN)
- Agregar endpoint de lecturas con filtros y resumen de consumo
- Implementar carga masiva de medidores via Excel (.xlsx)

Frontend:
- Crear cliente HTTP con manejo automático de JWT y refresh
- Actualizar todas las APIs para usar nuevo backend
- Agregar sistema de autenticación real (login, logout, me)
- Agregar selector de tipo (LORA, LoRaWAN, Grandes) en concentradores y medidores
- Agregar campo Meter ID en medidores
- Crear modal de carga masiva para medidores
- Agregar página de consumo con gráficas y filtros
- Corregir carga de proyectos independiente de datos existentes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 10:13:26 +00:00
Exteban08
143cd77cee Conflicts 2026-01-14 21:40:17 +00:00
Marlene-Angel
9af06addad Ajustes UI 2026-01-14 12:34:12 -08:00
Marlene-Angel
16f1f68499 Refactor meters: dividido en hook, sidebar, tabla y modal 2026-01-14 12:32:23 -08:00
Marlene-Angel
3681725b8f Refactor concentrators: dividido en hook, sidebar, tabla y modal 2026-01-14 12:30:08 -08:00
Exteban08
48df8a2bfd Merge branch 'main' of github.com:luanngel/water-project 2026-01-13 04:05:42 +00:00
Marlene-Angel
dd3997a3a8 Login GRH, marca de agua tipo membretado y logo en PNG sin fondo 2026-01-12 13:45:25 -08:00
Exteban08
fab39f099d Add viewId parameter to fetchProjects query 2026-01-08 19:42:54 +00:00
d147b74a54 Meters columns 2026-01-08 13:36:57 -06:00
c3e39819da Change 2026-01-08 13:32:31 -06:00
fc0f682d98 More conflicts 2026-01-08 13:29:56 -06:00
dd65f48a75 New changes conflicts 2026-01-08 13:27:15 -06:00
1501b29006 Conflicts 2026-01-08 13:16:50 -06:00
Marlene-Angel
4d807babf7 Se agrega marca de agua GRH y se corrige interacción de perfil en la interfaz 2026-01-07 15:37:57 -08:00
dce0e33693 Vite config tunnel and Enpoint changes 2026-01-07 00:20:52 -06:00
Marlene-Angel
4ecdd0d656 Merge remote-tracking branch 'origin/DevEsteban' into DevMarlene 2025-12-30 16:50:12 -08:00
bbc86bb2d8 Dashboard logic 2025-12-22 15:40:29 -06:00