Skip to content

Commit d55d4af

Browse files
committed
Merge branch 'feat/v6' of github.com:topcoder-platform/platform-ui into feat/v6
2 parents 8c944bf + 7a93c34 commit d55d4af

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

src/apps/review/src/lib/components/ChallengePhaseInfo/ChallengePhaseInfo.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ interface Props {
1919
className?: string
2020
challengeInfo: ChallengeInfo
2121
reviewProgress: number
22+
reviewInProgress: boolean
2223
variant?: 'active' | 'past'
2324
}
2425

@@ -112,6 +113,7 @@ export const ChallengePhaseInfo: FC<Props> = (props: Props) => {
112113
const uiItems = useMemo(() => {
113114
const data = props.challengeInfo
114115
const variant = props.variant ?? 'active'
116+
const reviewInProgress = props.reviewInProgress
115117

116118
const items: any[] = []
117119

@@ -172,18 +174,21 @@ export const ChallengePhaseInfo: FC<Props> = (props: Props) => {
172174
value: data.timeLeft || '-',
173175
})
174176

175-
items.push({
176-
title: 'Review Progress',
177-
type: PROGRESS_TYPE,
178-
value: props.reviewProgress,
179-
})
177+
if (!reviewInProgress) {
178+
items.push({
179+
title: 'Review Progress',
180+
type: PROGRESS_TYPE,
181+
value: props.reviewProgress,
182+
})
183+
}
180184
}
181185

182186
return items
183187
}, [
184188
myChallengeRoles,
185189
props.challengeInfo,
186190
props.reviewProgress,
191+
props.reviewInProgress,
187192
props.variant,
188193
hasPayment,
189194
paymentAmount,

src/apps/review/src/lib/components/TableReviewAppeals/TableReviewAppeals.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,8 @@ export const TableReviewAppeals: FC<Props> = (props: Props) => {
700700
label: 'Review Score',
701701
renderer: (data: SubmissionRow) => {
702702
const scoreDisplay = data.aggregated?.averageFinalScoreDisplay
703-
if (!scoreDisplay) {
703+
const isReviewInProgress = data.review?.status === 'IN_PROGRESS'
704+
if (!scoreDisplay || isReviewInProgress) {
704705
return (
705706
<span className={styles.statusBadgePending}>
706707
Pending Review

src/apps/review/src/pages/active-review-assignements/ChallengeDetailsPage/ChallengeDetailsPage.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ export const ChallengeDetailsPage: FC<Props> = (props: Props) => {
510510
() => location.pathname.includes(`/${pastReviewAssignmentsRouteId}/`),
511511
[location.pathname],
512512
)
513+
const latestReview = review.find(r => r.isLatest)
514+
const reviewInProgress = latestReview?.review?.status === 'IN_PROGRESS'
513515
const currentUserResource = useMemo<BackendResource | undefined>(() => myResources
514516
.find(resource => typeof resource.phaseChangeNotifications === 'boolean')
515517
?? myResources[0], [myResources])
@@ -1579,6 +1581,7 @@ export const ChallengeDetailsPage: FC<Props> = (props: Props) => {
15791581
<ChallengePhaseInfo
15801582
challengeInfo={challengeInfo}
15811583
reviewProgress={reviewProgress}
1584+
reviewInProgress={reviewInProgress}
15821585
variant={isPastReviewDetail ? 'past' : 'active'}
15831586
/>
15841587
)}

0 commit comments

Comments
 (0)