Web: People: Profile: Fixed Link component usage

This commit is contained in:
Ilya Oleshko 2019-07-29 11:32:58 +03:00
parent 2cb882d1dc
commit 7be6531c97

View File

@ -95,7 +95,9 @@ const getFormattedDepartments = (departments) => {
return splittedDepartments.map((department, index) => {
return (
<span key={index}>
<Link type="action" fontSize={13} isHovered={true} text={department.trim()} />
<Link type="action" fontSize={13} isHovered={true} >
{department.trim()}
</Link>
{(departmentsLength !== index) ? ', ' : ''}
</span>
)
@ -124,7 +126,7 @@ const createContacts = (contacts) => {
};
const SectionBodyContent = (props) => {
const { profile, history, isSelf, isAdmin } = props;
const { profile, history, isSelf } = props;
getFormattedContacts(profile);
@ -153,11 +155,11 @@ const SectionBodyContent = (props) => {
{profile.birthday && <Text.Body style={restMargins} color='lightGray' title='Date of birth'>Date of birth:</Text.Body>}
{profile.location && <Text.Body style={restMargins} color='lightGray' title='Location'>Location:</Text.Body>}
{isSelf && <Text.Body style={restMargins} color='lightGray' title='Language'>Language:</Text.Body>}
{isSelf && <Text.Body style={{marginTop: "24px"}} color='lightGray' title='Affiliate status'>Affiliate status:</Text.Body>}
{isSelf && <Text.Body style={{ marginTop: "24px" }} color='lightGray' title='Affiliate status'>Affiliate status:</Text.Body>}
</div>
<div>
<Text.Body style={restMargins}>{profile.isVisitor ? "Guest" : "Employee"}</Text.Body>
<Text.Body style={restMargins}><Link type="page" fontSize={13} isHovered={true} text={profile.email} onClick={() => sendMail(profile.email)} />{profile.activationStatus === 2 && ' (Pending)'}</Text.Body>
<Text.Body style={restMargins}><Link type="page" fontSize={13} isHovered={true} onClick={() => sendMail(profile.email)} >{profile.email}</Link>{profile.activationStatus === 2 && ' (Pending)'}</Text.Body>
<Text.Body style={restMargins}>{getFormattedDepartments(profile.department)}</Text.Body>
<Text.Body style={restMargins}>{profile.title}</Text.Body>
<Text.Body style={restMargins}>{profile.mobilePhone}</Text.Body>
@ -166,17 +168,17 @@ const SectionBodyContent = (props) => {
<Text.Body style={restMargins}>{getFormattedDate(profile.birthday)}</Text.Body>
<Text.Body style={restMargins}>{profile.location}</Text.Body>
{isSelf && <Text.Body style={restMargins}>{profile.cultureName}</Text.Body>}
{isSelf && <Button style={{marginTop: "22px"}} size="base" label="Become our Affiliate" onClick={() => console.log('Become our Affiliate onClick()')}/>}
{isSelf && <Button style={{ marginTop: "22px" }} size="base" label="Become our Affiliate" onClick={() => console.log('Become our Affiliate onClick()')} />}
</div>
</div>
{isSelf &&
<div style={{ width: "100%", marginBottom: "24px" }}>
<ToggleContent label="Login settings" style={notesWrapper} isOpen={true}>
<Text.Body tag="span">
Two-factor authentication via code generating application was enabled for all users by cloud service administrator.
<div style={{marginTop: "10px"}}>
<Link type="action" isBold={true} isHovered={true} fontSize={13} text='Reset application' />
<Link style={{marginLeft: "18px"}} type="action" isBold={true} isHovered={true} fontSize={13} text='Show backup codes' />
Two-factor authentication via code generating application was enabled for all users by cloud service administrator.
<div style={{ marginTop: "10px" }}>
<Link type="action" isBold={true} isHovered={true} fontSize={13} >{'Reset application'}</Link>
<Link style={{ marginLeft: "18px" }} type="action" isBold={true} isHovered={true} fontSize={13} >{'Show backup codes'}</Link>
</div>
</Text.Body>
</ToggleContent>
@ -186,7 +188,7 @@ const SectionBodyContent = (props) => {
<div style={{ width: "100%", marginBottom: "24px" }}>
<ToggleContent label="Subscriptions" style={notesWrapper} isOpen={true}>
<Text.Body tag="span">
<Button size="big" label="Edit subscriptions" primary={true} onClick={() => console.log('Edit subscriptions onClick()')}/>
<Button size="big" label="Edit subscriptions" primary={true} onClick={() => console.log('Edit subscriptions onClick()')} />
</Text.Body>
</ToggleContent>
</div>