Skip to content

Show billing account id in beta #1053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions src/components/ChallengeEditor/ChallengeView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ const ChallengeView = ({
assignedMemberDetails,
enableEdit,
onLaunchChallenge,
onCloseTask }) => {
onCloseTask,
location }) => {
const params = new URLSearchParams(location.search)
const selectedType = _.find(metadata.challengeTypes, { id: challenge.typeId })
const challengeTrack = _.find(metadata.challengeTracks, { id: challenge.trackId })

Expand Down Expand Up @@ -179,11 +181,25 @@ const ChallengeView = ({
</label>
</div>
</div>
{openAdvanceSettings && (<div className={cn(styles.row, styles.topRow)}>
<div className={styles.col}>
<span><span className={styles.fieldTitle}>Groups:</span> {groups}</span>
</div>
</div>)}
{openAdvanceSettings && (
<React.Fragment>
<div className={cn(styles.row, styles.topRow)}>
<div className={styles.col}>
<span><span className={styles.fieldTitle}>Groups:</span> {groups}</span>
</div>
</div>
{params.get('beta') && (
<div className={styles.row}>
<div className={styles.col}>
<span>
<span className={styles.fieldTitle}>Billing Account Id:</span>
{projectDetail.billingAccountId}
</span>
</div>
</div>
)}
</React.Fragment>
)}
{
<div className={styles.PhaseRow}>
<PhaseInput
Expand Down Expand Up @@ -267,7 +283,8 @@ ChallengeView.propTypes = {
assignedMemberDetails: PropTypes.shape(),
enableEdit: PropTypes.bool,
onLaunchChallenge: PropTypes.func,
onCloseTask: PropTypes.func
onCloseTask: PropTypes.func,
location: PropTypes.object
}

export default withRouter(ChallengeView)
15 changes: 14 additions & 1 deletion src/components/ChallengeEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,8 @@ class ChallengeEditor extends Component {
}

render () {
const params = new URLSearchParams(this.props.location.search)

const {
isLaunch,
isConfirm,
Expand Down Expand Up @@ -1395,6 +1397,16 @@ class ChallengeEditor extends Component {
{/* remove terms field and use default term */}
{false && (<TermsField terms={metadata.challengeTerms} challenge={challenge} onUpdateMultiSelect={this.onUpdateMultiSelect} />)}
<GroupsField onUpdateMultiSelect={this.onUpdateMultiSelect} challenge={challenge} />
{params.get('beta') && (
<div className={styles.row}>
<div className={styles.col}>
<span>
<span className={styles.fieldTitle}>Billing Account Id:</span>
{projectDetail.billingAccountId}
</span>
</div>
</div>
)}
</React.Fragment>
)}
{!isTask && (
Expand Down Expand Up @@ -1526,7 +1538,8 @@ ChallengeEditor.propTypes = {
replaceResourceInRole: PropTypes.func,
partiallyUpdateChallengeDetails: PropTypes.func.isRequired,
deleteChallenge: PropTypes.func.isRequired,
loggedInUser: PropTypes.shape().isRequired
loggedInUser: PropTypes.shape().isRequired,
location: PropTypes.object
}

export default withRouter(ChallengeEditor)