Skip to content

Commit df328ec

Browse files
committed
fix: issue #4315
1 parent 1a416c1 commit df328ec

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

config/constants/dev.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module.exports = {
3838
FILE_PICKER_ACCEPT: process.env.FILE_PICKER_ACCEPT_DEV,
3939

4040
SALESFORCE_PROJECT_LEAD_LINK: 'https://c.cs18.visual.force.com/apex/ConnectLead?connectProjectId=',
41+
SALESFORCE_BILLING_ACCOUNT_LINK: 'https://c.cs18.visual.force.com/apex/baredirect?id=',
4142

4243
CONNECT_SEGMENT_KEY: process.env.DEV_SEGMENT_KEY,
4344
PREDIX_PROGRAM_ID : 3448,

config/constants/master.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module.exports = {
3939
FILE_PICKER_ACCEPT: process.env.FILE_PICKER_ACCEPT_PROD,
4040

4141
SALESFORCE_PROJECT_LEAD_LINK: 'https://topcoder.my.salesforce.com/apex/ConnectLead?connectProjectId=',
42+
SALESFORCE_BILLING_ACCOUNT_LINK: 'https://topcoder.my.salesforce.com/apex/baredirect?id=',
4243
CONNECT_SEGMENT_KEY: process.env.PROD_SEGMENT_KEY,
4344
PREDIX_PROGRAM_ID : 3448,
4445
IBM_COGNITIVE_PROGRAM_ID : 3449,

config/constants/qa.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module.exports = {
3838
FILE_PICKER_ACCEPT: process.env.FILE_PICKER_ACCEPT_QA,
3939

4040
SALESFORCE_PROJECT_LEAD_LINK: 'https://c.cs18.visual.force.com/apex/ConnectLead?connectProjectId=',
41+
SALESFORCE_BILLING_ACCOUNT_LINK: 'https://c.cs18.visual.force.com/apex/baredirect?id=',
4142
CONNECT_SEGMENT_KEY: process.env.QA_SEGMENT_KEY,
4243
PREDIX_PROGRAM_ID : 3448,
4344
IBM_COGNITIVE_PROGRAM_ID : 3449,

src/config/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ export const TC_API_URL = `https://api.${DOMAIN}`
738738
export const DIRECT_PROJECT_URL = `https://www.${DOMAIN}/direct/projectOverview?formData.projectId=`
739739
export const WORK_MANAGER_APP = `https://challenges.${DOMAIN}/projects`
740740
export const SALESFORCE_PROJECT_LEAD_LINK = process.env.SALESFORCE_PROJECT_LEAD_LINK
741+
export const SALESFORCE_BILLING_ACCOUNT_LINK = process.env.SALESFORCE_BILLING_ACCOUNT_LINK
741742
export const TC_NOTIFICATION_URL = process.env.TC_NOTIFICATION_URL || `${TC_API_URL}/v5/notifications`
742743
// Uncomment if you run TC Notifications locally
743744
// export const TC_NOTIFICATION_URL = 'http://localstho:4000/v5/notifications'

src/projects/detail/components/BillingAccountField/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {HOC as hoc} from 'formsy-react'
33

44
import Select from '../../../../components/Select/Select'
55
import {fetchBillingAccounts} from '../../../../api/billingAccounts'
6-
// import {SALESFORCE_PROJECT_LEAD_LINK} from '../../../../config/constants'
6+
import {SALESFORCE_BILLING_ACCOUNT_LINK} from '../../../../config/constants'
77

88
import styles from './styles.module.scss'
99

@@ -90,17 +90,16 @@ class BillingAccountField extends React.Component {
9090
options={this.state.billingAccounts}
9191
isDisabled={this.state.billingAccounts.length === 0}
9292
/>
93-
{/* Hide this link because we haven't implemented a required page in SFDC yet */}
94-
{/* <div className={styles.manageBillingAccountLinkWrapper}>
93+
{this.state.selectedBillingAccount ? <div className={styles.manageBillingAccountLinkWrapper}>
9594
<a
9695
className={styles.manageBillingAccountLink}
97-
href={`${SALESFORCE_PROJECT_LEAD_LINK}${this.props.projectId}`}
96+
href={`${SALESFORCE_BILLING_ACCOUNT_LINK}${this.state.selectedBillingAccount.value}`}
9897
target="_blank"
9998
rel="noopener noreferrer"
10099
>
101100
Manage the billing account in Salesforce
102101
</a>
103-
</div> */}
102+
</div>: null }
104103
</div>
105104
)
106105
}

0 commit comments

Comments
 (0)