Commit bde58f07 authored by Matija Obreza's avatar Matija Obreza
Browse files

Update dataset Creator to fullName

parent b02dc463
Pipeline #3914 passed with stages
in 4 minutes and 28 seconds
import {UuidModel} from './common.model';
class Creator extends UuidModel {
public firstName: string;
public lastName: string;
public fullName: string;
public email: string;
public phoneNumber: number;
public fax: number;
......
......@@ -62,7 +62,7 @@ class Summary extends React.Component<ISummaryProps, any> {
protected renderName = (creators) => {
const creator: Creator = creators.find((e) => e.role === CreatorRole.CONTACT);
if (creator) {
return `${creator.firstName} ${creator.lastName}`;
return `${creator.fullName}`;
}
return '';
}
......
......@@ -345,7 +345,7 @@ class DetailInfo extends React.Component<IDetailInfoProps, any> {
<Grid container spacing={ 0 } key={ i } className={ `${classes.dataContainer} ${classes.grayRowsOdd}` }>
<Grid item xs={ 12 } md={ 3 }>
<Typography type="title" component="h3" className={ `${classes.margin1} ${classes.gray} ${classes.grayTitleSmall} ${classes.pdBottom0}` }>
{ `${e.firstName} ${e.lastName}` }
{ `${e.fullName}` }
</Typography>
</Grid>
<Grid item xs={ 12 } md={ 4 } className={ `${classes.margin1} ${classes.gray}` }>
......
......@@ -101,13 +101,10 @@ class DatasetCreatorForm extends React.Component<IDatasetCreatorFormProps, any>
<DeleteIcon onClick={ this.deleteCreator(fields, index) }/>
</IconButton>
</div>
<Field name={ `${creator}.firstName` } component={ TextField } label="First Name*"
placeholder="First Name*"
<Field required name={ `${creator}.fullName` } component={ TextField } label="Full name"
placeholder="Jane A. Doe"
onBlur={ this.updateCreator(fields, index) }
/>
<Field name={ `${creator}.lastName` } component={ TextField } type="text" label="Last Name*"
placeholder="Last Name*"
onBlur={ this.updateCreator(fields, index) }
/>
<Field name={ `${creator}.email` } component={ TextField } type="text" label="Email*"
placeholder="Email*"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment