Skip to content

Commit 884b5d0

Browse files
author
vikasrohit
authored
Merge pull request #4382 from appirio-tech/dev
Prod Release - 2.20.0
2 parents 9055b62 + f427ca4 commit 884b5d0

File tree

6 files changed

+18
-7
lines changed

6 files changed

+18
-7
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ workflows:
128128
- build-dev
129129
filters:
130130
branches:
131-
only: ['dev', 'feature/project-plan-simplification-0']
131+
only: ['dev', 'feature/cf-2.20']
132132

133133
- deployTest01:
134134
context : org-global

src/components/TeamManagement/TeamManagement.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ class TeamManagement extends React.Component {
114114
const copilotRemoveAction = hasPermission(PERMISSIONS.REMOVE_COPILOTS)
115115
const copilotViewAction = hasPermission(PERMISSIONS.VIEW_COPILOTS)
116116
const canRequestCopilot = hasPermission(PERMISSIONS.REQUEST_COPILOTS)
117+
const canManageCopilots = hasPermission(PERMISSIONS.MANAGE_COPILOTS)
117118
const copilotRequestLink = `https://topcoder.typeform.com/to/YJ7AL4p8#handle=${currentUser.handle}&projectid=${projectId}`
118119
const canJoinTopcoderTeam = !currentMember && hasPermission(PERMISSIONS.JOIN_TOPCODER_TEAM)
120+
const hasCopilot = members.some(member => member.role === 'copilot')
119121

120122
const sortedMembers = members
121123
let projectTeamInviteCount = 0
@@ -194,7 +196,7 @@ class TeamManagement extends React.Component {
194196
<div className="projects-team">
195197
<div className="title">
196198
<span styleName="title-text">Copilot</span>
197-
{(copilotTeamManageAction || copilotRemoveAction || copilotViewAction) &&
199+
{((copilotTeamManageAction || copilotRemoveAction || copilotViewAction) && (canManageCopilots || hasCopilot)) &&
198200
<span className="title-action" onClick={() => onShowCopilotDialog(true)}>
199201
{(copilotTeamManageAction || copilotRemoveAction) ? 'Manage' : 'View'}
200202
</span>

src/components/TeamManagement/TeamManagement.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,10 @@
457457
display: flex;
458458
flex-wrap: wrap;
459459
flex-direction: column;
460+
461+
div {
462+
align-items: center;
463+
}
460464
}
461465
}
462466
}

src/projects/detail/components/CreatePhaseForm/CreatePhaseForm.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,14 @@ class CreatePhaseForm extends React.Component {
120120

121121
const phaseData = {
122122
title: model.title,
123-
description: model.description || ' ',
124123
startDate: moment(model.startDate),
125124
endDate: moment(model.endDate),
126125
}
127126

127+
if (model.description.trim()) {
128+
phaseData.description = model.description
129+
}
130+
128131
const apiMilestones = milestones.map((milestone, index) => ({
129132
// default values
130133
...MILESTONE_DEFAULT_VALUES[milestone.type],

src/projects/detail/components/PhaseCard/EditStageForm.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ class EditStageForm extends React.Component {
8686
if (publishClicked && phase.status === PHASE_STATUS_DRAFT) {
8787
newStatus = PHASE_STATUS_ACTIVE
8888
}
89+
if (!model.description.trim()) {
90+
delete model.description
91+
}
8992
const updateParam = _.assign({}, model, {
90-
description: model.description || ' ',
9193
startDate: updatedStartDate,
9294
endDate: updatedEndDate || '',
9395
status: newStatus
@@ -285,7 +287,7 @@ class EditStageForm extends React.Component {
285287
wrapperClass={`${styles['input-row']}`}
286288
label="Description"
287289
name="description"
288-
value={phase.description ? phase.description.trim() : ''}
290+
value={phase.description}
289291
maxLength={255}
290292
/>
291293
<label styleName="description-sub-label">255 character maximum</label>

src/projects/detail/components/timeline/CreateMilestoneForm/CreateMilestoneForm.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ class CreateMilestoneForm extends React.Component {
3434
cancelEdit() {
3535
const { previousMilestone } = this.props
3636
const startDate = previousMilestone ? moment.utc(previousMilestone.completionDate || previousMilestone.endDate) : moment.utc()
37-
this.state = {
37+
this.setState({
3838
isEditing: false,
3939
type: '',
4040
name: '',
4141
startDate: startDate.format('YYYY-MM-DD'),
4242
endDate: startDate.add(3, 'days').format('YYYY-MM-DD')
43-
}
43+
})
4444
}
4545

4646
onAddClick() {

0 commit comments

Comments
 (0)