|
@@ -0,0 +1,152 @@
|
|
1
|
+import React from 'react'
|
|
2
|
+import {
|
|
3
|
+ Delimiter,
|
|
4
|
+ PageWrapper,
|
|
5
|
+ PageTitle,
|
|
6
|
+ PageContent,
|
|
7
|
+ BtnSwitch
|
|
8
|
+} from 'tracim_frontend_lib'
|
|
9
|
+import AddMemberForm from './AddMemberForm.jsx'
|
|
10
|
+// import { translate } from 'react-i18next'
|
|
11
|
+
|
|
12
|
+export class AdminUser extends React.Component {
|
|
13
|
+ constructor (props) {
|
|
14
|
+ super(props)
|
|
15
|
+
|
|
16
|
+ this.state = {
|
|
17
|
+ displayAddMember: false
|
|
18
|
+ }
|
|
19
|
+ }
|
|
20
|
+
|
|
21
|
+ handleToggleAddMember = () => this.setState(prevState => ({
|
|
22
|
+ displayAddMember: !prevState.displayAddMember
|
|
23
|
+ }))
|
|
24
|
+
|
|
25
|
+ render () {
|
|
26
|
+ return (
|
|
27
|
+ <PageWrapper customClass='adminUserPage'>
|
|
28
|
+ <PageTitle
|
|
29
|
+ parentClass={'adminUserPage'}
|
|
30
|
+ title={"Member's management"}
|
|
31
|
+ />
|
|
32
|
+
|
|
33
|
+ <PageContent parentClass='adminUserPage'>
|
|
34
|
+
|
|
35
|
+ <div className='adminUserPage__description'>
|
|
36
|
+ On this page you can manage the members of your instance Tracim.
|
|
37
|
+ </div>
|
|
38
|
+
|
|
39
|
+ <div className='adminUserPage__adduser'>
|
|
40
|
+ <button className='adminUserPage__adduser__button btn' onClick={this.handleToggleAddMember}>
|
|
41
|
+ Add a member
|
|
42
|
+ </button>
|
|
43
|
+
|
|
44
|
+ {this.state.displayAddMember &&
|
|
45
|
+ <AddMemberForm />
|
|
46
|
+ }
|
|
47
|
+ </div>
|
|
48
|
+
|
|
49
|
+ <Delimiter customClass={'adminUserPage__delimiter'} />
|
|
50
|
+
|
|
51
|
+ <div className='adminUserPage__table'>
|
|
52
|
+ <table className='table'>
|
|
53
|
+ <thead>
|
|
54
|
+ <tr>
|
|
55
|
+ <th scope='col'>Active</th>
|
|
56
|
+ <th scope='col'>Member</th>
|
|
57
|
+ <th scope='col'>Email</th>
|
|
58
|
+ <th scope='col'>Member can create workspace</th>
|
|
59
|
+ <th scope='col'>Administrator</th>
|
|
60
|
+ </tr>
|
|
61
|
+ </thead>
|
|
62
|
+ <tbody>
|
|
63
|
+ <tr>
|
|
64
|
+ <td>
|
|
65
|
+ <BtnSwitch />
|
|
66
|
+ </td>
|
|
67
|
+ <th scope='row'>Joe Delavaiga</th>
|
|
68
|
+ <td><a href='#'>joedelavaiga@mail.com</a></td>
|
|
69
|
+ <td>
|
|
70
|
+ <BtnSwitch />
|
|
71
|
+ </td>
|
|
72
|
+ <td>
|
|
73
|
+ <BtnSwitch />
|
|
74
|
+ </td>
|
|
75
|
+ </tr>
|
|
76
|
+ <tr>
|
|
77
|
+ <td>
|
|
78
|
+ <BtnSwitch />
|
|
79
|
+ </td>
|
|
80
|
+ <th scope='row'>Susie Washington</th>
|
|
81
|
+ <td><a href='#'>susiewash@mail.com</a></td>
|
|
82
|
+ <td>
|
|
83
|
+ <BtnSwitch />
|
|
84
|
+ </td>
|
|
85
|
+ <td>
|
|
86
|
+ <BtnSwitch />
|
|
87
|
+ </td>
|
|
88
|
+ </tr>
|
|
89
|
+ <tr>
|
|
90
|
+ <td>
|
|
91
|
+ <BtnSwitch />
|
|
92
|
+ </td>
|
|
93
|
+ <th scope='row'>Marty MacJoe</th>
|
|
94
|
+ <td><a href='#'>martymac@mail.com</a></td>
|
|
95
|
+ <td>
|
|
96
|
+ <BtnSwitch />
|
|
97
|
+ </td>
|
|
98
|
+ <td>
|
|
99
|
+ <BtnSwitch />
|
|
100
|
+ </td>
|
|
101
|
+ </tr>
|
|
102
|
+ <tr>
|
|
103
|
+ <td>
|
|
104
|
+ <BtnSwitch />
|
|
105
|
+ </td>
|
|
106
|
+ <th scope='row'>Joe Delavaiga</th>
|
|
107
|
+ <td><a href='#'>joedelavaiga@mail.com</a></td>
|
|
108
|
+ <td>
|
|
109
|
+ <BtnSwitch />
|
|
110
|
+ </td>
|
|
111
|
+ <td>
|
|
112
|
+ <BtnSwitch />
|
|
113
|
+ </td>
|
|
114
|
+ </tr>
|
|
115
|
+ <tr>
|
|
116
|
+ <td>
|
|
117
|
+ <BtnSwitch />
|
|
118
|
+ </td>
|
|
119
|
+ <th scope='row'>Susie Washington</th>
|
|
120
|
+ <td><a href='#'>susiewash@mail.com</a></td>
|
|
121
|
+ <td>
|
|
122
|
+ <BtnSwitch />
|
|
123
|
+ </td>
|
|
124
|
+ <td>
|
|
125
|
+ <BtnSwitch />
|
|
126
|
+ </td>
|
|
127
|
+ </tr>
|
|
128
|
+ <tr>
|
|
129
|
+ <td>
|
|
130
|
+ <BtnSwitch />
|
|
131
|
+ </td>
|
|
132
|
+ <th scope='row'>Marty MacJoe</th>
|
|
133
|
+ <td><a href='#'>martymac@mail.com</a></td>
|
|
134
|
+ <td>
|
|
135
|
+ <BtnSwitch />
|
|
136
|
+ </td>
|
|
137
|
+ <td>
|
|
138
|
+ <BtnSwitch />
|
|
139
|
+ </td>
|
|
140
|
+ </tr>
|
|
141
|
+ </tbody>
|
|
142
|
+ </table>
|
|
143
|
+ </div>
|
|
144
|
+
|
|
145
|
+ </PageContent>
|
|
146
|
+
|
|
147
|
+ </PageWrapper>
|
|
148
|
+ )
|
|
149
|
+ }
|
|
150
|
+}
|
|
151
|
+
|
|
152
|
+export default AdminUser
|