Added summary.

This commit is contained in:
WildScotsmen 2018-12-10 16:57:13 -05:00
parent df5052a917
commit 37eba8454a
2 changed files with 18 additions and 1 deletions

2
package-lock.json generated
View File

@ -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": {

View File

@ -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: '',
@ -25,6 +28,18 @@ class About extends Component {
componentDidMount() { componentDidMount() {
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
@ -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>