From 3574235bab48a32d0072abe1470bdcd0dc1e9786 Mon Sep 17 00:00:00 2001 From: Zhijie Liu Date: Wed, 20 Apr 2022 22:24:38 +0800 Subject: [PATCH 01/13] fix: fix challenge link for marathon match in member statics page --- .../ProfilePage/Stats/ChartTooltip/index.jsx | 9 +++++- .../ProfilePage/Stats/HistoryGraph/index.jsx | 32 ++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/src/shared/components/ProfilePage/Stats/ChartTooltip/index.jsx b/src/shared/components/ProfilePage/Stats/ChartTooltip/index.jsx index de48b50123..a4f45714c7 100644 --- a/src/shared/components/ProfilePage/Stats/ChartTooltip/index.jsx +++ b/src/shared/components/ProfilePage/Stats/ChartTooltip/index.jsx @@ -5,10 +5,11 @@ import React from 'react'; import PT from 'prop-types'; import './styles.scss'; +import _ from 'lodash'; const ChartTooltip = ({ show, left, top, challengeName, - challengeData, rating, ratingColor, href, + challengeData, rating, ratingColor, href, onClick, }) => ( { + e.preventDefault(); + onClick(); + }} >
{rating} @@ -44,6 +49,7 @@ ChartTooltip.defaultProps = { rating: 0, ratingColor: '', href: null, + onClick: _.noop, }; ChartTooltip.propTypes = { @@ -55,6 +61,7 @@ ChartTooltip.propTypes = { rating: PT.number, ratingColor: PT.string, href: PT.string, + onClick: PT.func, }; export default ChartTooltip; diff --git a/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx b/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx index ce97e80829..aa8affeae0 100644 --- a/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx +++ b/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx @@ -15,6 +15,7 @@ export default class HistoryGraph extends React.Component { this.state = {}; this.mobileWidth = 0; this.graphRef = React.createRef(); + this.onHandleDataPointClicked = this.onHandleDataPointClicked.bind(this); } componentDidMount() { @@ -58,6 +59,23 @@ export default class HistoryGraph extends React.Component { return 300; } + onHandleDataPointClicked() { + const { challengeId, href } = this.state; + fetch(`${config.API.V5}/challenges?legacyId=${challengeId}`) + .then(result => result.json()) + .then((dataResponse) => { + if (dataResponse.length > 0) { + const challenge = dataResponse[0]; + window.location.href = `${config.URL.CHALLENGES_URL}/${challenge.id}`; + } else { + window.location.href = href; + } + }).catch(() => { + window.location.href = href; + }); + } + + draw() { const $scope = this; const { history: wrapper, track, subTrack } = this.props; @@ -247,6 +265,7 @@ export default class HistoryGraph extends React.Component { show: true, left: e.pageX, top: e.pageY, + challengeId: d.challengeId, challengeName: d.challengeName, challengeData: moment(d.ratingDate).format('MMM DD, YYYY'), rating: d.newRating, @@ -259,7 +278,18 @@ export default class HistoryGraph extends React.Component { render() { return (
- + { + const { track } = this.props; + const { href } = this.state; + if (track === 'DATA_SCIENCE') { + this.onHandleDataPointClicked(); + } else { + window.location.href = href; + } + }} + />
); } From 1c49e66905e0a3223588578026455317c613ed0f Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Thu, 21 Apr 2022 18:46:03 -0300 Subject: [PATCH 02/13] Fix new password placeholder --- src/shared/components/Settings/Account/MyAccount/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/Settings/Account/MyAccount/index.jsx b/src/shared/components/Settings/Account/MyAccount/index.jsx index 21f0adeecb..29c6060ec4 100644 --- a/src/shared/components/Settings/Account/MyAccount/index.jsx +++ b/src/shared/components/Settings/Account/MyAccount/index.jsx @@ -782,7 +782,7 @@ export default class MyAccount extends ConsentComponent {
- +
- +
) } -
-

- Payments -

- { - isWipro ? ( -
- ) : ( + {isWipro && ( +
+

+ Payments +

+

- Topcoder will compensate members in accordance with our standard payment policies, unless - otherwise specified in this challenge. For information on payment policies, setting up your profile to - receive payments, and general payment questions, please refer to + For employees of Wipro Technologies, following are the + payment terms. Winner/s would be awarded the prize money on + successful completion and acceptance of the submission by + the stakeholder. Accumulated prize money for the month will + be paid through Wipro payroll as part of subsequent month’s + salary (eg. Aug month challenge winners payment will be + credited as part Sept month salary). For payment of prize + money, respective country currency conversion shall be + considered as per Wipro standard currency conversion + guidelines. Please refer to policy document at ‌ - Payment Policies and Instructions - . + https://wipro365.sharepoint.com/sites/wipro-people-policies/wipro%20policies/TopGear-RewardPoints-Policy.pdf + + ‌ + for details regarding the policy.

- ) - } -
+
+ + )}
Date: Fri, 22 Apr 2022 20:41:28 -0300 Subject: [PATCH 05/13] Return 404 if member not sACTIVE --- src/shared/containers/Profile.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/containers/Profile.jsx b/src/shared/containers/Profile.jsx index f79e003079..0e5704037a 100644 --- a/src/shared/containers/Profile.jsx +++ b/src/shared/containers/Profile.jsx @@ -96,7 +96,7 @@ class ProfileContainer extends React.Component { handleParam, } = this.props; - if (loadingError) { + if (loadingError || (info && info.status !== 'ACTIVE')) { return ; } From 20fb301d8bdb7815b68f24435e97694a49ac1fae Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Fri, 22 Apr 2022 22:45:09 -0300 Subject: [PATCH 06/13] Fix thrive url --- config/default.js | 2 +- config/production.js | 2 ++ src/shared/components/challenge-detail/ThriveArticles/index.jsx | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/default.js b/config/default.js index f52f684b5f..1e4f3b5492 100644 --- a/config/default.js +++ b/config/default.js @@ -117,7 +117,7 @@ module.exports = { HELP: 'https://www.topcoder.com/thrive/tracks?track=Topcoder&tax=Help%20Articles', SUBMISSION_REVIEW: 'https://submission-review.topcoder-dev.com', - THRIVE: 'https://www.topcoder.com/thrive', + THRIVE: 'https://community-app.topcoder-dev.com/thrive', COMMUNITIES: { BLOCKCHAIN: 'https://blockchain.topcoder-dev.com', diff --git a/config/production.js b/config/production.js index 6d3142daf7..6f068449ec 100644 --- a/config/production.js +++ b/config/production.js @@ -50,6 +50,8 @@ module.exports = { COMMUNITY_API: 'http://localhost:8000', + THRIVE: 'https://www.topcoder.com/thrive', + COMMUNITIES: { BLOCKCHAIN: 'https://blockchain.topcoder.com', COGNITIVE: 'https://cognitive.topcoder.com', diff --git a/src/shared/components/challenge-detail/ThriveArticles/index.jsx b/src/shared/components/challenge-detail/ThriveArticles/index.jsx index ac214202be..97684c34b4 100644 --- a/src/shared/components/challenge-detail/ThriveArticles/index.jsx +++ b/src/shared/components/challenge-detail/ThriveArticles/index.jsx @@ -20,7 +20,7 @@ export default function ThriveArticles({ articles }) { const getPageUrl = article => (article.externalArticle && article.contentUrl ? article.contentUrl - : `${config.TC_EDU_BASE_PATH}${config.TC_EDU_ARTICLES_PATH}/${article.slug || article.title}`); + : `${config.URL.THRIVE}${config.TC_EDU_ARTICLES_PATH}/${article.slug || article.title}`); const items = map(articles, (a, idx) => (
From 6ac4d917d9229efa7c0dc76a038e5df8f702940a Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Sat, 23 Apr 2022 06:07:22 -0300 Subject: [PATCH 07/13] Challenge Details - Fix spec width --- src/shared/components/challenge-detail/Specification/styles.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/components/challenge-detail/Specification/styles.scss b/src/shared/components/challenge-detail/Specification/styles.scss index 2605a43efe..4802a573f1 100644 --- a/src/shared/components/challenge-detail/Specification/styles.scss +++ b/src/shared/components/challenge-detail/Specification/styles.scss @@ -421,6 +421,7 @@ $tc-link-visited: #0c4e98; .challenge-specs-main { @include roboto-regular; + width: 100%; padding: 0 20px; max-width: 720px; align-self: center; From b12a6156d77112ec915d9cf2873d83dfc4e200b3 Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Tue, 26 Apr 2022 09:18:51 -0300 Subject: [PATCH 08/13] fix: for issue #6311 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index da9928d998..3b930ee4c2 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,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.5", + "topcoder-react-lib": "1000.29.0", "topcoder-react-ui-kit": "2.0.1", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From 2be6649b949e1413e64df4c2b330d25e4417f51d Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Tue, 26 Apr 2022 09:20:46 -0300 Subject: [PATCH 09/13] ci: deploy pv-challenge-msg to Stag and Dev --- .circleci/config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dea585d4eb..91c9668c6f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -343,7 +343,7 @@ workflows: branches: only: - develop - - fix/infected-submission + - pv-challenge-msg # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -372,8 +372,7 @@ workflows: branches: only: - develop - - features/mm-dashboard - - fix/settings-save-fail + - pv-challenge-msg # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration From 91228ffd3510e0887f20a087dfb4b959fcb041fa Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Tue, 26 Apr 2022 09:34:30 -0300 Subject: [PATCH 10/13] ci: deploy pv-challenge-msg o Beta and QA --- .circleci/config.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 91c9668c6f..5564d8ad9a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -343,7 +343,6 @@ workflows: branches: only: - develop - - pv-challenge-msg # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -357,14 +356,14 @@ workflows: filters: branches: only: - - thrive-rss + - pv-challenge-msg # This is beta env for production soft releases - "build-prod-beta": context : org-global filters: branches: only: - - new-tc-logo + - pv-challenge-msg # This is stage env for production QA releases - "build-prod-staging": context : org-global @@ -372,7 +371,6 @@ workflows: branches: only: - develop - - pv-challenge-msg # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration From 1cfd18f727bf4eaf18f04ff0c012b324d6b5d40a Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Wed, 27 Apr 2022 06:11:54 -0300 Subject: [PATCH 11/13] fix: for issue #6311 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3b930ee4c2..04c52c6094 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,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.29.0", + "topcoder-react-lib": "1000.29.1", "topcoder-react-ui-kit": "2.0.1", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From c09826a106fec9f2cb8ab7982c7a446e65b6a76b Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Thu, 28 Apr 2022 04:44:15 -0300 Subject: [PATCH 12/13] Revert "fix: fix challenge link for marathon match in member statics page" --- .../ProfilePage/Stats/ChartTooltip/index.jsx | 9 +----- .../ProfilePage/Stats/HistoryGraph/index.jsx | 32 +------------------ 2 files changed, 2 insertions(+), 39 deletions(-) diff --git a/src/shared/components/ProfilePage/Stats/ChartTooltip/index.jsx b/src/shared/components/ProfilePage/Stats/ChartTooltip/index.jsx index a4f45714c7..de48b50123 100644 --- a/src/shared/components/ProfilePage/Stats/ChartTooltip/index.jsx +++ b/src/shared/components/ProfilePage/Stats/ChartTooltip/index.jsx @@ -5,11 +5,10 @@ import React from 'react'; import PT from 'prop-types'; import './styles.scss'; -import _ from 'lodash'; const ChartTooltip = ({ show, left, top, challengeName, - challengeData, rating, ratingColor, href, onClick, + challengeData, rating, ratingColor, href, }) => ( { - e.preventDefault(); - onClick(); - }} >
{rating} @@ -49,7 +44,6 @@ ChartTooltip.defaultProps = { rating: 0, ratingColor: '', href: null, - onClick: _.noop, }; ChartTooltip.propTypes = { @@ -61,7 +55,6 @@ ChartTooltip.propTypes = { rating: PT.number, ratingColor: PT.string, href: PT.string, - onClick: PT.func, }; export default ChartTooltip; diff --git a/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx b/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx index aa8affeae0..ce97e80829 100644 --- a/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx +++ b/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx @@ -15,7 +15,6 @@ export default class HistoryGraph extends React.Component { this.state = {}; this.mobileWidth = 0; this.graphRef = React.createRef(); - this.onHandleDataPointClicked = this.onHandleDataPointClicked.bind(this); } componentDidMount() { @@ -59,23 +58,6 @@ export default class HistoryGraph extends React.Component { return 300; } - onHandleDataPointClicked() { - const { challengeId, href } = this.state; - fetch(`${config.API.V5}/challenges?legacyId=${challengeId}`) - .then(result => result.json()) - .then((dataResponse) => { - if (dataResponse.length > 0) { - const challenge = dataResponse[0]; - window.location.href = `${config.URL.CHALLENGES_URL}/${challenge.id}`; - } else { - window.location.href = href; - } - }).catch(() => { - window.location.href = href; - }); - } - - draw() { const $scope = this; const { history: wrapper, track, subTrack } = this.props; @@ -265,7 +247,6 @@ export default class HistoryGraph extends React.Component { show: true, left: e.pageX, top: e.pageY, - challengeId: d.challengeId, challengeName: d.challengeName, challengeData: moment(d.ratingDate).format('MMM DD, YYYY'), rating: d.newRating, @@ -278,18 +259,7 @@ export default class HistoryGraph extends React.Component { render() { return (
- { - const { track } = this.props; - const { href } = this.state; - if (track === 'DATA_SCIENCE') { - this.onHandleDataPointClicked(); - } else { - window.location.href = href; - } - }} - /> +
); } From 967e5fca2fffe44ba82423a16d4e9443a14fb53c Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Thu, 28 Apr 2022 05:20:22 -0300 Subject: [PATCH 13/13] fix: for issue #6311 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 04c52c6094..5dc9b22e2e 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,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.29.1", + "topcoder-react-lib": "1.2.6", "topcoder-react-ui-kit": "2.0.1", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2",