diff --git a/typescript/frontend-marios2/src/App.tsx b/typescript/frontend-marios2/src/App.tsx index 29ee0324f..ba1934e1b 100644 --- a/typescript/frontend-marios2/src/App.tsx +++ b/typescript/frontend-marios2/src/App.tsx @@ -119,6 +119,10 @@ function App() { path={routes.forgotPassword} element={} > + } + > ); @@ -147,6 +151,10 @@ function App() { path={''} element={} > + } + > } /> - + } + > }> diff --git a/typescript/frontend-marios2/src/components/login.tsx b/typescript/frontend-marios2/src/components/login.tsx index dbcd203b3..c0148d42a 100644 --- a/typescript/frontend-marios2/src/components/login.tsx +++ b/typescript/frontend-marios2/src/components/login.tsx @@ -91,7 +91,7 @@ function Login() { }; return ( - <> +
@@ -263,7 +263,7 @@ function Login() { - +
); } diff --git a/typescript/frontend-marios2/src/content/dashboards/Overview/chartOptions.tsx b/typescript/frontend-marios2/src/content/dashboards/Overview/chartOptions.tsx index 037f835b8..006ce83af 100644 --- a/typescript/frontend-marios2/src/content/dashboards/Overview/chartOptions.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/Overview/chartOptions.tsx @@ -260,7 +260,7 @@ export const getChartOptions = ( : chartInfo.max <= 0 ? Math.ceil(chartInfo.min / findPower(chartInfo.min).value) * findPower(chartInfo.min).value - : Math.abs(chartInfo.min) < 1 + : Math.abs(chartInfo.min) < 1 || Math.abs(chartInfo.max) < 1 ? -Math.max( Math.abs( Math.ceil(chartInfo.min / findPower(chartInfo.min).value) * @@ -278,7 +278,7 @@ export const getChartOptions = ( ).toFixed(2) : chartInfo.max <= 0 ? 0 - : Math.abs(chartInfo.min) < 1 + : Math.abs(chartInfo.min) < 1 || Math.abs(chartInfo.max) < 1 ? +Math.max( Math.abs( Math.ceil(chartInfo.min / findPower(chartInfo.min).value) * diff --git a/typescript/frontend-marios2/src/content/dashboards/Overview/overview.tsx b/typescript/frontend-marios2/src/content/dashboards/Overview/overview.tsx index 39a5af4d5..723924cda 100644 --- a/typescript/frontend-marios2/src/content/dashboards/Overview/overview.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/Overview/overview.tsx @@ -444,20 +444,20 @@ function Overview(props: OverviewProps) { > - {/**/} - {/* */} - {/**/} + {dailyData && ( <> - - - - - - Search - - - } - startAdornment={ - - - - } - /> - - OR - - - diff --git a/typescript/frontend-marios2/src/interfaces/Chart.tsx b/typescript/frontend-marios2/src/interfaces/Chart.tsx index cc4b4a63a..1c209eb69 100644 --- a/typescript/frontend-marios2/src/interfaces/Chart.tsx +++ b/typescript/frontend-marios2/src/interfaces/Chart.tsx @@ -110,7 +110,7 @@ export const transformInputToDailyData = async ( while (startUnixTime < endTimestamp) { timestampPromises.push(fetchData(startUnixTime, s3Credentials)); - startUnixTime = UnixTime.fromTicks(startUnixTime.ticks + diff / 200); + startUnixTime = UnixTime.fromTicks(startUnixTime.ticks + diff / 100); if (startUnixTime.ticks % 2 !== 0) { startUnixTime = UnixTime.fromTicks(startUnixTime.ticks + 1); } @@ -436,12 +436,8 @@ export const transformInputToAggregatedData = async ( overviewData['/GridExportPower'].magnitude ), unit: '(kWh)', - min: - overviewData['/GridImportPower'].min + - overviewData['/GridExportPower'].min, - max: - overviewData['/GridImportPower'].max + - overviewData['/GridExportPower'].max + min: overviewData['/GridExportPower'].min, + max: overviewData['/GridImportPower'].max }; chartOverview.overview = { diff --git a/typescript/frontend-marios2/src/layouts/SidebarLayout/Header/Menu/index.tsx b/typescript/frontend-marios2/src/layouts/SidebarLayout/Header/Menu/index.tsx index 65c3784cd..743301461 100644 --- a/typescript/frontend-marios2/src/layouts/SidebarLayout/Header/Menu/index.tsx +++ b/typescript/frontend-marios2/src/layouts/SidebarLayout/Header/Menu/index.tsx @@ -11,6 +11,7 @@ import { styled } from '@mui/material/styles'; import ExpandMoreTwoToneIcon from '@mui/icons-material/ExpandMoreTwoTone'; import { ThemeContext } from '../../../../theme/ThemeProvider'; import { FormattedMessage } from 'react-intl'; +import '../../../../App.css'; interface HeaderButtonsProps { language: string; @@ -106,7 +107,7 @@ function HeaderMenu(props: HeaderButtonsProps) { const isMobile = window.innerWidth <= 1280; return ( - <> +
- - handleLanguageSelect('en')}> - English - - handleLanguageSelect('de')}> - German - - handleLanguageSelect('fr')}> - French - - - +
+ + handleLanguageSelect('en')}> + English + + handleLanguageSelect('de')}> + German + + handleLanguageSelect('fr')}> + French + + +
+
); } diff --git a/typescript/frontend-marios2/src/layouts/SidebarLayout/Header/Userbox/index.tsx b/typescript/frontend-marios2/src/layouts/SidebarLayout/Header/Userbox/index.tsx index 04eb7cd32..cdfe96b9d 100644 --- a/typescript/frontend-marios2/src/layouts/SidebarLayout/Header/Userbox/index.tsx +++ b/typescript/frontend-marios2/src/layouts/SidebarLayout/Header/Userbox/index.tsx @@ -19,6 +19,7 @@ import { TokenContext } from 'src/contexts/tokenContext'; import { useNavigate } from 'react-router-dom'; import routes from 'src/Resources/routes.json'; import { WebSocketContext } from '../../../../contexts/WebSocketContextProvider'; +import '../../../../App.css'; const UserBoxButton = styled(Button)( ({ theme }) => ` @@ -86,8 +87,13 @@ function HeaderUserbox() { }; return ( - <> - +
+ {currentUser?.name} @@ -113,14 +119,16 @@ function HeaderUserbox() { horizontal: 'right' }} > - - - {currentUser?.name} - - {currentUser?.email} - - - +
+ + + {currentUser?.name} + + {currentUser?.email} + + + +
@@ -130,7 +138,7 @@ function HeaderUserbox() { - +
); } diff --git a/typescript/frontend-marios2/src/layouts/SidebarLayout/index.tsx b/typescript/frontend-marios2/src/layouts/SidebarLayout/index.tsx index 4c9f3e7cf..bbcd07914 100644 --- a/typescript/frontend-marios2/src/layouts/SidebarLayout/index.tsx +++ b/typescript/frontend-marios2/src/layouts/SidebarLayout/index.tsx @@ -43,10 +43,12 @@ const SidebarLayout = (props: SidebarLayoutProps) => { } }} > -
+
+
+