From 367bbbc2df08d99a8e188d6cb776a672f6b29d60 Mon Sep 17 00:00:00 2001 From: Dedy Wahyudi Date: Tue, 5 Oct 2021 22:53:35 +0700 Subject: [PATCH 1/6] feat(unassigned-tasks): initial fixes --- .../challenge-listing/Listing/Bucket/index.jsx | 17 +++++++++++++++-- .../containers/challenge-detail/index.jsx | 4 +++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/shared/components/challenge-listing/Listing/Bucket/index.jsx b/src/shared/components/challenge-listing/Listing/Bucket/index.jsx index afcf67b309..cc4898d94d 100644 --- a/src/shared/components/challenge-listing/Listing/Bucket/index.jsx +++ b/src/shared/components/challenge-listing/Listing/Bucket/index.jsx @@ -77,6 +77,19 @@ export default function Bucket({ } else { sortedChallenges = _.clone(challenges); } + + let filteredChallenges = sortedChallenges; + filteredChallenges = sortedChallenges.filter((ch) => { + if (ch.type === 'Task' + && ch.task + && ch.task.isTask + && ch.task.isAssigned + && Number(ch.task.memberId) !== Number(userId)) { + return null; + } + return ch; + }); + // sortedChallenges.sort(Sort[activeSort].func); // const bucketQuery = qs.stringify({ @@ -118,14 +131,14 @@ export default function Bucket({ // ); // } - if (!loading && sortedChallenges.length === 0) { + if (!loading && filteredChallenges.length === 0) { return (
{ (filterState.recommended && activeBucket === 'openForRegistration') ? null : `${NO_LIVE_CHALLENGES_CONFIG[activeBucket]}` }
); } - const cards = sortedChallenges.map(challenge => ( + const cards = filteredChallenges.map(challenge => ( !w.type || w.type === 'final'); + if (challenge.type !== 'Task') { + winners = winners.filter(w => !w.type || w.type === 'final'); + } let hasFirstPlacement = false; if (!_.isEmpty(winners)) { From 5a597fc98080bcfd3b4824e77ead495e4eefec0a Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Wed, 6 Oct 2021 15:46:01 -0300 Subject: [PATCH 2/6] fix: for issue #5712 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a400094647..a78557eebd 100644 --- a/package.json +++ b/package.json @@ -150,7 +150,7 @@ "supertest": "^3.1.0", "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3", "tc-ui": "^1.0.12", - "topcoder-react-lib": "1.2.0", + "topcoder-react-lib": "1000.28.0", "topcoder-react-ui-kit": "2.0.1", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From a9ac7a12fae78cc3807e45873ad146ae8ab5a2d4 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Wed, 6 Oct 2021 15:51:18 -0300 Subject: [PATCH 3/6] ci: deploy feature/unassigned-tasks to Stag and Dev env --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index ab8fcc9a87..1fed283996 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -343,6 +343,7 @@ workflows: branches: only: - develop + - feature/unassigned-tasks # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -371,6 +372,7 @@ workflows: branches: only: - develop + - feature/unassigned-tasks # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration From 787f2c57ec36bb1cf57c50486adc66cea64d111e Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Thu, 7 Oct 2021 05:26:04 -0300 Subject: [PATCH 4/6] ci: Remove feature/unassigned-tasks from Stag and Dev env --- .circleci/config.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 776ba329d3..349c4c5d3c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -343,7 +343,6 @@ workflows: branches: only: - develop - - feature/unassigned-tasks # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -357,14 +356,14 @@ workflows: filters: branches: only: - - ref-email-tracking + - free # This is beta env for production soft releases - "build-prod-beta": context : org-global filters: branches: only: - - slash-home-hotfix + - free # This is stage env for production QA releases - "build-prod-staging": context : org-global @@ -372,7 +371,6 @@ workflows: branches: only: - develop - - feature/unassigned-tasks # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration From f1ffc0a4427d75bde4438ad397bce57ebe738d21 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Thu, 7 Oct 2021 05:29:38 -0300 Subject: [PATCH 5/6] fix: for issue #5712 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a78557eebd..68086b3c61 100644 --- a/package.json +++ b/package.json @@ -150,7 +150,7 @@ "supertest": "^3.1.0", "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3", "tc-ui": "^1.0.12", - "topcoder-react-lib": "1000.28.0", + "topcoder-react-lib": "1000.28.1", "topcoder-react-ui-kit": "2.0.1", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From 2ba154fd6b0294735905cabddb56f503ae265b77 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Thu, 7 Oct 2021 07:52:17 -0300 Subject: [PATCH 6/6] fix: for issue #5712 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 68086b3c61..47838d7999 100644 --- a/package.json +++ b/package.json @@ -150,7 +150,7 @@ "supertest": "^3.1.0", "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3", "tc-ui": "^1.0.12", - "topcoder-react-lib": "1000.28.1", + "topcoder-react-lib": "1.2.1", "topcoder-react-ui-kit": "2.0.1", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2",