Skip to content

Commit 8b0d771

Browse files
authored
Merge pull request #1382 from topcoder-platform/phase_durations
Phase durations
2 parents ed93f7d + d5591e0 commit 8b0d771

File tree

13 files changed

+697
-119
lines changed

13 files changed

+697
-119
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ workflows:
150150
context : org-global
151151
filters: &filters-dev
152152
branches:
153-
only: ['develop', 'hot-fix-jira-vuln-2333']
153+
only: ['develop']
154154

155155
# Production builds are exectuted only on tagged commits to the
156156
# master branch.

package-lock.json

Lines changed: 137 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"@fortawesome/fontawesome-svg-core": "^1.2.14",
88
"@fortawesome/free-solid-svg-icons": "^5.7.1",
99
"@fortawesome/react-fontawesome": "^0.1.4",
10+
"@nateradebaugh/react-datetime": "^4.4.11",
1011
"@popperjs/core": "^2.5.4",
1112
"@svgr/webpack": "2.4.1",
1213
"axios": "^0.19.0",
@@ -53,6 +54,7 @@
5354
"mini-css-extract-plugin": "0.4.3",
5455
"moment": "^2.24.0",
5556
"moment-duration-format": "^2.2.2",
57+
"moment-timezone": "^0.5.34",
5658
"node-sass": "^4.14.0",
5759
"optimize-css-assets-webpack-plugin": "5.0.1",
5860
"pnp-webpack-plugin": "1.1.0",

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import $ from 'jquery'
66
import styles from './ChallengeSchedule-Field.module.scss'
77
import cn from 'classnames'
88
import jstz from 'jstimezonedetect'
9-
import PhaseInput from '../../PhaseInput'
9+
import StartDateInput from '../../StartDateInput'
1010
import Chart from 'react-google-charts'
1111
import Select from '../../Select'
1212
import { parseSVG } from '../../../util/svg'
@@ -183,7 +183,7 @@ class ChallengeScheduleField extends Component {
183183
return (
184184
_.map(challenge.phases, (p, index) => (
185185
<div className={styles.PhaseRow} key={index}>
186-
<PhaseInput
186+
<StartDateInput
187187
phase={this.getPhaseTemplate(p)}
188188
withDuration
189189
onUpdateSelect={onUpdateSelect}
@@ -345,7 +345,7 @@ class ChallengeScheduleField extends Component {
345345
</div>
346346
</div> }
347347
<div className={styles.PhaseRow}>
348-
<PhaseInput
348+
<StartDateInput
349349
withDates
350350
phase={{
351351
name: 'Start Date',

src/components/ChallengeEditor/ChallengeView/index.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ import ChallengePrizesField from '../ChallengePrizes-Field'
1616
import CopilotFeeField from '../CopilotFee-Field'
1717
import ChallengeTotalField from '../ChallengeTotal-Field'
1818
import Loader from '../../Loader'
19-
import PhaseInput from '../../PhaseInput'
2019
import AssignedMemberField from '../AssignedMember-Field'
2120
import { getResourceRoleByName } from '../../../util/tc'
2221
import { isBetaMode } from '../../../util/cookie'
2322
import { loadGroupDetails } from '../../../actions/challenges'
2423
import { REVIEW_TYPES, CONNECT_APP_URL, PHASE_PRODUCT_CHALLENGE_ID_FIELD } from '../../../config/constants'
24+
import PhaseInput from '../../PhaseInput'
2525

2626
const ChallengeView = ({
2727
projectDetail,
@@ -90,6 +90,7 @@ const ChallengeView = ({
9090
if (isLoading || _.isEmpty(metadata.challengePhases) || challenge.id !== challengeId) return <Loader />
9191
const showTimeline = false // disables the timeline for time being https://github.com/topcoder-platform/challenge-engine-ui/issues/706
9292
const isTask = _.get(challenge, 'task.isTask', false)
93+
const phases = _.get(challenge, 'phases', [])
9394

9495
return (
9596
<div className={styles.wrapper}>
@@ -188,16 +189,14 @@ const ChallengeView = ({
188189
</>
189190
)}
190191
{
191-
<div className={styles.PhaseRow}>
192+
phases.map((phase, index) => (
192193
<PhaseInput
193-
withDates
194-
phase={{
195-
name: 'Start Date',
196-
date: challenge.startDate
197-
}}
194+
phase={phase}
195+
phaseIndex={index}
196+
key={index}
198197
readOnly
199198
/>
200-
</div>
199+
))
201200
}
202201
{showTimeline && (
203202
<ChallengeScheduleField

0 commit comments

Comments
 (0)