diff options
author | Ashutosh Bishnoi <mail2bishnoi@gmail.com> | 2021-01-08 16:52:26 +0530 |
---|---|---|
committer | Ashutosh Bishnoi <mail2bishnoi@gmail.com> | 2021-01-08 16:52:26 +0530 |
commit | f48e7801d86ca3d8b831358013823dd62d33c7ee (patch) | |
tree | 5f9a8ffedc10160ce3aecc7f4f1cb50074a4497f | |
parent | e3ead466abdb03c5f1eb5d3979ad286d38ac95cb (diff) | |
download | trackermap-web-f48e7801d86ca3d8b831358013823dd62d33c7ee.tar.gz trackermap-web-f48e7801d86ca3d8b831358013823dd62d33c7ee.tar.bz2 trackermap-web-f48e7801d86ca3d8b831358013823dd62d33c7ee.zip |
Computed attributes code improvements
-rw-r--r-- | modern/src/EditCollectionView.js | 8 | ||||
-rw-r--r-- | modern/src/settings/ComputedAttributesPage.js | 14 |
2 files changed, 9 insertions, 13 deletions
diff --git a/modern/src/EditCollectionView.js b/modern/src/EditCollectionView.js index f15d72cf..d3d0af17 100644 --- a/modern/src/EditCollectionView.js +++ b/modern/src/EditCollectionView.js @@ -63,11 +63,9 @@ const EditCollectionView = ({ content, editPath, endpoint }) => { <> <Content updateTimestamp={updateTimestamp} onMenuClick={menuShow} /> {adminEnabled && - ( - <Fab size="medium" color="primary" className={classes.fab} onClick={handleAdd}> - <AddIcon /> - </Fab> - ) + <Fab size="medium" color="primary" className={classes.fab} onClick={handleAdd}> + <AddIcon /> + </Fab> } <Menu open={!!selectedAnchorEl} anchorEl={selectedAnchorEl} onClose={menuHide}> <MenuItem onClick={handleEdit}>{t('sharedEdit')}</MenuItem> diff --git a/modern/src/settings/ComputedAttributesPage.js b/modern/src/settings/ComputedAttributesPage.js index dde6b237..1a6feab5 100644 --- a/modern/src/settings/ComputedAttributesPage.js +++ b/modern/src/settings/ComputedAttributesPage.js @@ -32,7 +32,7 @@ const ComputedAttributeView = ({ updateTimestamp, onMenuClick }) => { <Table> <TableHead> <TableRow> - {adminEnabled && (<TableCell className={classes.columnAction} />)} + {adminEnabled && <TableCell className={classes.columnAction} />} <TableCell>{t('sharedDescription')}</TableCell> <TableCell>{t('sharedAttribute')}</TableCell> <TableCell>{t('sharedExpression')}</TableCell> @@ -43,13 +43,11 @@ const ComputedAttributeView = ({ updateTimestamp, onMenuClick }) => { {items.map((item) => ( <TableRow key={item.id}> {adminEnabled && - ( - <TableCell className={classes.columnAction} padding="none"> - <IconButton onClick={(event) => onMenuClick(event.currentTarget, item.id)}> - <MoreVertIcon /> - </IconButton> - </TableCell> - ) + <TableCell className={classes.columnAction} padding="none"> + <IconButton onClick={(event) => onMenuClick(event.currentTarget, item.id)}> + <MoreVertIcon /> + </IconButton> + </TableCell> } <TableCell>{item.description}</TableCell> <TableCell>{item.attribute}</TableCell> |