From 09efe5d3a48f909a8ec627d1ecc3ba151068614b Mon Sep 17 00:00:00 2001 From: gets0ul Date: Wed, 28 Oct 2020 00:05:03 +0700 Subject: [PATCH 1/3] refactor: use v4 api for member stats history https://www.topcoder.com/challenges/d755a633-8564-4637-813f-e6987b016435 --- .../Stats/SubTrackChallengeView/index.jsx | 24 +++++++++++++++++-- src/shared/utils/tc.js | 1 + 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/shared/components/ProfilePage/Stats/SubTrackChallengeView/index.jsx b/src/shared/components/ProfilePage/Stats/SubTrackChallengeView/index.jsx index 332374de38..6bd154dc37 100644 --- a/src/shared/components/ProfilePage/Stats/SubTrackChallengeView/index.jsx +++ b/src/shared/components/ProfilePage/Stats/SubTrackChallengeView/index.jsx @@ -13,6 +13,7 @@ import shortId from 'shortid'; import ChallengeTile from 'components/ChallengeTile'; import SRMTile from 'components/SRMTile'; import { actions } from 'topcoder-react-lib'; +import { OLD_COMPETITION_TRACKS, COMPETITION_TRACKS } from 'utils/tc'; import LoadingIndicator from 'components/LoadingIndicator'; import GalleryModal from './GalleryModal'; import './style.scss'; @@ -104,6 +105,27 @@ const processPastChallenge = (challenge) => { } else { cloned.numImages = 0; } + + if (!cloned.type) { + cloned.type = cloned.subTrack; + } + + switch (cloned.track) { + case OLD_COMPETITION_TRACKS.DATA_SCIENCE: + cloned.track = COMPETITION_TRACKS.DS; + break; + case OLD_COMPETITION_TRACKS.DESIGN: + cloned.track = COMPETITION_TRACKS.DES; + break; + case OLD_COMPETITION_TRACKS.DEVELOP: + cloned.track = COMPETITION_TRACKS.DEV; + break; + case OLD_COMPETITION_TRACKS.QA: + cloned.track = COMPETITION_TRACKS.QA; + break; + default: + break; + } } return cloned; }; @@ -421,7 +443,6 @@ function mapDispatchToProps(dispatch) { pageNum, pageSize, refresh, - userId, ) => { const uuid = shortId(); dispatch(action.getSubtrackChallengesInit(handle, uuid)); @@ -434,7 +455,6 @@ function mapDispatchToProps(dispatch) { pageNum, pageSize, refresh, - userId, )); }, loadSRM: (handle, tokenV3, pageNum, pageSize, refresh) => { diff --git a/src/shared/utils/tc.js b/src/shared/utils/tc.js index e24a6249b0..5cd81de393 100644 --- a/src/shared/utils/tc.js +++ b/src/shared/utils/tc.js @@ -11,6 +11,7 @@ import { config, isomorphy } from 'topcoder-react-utils'; import { tc } from 'topcoder-react-lib'; export const { + OLD_COMPETITION_TRACKS, COMPETITION_TRACKS, CHALLENGE_STATUS, REVIEW_OPPORTUNITY_TYPES, From e868fbe3fe8615c9126e73f43c5aa0d015a09d70 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Tue, 3 Nov 2020 21:16:25 -0300 Subject: [PATCH 2/3] fix: for issue #4527 Issue: #4527 PRs: https://github.com/topcoder-platform/community-app/pull/5144 https://github.com/topcoder-platform/topcoder-react-lib/pull/276 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eb006f35d7..17258b0451 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev", "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3", "tc-ui": "^1.0.12", - "topcoder-react-lib": "1.0.8", + "topcoder-react-lib": "1000.25.0", "topcoder-react-ui-kit": "2.0.1", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From d5d101cd5c64802647ff9660d5537e678616fd30 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Tue, 3 Nov 2020 22:36:58 -0300 Subject: [PATCH 3/3] ci: deploy stats-history-v4 to Stag env Issue: #4527 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1e58d6ae06..5b4e7f248c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -260,7 +260,7 @@ workflows: branches: only: - develop - - listing-develop-sync + - stats-history-v4 # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration