Skip to content

Commit 8537f27

Browse files
authored
Merge pull request #4332 from yoution/issue-4315
fix: issue #4315
2 parents a43243c + a23bc24 commit 8537f27

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
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
@@ -744,6 +744,7 @@ export const TC_API_URL = `https://api.${DOMAIN}`
744744
export const DIRECT_PROJECT_URL = `https://www.${DOMAIN}/direct/projectOverview?formData.projectId=`
745745
export const WORK_MANAGER_APP = `https://challenges.${DOMAIN}/projects`
746746
export const SALESFORCE_PROJECT_LEAD_LINK = process.env.SALESFORCE_PROJECT_LEAD_LINK
747+
export const SALESFORCE_BILLING_ACCOUNT_LINK = process.env.SALESFORCE_BILLING_ACCOUNT_LINK
747748
export const TC_NOTIFICATION_URL = process.env.TC_NOTIFICATION_URL || `${TC_API_URL}/v5/notifications`
748749
// Uncomment if you run TC Notifications locally
749750
// export const TC_NOTIFICATION_URL = 'http://localstho:4000/v5/notifications'

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

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

55
import Select from '../../../../components/Select/Select'
66
import {fetchBillingAccounts} from '../../../../api/billingAccounts'
7-
// import {SALESFORCE_PROJECT_LEAD_LINK} from '../../../../config/constants'
7+
import {SALESFORCE_BILLING_ACCOUNT_LINK} from '../../../../config/constants'
88

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

@@ -92,17 +92,18 @@ class BillingAccountField extends React.Component {
9292
isDisabled={this.state.billingAccounts.length === 0}
9393
showDropdownIndicator
9494
/>
95-
{/* Hide this link because we haven't implemented a required page in SFDC yet */}
96-
{/* <div className={styles.manageBillingAccountLinkWrapper}>
97-
<a
98-
className={styles.manageBillingAccountLink}
99-
href={`${SALESFORCE_PROJECT_LEAD_LINK}${this.props.projectId}`}
100-
target="_blank"
101-
rel="noopener noreferrer"
102-
>
95+
{this.state.selectedBillingAccount && (
96+
<div className={styles.manageBillingAccountLinkWrapper}>
97+
<a
98+
className={styles.manageBillingAccountLink}
99+
href={`${SALESFORCE_BILLING_ACCOUNT_LINK}${this.state.selectedBillingAccount.value}`}
100+
target="_blank"
101+
rel="noopener noreferrer"
102+
>
103103
Manage the billing account in Salesforce
104-
</a>
105-
</div> */}
104+
</a>
105+
</div>
106+
)}
106107
</div>
107108
)
108109
}

0 commit comments

Comments
 (0)