Skip to content

Commit

Permalink
chore(chat): agent identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Apr 23, 2019
1 parent ca90ba1 commit c0f3a7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client/containers/Topbar/onlineUserList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class OnlineUserListPartial extends React.Component {
{entries(this.activeUsers).map(([key, value]) => {
if (this.props.sessionUser && value.user._id === this.props.sessionUser._id) return
const image = value.user.image || 'defaultProfile.jpg'
const isAgentOrAdmin = value.user.role.isAdmin || value.user.role.isAgent
return (
<li key={key}>
<a className={'no-ajaxy'} onClick={e => OnlineUserListPartial.onUserClicked(e, value.user._id)}>
Expand All @@ -104,7 +105,9 @@ class OnlineUserListPartial extends React.Component {
<img src={`/uploads/users/${image}`} alt='Profile Pic' />
</div>
<span className='online-status' data-user-status-id={value.user._id} />
<div className='user-name'>{value.user.fullname}</div>
<div className={'user-name' + (isAgentOrAdmin ? ' _agent' : '')}>
{value.user.fullname + (isAgentOrAdmin ? ' - Support Agent' : '')}
</div>
</div>
</a>
</li>
Expand Down
2 changes: 2 additions & 0 deletions src/sass/partials/offcanvas.sass
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
font-weight: 400
margin-left: 40px
line-height: 30px
&.agent
color: $accent_agent
.online-status
position: absolute
right: 10px
Expand Down

0 comments on commit c0f3a7c

Please sign in to comment.