diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-27 19:49:47 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-27 19:49:47 -0700 |
commit | 9bfda9e131ddda3076b4094a94795db41072a39c (patch) | |
tree | d6b4e12f2d62431cc0d320b5396e578944af78f4 /modern/src/UserPage.js | |
parent | bbc54a464a8a3cf41904c5335fb1845ff8af1887 (diff) | |
download | trackermap-web-9bfda9e131ddda3076b4094a94795db41072a39c.tar.gz trackermap-web-9bfda9e131ddda3076b4094a94795db41072a39c.tar.bz2 trackermap-web-9bfda9e131ddda3076b4094a94795db41072a39c.zip |
Implement attributes editing
Diffstat (limited to 'modern/src/UserPage.js')
-rw-r--r-- | modern/src/UserPage.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modern/src/UserPage.js b/modern/src/UserPage.js index 8bef99c2..81e33893 100644 --- a/modern/src/UserPage.js +++ b/modern/src/UserPage.js @@ -2,9 +2,11 @@ import React, { useState } from 'react'; import TextField from '@material-ui/core/TextField'; import t from './common/localization'; +import userAttributes from './attributes/userAttributes'; import EditItemView from './EditItemView'; import { Accordion, AccordionSummary, AccordionDetails, makeStyles, Typography } from '@material-ui/core'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; +import EditAttributesView from './attributes/EditAttributesView'; const useStyles = makeStyles(() => ({ details: { @@ -48,6 +50,20 @@ const UserPage = () => { variant="filled" /> </AccordionDetails> </Accordion> + <Accordion> + <AccordionSummary expandIcon={<ExpandMoreIcon />}> + <Typography variant="subtitle1"> + {t('sharedAttributes')} + </Typography> + </AccordionSummary> + <AccordionDetails className={classes.details}> + <EditAttributesView + attributes={item.attributes} + setAttributes={attributes => setItem({...item, attributes})} + definitions={userAttributes} + /> + </AccordionDetails> + </Accordion> </> } </EditItemView> |