Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/api/projectMembers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TC_API_URL, PROJECTS_API_URL, CONNECT_MESSAGE_API_URL } from '../config
export function getMembersById (userIds) {
const _userIdArr = _.map(userIds, _id => `userId:${_id}`)
// only requesting certain member attributes
const fields = 'userId,handle,photoURL,firstName,lastName,maxRating,details,email'
const fields = 'userId,handle,photoURL,firstName,lastName,details,email'
const query = _userIdArr.join(' OR ')
const url = `${TC_API_URL}/v3/members/_search/?fields=`
+ encodeURIComponent(fields)
Expand Down
2 changes: 1 addition & 1 deletion src/components/TopBar/ProjectsToolBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class ProjectsToolBar extends Component {
excludedFiltersCount++
}
// Ignore status from filters count
const noOfFilters = _.keys(_.omit(criteria, ['status'])).length - excludedFiltersCount
const noOfFilters = _.keys(_.omit(criteria, ['status', 'keyword'])).length - excludedFiltersCount
const onLeaveMessage = this.onLeave() || ''

const primaryNavigationItems = [
Expand Down
36 changes: 0 additions & 36 deletions src/components/User/UserAvatar.jsx

This file was deleted.

13 changes: 7 additions & 6 deletions src/components/User/UserWithName.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import React from 'react'
import PropTypes from 'prop-types'
import { DOMAIN } from '../../config/constants'
import UserAvatar from './UserAvatar'
import { Avatar } from 'appirio-tech-react-components'
require('./UserWithName.scss')

const UserWithName = ({ handle, firstName, lastName, photoURL, maxRating={rating: 0}, showLevel=false }) => {
const UserWithName = ({ handle, firstName, lastName, photoURL }) => {
const url = `//www.${DOMAIN}/members/${handle}/`
return (
<div className="user-block">
<a href={url} target="_blank" rel="noopener noreferrer" className="photo">
<UserAvatar rating={maxRating.rating} showLevel={showLevel} photoURL={photoURL} />
<Avatar
avatarUrl={photoURL}
userName={firstName + ' ' + lastName}
/>
</a>
<span className="txt-box">
<a href={url} target="_blank" rel="noopener noreferrer" className="link-black">{firstName} {lastName}</a>
Expand All @@ -23,9 +26,7 @@ UserWithName.propTypes = {
handle : PropTypes.string.isRequired,
firstName : PropTypes.string.isRequired,
lastName : PropTypes.string.isRequired,
photoURL : PropTypes.string,
maxRating : PropTypes.object,
showLevel : PropTypes.bool
photoURL : PropTypes.string
}

export default UserWithName
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ProjectListProjectColHeader extends React.Component {
const activeClass = cn({
active: item.val === currentSortField
})
return (<li key={i} className={activeClass} onClick={sortHandler}>
return (<li key={i} className={activeClass} onClick={() => sortHandler(item.val)}>
{activeClass? <IconCheckDark className="icon-check-dark"/>: ''}
<a href="javascript:;">{item.label}</a>
</li>)
Expand Down