diff options
author | Anton Tananaev <anton@traccar.org> | 2022-05-23 09:00:08 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-05-23 09:00:08 -0700 |
commit | 7db8b3f293b8fcbab86a13b2af4e9fee5fd937e1 (patch) | |
tree | 893861c605696516c1c4c3d06179ace6376f2765 /modern/src/reports | |
parent | b98137ab304e8068484926eb31b77bd727a6407d (diff) | |
download | trackermap-web-7db8b3f293b8fcbab86a13b2af4e9fee5fd937e1.tar.gz trackermap-web-7db8b3f293b8fcbab86a13b2af4e9fee5fd937e1.tar.bz2 trackermap-web-7db8b3f293b8fcbab86a13b2af4e9fee5fd937e1.zip |
Fix select field labels
Diffstat (limited to 'modern/src/reports')
-rw-r--r-- | modern/src/reports/ChartReportPage.js | 2 | ||||
-rw-r--r-- | modern/src/reports/EventReportPage.js | 1 | ||||
-rw-r--r-- | modern/src/reports/SummaryReportPage.js | 2 | ||||
-rw-r--r-- | modern/src/reports/components/ColumnSelect.js | 1 | ||||
-rw-r--r-- | modern/src/reports/components/ReportFilter.js | 4 |
5 files changed, 6 insertions, 4 deletions
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> |