Skip to content

Commit 52c1685

Browse files
committed
Fix for showing Complete Review button
1 parent 52d750f commit 52c1685

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1275,12 +1275,19 @@ export const TableIterativeReview: FC<Props> = (props: Props) => {
12751275
return undefined
12761276
}
12771277

1278+
const hasMyIterativeReviewAssignments = (datas || []).some(entry => {
1279+
const resourceId = entry.review?.resourceId
1280+
return resourceId ? myResourceIds.has(resourceId) : false
1281+
})
1282+
12781283
const hasCompletedIterativeReviews = (datas || []).some(d => (
12791284
['COMPLETED', 'SUBMITTED'].includes((d.review?.status || '').toString()
12801285
.toUpperCase())
12811286
))
12821287

1283-
const allowColumn = isReviewPhase(challengeInfo) || (isFirst2Finish && hasCompletedIterativeReviews)
1288+
const allowColumn = isReviewPhase(challengeInfo)
1289+
|| hasMyIterativeReviewAssignments
1290+
|| (isFirst2Finish && hasCompletedIterativeReviews)
12841291
if (!allowColumn) {
12851292
return undefined
12861293
}
@@ -1307,6 +1314,7 @@ export const TableIterativeReview: FC<Props> = (props: Props) => {
13071314
renderApprovalAction,
13081315
renderIterativeAction,
13091316
renderPostMortemAction,
1317+
myResourceIds,
13101318
])
13111319

13121320
const columns = useMemo<TableColumn<SubmissionInfo>[]>(() => {

0 commit comments

Comments
 (0)