Skip to content

Commit 20f9169

Browse files
author
vikasrohit
authored
Merge pull request #3978 from appirio-tech/hotfix/post-release-2.9.1
[PROD] [HOTFIX] Post release 2.9.1
2 parents 572d0ad + 6b1a16a commit 20f9169

File tree

13 files changed

+115
-24
lines changed

13 files changed

+115
-24
lines changed

config/constants/dev.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@ module.exports = {
4949
TC_SYSTEM_USERID: process.env.DEV_TC_SYSTEM_USERID,
5050
MAINTENANCE_MODE: process.env.DEV_MAINTENANCE_MODE,
5151

52+
TC_CDN_URL: process.env.TC_CDN_URL || 'https://d1aahxkjiobka8.cloudfront.net'
5253
}

config/constants/master.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@ module.exports = {
4949
TC_SYSTEM_USERID: process.env.PROD_TC_SYSTEM_USERID,
5050
MAINTENANCE_MODE: process.env.PROD_MAINTENANCE_MODE,
5151

52+
TC_CDN_URL: process.env.TC_CDN_URL || 'https://dlxczxztayxv6.cloudfront.net'
5253
}

config/constants/qa.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = {
1515
ENV : 'QA',
1616

1717
PROJECTS_API_URL : 'http://api.topcoder-dev.com',
18-
18+
1919
NEW_RELIC_APPLICATION_ID: process.env.TRAVIS_BRANCH ? '11199233' : '',
2020

2121
ARENA_URL : '//arena.topcoder-qa.com',
@@ -47,4 +47,6 @@ module.exports = {
4747
CONNECT_MESSAGE_API_URL: 'https://api.topcoder-qa.com/v5',
4848
TC_SYSTEM_USERID: process.env.QA_TC_SYSTEM_USERID,
4949
MAINTENANCE_MODE: process.env.QA_MAINTENANCE_MODE,
50+
51+
TC_CDN_URL: process.env.TC_CDN_URL || 'https://d1aahxkjiobka8.cloudfront.net'
5052
}

src/api/projectMembers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function addProjectMember(projectId, newMember) {
4949

5050

5151
export function updateProjectMember(projectId, memberId, updatedProps) {
52-
const fields = 'id,userId,role,isPrimary,deletedAt,createdAt,updatedAt,deletedBy,createdBy,updatedBy,handle,photoURL,workingHourStart,workingHourEnd,timeZone'
52+
const fields = 'id,userId,role,isPrimary,deletedAt,createdAt,updatedAt,deletedBy,createdBy,updatedBy,handle,photoURL,workingHourStart,workingHourEnd,timeZone,email'
5353
const url = `${PROJECTS_API_URL}/v5/projects/${projectId}/members/${memberId}/?fields=`
5454
+ encodeURIComponent(fields)
5555
return axios.patch(url, updatedProps)
@@ -68,7 +68,7 @@ export function removeProjectMember(projectId, memberId) {
6868
}
6969

7070
export function getProjectMembers(projectId) {
71-
const fields = 'id,userId,role,isPrimary,deletedAt,createdAt,updatedAt,deletedBy,createdBy,updatedBy,handle,photoURL,workingHourStart,workingHourEnd,timeZone'
71+
const fields = 'id,userId,role,isPrimary,deletedAt,createdAt,updatedAt,deletedBy,createdBy,updatedBy,handle,photoURL,workingHourStart,workingHourEnd,timeZone,email'
7272
const url = `${PROJECTS_API_URL}/v5/projects/${projectId}/members/?fields=`
7373
+ encodeURIComponent(fields)
7474
return axios.get(url)
@@ -78,7 +78,7 @@ export function getProjectMembers(projectId) {
7878
}
7979

8080
export function getProjectMember(projectId, memberId) {
81-
const fields = 'id,userId,role,isPrimary,deletedAt,createdAt,updatedAt,deletedBy,createdBy,updatedBy,handle,photoURL,workingHourStart,workingHourEnd,timeZone'
81+
const fields = 'id,userId,role,isPrimary,deletedAt,createdAt,updatedAt,deletedBy,createdBy,updatedBy,handle,photoURL,workingHourStart,workingHourEnd,timeZone,email'
8282
const url = `${PROJECTS_API_URL}/v5/projects/${projectId}/members/${memberId}?fields=`
8383
+ encodeURIComponent(fields)
8484
return axios.get(url)

src/components/PositiveNumberInput/PositiveNumberInput.jsx

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ class PositiveNumberInput extends React.PureComponent {
77
super(props)
88

99
this.isInputValid = true
10+
this.previousValue = props.value || ''
1011

1112
this.onKeyDown = this.onKeyDown.bind(this)
1213
this.onPaste = this.onPaste.bind(this)
1314
this.onKeyUp = this.onKeyUp.bind(this)
15+
this.onChange = this.onChange.bind(this)
1416
}
1517

1618
onKeyDown(evt) {
@@ -44,26 +46,62 @@ class PositiveNumberInput extends React.PureComponent {
4446
this.props.onKeyUp(evt)
4547
}
4648

49+
onChange(evt) {
50+
const { onChange } = this.props
51+
52+
this.enforceInputBelowMax(evt)
53+
onChange(evt)
54+
}
55+
56+
/**
57+
* Makes sure the input value is kept below the max value
58+
* @param {Event} evt The change event
59+
*/
60+
enforceInputBelowMax(evt) {
61+
const value = evt.target.value
62+
if (this.isBelowMaxLimit(value)) {
63+
this.previousValue = value
64+
} else {
65+
evt.target.value = this.previousValue
66+
}
67+
}
68+
69+
isBelowMaxLimit(text) {
70+
const { max = Infinity } = this.props
71+
return Number(text) <= max
72+
}
73+
4774
render() {
4875
const props = omit(this.props, ['onValidityChange'])
49-
return <input type="number" min={0} {...props} onKeyDown={this.onKeyDown} onPaste={this.onPaste} onKeyUp={this.onKeyUp} />
76+
return (
77+
<input
78+
type="number"
79+
min={0}
80+
{...props}
81+
onKeyDown={this.onKeyDown}
82+
onPaste={this.onPaste}
83+
onKeyUp={this.onKeyUp}
84+
onChange={this.onChange}
85+
/>
86+
)
5087
}
5188
}
5289

5390
PositiveNumberInput.defaultProps = {
5491
onKeyDown: noop,
5592
onPaste: noop,
5693
onKeyUp: noop,
57-
onValidityChange: noop
58-
94+
onValidityChange: noop,
95+
onChange: noop,
5996
}
6097

6198
PositiveNumberInput.propTypes = {
99+
max: PT.number,
62100
onKeyDown: PT.func,
63101
onPaste: PT.func,
64102
onKeyUp: PT.func,
65-
onValidityChange: PT.func
103+
onValidityChange: PT.func,
104+
onChange: PT.func,
66105
}
67106

68-
69107
export default PositiveNumberInput

src/components/TeamManagement/Dialog.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ class Dialog extends React.Component {
6363
isOpen
6464
className="management-dialog"
6565
overlayClassName="management-dialog-overlay"
66-
onRequestClose={onCancel}
67-
shouldCloseOnOverlayClick={!isLoading}
68-
shouldCloseOnEsc={!isLoading}
66+
shouldCloseOnOverlayClick={false}
67+
shouldCloseOnEsc={false}
6968
contentLabel=""
7069
>
7170
<div className="management-dialog-container">

src/components/User/UserTooltip.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import _ from 'lodash'
22
import React from 'react'
33
import PropTypes from 'prop-types'
4+
import cn from 'classnames'
45
import Tooltip from 'appirio-tech-react-components/components/Tooltip/Tooltip'
56
import Avatar from 'appirio-tech-react-components/components/Avatar/Avatar'
67
import { DOMAIN } from '../../config/constants'
@@ -53,7 +54,7 @@ const UserTooltip = ({ usr, id, previewAvatar, size, invitedLabel, showEmailOnly
5354
</span>
5455
)}
5556
</div>
56-
<div className="tt-col-user-data">
57+
<div className={cn('tt-col-user-data', { 'with-invite-label': invitedLabel })}>
5758
{!showEmailOnly && <div className="user-name-container">
5859
<span>{userFullName}</span>
5960
</div>}

src/components/User/UserTooltip.scss

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,14 @@
127127
display: flex;
128128
flex-wrap: wrap;
129129
align-content: flex-start;
130-
position: relative;
131-
width: 80%;
130+
overflow: hidden;
132131
}
133132

134133
.user-name-container {
135-
flex: 1 0 90%;
134+
flex: 1 1 100%;
135+
overflow: hidden;
136+
text-overflow: ellipsis;
137+
white-space: nowrap;
136138

137139
span {
138140
font-size: 15px;
@@ -143,8 +145,10 @@
143145
}
144146

145147
.user-handle-container {
146-
padding-right: 10px;
147148
height: 20px;
149+
overflow: hidden;
150+
text-overflow: ellipsis;
151+
white-space: nowrap;
148152

149153
&.with-email {
150154
border-right: 1px solid $tc-gray-50;
@@ -163,7 +167,6 @@
163167
overflow: hidden;
164168
text-overflow: ellipsis;
165169
white-space: nowrap;
166-
max-width: 80%;
167170

168171
a {
169172
font-size: 12px;
@@ -186,6 +189,11 @@
186189
}
187190
}
188191
}
192+
193+
.tt-col-user-data.with-invite-label .user-name-container,
194+
.tt-col-user-data.with-invite-label .user-email-container.text-dark {
195+
margin-right: 75px;
196+
}
189197
}
190198

191199
.sf-data-bottom-container {

src/config/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ export const DIRECT_PROJECT_URL = `https://www.${DOMAIN}/direct/projectOverview?
709709
export const SALESFORCE_PROJECT_LEAD_LINK = process.env.SALESFORCE_PROJECT_LEAD_LINK
710710
export const TC_NOTIFICATION_URL = process.env.TC_NOTIFICATION_URL || `${TC_API_URL}/v5/notifications`
711711

712-
export const TC_CDN_URL = process.env.NODE_ENV === 'development' ? 'https://d1aahxkjiobka8.cloudfront.net' : 'https://d2nl5eqipnb33q.cloudfront.net'
712+
export const TC_CDN_URL = process.env.TC_CDN_URL
713713

714714
export const RESET_PASSWORD_URL = `https://accounts.${DOMAIN}/connect/reset-password`
715715
export const VERIFY_EMAIL_URL = `http://www.${DOMAIN}/settings/account/changeEmail`

src/config/permissions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ const TOPCODER_ALL = [
114114
ROLE_ADMINISTRATOR,
115115
ROLE_CONNECT_ADMIN,
116116
ROLE_CONNECT_MANAGER,
117+
ROLE_CONNECT_COPILOT_MANAGER,
117118
ROLE_CONNECT_ACCOUNT_MANAGER,
118119
ROLE_BUSINESS_DEVELOPMENT_REPRESENTATIVE,
119120
ROLE_PRESALES,

0 commit comments

Comments
 (0)