aboutsummaryrefslogtreecommitdiff
path: root/modern/src
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src')
-rw-r--r--modern/src/common/components/LinkField.js3
-rw-r--r--modern/src/common/components/SelectField.js3
-rw-r--r--modern/src/login/LoginPage.js2
-rw-r--r--modern/src/reports/ChartReportPage.js2
-rw-r--r--modern/src/reports/EventReportPage.js1
-rw-r--r--modern/src/reports/SummaryReportPage.js2
-rw-r--r--modern/src/reports/components/ColumnSelect.js1
-rw-r--r--modern/src/reports/components/ReportFilter.js4
-rw-r--r--modern/src/settings/ComputedAttributePage.js2
-rw-r--r--modern/src/settings/MaintenancePage.js1
-rw-r--r--modern/src/settings/PreferencesPage.js7
-rw-r--r--modern/src/settings/ServerPage.js4
-rw-r--r--modern/src/settings/UserPage.js4
-rw-r--r--modern/src/settings/components/AddAttributeDialog.js1
14 files changed, 29 insertions, 8 deletions
diff --git a/modern/src/common/components/LinkField.js b/modern/src/common/components/LinkField.js
index 308ee585..876fa66f 100644
--- a/modern/src/common/components/LinkField.js
+++ b/modern/src/common/components/LinkField.js
@@ -69,9 +69,10 @@ const LinkField = ({
if (items && linked) {
return (
- <FormControl margin={margin} variant={variant}>
+ <FormControl margin={margin} fullWidth>
<InputLabel>{label}</InputLabel>
<Select
+ label={label}
multiple
value={linked}
onChange={onChange}
diff --git a/modern/src/common/components/SelectField.js b/modern/src/common/components/SelectField.js
index 18b3afbb..649bde16 100644
--- a/modern/src/common/components/SelectField.js
+++ b/modern/src/common/components/SelectField.js
@@ -33,9 +33,10 @@ const SelectField = ({
if (items) {
return (
- <FormControl margin={margin} variant={variant}>
+ <FormControl margin={margin} fullWidth>
<InputLabel>{label}</InputLabel>
<Select
+ label={label}
multiple={multiple}
value={value}
onChange={onChange}
diff --git a/modern/src/login/LoginPage.js b/modern/src/login/LoginPage.js
index 8bef8b07..cc010427 100644
--- a/modern/src/login/LoginPage.js
+++ b/modern/src/login/LoginPage.js
@@ -153,7 +153,7 @@ const LoginPage = () => {
<Grid item xs>
<FormControl fullWidth>
<InputLabel>{t('loginLanguage')}</InputLabel>
- <Select value={language} onChange={(e) => setLanguage(e.target.value)}>
+ <Select label={t('loginLanguage')} value={language} onChange={(e) => setLanguage(e.target.value)}>
{languageList.map((it) => <MenuItem key={it.code} value={it.code}>{it.name}</MenuItem>)}
</Select>
</FormControl>
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 = () => {
<div className={filterClasses.item}>
<FormControl fullWidth>
<InputLabel>{t('reportChartType')}</InputLabel>
- <Select value={type} onChange={(e) => setType(e.target.value)}>
+ <Select label={t('reportChartType')} value={type} onChange={(e) => setType(e.target.value)}>
{Object.keys(positionAttributes).filter((key) => positionAttributes[key].type === 'number').map((key) => (
<MenuItem key={key} value={key}>{positionAttributes[key].name}</MenuItem>
))}
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 = () => {
<FormControl fullWidth>
<InputLabel>{t('reportEventTypes')}</InputLabel>
<Select
+ label={t('reportEventTypes')}
value={eventTypes}
onChange={(event, child) => {
let values = event.target.value;
diff --git a/modern/src/reports/SummaryReportPage.js b/modern/src/reports/SummaryReportPage.js
index 511a0e6e..bd27bf26 100644
--- a/modern/src/reports/SummaryReportPage.js
+++ b/modern/src/reports/SummaryReportPage.js
@@ -83,7 +83,7 @@ const SummaryReportPage = () => {
<div className={classes.item}>
<FormControl fullWidth>
<InputLabel>{t('sharedType')}</InputLabel>
- <Select value={daily} onChange={(e) => setDaily(e.target.value)}>
+ <Select label={t('sharedType')} value={daily} onChange={(e) => setDaily(e.target.value)}>
<MenuItem value={false}>{t('reportSummary')}</MenuItem>
<MenuItem value>{t('reportDaily')}</MenuItem>
</Select>
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 = ({
<FormControl fullWidth>
<InputLabel>{t('sharedColumns')}</InputLabel>
<Select
+ label={t('sharedColumns')}
value={columns}
onChange={(e) => setColumns(e.target.value)}
renderValue={(it) => it.length}
diff --git a/modern/src/reports/components/ReportFilter.js b/modern/src/reports/components/ReportFilter.js
index f4d2b1a0..42fcaa9a 100644
--- a/modern/src/reports/components/ReportFilter.js
+++ b/modern/src/reports/components/ReportFilter.js
@@ -92,7 +92,7 @@ const ReportFilter = ({
<div className={classes.item}>
<FormControl fullWidth>
<InputLabel>{t('reportDevice')}</InputLabel>
- <Select value={deviceId || ''} onChange={(e) => setDeviceId(e.target.value)}>
+ <Select label={t('reportDevice')} value={deviceId || ''} onChange={(e) => setDeviceId(e.target.value)}>
{Object.values(devices).map((device) => (
<MenuItem key={device.id} value={device.id}>{device.name}</MenuItem>
))}
@@ -103,7 +103,7 @@ const ReportFilter = ({
<div className={classes.item}>
<FormControl fullWidth>
<InputLabel>{t('reportPeriod')}</InputLabel>
- <Select value={period} onChange={(e) => setPeriod(e.target.value)}>
+ <Select label={t('reportPeriod')} value={period} onChange={(e) => setPeriod(e.target.value)}>
<MenuItem value="today">{t('reportToday')}</MenuItem>
<MenuItem value="yesterday">{t('reportYesterday')}</MenuItem>
<MenuItem value="thisWeek">{t('reportThisWeek')}</MenuItem>
diff --git a/modern/src/settings/ComputedAttributePage.js b/modern/src/settings/ComputedAttributePage.js
index 28b0f41e..ba5fe712 100644
--- a/modern/src/settings/ComputedAttributePage.js
+++ b/modern/src/settings/ComputedAttributePage.js
@@ -77,6 +77,7 @@ const ComputedAttributePage = () => {
<FormControl margin="normal" fullWidth>
<InputLabel>{t('sharedAttribute')}</InputLabel>
<Select
+ label={t('sharedAttribute')}
value={item.attribute || ''}
onChange={handleChange}
>
@@ -100,6 +101,7 @@ const ComputedAttributePage = () => {
>
<InputLabel>{t('sharedType')}</InputLabel>
<Select
+ label={t('sharedType')}
value={item.type || ''}
onChange={(event) => setItem({ ...item, type: event.target.value })}
>
diff --git a/modern/src/settings/MaintenancePage.js b/modern/src/settings/MaintenancePage.js
index 67448fb7..5694d77b 100644
--- a/modern/src/settings/MaintenancePage.js
+++ b/modern/src/settings/MaintenancePage.js
@@ -133,6 +133,7 @@ const MaintenancePage = () => {
<FormControl margin="normal" fullWidth>
<InputLabel>{t('sharedType')}</InputLabel>
<Select
+ label={t('sharedType')}
value={item.type || ''}
onChange={onMaintenanceTypeChange}
>
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 = () => {
<AccordionDetails className={classes.details}>
<FormControl fullWidth>
<InputLabel>{t('loginLanguage')}</InputLabel>
- <Select value={language} onChange={(e) => setLanguage(e.target.value)}>
+ <Select
+ label={t('loginLanguage')}
+ value={language}
+ onChange={(e) => setLanguage(e.target.value)}
+ >
{languageList.map((it) => <MenuItem key={it.code} value={it.code}>{it.name}</MenuItem>)}
</Select>
</FormControl>
@@ -71,6 +75,7 @@ const PreferencesPage = () => {
<FormControl fullWidth>
<InputLabel>{t('sharedAttributes')}</InputLabel>
<Select
+ label={t('sharedAttributes')}
value={positionItems}
onChange={(e) => setPositionItems(e.target.value)}
renderValue={(it) => it.length}
diff --git a/modern/src/settings/ServerPage.js b/modern/src/settings/ServerPage.js
index 8432e657..80353deb 100644
--- a/modern/src/settings/ServerPage.js
+++ b/modern/src/settings/ServerPage.js
@@ -114,6 +114,7 @@ const ServerPage = () => {
<FormControl margin="normal" fullWidth>
<InputLabel>{t('settingsCoordinateFormat')}</InputLabel>
<Select
+ label={t('settingsCoordinateFormat')}
value={item.coordinateFormat || 'dd'}
onChange={(event) => setItem({ ...item, coordinateFormat: event.target.value })}
>
@@ -125,6 +126,7 @@ const ServerPage = () => {
<FormControl margin="normal" fullWidth>
<InputLabel>{t('settingsSpeedUnit')}</InputLabel>
<Select
+ label={t('settingsSpeedUnit')}
value={item.attributes.speedUnit || 'kn'}
onChange={(e) => setItem({ ...item, attributes: { ...item.attributes, speedUnit: e.target.value } })}
>
@@ -136,6 +138,7 @@ const ServerPage = () => {
<FormControl margin="normal" fullWidth>
<InputLabel>{t('settingsDistanceUnit')}</InputLabel>
<Select
+ label={t('settingsDistanceUnit')}
value={item.attributes.distanceUnit || 'km'}
onChange={(e) => setItem({ ...item, attributes: { ...item.attributes, distanceUnit: e.target.value } })}
>
@@ -147,6 +150,7 @@ const ServerPage = () => {
<FormControl margin="normal" fullWidth>
<InputLabel>{t('settingsVolumeUnit')}</InputLabel>
<Select
+ label={t('settingsVolumeUnit')}
value={item.attributes.volumeUnit || 'ltr'}
onChange={(e) => setItem({ ...item, attributes: { ...item.attributes, volumeUnit: e.target.value } })}
>
diff --git a/modern/src/settings/UserPage.js b/modern/src/settings/UserPage.js
index 48769557..d9238c22 100644
--- a/modern/src/settings/UserPage.js
+++ b/modern/src/settings/UserPage.js
@@ -139,6 +139,7 @@ const UserPage = () => {
<FormControl margin="normal" fullWidth>
<InputLabel>{t('settingsCoordinateFormat')}</InputLabel>
<Select
+ label={t('settingsCoordinateFormat')}
value={item.coordinateFormat || 'dd'}
onChange={(event) => setItem({ ...item, coordinateFormat: event.target.value })}
>
@@ -150,6 +151,7 @@ const UserPage = () => {
<FormControl margin="normal" fullWidth>
<InputLabel>{t('settingsSpeedUnit')}</InputLabel>
<Select
+ label={t('settingsSpeedUnit')}
value={(item.attributes && item.attributes.speedUnit) || 'kn'}
onChange={(e) => setItem({ ...item, attributes: { ...item.attributes, speedUnit: e.target.value } })}
>
@@ -161,6 +163,7 @@ const UserPage = () => {
<FormControl margin="normal" fullWidth>
<InputLabel>{t('settingsDistanceUnit')}</InputLabel>
<Select
+ label={t('settingsDistanceUnit')}
value={(item.attributes && item.attributes.distanceUnit) || 'km'}
onChange={(e) => setItem({ ...item, attributes: { ...item.attributes, distanceUnit: e.target.value } })}
>
@@ -172,6 +175,7 @@ const UserPage = () => {
<FormControl margin="normal" fullWidth>
<InputLabel>{t('settingsVolumeUnit')}</InputLabel>
<Select
+ label={t('settingsVolumeUnit')}
value={(item.attributes && item.attributes.volumeUnit) || 'ltr'}
onChange={(e) => setItem({ ...item, attributes: { ...item.attributes, volumeUnit: e.target.value } })}
>
diff --git a/modern/src/settings/components/AddAttributeDialog.js b/modern/src/settings/components/AddAttributeDialog.js
index 150fc008..de5d22b7 100644
--- a/modern/src/settings/components/AddAttributeDialog.js
+++ b/modern/src/settings/components/AddAttributeDialog.js
@@ -58,6 +58,7 @@ const AddAttributeDialog = ({ open, onResult, definitions }) => {
>
<InputLabel>{t('sharedType')}</InputLabel>
<Select
+ label={t('sharedType')}
value={type}
onChange={(e) => setType(e.target.value)}
>