Skip to content

Commit 6b054cf

Browse files
authored
Merge pull request #1267 from topcoder-platform/PM-1904_active-challenges-page
PM-1904 active challenges page
2 parents f448252 + fc857e8 commit 6b054cf

File tree

16 files changed

+101
-10
lines changed

16 files changed

+101
-10
lines changed
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

src/apps/review/src/lib/assets/icons/index.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ import { ReactComponent as IconArrowLeft } from './arrow-left.svg'
22
import { ReactComponent as IconExternalLink } from './external-link.svg'
33
import { ReactComponent as IconChevronDown } from './selector.svg'
44
import { ReactComponent as IconError } from './icon-error.svg'
5+
import { ReactComponent as IconAiReview } from './icon-ai-review.svg'
6+
import { ReactComponent as IconSubmission } from './icon-phase-submission.svg'
7+
import { ReactComponent as IconRegistration } from './icon-phase-registration.svg'
8+
import { ReactComponent as IconReview } from './icon-phase-review.svg'
9+
import { ReactComponent as IconAppeal } from './icon-phase-appeal.svg'
10+
import { ReactComponent as IconAppealResponse } from './icon-phase-appeal-response.svg'
11+
import { ReactComponent as IconPhaseWinners } from './icon-phase-winners.svg'
512

613
export * from './editor/bold'
714
export * from './editor/code'
@@ -19,4 +26,24 @@ export * from './editor/table'
1926
export * from './editor/unordered-list'
2027
export * from './editor/upload-file'
2128

22-
export { IconArrowLeft, IconExternalLink, IconChevronDown, IconError }
29+
export {
30+
IconArrowLeft,
31+
IconExternalLink,
32+
IconChevronDown,
33+
IconError,
34+
IconAiReview,
35+
IconSubmission,
36+
IconReview,
37+
IconAppeal,
38+
IconAppealResponse,
39+
IconPhaseWinners,
40+
}
41+
42+
export const phasesIcons = {
43+
appeal: IconAppeal,
44+
appealResponse: IconAppealResponse,
45+
'iterative review': IconReview,
46+
registration: IconRegistration,
47+
review: IconReview,
48+
submission: IconSubmission,
49+
}

src/apps/review/src/lib/components/TableActiveReviews/TableActiveReviews.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,7 @@
7979
background-color: $red-25;
8080
color: $red-140;
8181
}
82+
83+
.mr2 {
84+
margin-right: $sp-2;
85+
}

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

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
} from '../../models'
1818
import { TableWrapper } from '../TableWrapper'
1919
import { ProgressBar } from '../ProgressBar'
20+
import { IconAiReview, phasesIcons } from '../../assets/icons'
2021

2122
import styles from './TableActiveReviews.module.scss'
2223

@@ -253,11 +254,20 @@ export const TableActiveReviews: FC<Props> = (props: Props) => {
253254
isSortable: true,
254255
label: 'Phase',
255256
propertyName: 'currentPhase',
256-
renderer: (data: ActiveReviewAssignment) => (
257-
<div className={styles.phase}>
258-
{data.currentPhase}
259-
</div>
260-
),
257+
renderer: (data: ActiveReviewAssignment) => {
258+
const Icon = data.hasAIReview ? IconAiReview : (
259+
phasesIcons[data.currentPhase.toLowerCase() as keyof typeof phasesIcons]
260+
)
261+
262+
return (
263+
<div className={styles.phase}>
264+
{Icon && (
265+
<Icon className={styles.mr2} />
266+
)}
267+
{data.currentPhase}
268+
</div>
269+
)
270+
},
261271
type: 'element',
262272
},
263273
{

0 commit comments

Comments
 (0)