From 893fd3aae19564027c90683dd1378bc67e127180 Mon Sep 17 00:00:00 2001 From: wwu Date: Fri, 26 Jan 2018 21:51:39 +0100 Subject: [PATCH 1/4] Issue 1593 delete UserAvatar --- src/api/projectMembers.js | 2 +- src/components/User/UserAvatar.jsx | 36 ---------------------------- src/components/User/UserWithName.jsx | 11 +++++---- 3 files changed, 7 insertions(+), 42 deletions(-) delete mode 100644 src/components/User/UserAvatar.jsx 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/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..e4702bff6 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} @@ -24,8 +27,6 @@ UserWithName.propTypes = { firstName : PropTypes.string.isRequired, lastName : PropTypes.string.isRequired, photoURL : PropTypes.string, - maxRating : PropTypes.object, - showLevel : PropTypes.bool } export default UserWithName From c8728ba057eb1a15bac12024f8044f989e0d15cb Mon Sep 17 00:00:00 2001 From: wwu Date: Fri, 26 Jan 2018 22:29:54 +0100 Subject: [PATCH 2/4] Issue 1634 Project search should not count against total filter applied --- src/components/TopBar/ProjectsToolBar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = [ From 9a86cfc43f4dd11a53b8f67799dfb3d274ad34dd Mon Sep 17 00:00:00 2001 From: Samir Gondzetovic Date: Sat, 27 Jan 2018 00:07:52 +0000 Subject: [PATCH 3/4] lint --- src/components/User/UserWithName.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/User/UserWithName.jsx b/src/components/User/UserWithName.jsx index e4702bff6..c3a24a390 100644 --- a/src/components/User/UserWithName.jsx +++ b/src/components/User/UserWithName.jsx @@ -26,7 +26,7 @@ UserWithName.propTypes = { handle : PropTypes.string.isRequired, firstName : PropTypes.string.isRequired, lastName : PropTypes.string.isRequired, - photoURL : PropTypes.string, + photoURL : PropTypes.string } export default UserWithName From 480bd5b1d436416a8a172ef10ba9532b47e449a3 Mon Sep 17 00:00:00 2001 From: Jagdish Sharma Date: Mon, 29 Jan 2018 23:14:28 +0545 Subject: [PATCH 4/4] fix for sort error #1652 --- .../list/components/Projects/ProjectListProjectColHeader.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}
  • )