Ivan - Add verification for admin view [skip ci]
This commit is contained in:
parent
a113d547d2
commit
c248c8d486
|
@ -11,12 +11,14 @@ import AreYouSure from 'app-components/are-you-sure';
|
||||||
import Header from 'core-components/header';
|
import Header from 'core-components/header';
|
||||||
import Button from 'core-components/button';
|
import Button from 'core-components/button';
|
||||||
import Message from 'core-components/message';
|
import Message from 'core-components/message';
|
||||||
|
import InfoTooltip from 'core-components/info-tooltip';
|
||||||
|
|
||||||
class AdminPanelViewUser extends React.Component {
|
class AdminPanelViewUser extends React.Component {
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
name: '',
|
name: '',
|
||||||
email: '',
|
email: '',
|
||||||
|
verified: true,
|
||||||
tickets: [],
|
tickets: [],
|
||||||
invalid: false,
|
invalid: false,
|
||||||
loading: true
|
loading: true
|
||||||
|
@ -64,6 +66,7 @@ class AdminPanelViewUser extends React.Component {
|
||||||
{i18n('EMAIL')}
|
{i18n('EMAIL')}
|
||||||
<div className="admin-panel-view-user__info-box">
|
<div className="admin-panel-view-user__info-box">
|
||||||
{this.state.email}
|
{this.state.email}
|
||||||
|
{(!this.state.verified) ? this.renderNotVerified() : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="admin-panel-view-user__delete-button">
|
<div className="admin-panel-view-user__delete-button">
|
||||||
|
@ -79,6 +82,12 @@ class AdminPanelViewUser extends React.Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderNotVerified() {
|
||||||
|
return (
|
||||||
|
<InfoTooltip className="admin-panel-view-user__unverified" type="warning" text={i18n('UNVERIFIED_EMAIL')} />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
getTicketListProps() {
|
getTicketListProps() {
|
||||||
return {
|
return {
|
||||||
type: 'secondary',
|
type: 'secondary',
|
||||||
|
@ -93,6 +102,7 @@ class AdminPanelViewUser extends React.Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
name: result.data.name,
|
name: result.data.name,
|
||||||
email: result.data.email,
|
email: result.data.email,
|
||||||
|
verified: result.data.verified,
|
||||||
tickets: result.data.tickets,
|
tickets: result.data.tickets,
|
||||||
loading: false
|
loading: false
|
||||||
});
|
});
|
||||||
|
|
|
@ -29,4 +29,8 @@
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__unverified {
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -155,6 +155,7 @@ module.exports = [
|
||||||
data: {
|
data: {
|
||||||
name: 'Kurt Gödel',
|
name: 'Kurt Gödel',
|
||||||
email: 'kurt@currycurrylady.hs',
|
email: 'kurt@currycurrylady.hs',
|
||||||
|
verified: false,
|
||||||
tickets: _.times(13).map(() => {
|
tickets: _.times(13).map(() => {
|
||||||
return {
|
return {
|
||||||
ticketNumber: '118551',
|
ticketNumber: '118551',
|
||||||
|
|
Loading…
Reference in New Issue