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 Button from 'core-components/button';
|
||||
import Message from 'core-components/message';
|
||||
import InfoTooltip from 'core-components/info-tooltip';
|
||||
|
||||
class AdminPanelViewUser extends React.Component {
|
||||
|
||||
state = {
|
||||
name: '',
|
||||
email: '',
|
||||
verified: true,
|
||||
tickets: [],
|
||||
invalid: false,
|
||||
loading: true
|
||||
|
@ -64,6 +66,7 @@ class AdminPanelViewUser extends React.Component {
|
|||
{i18n('EMAIL')}
|
||||
<div className="admin-panel-view-user__info-box">
|
||||
{this.state.email}
|
||||
{(!this.state.verified) ? this.renderNotVerified() : null}
|
||||
</div>
|
||||
</div>
|
||||
<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() {
|
||||
return {
|
||||
type: 'secondary',
|
||||
|
@ -93,6 +102,7 @@ class AdminPanelViewUser extends React.Component {
|
|||
this.setState({
|
||||
name: result.data.name,
|
||||
email: result.data.email,
|
||||
verified: result.data.verified,
|
||||
tickets: result.data.tickets,
|
||||
loading: false
|
||||
});
|
||||
|
|
|
@ -29,4 +29,8 @@
|
|||
margin-bottom: 20px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
&__unverified {
|
||||
margin-left: 15px;
|
||||
}
|
||||
}
|
|
@ -155,6 +155,7 @@ module.exports = [
|
|||
data: {
|
||||
name: 'Kurt Gödel',
|
||||
email: 'kurt@currycurrylady.hs',
|
||||
verified: false,
|
||||
tickets: _.times(13).map(() => {
|
||||
return {
|
||||
ticketNumber: '118551',
|
||||
|
|
Loading…
Reference in New Issue