aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings
diff options
context:
space:
mode:
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 fcf49d3a..d376f23f 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 57f69b6e..03bf49c5 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 3b1058e3..ebebd40a 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 9d60937d..89ebaa12 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 b8e74d28..357d0791 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 079f88d2..2f1ee8b7 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>
);