-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathindex.js
More file actions
157 lines (141 loc) · 4.54 KB
/
Copy pathindex.js
File metadata and controls
157 lines (141 loc) · 4.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/*
*
* Investigators
*
*/
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import Helmet from 'react-helmet';
import { FormattedMessage } from 'react-intl';
import messages from './messages';
import Paper from 'material-ui/Paper';
import TextField from 'material-ui/TextField';
import SelectField from 'material-ui/SelectField';
import MenuItem from 'material-ui/MenuItem';
import ButtonElement from '../../components/ButtonElement';
import { Grid, Row, Col } from 'react-flexbox-grid';
import Divider from 'material-ui/Divider';
import Subheader from 'material-ui/Subheader';
import Avatar from 'material-ui/Avatar';
import {List, ListItem} from 'material-ui/List';
const styles = {
Papers: {
margin: 10,
padding: 10,
},
TextFields:{
width: 500,
},
Button: {
float: 'right',
},
Divider: {
backgroundColor: '#000a12',
},
Subheader: {
color: '#007ac1',
}
};
export class Investigators extends React.Component { // eslint-disable-line react/prefer-stateless-function
state = {
value: 0,
};
handleChange = (event, index, value) => this.setState({ value });
render() {
return (
<div>
<Helmet
title="Investigators"
meta={[
{ name: 'description', content: 'Description of Investigators' },
]}
/>
<Grid fluid>
<Row><Col xs> <h1>Investigators</h1> </Col></Row>
<Row>
{/*Show all investigators */}
<Paper style={styles.Papers}>
<Col xs>
<Subheader style={styles.Subheader}>All Investigators</Subheader>
<Divider style={styles.Divider}/>
<List>
<ListItem
primaryText="Brendan Lim"
leftAvatar={<Avatar>BL</Avatar>}
/>
<ListItem
primaryText="Eric Hoffman"
leftAvatar={<Avatar>EH</Avatar>}
/>
<ListItem
primaryText="Grace Ng"
leftAvatar={<Avatar>GN</Avatar>}
/>
<ListItem
primaryText="Kerem Suer"
leftAvatar={<Avatar>KS</Avatar>}
/>
<ListItem
primaryText="Raquel Parrado"
leftAvatar={<Avatar>RP</Avatar>}
/>
</List>
</Col>
</Paper>
{/*Investigators adding form */}
<Paper style={styles.Papers}>
<Col xs>
<Subheader style={styles.Subheader}>Add Investigator</Subheader>
<Divider style={styles.Divider}/>
<form>
<TextField
hintText="Name"
floatingLabelText="Name"
fullWidth={true}
style={styles.TextFields}
/> <br />
<TextField
hintText="Company Name"
floatingLabelText="Company Name"
fullWidth={true}
style={styles.TextFields}
/> <br />
<TextField
hintText="Project Name"
floatingLabelText="Project Name"
fullWidth={true}
style={styles.TextFields}
/> <br/>
<SelectField
floatingLabelText="Investigator"
value={this.state.value}
onChange={this.handleChange}
>
<MenuItem value={1} primaryText="Investigator01" />
<MenuItem value={2} primaryText="Investigator02" />
<MenuItem value={3} primaryText="Investigator03" />
<MenuItem value={4} primaryText="Investigator04" />
<MenuItem value={5} primaryText="Investigator05" />
</SelectField> <br/>
<div style={styles.Button}>
<ButtonElement label={"Save"} backgroundColor={'#4CAF50'} labelColor={'#fff'} labelPosition={'after'} />
<ButtonElement label={"Reset"} backgroundColor={'#FF5252'} labelColor={'#fff'} labelPosition={'after'}/>
</div>
</form>
</Col>
</Paper>
</Row>
</Grid>
</div>
);
}
}
Investigators.propTypes = {
dispatch: PropTypes.func.isRequired,
};
function mapDispatchToProps(dispatch) {
return {
dispatch,
};
}
export default connect(null, mapDispatchToProps)(Investigators);