Skip to content

Commit e36e09b

Browse files
author
vikasrohit
authored
Merge pull request #1075 from topcoder-platform/develop
Prod Release - 0.5.2
2 parents 703e2e3 + 0dfc40b commit e36e09b

File tree

4 files changed

+17
-22
lines changed

4 files changed

+17
-22
lines changed

src/components/ChallengeEditor/ChallengeTotal-Field/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const ChallengeTotalField = ({ challenge }) => {
1111
challengeTotal = _.flatten(challenge.prizeSets.map(p => p.prizes))
1212
.map(p => p.value)
1313
.map(v => convertDollarToInteger(v, '$'))
14-
.map(v => +v)
1514
.reduce((prev, next) => prev + next, 0)
1615
}
1716
return (

src/components/ChallengeEditor/ChallengeView/index.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,14 @@ const ChallengeView = ({
189189
<span><span className={styles.fieldTitle}>Groups:</span> {groups}</span>
190190
</div>
191191
</div>
192-
{isBetaMode() && (
193-
<div className={styles.row}>
194-
<div className={styles.col}>
195-
<span>
196-
<span className={styles.fieldTitle}>Billing Account Id:</span>
197-
{projectDetail.billingAccountId}
198-
</span>
199-
</div>
192+
<div className={styles.row}>
193+
<div className={styles.col}>
194+
<span>
195+
<span className={styles.fieldTitle}>Billing Account Id:</span>
196+
{projectDetail.billingAccountId}
197+
</span>
200198
</div>
201-
)}
199+
</div>
202200
{isBetaMode() && (
203201
<UseSchedulingAPIField challenge={challenge} readOnly />
204202
)}

src/components/ChallengeEditor/index.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -851,15 +851,15 @@ class ChallengeEditor extends Component {
851851
groups: []
852852
// prizeSets: this.getDefaultPrizeSets()
853853
}
854-
if (isBetaMode() && projectDetail.terms) {
854+
if (projectDetail.terms) {
855855
const currTerms = new Set(newChallenge.terms.map(term => term.id))
856856
newChallenge.terms.push(
857857
...projectDetail.terms
858858
.filter(term => !currTerms.has(term))
859859
.map(term => ({ id: term, roleId: SUBMITTER_ROLE_UUID }))
860860
)
861861
}
862-
if (isBetaMode() && projectDetail.groups) {
862+
if (projectDetail.groups) {
863863
newChallenge.groups.push(...projectDetail.groups)
864864
}
865865
const discussions = this.getDiscussionsConfig(newChallenge)
@@ -1419,16 +1419,14 @@ class ChallengeEditor extends Component {
14191419
{/* remove terms field and use default term */}
14201420
{false && (<TermsField terms={metadata.challengeTerms} challenge={challenge} onUpdateMultiSelect={this.onUpdateMultiSelect} />)}
14211421
<GroupsField onUpdateMultiSelect={this.onUpdateMultiSelect} challenge={challenge} />
1422-
{isBetaMode() && (
1423-
<div className={styles.row}>
1424-
<div className={styles.col}>
1425-
<span>
1426-
<span className={styles.fieldTitle}>Billing Account Id:</span>
1427-
{projectDetail.billingAccountId}
1428-
</span>
1429-
</div>
1422+
<div className={styles.row}>
1423+
<div className={styles.col}>
1424+
<span>
1425+
<span className={styles.fieldTitle}>Billing Account Id:</span>
1426+
{projectDetail.billingAccountId}
1427+
</span>
14301428
</div>
1431-
)}
1429+
</div>
14321430
{isBetaMode() && (
14331431
<UseSchedulingAPIField challenge={challenge} toggleUseSchedulingAPI={this.toggleUseSchedulingAPI} />
14341432
)}

src/util/input-check.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const validateValue = (value, checkType = '', prefix = '') => {
4444
*/
4545
export const convertDollarToInteger = (value, prefix = '') => {
4646
if (value) {
47-
return parseInt(('' + value).replace(prefix, '').replace(' ', '').replace(/[^0-9]/g, ''))
47+
return parseInt(('' + value).replace(prefix, '').replace(' ', '').replace(/[^0-9.,]/g, ''))
4848
}
4949
return 0
5050
}

0 commit comments

Comments
 (0)