From e1d363f5996d82f3548903e00872eb00b1dad543 Mon Sep 17 00:00:00 2001 From: PeterGreat Date: Thu, 28 Aug 2025 19:41:59 +0800 Subject: [PATCH 1/3] add Submission End Date column to Review Management Page --- .../MobileListView/MobileListView.module.scss | 5 ++-- .../MobileListView/MobileListView.tsx | 13 ++++---- .../ReviewSummaryList/ReviewSummaryList.tsx | 30 +++++++++---------- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/apps/admin/src/lib/components/ReviewSummaryList/MobileListView/MobileListView.module.scss b/src/apps/admin/src/lib/components/ReviewSummaryList/MobileListView/MobileListView.module.scss index 47dc4e423..00ef1724d 100644 --- a/src/apps/admin/src/lib/components/ReviewSummaryList/MobileListView/MobileListView.module.scss +++ b/src/apps/admin/src/lib/components/ReviewSummaryList/MobileListView/MobileListView.module.scss @@ -42,11 +42,12 @@ .row2, .row3, - .row4 { + .row4, + .row5 { grid-template-columns: 1fr auto; } - .row5 { + .row6 { justify-content: flex-end; } } diff --git a/src/apps/admin/src/lib/components/ReviewSummaryList/MobileListView/MobileListView.tsx b/src/apps/admin/src/lib/components/ReviewSummaryList/MobileListView/MobileListView.tsx index a828fc033..3831b7662 100644 --- a/src/apps/admin/src/lib/components/ReviewSummaryList/MobileListView/MobileListView.tsx +++ b/src/apps/admin/src/lib/components/ReviewSummaryList/MobileListView/MobileListView.tsx @@ -73,16 +73,19 @@ const MobileListView: FC> = props => {
{/* Legacy ID */ propertyElements[1]}
-
- {/* propertyElementLabels[5] */} - {/* Open Review Opp' */ propertyElements[3]} +
+ {/* Submission End Date */ propertyElements[3]}
{propertyElementLabels[4]} - {/* Review Applications */ propertyElements[4]} + {/* Open Review Opp' */ propertyElements[4]}
- {/* Action */ propertyElements[5]} + {propertyElementLabels[5]} + {/* Review Applications */ propertyElements[5]} +
+
+ {/* Action */ propertyElements[6]}
diff --git a/src/apps/admin/src/lib/components/ReviewSummaryList/ReviewSummaryList.tsx b/src/apps/admin/src/lib/components/ReviewSummaryList/ReviewSummaryList.tsx index f95ee26fa..97ed8d615 100644 --- a/src/apps/admin/src/lib/components/ReviewSummaryList/ReviewSummaryList.tsx +++ b/src/apps/admin/src/lib/components/ReviewSummaryList/ReviewSummaryList.tsx @@ -13,6 +13,7 @@ import { Paging } from '../../models/challenge-management/Pagination' import { MobileListView } from './MobileListView' import styles from './ReviewSummaryList.module.scss' +import { format } from 'date-fns'; export interface ReviewListProps { reviews: ReviewSummary[] @@ -98,21 +99,20 @@ const ReviewSummaryList: FC = 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 - //
- // {review.submissionEndDate} - // {/* {format( - // new Date(review.submissionEndDate), - // 'MMM dd, yyyy HH:mm' - // )} */} - //
- // ), - // type: 'element', - // }, + { + label: 'Submission End Date', + propertyName: 'submissionEndDate', + renderer: (review: ReviewSummary) => ( + // eslint-disable-next-line jsx-a11y/anchor-is-valid +
+ {review.submissionEndDate ? + format( + new Date(review.submissionEndDate), + 'MMM dd, yyyy HH:mm') : 'N/A'} +
+ ), + type: 'element', + }, { columnId: 'OpenReviewOpp', label: 'Open Review Opp', From 2d7c28bebcee35f2ac30b697a9e81aa5f1c6b367 Mon Sep 17 00:00:00 2001 From: phead <65379136@qq.com> Date: Sat, 6 Sep 2025 13:09:12 +0800 Subject: [PATCH 2/3] update challenge management page to apply api response to items --- .../components/ChallengeList/ChallengeList.tsx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/apps/admin/src/lib/components/ChallengeList/ChallengeList.tsx b/src/apps/admin/src/lib/components/ChallengeList/ChallengeList.tsx index de3fcb6af..2f0bf6b33 100644 --- a/src/apps/admin/src/lib/components/ChallengeList/ChallengeList.tsx +++ b/src/apps/admin/src/lib/components/ChallengeList/ChallengeList.tsx @@ -218,6 +218,15 @@ const Actions: FC<{ classNames={{ menu: 'challenge-list-actions-dropdown-menu' }} >
    +
  • + + Challenge Details + +
  • {hasProjectId && ( = props => { renderer: (challenge: Challenge) => ( // eslint-disable-next-line jsx-a11y/anchor-is-valid {challenge.name} @@ -334,6 +342,7 @@ const ChallengeList: FC = props => { disableSorting onToggleSort={_.noop} className={styles.desktopTable} + preventDefault /> )} {screenWidth <= 1279 && ( From 8a04d286ee1354f87bca61a743292487f25fe31e Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Sun, 7 Sep 2025 07:45:15 +1000 Subject: [PATCH 3/3] Lint --- .../MobileListView/MobileListView.tsx | 2 +- .../ReviewSummaryList/ReviewSummaryList.tsx | 33 ++++++++++--------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/apps/admin/src/lib/components/ReviewSummaryList/MobileListView/MobileListView.tsx b/src/apps/admin/src/lib/components/ReviewSummaryList/MobileListView/MobileListView.tsx index 3831b7662..5fe99d0a7 100644 --- a/src/apps/admin/src/lib/components/ReviewSummaryList/MobileListView/MobileListView.tsx +++ b/src/apps/admin/src/lib/components/ReviewSummaryList/MobileListView/MobileListView.tsx @@ -73,7 +73,7 @@ const MobileListView: FC> = props => {
    {/* Legacy ID */ propertyElements[1]}
    -
    +
    {/* Submission End Date */ propertyElements[3]}
    diff --git a/src/apps/admin/src/lib/components/ReviewSummaryList/ReviewSummaryList.tsx b/src/apps/admin/src/lib/components/ReviewSummaryList/ReviewSummaryList.tsx index 97ed8d615..0555739ae 100644 --- a/src/apps/admin/src/lib/components/ReviewSummaryList/ReviewSummaryList.tsx +++ b/src/apps/admin/src/lib/components/ReviewSummaryList/ReviewSummaryList.tsx @@ -1,19 +1,19 @@ 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' -import { format } from 'date-fns'; export interface ReviewListProps { reviews: ReviewSummary[] @@ -100,19 +100,20 @@ const ReviewSummaryList: FC = 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 -
    - {review.submissionEndDate ? - format( - new Date(review.submissionEndDate), - 'MMM dd, yyyy HH:mm') : 'N/A'} -
    - ), - type: 'element', - }, + label: 'Submission End Date', + propertyName: 'submissionEndDate', + renderer: (review: ReviewSummary) => ( + // eslint-disable-next-line jsx-a11y/anchor-is-valid +
    + {review.submissionEndDate + ? format( + new Date(review.submissionEndDate), + 'MMM dd, yyyy HH:mm', + ) : 'N/A'} +
    + ), + type: 'element', + }, { columnId: 'OpenReviewOpp', label: 'Open Review Opp',