display available profiles in back project

This commit is contained in:
Barry Gitarts 2019-03-08 16:56:19 -05:00 committed by Barry G
parent 3679ebe555
commit 6a1eb882dd
1 changed files with 14 additions and 6 deletions

View File

@ -17,8 +17,10 @@ const styles = theme => ({
gridTemplateRows: 'repeat(5, [row] auto)', gridTemplateRows: 'repeat(5, [row] auto)',
gridColumnGap: '1em', gridColumnGap: '1em',
gridRowGap: '36px', gridRowGap: '36px',
margin: '1.75rem 4.5rem', fontFamily: theme.typography.fontFamily,
fontFamily: theme.typography.fontFamily [theme.breakpoints.up('sm')]: {
margin: '1.75rem 4.5rem'
}
}, },
title: { title: {
display: 'grid', display: 'grid',
@ -46,7 +48,7 @@ const Title = ({ className, manifest }) => (
</div> </div>
) )
const SubmissionSection = ({ classes }) => ( const SubmissionSection = ({ classes, profiles }) => (
<Formik <Formik
initialValues={{ delegateProfile: ''}} initialValues={{ delegateProfile: ''}}
onSubmit={console.log} onSubmit={console.log}
@ -74,8 +76,14 @@ const SubmissionSection = ({ classes }) => (
variant="outlined" variant="outlined"
onChange={handleChange} onChange={handleChange}
onBlur={handleBlur} onBlur={handleBlur}
value={values.adminType || ''} value={values.delegateProfile || ''}
/> >
{profiles && profiles.map(profile => (
<MenuItem style={{ display: 'flex', alignItems: 'center' }} key={profile.name} value={profile.name}>
{profile.name}
</MenuItem>
))}
</TextField>
</form> </form>
)} )}
</Formik> </Formik>
@ -88,7 +96,7 @@ function BackProject({classes, match, profile, projectAddedEvents}) {
return ( return (
<div className={classes.root}> <div className={classes.root}>
<Title className={classes.title} manifest={manifest} /> <Title className={classes.title} manifest={manifest} />
<SubmissionSection classes={classes}/> <SubmissionSection classes={classes} profiles={delegateProfiles} />
</div> </div>
) )
} }