Skip to content

Commit 26852da

Browse files
author
vikasrohit
authored
Merge pull request #895 from topcoder-platform/develop
Update NDA and Resource Roles
2 parents 5c36237 + 55bc7bf commit 26852da

File tree

5 files changed

+19
-18
lines changed

5 files changed

+19
-18
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@
2323
npm-debug.log*
2424
yarn-debug.log*
2525
yarn-error.log*
26+
27+
*.env

config/constants/production.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ module.exports = {
2424
CONNECT_APP_URL: `https://connect.${DOMAIN}`,
2525
DIRECT_PROJECT_URL: `https://www.${DOMAIN}/direct`,
2626
ONLINE_REVIEW_URL: `https://software.${DOMAIN}`,
27-
DEFAULT_TERM_UUID: '9ef9dec4-dddb-48c9-9cce-659db68bc5ac', // Terms & Conditions of Use at TopCoder
28-
DEFAULT_NDA_UUID: '876e9802-eb2c-4779-a2a8-8dd8e7fb783d', // Appirio NDA v2.0
27+
DEFAULT_TERM_UUID: '564a981e-6840-4a5c-894e-d5ad22e9cd6f', // Terms & Conditions of Use at TopCoder
28+
DEFAULT_NDA_UUID: 'c41e90e5-4d0e-4811-bd09-38ff72674490', // Appirio NDA v2.0
2929
SUBMITTER_ROLE_UUID: '732339e7-8e30-49d7-9198-cccf9451e221',
3030
DEV_TRACK_ID: '9b6fc876-f4d9-4ccb-9dfd-419247628825',
3131
DES_TRACK_ID: '5fa04185-041f-49a6-bfd1-fe82533cd6c8',

src/components/ChallengeEditor/ChallengeView/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,15 @@ const ChallengeView = ({
163163
readOnly
164164
/>
165165
)}
166+
<div>
167+
{ challenge.discussions && challenge.discussions.map(d => (
168+
<div key={d.id} className={cn(styles.row, styles.topRow)}>
169+
<div className={styles.col}>
170+
<span><span className={styles.fieldTitle}>Forum:</span> <a href={d.url} target='_blank' rel='noopener noreferrer'>{d.name}</a></span>
171+
</div>
172+
</div>
173+
))}
174+
</div>
166175
</div>
167176
<div className={styles.group}>
168177
<div className={styles.title}>Public specification <span>*</span></div>

src/components/ChallengeEditor/index.js

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,7 @@ class ChallengeEditor extends Component {
10311031
return <div>Error loading challenge</div>
10321032
}
10331033
const isTask = _.get(challenge, 'task.isTask', false)
1034+
console.log(this.props.assignedMemberDetails)
10341035
const { assignedMemberDetails, error } = this.state
10351036
let isActive = false
10361037
let isDraft = false
@@ -1098,33 +1099,22 @@ class ChallengeEditor extends Component {
10981099
*/
10991100
if (isCloseTask && !isConfirm) {
11001101
const taskPrize = _.get(_.find(challenge.prizeSets, { type: 'placement' }), 'prizes[0].value')
1101-
const assignedMember = assignedMemberDetails ? assignedMemberDetails.handle : `User id: ${_.get(challenge, 'task.memberId')}`
1102-
const copilotFee = _.get(_.find(challenge.prizeSets, { type: 'copilot' }), 'prizes[0].value')
1103-
const copilot = challenge.copilot
1102+
const assignedMemberId = _.get(assignedMemberDetails, 'userId')
1103+
const assignedMember = _.get(assignedMemberDetails, 'handle', `User Id: ${assignedMemberId}`)
11041104

11051105
const validationErrors = []
1106-
if (!_.get(challenge, 'task.memberId')) {
1106+
if (!assignedMemberId) {
11071107
validationErrors.push('assign task member')
11081108
}
11091109

1110-
if (!copilot) {
1111-
validationErrors.push('select copilot')
1112-
}
1113-
1114-
if (!copilotFee) {
1115-
validationErrors.push('set copilot fee')
1116-
}
1117-
11181110
// if all data for closing task is there, show confirmation modal
11191111
if (validationErrors.length === 0) {
11201112
closeTaskModal = (
11211113
<ConfirmationModal
11221114
title='Close Task Confirmation'
11231115
message={
11241116
<p>
1125-
Are you sure want to close task <strong>"{challenge.name}"</strong> with the prize <strong>${taskPrize}</strong> for <strong>{assignedMember}</strong>
1126-
{' '}
1127-
and copilot fee <strong>${copilotFee}</strong> for <strong>{copilot}</strong>?
1117+
Are you sure want to close task <strong>"{challenge.name}"</strong> with the prize <strong>${taskPrize}</strong> for <strong>{assignedMember}</strong>?
11281118
</p>
11291119
}
11301120
theme={theme}

src/containers/ChallengeEditor/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class ChallengeEditor extends Component {
131131
}
132132
const userRoles = _.filter(challengeResources, cr => cr.memberId === `${loggedInUser.userId}`)
133133
const userResourceRoles = _.filter(resourceRoles, rr => _.some(userRoles, ur => ur.roleId === rr.id))
134-
return _.some(userResourceRoles, urr => urr.fullAccess && urr.isActive)
134+
return _.some(userResourceRoles, urr => urr.fullWriteAccess && urr.isActive)
135135
}
136136

137137
render () {

0 commit comments

Comments
 (0)