aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings
diff options
context:
space:
mode:
authorDesmond Kyeremeh <elDekyfin@gmail.com>2021-07-11 23:39:30 +0000
committerDesmond Kyeremeh <elDekyfin@gmail.com>2021-07-11 23:39:30 +0000
commit004367fc1fd389b169821eb2d73266490f409999 (patch)
tree1b7e6f13c03326a957bdb78351853f429156b3ae /modern/src/settings
parent1b93de84e2bf6a6532bdb03e1ae75e47061a4dca (diff)
parent702e674ecce7de1a4f4318ef8f30c572264a4560 (diff)
downloadetbsa-traccar-web-004367fc1fd389b169821eb2d73266490f409999.tar.gz
etbsa-traccar-web-004367fc1fd389b169821eb2d73266490f409999.tar.bz2
etbsa-traccar-web-004367fc1fd389b169821eb2d73266490f409999.zip
Merge remote-tracking branch 'upstream/master' into group-config
Diffstat (limited to 'modern/src/settings')
-rw-r--r--modern/src/settings/ComputedAttributesPage.js10
-rw-r--r--modern/src/settings/DriversPage.js10
-rw-r--r--modern/src/settings/GroupsPage.js10
-rw-r--r--modern/src/settings/MaintenancePage.js4
-rw-r--r--modern/src/settings/MaintenancesPage.js10
-rw-r--r--modern/src/settings/NotificationsPage.js18
6 files changed, 16 insertions, 46 deletions
diff --git a/modern/src/settings/ComputedAttributesPage.js b/modern/src/settings/ComputedAttributesPage.js
index fcf49d3..d376f23 100644
--- a/modern/src/settings/ComputedAttributesPage.js
+++ b/modern/src/settings/ComputedAttributesPage.js
@@ -46,7 +46,8 @@ const ComputedAttributeView = ({ updateTimestamp, onMenuClick }) => {
<TableBody>
{items.map((item) => (
<TableRow key={item.id}>
- {adminEnabled && (
+ {adminEnabled
+ && (
<TableCell className={classes.columnAction} padding="none">
<IconButton
onClick={(event) => onMenuClick(event.currentTarget, item.id)}
@@ -69,11 +70,8 @@ const ComputedAttributeView = ({ updateTimestamp, onMenuClick }) => {
const ComputedAttributesPage = () => (
<OptionsLayout>
- <EditCollectionView
- content={ComputedAttributeView}
- editPath="/settings/attribute"
- endpoint="attributes/computed"
- />
+
+ <EditCollectionView content={ComputedAttributeView} editPath="/settings/attribute" endpoint="attributes/computed" />
</OptionsLayout>
);
diff --git a/modern/src/settings/DriversPage.js b/modern/src/settings/DriversPage.js
index 57f69b6..03bf49c 100644
--- a/modern/src/settings/DriversPage.js
+++ b/modern/src/settings/DriversPage.js
@@ -41,9 +41,7 @@ const DriversView = ({ updateTimestamp, onMenuClick }) => {
{items.map((item) => (
<TableRow key={item.id}>
<TableCell className={classes.columnAction} padding="none">
- <IconButton
- onClick={(event) => onMenuClick(event.currentTarget, item.id)}
- >
+ <IconButton onClick={(event) => onMenuClick(event.currentTarget, item.id)}>
<MoreVertIcon />
</IconButton>
</TableCell>
@@ -59,11 +57,7 @@ const DriversView = ({ updateTimestamp, onMenuClick }) => {
const DriversPage = () => (
<OptionsLayout>
- <EditCollectionView
- content={DriversView}
- editPath="/settings/driver"
- endpoint="drivers"
- />
+ <EditCollectionView content={DriversView} editPath="/settings/driver" endpoint="drivers" />
</OptionsLayout>
);
diff --git a/modern/src/settings/GroupsPage.js b/modern/src/settings/GroupsPage.js
index 3b1058e..ebebd40 100644
--- a/modern/src/settings/GroupsPage.js
+++ b/modern/src/settings/GroupsPage.js
@@ -40,9 +40,7 @@ const GroupsView = ({ updateTimestamp, onMenuClick }) => {
{items.map((item) => (
<TableRow key={item.id}>
<TableCell className={classes.columnAction} padding="none">
- <IconButton
- onClick={(event) => onMenuClick(event.currentTarget, item.id)}
- >
+ <IconButton onClick={(event) => onMenuClick(event.currentTarget, item.id)}>
<MoreVertIcon />
</IconButton>
</TableCell>
@@ -57,11 +55,7 @@ const GroupsView = ({ updateTimestamp, onMenuClick }) => {
const GroupsPage = () => (
<OptionsLayout>
- <EditCollectionView
- content={GroupsView}
- editPath="/settings/group"
- endpoint="groups"
- />
+ <EditCollectionView content={GroupsView} editPath="/settings/group" endpoint="groups" />
</OptionsLayout>
);
diff --git a/modern/src/settings/MaintenancePage.js b/modern/src/settings/MaintenancePage.js
index 9d60937..89ebaa1 100644
--- a/modern/src/settings/MaintenancePage.js
+++ b/modern/src/settings/MaintenancePage.js
@@ -30,12 +30,12 @@ const MaintenancePage = () => {
const convertToList = (attributes) => {
const otherList = [];
- for (const key in attributes) {
+ Object.keys(attributes).forEach((key) => {
const value = attributes[key];
if (value.type === 'number') {
otherList.push({ key, name: value.name, type: value.type });
}
- }
+ });
return otherList;
};
diff --git a/modern/src/settings/MaintenancesPage.js b/modern/src/settings/MaintenancesPage.js
index b8e74d2..357d079 100644
--- a/modern/src/settings/MaintenancesPage.js
+++ b/modern/src/settings/MaintenancesPage.js
@@ -65,9 +65,7 @@ const MaintenancesView = ({ updateTimestamp, onMenuClick }) => {
{items.map((item) => (
<TableRow key={item.id}>
<TableCell className={classes.columnAction} padding="none">
- <IconButton
- onClick={(event) => onMenuClick(event.currentTarget, item.id)}
- >
+ <IconButton onClick={(event) => onMenuClick(event.currentTarget, item.id)}>
<MoreVertIcon />
</IconButton>
</TableCell>
@@ -85,11 +83,7 @@ const MaintenancesView = ({ updateTimestamp, onMenuClick }) => {
const MaintenacesPage = () => (
<OptionsLayout>
- <EditCollectionView
- content={MaintenancesView}
- editPath="/settings/maintenance"
- endpoint="maintenance"
- />
+ <EditCollectionView content={MaintenancesView} editPath="/settings/maintenance" endpoint="maintenance" />
</OptionsLayout>
);
diff --git a/modern/src/settings/NotificationsPage.js b/modern/src/settings/NotificationsPage.js
index 079f88d..2f1ee8b 100644
--- a/modern/src/settings/NotificationsPage.js
+++ b/modern/src/settings/NotificationsPage.js
@@ -56,20 +56,14 @@ const NotificationsView = ({ updateTimestamp, onMenuClick }) => {
{items.map((item) => (
<TableRow key={item.id}>
<TableCell className={classes.columnAction} padding="none">
- <IconButton
- onClick={(event) => onMenuClick(event.currentTarget, item.id)}
- >
+ <IconButton onClick={(event) => onMenuClick(event.currentTarget, item.id)}>
<MoreVertIcon />
</IconButton>
</TableCell>
<TableCell>{t(prefixString('event', item.type))}</TableCell>
<TableCell>{formatBoolean(item.always)}</TableCell>
- <TableCell>
- {formatList('alarm', item.attributes.alarms)}
- </TableCell>
- <TableCell>
- {formatList('notificator', item.notificators)}
- </TableCell>
+ <TableCell>{formatList('alarm', item.attributes.alarms)}</TableCell>
+ <TableCell>{formatList('notificator', item.notificators)}</TableCell>
</TableRow>
))}
</TableBody>
@@ -80,11 +74,7 @@ const NotificationsView = ({ updateTimestamp, onMenuClick }) => {
const NotificationsPage = () => (
<OptionsLayout>
- <EditCollectionView
- content={NotificationsView}
- editPath="/settings/notification"
- endpoint="notifications"
- />
+ <EditCollectionView content={NotificationsView} editPath="/settings/notification" endpoint="notifications" />
</OptionsLayout>
);