Skip to content

Commit 8bb565b

Browse files
committed
fix: issue #4399
1 parent 7d8d768 commit 8bb565b

File tree

7 files changed

+23
-2
lines changed

7 files changed

+23
-2
lines changed

config/constants/dev.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module.exports = {
3232

3333
ACCOUNTS_APP_URL : 'https://accounts-auth0.topcoder-dev.com',
3434
ACCOUNTS_APP_CONNECTOR_URL : 'https://accounts-auth0.topcoder-dev.com',
35+
TYPEFORM_URL : 'https://topcoder.typeform.com/to/vgqiBXdk',
3536

3637
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY_DEV,
3738
FILE_PICKER_SUBMISSION_CONTAINER_NAME: 'submission-staging-dev',

config/constants/master.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module.exports = {
3333

3434
ACCOUNTS_APP_URL : 'https://accounts-auth0.topcoder.com',
3535
ACCOUNTS_APP_CONNECTOR_URL : 'https://accounts-auth0.topcoder.com',
36+
TYPEFORM_URL : 'https://topcoder.typeform.com/to/vgqiBXdk',
3637

3738
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY_PROD,
3839
FILE_PICKER_SUBMISSION_CONTAINER_NAME: 'submission-staging-prod',

config/constants/qa.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module.exports = {
3232

3333
ACCOUNTS_APP_URL : 'https://accounts.topcoder-qa.com/#!/member',
3434
ACCOUNTS_APP_CONNECTOR_URL : 'https://accounts.topcoder-qa.com/connector.html',
35+
TYPEFORM_URL : 'https://topcoder.typeform.com/to/vgqiBXdk',
3536

3637
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY_QA,
3738
FILE_PICKER_SUBMISSION_CONTAINER_NAME: 'submission-staging-qa',

src/components/TeamManagement/MemberItem.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import './MemberItem.scss'
1010

1111
const MemberItem = (props) => {
1212

13-
const {usr, showEmailOnly} = props
13+
const {usr, showEmailOnly, feedback} = props
1414

1515
const userFullName = getFullNameWithFallback(usr)
1616
const workingHourStart = _.get(usr, 'workingHourStart')
@@ -64,6 +64,7 @@ const MemberItem = (props) => {
6464
return (
6565
<div styleName="container">
6666
<UserTooltip {...props} localTimeInfo={localTimeInfoEl}/>
67+
{feedback && <a styleName="feed-back" href={feedback} target="_blank">Feed Back</a>}
6768
<div styleName="member-detail">
6869
<div styleName="member-name">{showEmailOnly? email :userFullName}</div>
6970
{localWhStart && localWhEnd && <div styleName="wk-hour">WH: {localWhStart} - {localWhEnd} {localTimeOffsetFormat}</div>}
@@ -84,6 +85,7 @@ MemberItem.propTypes = {
8485
PropTypes.number
8586
]).isRequired,
8687
previewAvatar: PropTypes.bool,
88+
feedback: PropTypes.string,
8789
showEmailOnly: PropTypes.bool,
8890
size: PropTypes.number
8991
}

src/components/TeamManagement/MemberItem.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
flex-direction: row;
66
min-height: 51px;
77
width: 100%;
8+
position: relative;
89

910
& + & {
1011
margin-top: 2 * $base-unit;
@@ -20,6 +21,14 @@
2021
}
2122
}
2223

24+
.feed-back {
25+
color: #0681ff;
26+
position: absolute;
27+
font-size: 12px;
28+
right: 0px;
29+
top: 4px;
30+
}
31+
2332
.member-detail {
2433
margin-left: 2 * $base-unit;
2534
overflow: hidden;

src/components/TeamManagement/TeamManagement.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import MemberItem from './MemberItem'
99
import AddIcon from '../../assets/icons/icon-ui-bold-add.svg'
1010
import Dialog from './Dialog'
1111
import { PERMISSIONS } from '../../config/permissions'
12+
import { TYPEFORM_URL } from '../../config/constants'
1213
import {hasPermission} from '../../helpers/permissions'
1314
import { getFullNameWithFallback } from '../../helpers/tcHelpers'
1415

@@ -213,8 +214,13 @@ class TeamManagement extends React.Component {
213214
return null
214215
}
215216

217+
let feedback = ''
218+
if (member.handle !== currentUser.handle) {
219+
feedback = `${TYPEFORM_URL}#copilot=${member.handle}&projectid=${projectId}&submitter=${currentUser.handle}`
220+
}
221+
216222
return (
217-
<MemberItem usr={member} id={i} key={i} previewAvatar size={40}/>
223+
<MemberItem usr={member} id={i} key={i} previewAvatar size={40} feedback={feedback} />
218224
)
219225
})}
220226
{copilotTeamInvites.map((invite, i) => {

src/config/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ export const TC_NOTIFICATION_URL = process.env.TC_NOTIFICATION_URL || `${TC_API_
764764

765765
export const TC_CDN_URL = process.env.TC_CDN_URL || `https://community-app.${DOMAIN}/api/cdn/public`
766766

767+
export const TYPEFORM_URL = process.env.TYPEFORM_URL || 'https://topcoder.typeform.com/to/vgqiBXdk'
767768
export const RESET_PASSWORD_URL = `https://accounts.${DOMAIN}/member/reset-password`
768769
export const VERIFY_EMAIL_URL = `http://www.${DOMAIN}/settings/account/changeEmail`
769770
export const TOPCODER_CONNECT_TERMS_URL = `https://connect.${DOMAIN}/terms`

0 commit comments

Comments
 (0)