add additional field to display

do not attempt rendering elements until manifest is present
This commit is contained in:
Barry Gitarts 2019-08-01 15:40:35 -04:00 committed by Barry G
parent 499a5681fe
commit 1961236c0f
1 changed files with 10 additions and 28 deletions

View File

@ -273,7 +273,7 @@ const SubmissionSection = ({ classes, history, projectData, projectId, pledges }
return ( return (
<form onSubmit={handleSubmit} className={classes.submissionRoot}> <form onSubmit={handleSubmit} className={classes.submissionRoot}>
<div className={firstHalf}> {manifest && <div className={firstHalf}>
<div className={classnames(classes.breadCrumb, fullWidth)}> <div className={classnames(classes.breadCrumb, fullWidth)}>
{'All projects > title here'} {'All projects > title here'}
</div> </div>
@ -283,42 +283,24 @@ const SubmissionSection = ({ classes, history, projectData, projectId, pledges }
<Typography className={classes.projectSubTitle} component="h2" gutterBottom> <Typography className={classes.projectSubTitle} component="h2" gutterBottom>
{manifest && manifest.subtitle} {manifest && manifest.subtitle}
</Typography> </Typography>
{manifest && <TextDisplay <TextDisplay
name="Contact Person" name="Contact Person"
text={manifest.creator} text={manifest.creator}
rootClass={classes.contact} rootClass={classes.contact}
/>} />
{manifest && <TextDisplay <TextDisplay
name="Profile created on" name="Profile created on"
text={createdDate} text={createdDate}
rootClass={classes.created} rootClass={classes.created}
/>}
<StatusTextField
className={fullWidth}
isRequired={true}
idFor="creator"
name="creator"
label="Contact Person"
bottomLeftLabel="Name of the primary contact"
placeholder="Contract Person"
onChange={handleChange}
onBlur={handleBlur}
value={values.creator || ''}
/> />
<div className={classes.chatRoom}> <div className={classes.chatRoom}>
<Icon name="oneOnOneChat" /> <Icon name="oneOnOneChat" />
<div className={classes.chatText}>{`Join ${generateChatRoom(values.title)}`}</div> <div className={classes.chatText}>{`Join ${manifest.chatRoom}`}</div>
</div>
<div className={classes.chatRoom}>
<Icon name="boxArrow" />
<div className={classes.chatText}>{manifest.code}</div>
</div> </div>
<IconTextField
iconName="boxArrow"
idFor="repo"
name="repo"
placeholder="Code Repo"
onChange={handleChange}
onBlur={handleBlur}
value={values.repo || ''}
/>
<IconTextField <IconTextField
iconName="addPerson" iconName="addPerson"
endAdornment={( endAdornment={(
@ -432,7 +414,7 @@ const SubmissionSection = ({ classes, history, projectData, projectId, pledges }
onBlur={handleBlur} onBlur={handleBlur}
value={values.commitTime || ''} value={values.commitTime || ''}
/> />
</div> </div>}
<div className={secondHalf}> <div className={secondHalf}>
<Button type="submit" color="primary" variant="contained" className={classnames(classes.formButton)}>{isSubmitting ? 'Ethereum Submission In Progress' : 'Create Project'}</Button> <Button type="submit" color="primary" variant="contained" className={classnames(classes.formButton)}>{isSubmitting ? 'Ethereum Submission In Progress' : 'Create Project'}</Button>
<CurrencySelect <CurrencySelect