-
Notifications
You must be signed in to change notification settings - Fork 18
Prod - August 25th deploy #1210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c5c0cf2
9889cd4
0a0ed87
e17ed99
4388a14
f83c0d4
e95b61b
2ef3b3e
f22c4ca
7d9056a
b42bdc6
56c237d
f3f9a97
6f191d8
89cd005
40057bb
f2f20fc
86eb547
80c9371
c8503fc
3377769
fa22569
3baf08a
b8e3be2
750aafe
2db5f5e
f1bcccd
685ed1b
88833e8
c34a372
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ import { | |
permissionManagementRouteId, | ||
platformRouteId, | ||
rootRoute, | ||
termsRouteId, | ||
userManagementRouteId, | ||
} from './config/routes.config' | ||
import { platformSkillRouteId } from './platform/routes.config' | ||
|
@@ -128,6 +129,22 @@ const BadgeListingPage: LazyLoadedComponent = lazyLoad( | |
const CreateBadgePage: LazyLoadedComponent = lazyLoad( | ||
() => import('./platform/gamification-admin/src/pages/create-badge/CreateBadgePage'), | ||
) | ||
const TermsListPage: LazyLoadedComponent = lazyLoad( | ||
() => import('./platform/terms/TermsListPage'), | ||
'TermsListPage', | ||
) | ||
const TermsAddPage: LazyLoadedComponent = lazyLoad( | ||
() => import('./platform/terms/TermsAddPage'), | ||
'TermsAddPage', | ||
) | ||
const TermsEditPage: LazyLoadedComponent = lazyLoad( | ||
() => import('./platform/terms/TermsEditPage'), | ||
'TermsEditPage', | ||
) | ||
const TermsUsersPage: LazyLoadedComponent = lazyLoad( | ||
() => import('./platform/terms/TermsUsersPage'), | ||
'TermsUsersPage', | ||
) | ||
|
||
export const toolTitle: string = ToolTitle.admin | ||
|
||
|
@@ -310,6 +327,22 @@ export const adminRoutes: ReadonlyArray<PlatformRoute> = [ | |
element: <BadgeDetailPage />, | ||
route: `${gamificationAdminRouteId}${baseDetailPath}/:id`, | ||
}, | ||
{ | ||
element: <TermsListPage />, | ||
route: termsRouteId, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The route |
||
}, | ||
{ | ||
element: <TermsAddPage />, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verify that the |
||
route: `${termsRouteId}/add`, | ||
}, | ||
{ | ||
element: <TermsUsersPage />, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the |
||
route: `${termsRouteId}/:id/users`, | ||
}, | ||
{ | ||
element: <TermsEditPage />, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verify that the |
||
route: `${termsRouteId}/:id/edit`, | ||
}, | ||
], | ||
element: <Platform />, | ||
id: platformRouteId, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
/** | ||
* Manage Submission Page. | ||
*/ | ||
import { FC } from 'react' | ||
import { FC, useMemo } from 'react' | ||
import { useParams } from 'react-router-dom' | ||
import classNames from 'classnames' | ||
|
||
import { LinkButton } from '~/libs/ui' | ||
|
||
import { | ||
useDownloadSubmission, | ||
useDownloadSubmissionProps, | ||
useFetchChallenge, | ||
useFetchChallengeProps, | ||
useManageAVScan, | ||
useManageAVScanProps, | ||
useManageBusEvent, | ||
useManageBusEventProps, | ||
useManageChallengeSubmissions, | ||
|
@@ -20,6 +26,7 @@ import { | |
TableLoading, | ||
TableNoRecord, | ||
} from '../../lib' | ||
import { checkIsMM } from '../../lib/utils' | ||
|
||
import styles from './ManageSubmissionPage.module.scss' | ||
|
||
|
@@ -35,7 +42,13 @@ export const ManageSubmissionPage: FC<Props> = (props: Props) => { | |
= useManageBusEvent() | ||
|
||
const { | ||
isLoading, | ||
isLoading: isLoadingChallenge, | ||
challengeInfo, | ||
}: useFetchChallengeProps = useFetchChallenge(challengeId) | ||
const isMM = useMemo(() => checkIsMM(challengeInfo), [challengeInfo]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
|
||
const { | ||
isLoading: isLoadingSubmission, | ||
submissions, | ||
isRemovingSubmission, | ||
isRemovingSubmissionBool, | ||
|
@@ -48,6 +61,19 @@ export const ManageSubmissionPage: FC<Props> = (props: Props) => { | |
}: useManageChallengeSubmissionsProps | ||
= useManageChallengeSubmissions(challengeId) | ||
|
||
const { | ||
isLoading: isDownloadingSubmission, | ||
isLoadingBool: isDownloadingSubmissionBool, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The variable |
||
downloadSubmission, | ||
}: useDownloadSubmissionProps = useDownloadSubmission() | ||
const { | ||
isLoading: isDoingAvScan, | ||
isLoadingBool: isDoingAvScanBool, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the previous comment, |
||
doPostBusEvent: doPostBusEventAvScan, | ||
}: useManageAVScanProps = useManageAVScan() | ||
|
||
const isLoading = isLoadingSubmission || isLoadingChallenge | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider renaming |
||
|
||
return ( | ||
<PageWrapper | ||
pageTitle='Submission Management' | ||
|
@@ -67,6 +93,10 @@ export const ManageSubmissionPage: FC<Props> = (props: Props) => { | |
) : ( | ||
<div className={styles.blockTableContainer}> | ||
<SubmissionTable | ||
isDoingAvScan={isDoingAvScan} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider renaming |
||
doPostBusEventAvScan={doPostBusEventAvScan} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The function name |
||
isDownloading={isDownloadingSubmission} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider renaming |
||
downloadSubmission={downloadSubmission} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The function name |
||
data={submissions} | ||
isRemovingSubmission={isRemovingSubmission} | ||
doRemoveSubmission={doRemoveSubmission} | ||
|
@@ -80,9 +110,12 @@ export const ManageSubmissionPage: FC<Props> = (props: Props) => { | |
doPostBusEvent={doPostBusEvent} | ||
showSubmissionHistory={showSubmissionHistory} | ||
setShowSubmissionHistory={setShowSubmissionHistory} | ||
isMM={isMM} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The addition of the |
||
/> | ||
|
||
{(isRemovingSubmissionBool | ||
{(isDoingAvScanBool | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The condition for displaying |
||
|| isDownloadingSubmissionBool | ||
|| isRemovingSubmissionBool | ||
|| isRunningTestBool | ||
|| isRemovingReviewSummationsBool) && ( | ||
<ActionLoading /> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,14 @@ | |
*/ | ||
import { v4 as uuidv4 } from 'uuid' | ||
|
||
import { RequestBusAPI } from '../lib/models' | ||
import { | ||
RequestBusAPI, | ||
RequestBusAPIAVScan, | ||
RequestBusAPIAVScanPayload, | ||
} from '../lib/models' | ||
|
||
/** | ||
* Create data for bus event | ||
* Create data for data submission marathon match bus event | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment should accurately reflect the function's purpose. Consider updating the comment to specify that it creates data for a 'data submission marathon match bus event'. |
||
* @param submissionId submission id | ||
* @param testType test type | ||
* @returns data for bus event | ||
|
@@ -27,3 +31,19 @@ export const CREATE_BUS_EVENT_DATA_SUBMISSION_MARATHON_MATCH = ( | |
.toISOString(), | ||
topic: 'submission.notification.score', | ||
}) | ||
|
||
/** | ||
* Create data for av rescan bus event | ||
* @param payload av rescan payload | ||
* @returns data for bus event | ||
*/ | ||
export const CREATE_BUS_EVENT_AV_RESCAN = ( | ||
payload: RequestBusAPIAVScanPayload, | ||
): RequestBusAPIAVScan => ({ | ||
'mime-type': 'application/json', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using consistent casing for the 'mime-type' key. In other parts of the code, it might be 'mimeType' or 'MIMEType', so ensure consistency across the codebase. |
||
originator: 'submission-processor', | ||
payload, | ||
timestamp: new Date() | ||
.toISOString(), | ||
topic: 'avscan.action.scan', | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ import { | |
import { useEventCallback } from '../../hooks' | ||
import { Challenge, ChallengeFilterCriteria, ChallengeType } from '../../models' | ||
import { Paging } from '../../models/challenge-management/Pagination' | ||
import { checkIsMM } from '../../utils' | ||
|
||
import { MobileListView } from './MobileListView' | ||
import styles from './ChallengeList.module.scss' | ||
|
@@ -135,7 +134,6 @@ const Actions: FC<{ | |
challenge: Challenge | ||
currentFilters: ChallengeFilterCriteria | ||
}> = props => { | ||
const isMM = useMemo(() => checkIsMM(props.challenge), [props.challenge]) | ||
const [openDropdown, setOpenDropdown] = useState(false) | ||
const navigate = useNavigate() | ||
const goToManageUser = useEventCallback(() => { | ||
|
@@ -202,16 +200,14 @@ const Actions: FC<{ | |
> | ||
Users | ||
</li> | ||
{isMM && ( | ||
<li | ||
onClick={function onClick() { | ||
navigate(`${props.challenge.id}/manage-submission`) | ||
setOpenDropdown(false) | ||
}} | ||
> | ||
Submissions | ||
</li> | ||
)} | ||
<li | ||
onClick={function onClick() { | ||
navigate(`${props.challenge.id}/manage-submission`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The removal of the |
||
setOpenDropdown(false) | ||
}} | ||
> | ||
Submissions | ||
</li> | ||
</ul> | ||
</DropdownMenu> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 20px; | ||
position: relative; | ||
} | ||
|
||
.blockForm { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 20px; | ||
position: relative; | ||
} | ||
|
||
.actionButtons { | ||
display: flex; | ||
justify-content: flex-end; | ||
gap: 6px; | ||
} | ||
|
||
.dialogLoadingSpinnerContainer { | ||
position: absolute; | ||
width: 64px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
bottom: 0; | ||
height: 64px; | ||
left: 0; | ||
|
||
.spinner { | ||
background: none; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the
TermsListPage
component is correctly imported and defined in the project. This applies to all new components added in this diff.