Skip to content

Commit 320c882

Browse files
committed
Showw billing account id in advanced settings
1 parent 6dc4760 commit 320c882

File tree

2 files changed

+38
-8
lines changed

2 files changed

+38
-8
lines changed

src/components/ChallengeEditor/ChallengeView/index.js

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ const ChallengeView = ({
3636
assignedMemberDetails,
3737
enableEdit,
3838
onLaunchChallenge,
39-
onCloseTask }) => {
39+
onCloseTask,
40+
location }) => {
41+
const params = new URLSearchParams(location.search)
4042
const selectedType = _.find(metadata.challengeTypes, { id: challenge.typeId })
4143
const challengeTrack = _.find(metadata.challengeTracks, { id: challenge.trackId })
4244

@@ -178,11 +180,25 @@ const ChallengeView = ({
178180
</label>
179181
</div>
180182
</div>
181-
{openAdvanceSettings && (<div className={cn(styles.row, styles.topRow)}>
182-
<div className={styles.col}>
183-
<span><span className={styles.fieldTitle}>Groups:</span> {groups}</span>
184-
</div>
185-
</div>)}
183+
{openAdvanceSettings && (
184+
<React.Fragment>
185+
<div className={cn(styles.row, styles.topRow)}>
186+
<div className={styles.col}>
187+
<span><span className={styles.fieldTitle}>Groups:</span> {groups}</span>
188+
</div>
189+
</div>
190+
{params.get('beta') && (
191+
<div className={styles.row}>
192+
<div className={styles.col}>
193+
<span>
194+
<span className={styles.fieldTitle}>Billing Account Id:</span>
195+
{projectDetail.billingAccountId}
196+
</span>
197+
</div>
198+
</div>
199+
)}
200+
</React.Fragment>
201+
)}
186202
{
187203
<div className={styles.PhaseRow}>
188204
<PhaseInput
@@ -265,7 +281,8 @@ ChallengeView.propTypes = {
265281
assignedMemberDetails: PropTypes.shape(),
266282
enableEdit: PropTypes.bool,
267283
onLaunchChallenge: PropTypes.func,
268-
onCloseTask: PropTypes.func
284+
onCloseTask: PropTypes.func,
285+
location: PropTypes.object
269286
}
270287

271288
export default withRouter(ChallengeView)

src/components/ChallengeEditor/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,8 @@ class ChallengeEditor extends Component {
11381138
}
11391139

11401140
render () {
1141+
const params = new URLSearchParams(this.props.location.search)
1142+
11411143
const {
11421144
isLaunch,
11431145
isConfirm,
@@ -1416,6 +1418,16 @@ class ChallengeEditor extends Component {
14161418
{/* remove terms field and use default term */}
14171419
{false && (<TermsField terms={metadata.challengeTerms} challenge={challenge} onUpdateMultiSelect={this.onUpdateMultiSelect} />)}
14181420
<GroupsField onUpdateMultiSelect={this.onUpdateMultiSelect} challenge={challenge} />
1421+
{params.get('beta') && (
1422+
<div className={styles.row}>
1423+
<div className={styles.col}>
1424+
<span>
1425+
<span className={styles.fieldTitle}>Billing Account Id:</span>
1426+
{projectDetail.billingAccountId}
1427+
</span>
1428+
</div>
1429+
</div>
1430+
)}
14191431
</React.Fragment>
14201432
)}
14211433
{!isTask && (
@@ -1546,7 +1558,8 @@ ChallengeEditor.propTypes = {
15461558
replaceResourceInRole: PropTypes.func,
15471559
partiallyUpdateChallengeDetails: PropTypes.func.isRequired,
15481560
deleteChallenge: PropTypes.func.isRequired,
1549-
loggedInUser: PropTypes.shape().isRequired
1561+
loggedInUser: PropTypes.shape().isRequired,
1562+
location: PropTypes.object
15501563
}
15511564

15521565
export default withRouter(ChallengeEditor)

0 commit comments

Comments
 (0)