From 85461684eb402d4df62c8b59e0a0f627bd3487c1 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 23 May 2022 07:19:30 -0700 Subject: Initial migration to MUI 5 --- modern/src/reports/EventReportPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modern/src/reports/EventReportPage.js') diff --git a/modern/src/reports/EventReportPage.js b/modern/src/reports/EventReportPage.js index 8a3a070f..2c6aaea5 100644 --- a/modern/src/reports/EventReportPage.js +++ b/modern/src/reports/EventReportPage.js @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { FormControl, InputLabel, Select, MenuItem, TableContainer, Table, TableHead, TableRow, TableCell, TableBody, -} from '@material-ui/core'; +} from '@mui/material'; import { useSelector } from 'react-redux'; import { formatDate } from '../common/util/formatter'; import ReportFilter, { useFilterStyles } from './components/ReportFilter'; -- cgit v1.2.3 From e7e8d1c9a52b9b82fdcbf2d4d6f3134698eb0cf0 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 23 May 2022 07:30:04 -0700 Subject: Convert to outline inputs --- modern/src/common/components/ErrorHandler.js | 2 +- modern/src/common/theme/index.js | 2 +- modern/src/login/LoginPage.js | 6 +-- modern/src/login/RegisterPage.js | 6 +-- modern/src/login/ResetPasswordPage.js | 4 +- modern/src/main/MainPage.js | 2 +- modern/src/reports/ChartReportPage.js | 2 +- modern/src/reports/EventReportPage.js | 2 +- modern/src/reports/SummaryReportPage.js | 2 +- modern/src/reports/components/ColumnSelect.js | 2 +- modern/src/reports/components/ReportFilter.js | 8 +-- modern/src/settings/AccumulatorsPage.js | 4 +- modern/src/settings/CalendarPage.js | 2 +- modern/src/settings/CommandPage.js | 2 +- modern/src/settings/CommandSendPage.js | 2 +- modern/src/settings/ComputedAttributePage.js | 8 +-- modern/src/settings/DevicePage.js | 26 +++++----- modern/src/settings/DriverPage.js | 4 +- modern/src/settings/GeofencePage.js | 2 +- modern/src/settings/GroupPage.js | 16 +++--- modern/src/settings/MaintenancePage.js | 8 +-- modern/src/settings/NotificationPage.js | 6 +-- modern/src/settings/PreferencesPage.js | 4 +- modern/src/settings/ServerPage.js | 22 ++++---- modern/src/settings/UserPage.js | 58 +++++++++++----------- .../src/settings/components/AddAttributeDialog.js | 4 +- modern/src/settings/components/BaseCommandView.js | 4 +- .../src/settings/components/EditAttributesView.js | 6 +-- 28 files changed, 108 insertions(+), 108 deletions(-) (limited to 'modern/src/reports/EventReportPage.js') diff --git a/modern/src/common/components/ErrorHandler.js b/modern/src/common/components/ErrorHandler.js index 08ba8e12..d6735885 100644 --- a/modern/src/common/components/ErrorHandler.js +++ b/modern/src/common/components/ErrorHandler.js @@ -14,7 +14,7 @@ const ErrorHandler = () => { dispatch(errorsActions.pop())} severity="error" > diff --git a/modern/src/common/theme/index.js b/modern/src/common/theme/index.js index 8e85150e..de0a7efd 100644 --- a/modern/src/common/theme/index.js +++ b/modern/src/common/theme/index.js @@ -5,7 +5,7 @@ import dimensions from './dimensions'; const theme = createTheme(adaptV4Theme({ palette, - overrides, + //overrides, dimensions, })); diff --git a/modern/src/login/LoginPage.js b/modern/src/login/LoginPage.js index 4478c866..e7a110de 100644 --- a/modern/src/login/LoginPage.js +++ b/modern/src/login/LoginPage.js @@ -118,7 +118,7 @@ const LoginPage = () => { onChange={(e) => setEmail(e.target.value)} onKeyUp={handleSpecialKey} helperText={failed && 'Invalid username or password'} - variant="filled" + /> @@ -134,7 +134,7 @@ const LoginPage = () => { autoFocus={!!email} onChange={(e) => setPassword(e.target.value)} onKeyUp={handleSpecialKey} - variant="filled" + /> @@ -156,7 +156,7 @@ const LoginPage = () => { - + {t('loginLanguage')} setType(e.target.value)}> {Object.keys(positionAttributes).filter((key) => positionAttributes[key].type === 'number').map((key) => ( diff --git a/modern/src/reports/EventReportPage.js b/modern/src/reports/EventReportPage.js index 2c6aaea5..352a4e13 100644 --- a/modern/src/reports/EventReportPage.js +++ b/modern/src/reports/EventReportPage.js @@ -99,7 +99,7 @@ const EventReportPage = () => { } breadcrumbs={['reportTitle', 'reportEvents']}>
- + {t('reportEventTypes')} setDaily(e.target.value)}> {t('reportSummary')} diff --git a/modern/src/reports/components/ColumnSelect.js b/modern/src/reports/components/ColumnSelect.js index 04645cd5..543aa7bf 100644 --- a/modern/src/reports/components/ColumnSelect.js +++ b/modern/src/reports/components/ColumnSelect.js @@ -13,7 +13,7 @@ const ColumnSelect = ({ return (
- + {t('sharedColumns')} setDeviceId(e.target.value)}> {Object.values(devices).map((device) => ( @@ -101,7 +101,7 @@ const ReportFilter = ({
)}
- + {t('reportPeriod')} { label={t('sharedExpression')} multiline rows={4} - variant="filled" + /> { value={item.name || ''} onChange={(event) => setItem({ ...item, name: event.target.value })} label={t('sharedName')} - variant="filled" + /> setItem({ ...item, uniqueId: event.target.value })} label={t('deviceIdentifier')} - variant="filled" + /> @@ -89,28 +89,28 @@ const DevicePage = () => { onChange={(event) => setItem({ ...item, groupId: Number(event.target.value) })} endpoint="/api/groups" label={t('groupParent')} - variant="filled" + /> setItem({ ...item, phone: event.target.value })} label={t('sharedPhone')} - variant="filled" + /> setItem({ ...item, model: event.target.value })} label={t('deviceModel')} - variant="filled" + /> setItem({ ...item, contact: event.target.value })} label={t('deviceContact')} - variant="filled" + /> { name: t(`category${category.replace(/^\w/, (c) => c.toUpperCase())}`), }))} label={t('deviceCategory')} - variant="filled" + /> {admin && ( { keyBase="deviceId" keyLink="geofenceId" label={t('sharedGeofences')} - variant="filled" + /> { keyLink="notificationId" titleGetter={(it) => t(prefixString('event', it.type))} label={t('sharedNotifications')} - variant="filled" + /> { keyBase="deviceId" keyLink="driverId" label={t('sharedDrivers')} - variant="filled" + /> { keyLink="attributeId" titleGetter={(it) => it.description} label={t('sharedComputedAttributes')} - variant="filled" + /> { keyLink="commandId" titleGetter={(it) => it.description} label={t('sharedSavedCommands')} - variant="filled" + /> { keyBase="deviceId" keyLink="maintenanceId" label={t('sharedMaintenance')} - variant="filled" + /> diff --git a/modern/src/settings/DriverPage.js b/modern/src/settings/DriverPage.js index f03682e3..c072c52b 100644 --- a/modern/src/settings/DriverPage.js +++ b/modern/src/settings/DriverPage.js @@ -47,14 +47,14 @@ const DriverPage = () => { value={item.name || ''} onChange={(event) => setItem({ ...item, name: event.target.value })} label={t('sharedName')} - variant="filled" + /> setItem({ ...item, uniqueId: event.target.value })} label={t('deviceIdentifier')} - variant="filled" + /> diff --git a/modern/src/settings/GeofencePage.js b/modern/src/settings/GeofencePage.js index 3b8ac2ed..7dd47527 100644 --- a/modern/src/settings/GeofencePage.js +++ b/modern/src/settings/GeofencePage.js @@ -51,7 +51,7 @@ const GeofencePage = () => { value={item.name || ''} onChange={(event) => setItem({ ...item, name: event.target.value })} label={t('sharedName')} - variant="filled" + /> diff --git a/modern/src/settings/GroupPage.js b/modern/src/settings/GroupPage.js index d4991c59..5cb0474d 100644 --- a/modern/src/settings/GroupPage.js +++ b/modern/src/settings/GroupPage.js @@ -56,7 +56,7 @@ const GroupPage = () => { value={item.name || ''} onChange={(event) => setItem({ ...item, name: event.target.value })} label={t('sharedName')} - variant="filled" + /> @@ -73,7 +73,7 @@ const GroupPage = () => { onChange={(event) => setItem({ ...item, groupId: Number(event.target.value) })} endpoint="/api/groups" label={t('groupParent')} - variant="filled" + /> @@ -107,7 +107,7 @@ const GroupPage = () => { keyBase="groupId" keyLink="geofenceId" label={t('sharedGeofences')} - variant="filled" + /> { keyLink="notificationId" titleGetter={(it) => t(prefixString('event', it.type))} label={t('sharedNotifications')} - variant="filled" + /> { keyBase="groupId" keyLink="driverId" label={t('sharedDrivers')} - variant="filled" + /> { keyLink="attributeId" titleGetter={(it) => it.description} label={t('sharedComputedAttributes')} - variant="filled" + /> { keyLink="commandId" titleGetter={(it) => it.description} label={t('sharedSavedCommands')} - variant="filled" + /> { keyBase="groupId" keyLink="maintenanceId" label={t('sharedMaintenance')} - variant="filled" + /> diff --git a/modern/src/settings/MaintenancePage.js b/modern/src/settings/MaintenancePage.js index 292e197e..599d600d 100644 --- a/modern/src/settings/MaintenancePage.js +++ b/modern/src/settings/MaintenancePage.js @@ -129,9 +129,9 @@ const MaintenancePage = () => { value={item.name || ''} onChange={(event) => setItem({ ...item, name: event.target.value })} label={t('sharedName')} - variant="filled" + /> - + {t('sharedType')} setLanguage(e.target.value)}> {languageList.map((it) => {it.name})} @@ -68,7 +68,7 @@ const PreferencesPage = () => { - + {t('sharedAttributes')} { {t('sharedDegreesMinutesSeconds')} - + {t('settingsSpeedUnit')} - + {t('settingsDistanceUnit')} - + {t('settingsVolumeUnit')} { {t('sharedDegreesMinutesSeconds')} - + {t('settingsSpeedUnit')} - + {t('settingsDistanceUnit')} - + {t('settingsVolumeUnit')} + {label} setLanguage(e.target.value)}> + diff --git a/modern/src/reports/ChartReportPage.js b/modern/src/reports/ChartReportPage.js index 461a6756..becdfb57 100644 --- a/modern/src/reports/ChartReportPage.js +++ b/modern/src/reports/ChartReportPage.js @@ -61,7 +61,7 @@ const ChartReportPage = () => {
{t('reportChartType')} - setType(e.target.value)}> {Object.keys(positionAttributes).filter((key) => positionAttributes[key].type === 'number').map((key) => ( {positionAttributes[key].name} ))} diff --git a/modern/src/reports/EventReportPage.js b/modern/src/reports/EventReportPage.js index 352a4e13..6a1fe309 100644 --- a/modern/src/reports/EventReportPage.js +++ b/modern/src/reports/EventReportPage.js @@ -102,6 +102,7 @@ const EventReportPage = () => { {t('reportEventTypes')} setDaily(e.target.value)}> + diff --git a/modern/src/reports/components/ColumnSelect.js b/modern/src/reports/components/ColumnSelect.js index 543aa7bf..8a79108e 100644 --- a/modern/src/reports/components/ColumnSelect.js +++ b/modern/src/reports/components/ColumnSelect.js @@ -16,6 +16,7 @@ const ColumnSelect = ({ {t('sharedColumns')} setDeviceId(e.target.value)}> + setPeriod(e.target.value)}> + @@ -100,6 +101,7 @@ const ComputedAttributePage = () => { > {t('sharedType')} diff --git a/modern/src/settings/PreferencesPage.js b/modern/src/settings/PreferencesPage.js index 7c0d4aee..93ded1f0 100644 --- a/modern/src/settings/PreferencesPage.js +++ b/modern/src/settings/PreferencesPage.js @@ -55,7 +55,11 @@ const PreferencesPage = () => { {t('loginLanguage')} - setLanguage(e.target.value)} + > {languageList.map((it) => {it.name})} @@ -71,6 +75,7 @@ const PreferencesPage = () => { {t('sharedAttributes')} setItem({ ...item, coordinateFormat: event.target.value })} > @@ -125,6 +126,7 @@ const ServerPage = () => { {t('settingsSpeedUnit')} setItem({ ...item, attributes: { ...item.attributes, distanceUnit: e.target.value } })} > @@ -147,6 +150,7 @@ const ServerPage = () => { {t('settingsVolumeUnit')} setItem({ ...item, coordinateFormat: event.target.value })} > @@ -150,6 +151,7 @@ const UserPage = () => { {t('settingsSpeedUnit')} setItem({ ...item, attributes: { ...item.attributes, distanceUnit: e.target.value } })} > @@ -172,6 +175,7 @@ const UserPage = () => { {t('settingsVolumeUnit')} setType(e.target.value)} > -- cgit v1.2.3