@@ -31,7 +31,7 @@ import {
3131import { BreadCrumbData , ChallengeDetailContextModel } from '../../../lib/models'
3232import { SubmissionBarInfo } from '../../../lib/components/SubmissionBarInfo'
3333import { ChallengeLinksForAdmin } from '../../../lib/components/ChallengeLinksForAdmin'
34- import { ADMIN , COPILOT } from '../../../config/index.config'
34+ import { ADMIN , COPILOT , MANAGER } from '../../../config/index.config'
3535import { useIsEditReview , useIsEditReviewProps } from '../../../lib/hooks/useIsEditReview'
3636import { activeReviewAssigmentsRouteId , rootRoute } from '../../../config/routes.config'
3737
@@ -319,6 +319,13 @@ export const ScorecardDetailsPage: FC<Props> = (props: Props) => {
319319 [ myChallengeRoles ] ,
320320 )
321321
322+ const hasChallengeManagerRole = useMemo (
323+ ( ) => myChallengeResources . some (
324+ resource => resource . roleName ?. toLowerCase ( ) === MANAGER . toLowerCase ( ) ,
325+ ) ,
326+ [ myChallengeResources ] ,
327+ )
328+
322329 const hasChallengeCopilotRole = useMemo (
323330 ( ) => myChallengeResources . some (
324331 resource => resource . roleName ?. toLowerCase ( ) === COPILOT . toLowerCase ( ) ,
@@ -331,11 +338,13 @@ export const ScorecardDetailsPage: FC<Props> = (props: Props) => {
331338 reviewInfo ?. committed
332339 && ( hasChallengeAdminRole
333340 || hasTopcoderAdminRole
341+ || hasChallengeManagerRole
334342 || hasChallengeCopilotRole ) ,
335343 ) ,
336344 [
337345 hasChallengeAdminRole ,
338346 hasChallengeCopilotRole ,
347+ hasChallengeManagerRole ,
339348 hasTopcoderAdminRole ,
340349 reviewInfo ?. committed ,
341350 ] ,
@@ -381,18 +390,21 @@ export const ScorecardDetailsPage: FC<Props> = (props: Props) => {
381390 < >
382391 < div className = { styles . summary } >
383392 < SubmissionBarInfo submission = { submissionInfo } />
384- { actionChallengeRole === ADMIN || actionChallengeRole === COPILOT ? (
385- < ChallengeLinksForAdmin
386- isSavingReview = { isSavingReview }
387- saveReviewInfo = { saveReviewInfo }
388- reviewInfo = { reviewInfo }
389- canEditScorecard = { canEditScorecard }
390- isManagerEdit = { isManagerEdit }
391- onToggleManagerEdit = { toggleManagerEdit }
392- />
393- ) : (
394- < ChallengeLinks />
395- ) }
393+ { actionChallengeRole === ADMIN
394+ || actionChallengeRole === COPILOT
395+ || actionChallengeRole === MANAGER
396+ ? (
397+ < ChallengeLinksForAdmin
398+ isSavingReview = { isSavingReview }
399+ saveReviewInfo = { saveReviewInfo }
400+ reviewInfo = { reviewInfo }
401+ canEditScorecard = { canEditScorecard }
402+ isManagerEdit = { isManagerEdit }
403+ onToggleManagerEdit = { toggleManagerEdit }
404+ />
405+ ) : (
406+ < ChallengeLinks />
407+ ) }
396408 </ div >
397409
398410 < ScorecardDetails
0 commit comments