Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/apps/admin/src/lib/components/ChallengeList/ChallengeList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,15 @@ const Actions: FC<{
classNames={{ menu: 'challenge-list-actions-dropdown-menu' }}
>
<ul>
<li>
<a
href={`${EnvironmentConfig.ADMIN.CHALLENGE_URL}/${props.challenge.id}`}
target='_blank'
rel='noreferrer'
>
Challenge Details
</a>
</li>
<li className={cn({ disabled: !hasProjectId })}>
{hasProjectId && (
<a
Expand Down Expand Up @@ -268,11 +277,10 @@ const ChallengeList: FC<ChallengeListProps> = props => {
renderer: (challenge: Challenge) => (
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<a
href={`${EnvironmentConfig.ADMIN.CHALLENGE_URL}/${challenge.id}`}
href={`${EnvironmentConfig.API.V5}/challenges/${challenge.id}`}
className={styles.challengeTitle}
onClick={function onClick() {
window.location.href = `${EnvironmentConfig.ADMIN.CHALLENGE_URL}/${challenge.id}`
}}
target='_blank'
rel='noreferrer'
>
{challenge.name}
</a>
Expand Down Expand Up @@ -334,6 +342,7 @@ const ChallengeList: FC<ChallengeListProps> = props => {
disableSorting
onToggleSort={_.noop}
className={styles.desktopTable}
preventDefault
/>
)}
{screenWidth <= 1279 && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@

.row2,
.row3,
.row4 {
.row4,
.row5 {
grid-template-columns: 1fr auto;
}

.row5 {
.row6 {
justify-content: flex-end;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,18 @@ const MobileListView: FC<MobileListViewProps<ReviewSummary>> = props => {
{/* Legacy ID */ propertyElements[1]}
</div>
<div className={styles.row3}>
{/* propertyElementLabels[5] */}
{/* Open Review Opp' */ propertyElements[3]}
{/* Submission End Date */ propertyElements[3]}
</div>
<div className={styles.row4}>
{propertyElementLabels[4]}
{/* Review Applications */ propertyElements[4]}
{/* Open Review Opp' */ propertyElements[4]}
</div>
<div className={styles.row5}>
{/* Action */ propertyElements[5]}
{propertyElementLabels[5]}
{/* Review Applications */ propertyElements[5]}
</div>
<div className={styles.row6}>
{/* Action */ propertyElements[6]}
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { FC, useMemo, useState } from 'react'
import { useNavigate } from 'react-router-dom'
import { format } from 'date-fns'

import { Sort } from '~/apps/admin/src/platform/gamification-admin/src/game-lib'
import { EnvironmentConfig } from '~/config'
import { useWindowSize, WindowSize } from '~/libs/shared'
import { Button, colWidthType, LinkButton, Table, type TableColumn } from '~/libs/ui'
import { Sort } from '~/apps/admin/src/platform/gamification-admin/src/game-lib'

import { Pagination } from '../common/Pagination'
import { useEventCallback } from '../../hooks'
import { ReviewFilterCriteria, ReviewSummary } from '../../models'
import { Paging } from '../../models/challenge-management/Pagination'
import { Pagination } from '../common/Pagination'

import { MobileListView } from './MobileListView'
import styles from './ReviewSummaryList.module.scss'
Expand Down Expand Up @@ -98,21 +99,21 @@ const ReviewSummaryList: FC<ReviewListProps> = props => {
},
// I think this column is important, and it exits in `admin-app`
// but resp does not have it, so I just comment it here
// {
// label: 'Submission End Date',
// propertyName: 'submissionEndDate',
// renderer: (review: ReviewSummary) => (
// // eslint-disable-next-line jsx-a11y/anchor-is-valid
// <div className={styles.submissionDate}>
// {review.submissionEndDate}
// {/* {format(
// new Date(review.submissionEndDate),
// 'MMM dd, yyyy HH:mm'
// )} */}
// </div>
// ),
// type: 'element',
// },
{
label: 'Submission End Date',
propertyName: 'submissionEndDate',
renderer: (review: ReviewSummary) => (
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<div className={styles.submissionDate}>
{review.submissionEndDate
? format(
new Date(review.submissionEndDate),
'MMM dd, yyyy HH:mm',
) : 'N/A'}
</div>
),
type: 'element',
},
{
columnId: 'OpenReviewOpp',
label: 'Open Review Opp',
Expand Down