Added summary.
This commit is contained in:
parent
df5052a917
commit
37eba8454a
|
@ -5679,7 +5679,7 @@
|
||||||
},
|
},
|
||||||
"core-js": {
|
"core-js": {
|
||||||
"version": "2.5.5",
|
"version": "2.5.5",
|
||||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz",
|
"resolved": "http://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz",
|
||||||
"integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs="
|
"integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs="
|
||||||
},
|
},
|
||||||
"firebase": {
|
"firebase": {
|
||||||
|
|
|
@ -15,8 +15,11 @@ const styles = theme => ({
|
||||||
|
|
||||||
class About extends Component {
|
class About extends Component {
|
||||||
state = {
|
state = {
|
||||||
|
summarySchemaName: 'martenAboutSummary',
|
||||||
researcherSchemaName: 'martenAbout',
|
researcherSchemaName: 'martenAbout',
|
||||||
developerSchemaName: 'martenAboutDevelopers',
|
developerSchemaName: 'martenAboutDevelopers',
|
||||||
|
summarySchemaDetails: '',
|
||||||
|
summarySchemaType: '',
|
||||||
researcherSchemaDetails: '',
|
researcherSchemaDetails: '',
|
||||||
researcherSchemaType: '',
|
researcherSchemaType: '',
|
||||||
developerSchemaDetails: '',
|
developerSchemaDetails: '',
|
||||||
|
@ -27,6 +30,18 @@ class About extends Component {
|
||||||
document.title = 'Marten Tracker | About';
|
document.title = 'Marten Tracker | About';
|
||||||
|
|
||||||
|
|
||||||
|
// Pulling in schema details for summary
|
||||||
|
flamelinkApp.schemas.getFields(this.state.summarySchemaName, { fields: ['title', 'key', 'type', 'gridColumns', 'description', 'options'] })
|
||||||
|
.then(result => this.setState({
|
||||||
|
summarySchemaDetails: result
|
||||||
|
}))
|
||||||
|
|
||||||
|
flamelinkApp.schemas.get(this.state.summarySchemaName)
|
||||||
|
.then(result => this.setState({
|
||||||
|
summarySchemaType: result.type
|
||||||
|
}))
|
||||||
|
|
||||||
|
|
||||||
// Pulling in schema details for researchers
|
// Pulling in schema details for researchers
|
||||||
flamelinkApp.schemas.getFields(this.state.researcherSchemaName, { fields: ['title', 'key', 'type', 'gridColumns', 'description', 'options'] })
|
flamelinkApp.schemas.getFields(this.state.researcherSchemaName, { fields: ['title', 'key', 'type', 'gridColumns', 'description', 'options'] })
|
||||||
.then(result => this.setState({
|
.then(result => this.setState({
|
||||||
|
@ -56,6 +71,8 @@ class About extends Component {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
<Typography variant="display1" className={classes.header}>Introduction</Typography>
|
||||||
|
<FlameLinkComponentCreations schemaDetails={this.state.summarySchemaDetails} schemaType={this.state.summarySchemaType} schemaName={this.state.summarySchemaName} />
|
||||||
<Typography variant="display1" className={classes.header}>Researchers</Typography>
|
<Typography variant="display1" className={classes.header}>Researchers</Typography>
|
||||||
<FlameLinkComponentCreations schemaDetails={this.state.researcherSchemaDetails} schemaType={this.state.researcherSchemaType} schemaName={this.state.researcherSchemaName} />
|
<FlameLinkComponentCreations schemaDetails={this.state.researcherSchemaDetails} schemaType={this.state.researcherSchemaType} schemaName={this.state.researcherSchemaName} />
|
||||||
<Typography variant="display1" className={classes.header}>Developers</Typography>
|
<Typography variant="display1" className={classes.header}>Developers</Typography>
|
||||||
|
|
Loading…
Reference in New Issue