diff options
author | Anton Tananaev <anton@traccar.org> | 2022-05-27 07:20:07 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-05-27 07:20:07 -0700 |
commit | 8e0fa926ee03a025ad284b06280132f55be22e28 (patch) | |
tree | 9f68909944f2623beb6aed44602a8961346edff8 /modern/src/settings/NotificationsPage.js | |
parent | 32cb5f8d90df09fd45a54c96491bc3568f14690b (diff) | |
download | trackermap-web-8e0fa926ee03a025ad284b06280132f55be22e28.tar.gz trackermap-web-8e0fa926ee03a025ad284b06280132f55be22e28.tar.bz2 trackermap-web-8e0fa926ee03a025ad284b06280132f55be22e28.zip |
Improve page scrolling
Diffstat (limited to 'modern/src/settings/NotificationsPage.js')
-rw-r--r-- | modern/src/settings/NotificationsPage.js | 50 |
1 files changed, 24 insertions, 26 deletions
diff --git a/modern/src/settings/NotificationsPage.js b/modern/src/settings/NotificationsPage.js index 5f8c5512..bdc9857f 100644 --- a/modern/src/settings/NotificationsPage.js +++ b/modern/src/settings/NotificationsPage.js @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import { - TableContainer, Table, TableRow, TableCell, TableHead, TableBody, + Table, TableRow, TableCell, TableHead, TableBody, } from '@mui/material'; import makeStyles from '@mui/styles/makeStyles'; import { useEffectAsync } from '../reactHelper'; @@ -48,32 +48,30 @@ const NotificationsPage = () => { return ( <PageLayout menu={<SettingsMenu />} breadcrumbs={['settingsTitle', 'sharedNotifications']}> - <TableContainer> - <Table> - <TableHead> - <TableRow> - <TableCell>{t('notificationType')}</TableCell> - <TableCell>{t('notificationAlways')}</TableCell> - <TableCell>{t('sharedAlarms')}</TableCell> - <TableCell>{t('notificationNotificators')}</TableCell> - <TableCell className={classes.columnAction} /> + <Table> + <TableHead> + <TableRow> + <TableCell>{t('notificationType')}</TableCell> + <TableCell>{t('notificationAlways')}</TableCell> + <TableCell>{t('sharedAlarms')}</TableCell> + <TableCell>{t('notificationNotificators')}</TableCell> + <TableCell className={classes.columnAction} /> + </TableRow> + </TableHead> + <TableBody> + {items.map((item) => ( + <TableRow key={item.id}> + <TableCell>{t(prefixString('event', item.type))}</TableCell> + <TableCell>{formatBoolean(item.always, t)}</TableCell> + <TableCell>{formatList('alarm', item.attributes.alarms)}</TableCell> + <TableCell>{formatList('notificator', item.notificators)}</TableCell> + <TableCell className={classes.columnAction} padding="none"> + <CollectionActions itemId={item.id} editPath="/settings/notification" endpoint="notifications" setTimestamp={setTimestamp} /> + </TableCell> </TableRow> - </TableHead> - <TableBody> - {items.map((item) => ( - <TableRow key={item.id}> - <TableCell>{t(prefixString('event', item.type))}</TableCell> - <TableCell>{formatBoolean(item.always, t)}</TableCell> - <TableCell>{formatList('alarm', item.attributes.alarms)}</TableCell> - <TableCell>{formatList('notificator', item.notificators)}</TableCell> - <TableCell className={classes.columnAction} padding="none"> - <CollectionActions itemId={item.id} editPath="/settings/notification" endpoint="notifications" setTimestamp={setTimestamp} /> - </TableCell> - </TableRow> - ))} - </TableBody> - </Table> - </TableContainer> + ))} + </TableBody> + </Table> <CollectionFab editPath="/settings/notification" /> </PageLayout> ); |