diff --git a/backend/endpoints/__pycache__/sensors.cpython-312.pyc b/backend/endpoints/__pycache__/sensors.cpython-312.pyc index 24a965d..f5f448c 100644 Binary files a/backend/endpoints/__pycache__/sensors.cpython-312.pyc and b/backend/endpoints/__pycache__/sensors.cpython-312.pyc differ diff --git a/backend/models/schemas/__pycache__/SensorModel.cpython-312.pyc b/backend/models/schemas/__pycache__/SensorModel.cpython-312.pyc index e0f1872..1a77f30 100644 Binary files a/backend/models/schemas/__pycache__/SensorModel.cpython-312.pyc and b/backend/models/schemas/__pycache__/SensorModel.cpython-312.pyc differ diff --git a/backend/models/sql/__pycache__/Sensor.cpython-312.pyc b/backend/models/sql/__pycache__/Sensor.cpython-312.pyc index e86d19a..d19f96a 100644 Binary files a/backend/models/sql/__pycache__/Sensor.cpython-312.pyc and b/backend/models/sql/__pycache__/Sensor.cpython-312.pyc differ diff --git a/frontend/public/config/settings.json b/frontend/public/config/settings.json index 86ae650..e2b432d 100644 --- a/frontend/public/config/settings.json +++ b/frontend/public/config/settings.json @@ -12,15 +12,6 @@ "sensor": "sensors/sensor" }, "historyChartConfig": { - "timeLabels": [ - "08:00", - "09:00", - "10:00", - "11:00", - "12:00", - "13:00", - "14:00" - ], "chartOptionsDark": { "responsive": true, "maintainAspectRatio": false, diff --git a/frontend/src/components/App.jsx b/frontend/src/components/App.jsx index 611e3e4..00297e0 100644 --- a/frontend/src/components/App.jsx +++ b/frontend/src/components/App.jsx @@ -45,13 +45,17 @@ const App = () => { setIsSideMenuOpen(!isSideMenuOpen); }; + const closeSideMenu = () => { + setIsSideMenuOpen(false); + } + return ( <> {/* Planeo añadir un React Router */} -
+
diff --git a/frontend/src/components/HistoryCharts.jsx b/frontend/src/components/HistoryCharts.jsx index 5e6935e..3087ba2 100644 --- a/frontend/src/components/HistoryCharts.jsx +++ b/frontend/src/components/HistoryCharts.jsx @@ -67,7 +67,15 @@ const HistoryChartsContent = () => { const optionsDark = config?.appConfig?.historyChartConfig?.chartOptionsDark ?? {}; const optionsLight = config?.appConfig?.historyChartConfig?.chartOptionsLight ?? {}; const options = theme === "dark" ? optionsDark : optionsLight; - const timeLabels = config?.appConfig?.historyChartConfig?.timeLabels ?? []; + + const currentHour = new Date().getHours(); + console.log("currentHour", currentHour); + + const timeLabels = [ + `${currentHour - 3}:00`, `${currentHour - 2}:00`, `${currentHour - 1}:00`, `${currentHour}:00`, `${currentHour + 1}:00`, `${currentHour + 2}:00`, `${currentHour + 3}:00` + ] + + //const timeLabels = config?.appConfig?.historyChartConfig?.timeLabels ?? []; if (loading) return

Cargando datos...

; diff --git a/frontend/src/css/MenuButton.css b/frontend/src/css/MenuButton.css index 5c7f2f5..a2ba7b7 100644 --- a/frontend/src/css/MenuButton.css +++ b/frontend/src/css/MenuButton.css @@ -1,7 +1,7 @@ .menuBtn { position: fixed; top: 20px; - right: 20px; + left: 20px; z-index: 1000; border: none; width: 50px; diff --git a/frontend/src/css/SideMenu.css b/frontend/src/css/SideMenu.css index 088f75b..c98c825 100644 --- a/frontend/src/css/SideMenu.css +++ b/frontend/src/css/SideMenu.css @@ -1,19 +1,19 @@ .side-menu { position: fixed; top: 0; - right: -350px; + left: -350px; width: 350px; height: 100%; background-color: #333; color: white; - transition: right 0.3s ease; + transition: left 0.3s ease; padding: 30px; box-shadow: 2px 0 5px rgba(0,0,0,0.5); z-index: 1000; } .side-menu.open { - right: 0; + left: 0; } .blur {