diff --git a/src/api/projectMembers.js b/src/api/projectMembers.js index 252df38c0..64a08f5d4 100644 --- a/src/api/projectMembers.js +++ b/src/api/projectMembers.js @@ -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) diff --git a/src/components/TopBar/ProjectsToolBar.js b/src/components/TopBar/ProjectsToolBar.js index 50c5ba048..47acb0625 100644 --- a/src/components/TopBar/ProjectsToolBar.js +++ b/src/components/TopBar/ProjectsToolBar.js @@ -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 = [ diff --git a/src/components/User/UserAvatar.jsx b/src/components/User/UserAvatar.jsx deleted file mode 100644 index 88e6ed456..000000000 --- a/src/components/User/UserAvatar.jsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react' -import PropTypes from 'prop-types' -import LevelDesignatorIcon from '../../assets/LevelDesignatorIcon' -import { memberLevelByRating } from '../../helpers' - -require('./UserAvatar.scss') - -const UserAvatar = ({ showLevel, rating, photoURL }) => { - let levelIcon - - if (showLevel) { - levelIcon = - } - - let backgroundImageUrl = `url(${require('./default-avatar.svg')})` - - if (photoURL) - backgroundImageUrl = `url(${photoURL}), ${backgroundImageUrl}` - - // Delete -r when taking member search back out of the angular app - // Renamed to -r to avoid naming collisions - return ( -
- {levelIcon} -
- ) -} - - -UserAvatar.propTypes = { - showLevel: PropTypes.bool, - rating : PropTypes.number, - photoURL : PropTypes.string -} - -export default UserAvatar diff --git a/src/components/User/UserWithName.jsx b/src/components/User/UserWithName.jsx index 27b7e3e65..c3a24a390 100644 --- a/src/components/User/UserWithName.jsx +++ b/src/components/User/UserWithName.jsx @@ -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 (
- + {firstName} {lastName} @@ -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 diff --git a/src/projects/list/components/Projects/ProjectListProjectColHeader.jsx b/src/projects/list/components/Projects/ProjectListProjectColHeader.jsx index 7cae09314..4190f25d9 100644 --- a/src/projects/list/components/Projects/ProjectListProjectColHeader.jsx +++ b/src/projects/list/components/Projects/ProjectListProjectColHeader.jsx @@ -61,7 +61,7 @@ class ProjectListProjectColHeader extends React.Component { const activeClass = cn({ active: item.val === currentSortField }) - return (
  • + return (
  • sortHandler(item.val)}> {activeClass? : ''} {item.label}
  • )