Skip to content
Snippets Groups Projects
Commit fbe9ce1b authored by MoSelim's avatar MoSelim
Browse files

styling

send email button
parent c0ebeb49
No related branches found
No related tags found
2 merge requests!60Dev,!29Shared data model
......@@ -153,7 +153,7 @@ class UserAccount extends React.Component {
<Page>
{values.signup && <H1>Create a Europe PMC plus account</H1>}
{values.myAccount && <H1>My Account</H1>}
{values.manageAccount && <H1>Manage User: {values.id}</H1>}
{values.success && (
<Notification type="success"> {values.success} </Notification>
)}
......
import React from 'react'
import { Query } from 'react-apollo'
import styled from 'styled-components'
import { Loading, LoadingIcon } from '../ui/'
import { H1, H2, Button } from '@pubsweet/ui'
import { Loading, LoadingIcon, Page } from '../ui/'
import AccountDetails from './AccountDetailsContainer'
import { GET_USER, GET_ROLES_BY_TYPE } from './queries'
......@@ -9,6 +10,12 @@ const Constainer = styled.div`
.reset-pass {
margin-top: 20px;
}
div {
padding: 0px;
}
section {
margin-top: 60px;
}
`
const ManageAccount = props => (
......@@ -40,14 +47,29 @@ const ManageAccount = props => (
</Loading>
)
}
const sendEmail = () => {
window.location.href = `mailto: ${
userData.epmc_user.identities.filter(
identity => identity.type === 'local',
)[0].email
}`
}
return (
<Constainer>
<AccountDetails
{...props}
roles={data.rolesByType}
user={userData.epmc_user}
/>
</Constainer>
<Page>
<Constainer>
<H1>Manage User: {props.location.pathname.split('/')[2]}</H1>
<H2>Profile</H2>
<AccountDetails
{...props}
roles={data.rolesByType}
user={userData.epmc_user}
/>
<section>
<H1>Admin</H1>
<Button onClick={sendEmail}>Send email</Button>
</section>
</Constainer>
</Page>
)
}}
</Query>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment