Skip to content

Commit

Permalink
Merge pull request #1519 from topcoder-platform/release_0.20.4
Browse files Browse the repository at this point in the history
Release 0.20.4
  • Loading branch information
jmgasper authored Apr 17, 2023
2 parents 9124501 + 62e77d1 commit 887b387
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/actions/challenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import { removeChallengeFromPhaseProduct, saveChallengeAsPhaseProduct } from '..
* @param {string} filterChallengeName
* @param {bool} selfService
* @param {string} userHandle this will be null for admin user(we will return all datas for admin user)
* @param {number} userId this will be null for admin user(we will return all datas for admin user)
* @param {string} filterChallengeType
* @param {object} filterDate
* @param {string} filterSortBy
Expand All @@ -79,6 +80,7 @@ export function loadChallengesByPage (
filterChallengeName = null,
selfService = false,
userHandle = null,
userId = 0,
filterChallengeType = {},
filterDate = {},
filterSortBy = null,
Expand Down Expand Up @@ -138,8 +140,8 @@ export function loadChallengesByPage (
if (filterSortBy) {
filters['sortBy'] = filterSortBy
}
if (userHandle) {
filters['createdBy'] = userHandle
if (userId) {
filters['memberId'] = userId
}
if (filterSortOrder) {
filters['sortOrder'] = filterSortOrder
Expand Down
14 changes: 13 additions & 1 deletion src/components/ChallengesComponent/ChallengeList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class ChallengeList extends Component {
searchText,
selfService,
this.getHandle(),
this.getLoginUserId(),
challengeType,
challengeDate
)
Expand Down Expand Up @@ -152,6 +153,7 @@ class ChallengeList extends Component {
searchText,
selfService,
this.getHandle(),
this.getLoginUserId(),
filterChallengeType,
filterDate,
sortBy,
Expand Down Expand Up @@ -189,6 +191,7 @@ class ChallengeList extends Component {
searchText,
selfService,
this.getHandle(),
this.getLoginUserId(),
filterChallengeType,
filterDate,
sortBy,
Expand Down Expand Up @@ -216,7 +219,8 @@ class ChallengeList extends Component {
status,
searchText,
selfService,
this.getHandle()
this.getHandle(),
this.getLoginUserId()
)
}

Expand Down Expand Up @@ -260,6 +264,12 @@ class ChallengeList extends Component {
: null
}

getLoginUserId () {
return this.props.auth && this.props.auth.user
? this.props.auth.user.userId
: null
}

/**
* Hide error message
*/
Expand Down Expand Up @@ -294,6 +304,7 @@ class ChallengeList extends Component {
searchText,
selfService,
this.getHandle(),
this.getLoginUserId(),
challengeType,
challengeDate,
name,
Expand Down Expand Up @@ -339,6 +350,7 @@ class ChallengeList extends Component {
'',
selfService,
this.getHandle(),
this.getLoginUserId(),
null,
{},
null,
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Challenges/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ class Challenges extends Component {
dashboard ? 'all' : '',
'',
selfService,
isAdmin ? null : this.props.auth.user.handle
isAdmin ? null : this.props.auth.user.handle,
this.props.auth.user.userId
)
const projectLoading =
window.localStorage.getItem('projectLoading') !== null
Expand Down

0 comments on commit 887b387

Please sign in to comment.