@@ -88,7 +88,7 @@ const ChallengeViewTabs = ({
88
88
const isDraft = challenge . status . toUpperCase ( ) === CHALLENGE_STATUS . DRAFT
89
89
const isSelfServiceCopilot = challenge . legacy . selfServiceCopilot === loggedInUser . handle
90
90
const isAdmin = checkAdmin ( token )
91
- const canApprove = isSelfServiceCopilot && isDraft && isSelfService
91
+ const canApprove = ( isSelfServiceCopilot || enableEdit ) && isDraft && isSelfService
92
92
const hasBillingAccount = _ . get ( projectDetail , 'billingAccountId' ) !== null
93
93
// only challenges that have a billing account can be launched AND
94
94
// if this isn't self-service, permit launching if the challenge is draft
@@ -97,7 +97,7 @@ const ChallengeViewTabs = ({
97
97
// b) the challenge is approved
98
98
const canLaunch = hasBillingAccount &&
99
99
( ( ! isSelfService && isDraft ) ||
100
- ( ( isSelfServiceCopilot || isAdmin ) &&
100
+ ( ( isSelfServiceCopilot || enableEdit || isAdmin ) &&
101
101
challenge . status . toUpperCase ( ) === CHALLENGE_STATUS . APPROVED ) )
102
102
103
103
return (
@@ -168,10 +168,10 @@ const ChallengeViewTabs = ({
168
168
) }
169
169
</ div >
170
170
) }
171
- { enableEdit && ! isSelfService && (
171
+ { enableEdit && (
172
172
< PrimaryButton text = { 'Edit' } type = { 'info' } submit link = { `./edit` } />
173
173
) }
174
- { isSelfService && isDraft && ( isAdmin || isSelfServiceCopilot ) && (
174
+ { isSelfService && isDraft && ( isAdmin || isSelfServiceCopilot || enableEdit ) && (
175
175
< div className = { styles . button } >
176
176
< PrimaryButton
177
177
text = 'Reject challenge'
0 commit comments