@@ -18,6 +18,8 @@ import {
1818 useManageBusEventProps ,
1919 useManageChallengeSubmissions ,
2020 useManageChallengeSubmissionsProps ,
21+ useManageSubmissionReprocess ,
22+ useManageSubmissionReprocessProps ,
2123} from '../../lib/hooks'
2224import {
2325 ActionLoading ,
@@ -26,7 +28,7 @@ import {
2628 TableLoading ,
2729 TableNoRecord ,
2830} from '../../lib'
29- import { checkIsMM } from '../../lib/utils'
31+ import { checkIsMM , getSubmissionReprocessTopic } from '../../lib/utils'
3032
3133import styles from './ManageSubmissionPage.module.scss'
3234
@@ -46,6 +48,10 @@ export const ManageSubmissionPage: FC<Props> = (props: Props) => {
4648 challengeInfo,
4749 } : useFetchChallengeProps = useFetchChallenge ( challengeId )
4850 const isMM = useMemo ( ( ) => checkIsMM ( challengeInfo ) , [ challengeInfo ] )
51+ const submissionReprocessTopic = useMemo (
52+ ( ) => getSubmissionReprocessTopic ( challengeInfo ) ,
53+ [ challengeInfo ] ,
54+ )
4955
5056 const {
5157 isLoading : isLoadingSubmission ,
@@ -71,6 +77,12 @@ export const ManageSubmissionPage: FC<Props> = (props: Props) => {
7177 isLoadingBool : isDoingAvScanBool ,
7278 doPostBusEvent : doPostBusEventAvScan ,
7379 } : useManageAVScanProps = useManageAVScan ( )
80+ const {
81+ isLoading : isReprocessingSubmission ,
82+ isLoadingBool : isReprocessingSubmissionBool ,
83+ doReprocessSubmission,
84+ } : useManageSubmissionReprocessProps
85+ = useManageSubmissionReprocess ( submissionReprocessTopic )
7486
7587 const isLoading = isLoadingSubmission || isLoadingChallenge
7688
@@ -111,13 +123,21 @@ export const ManageSubmissionPage: FC<Props> = (props: Props) => {
111123 showSubmissionHistory = { showSubmissionHistory }
112124 setShowSubmissionHistory = { setShowSubmissionHistory }
113125 isMM = { isMM }
126+ isReprocessingSubmission = {
127+ isReprocessingSubmission
128+ }
129+ doReprocessSubmission = { doReprocessSubmission }
130+ canReprocessSubmission = { Boolean (
131+ submissionReprocessTopic ,
132+ ) }
114133 />
115134
116135 { ( isDoingAvScanBool
117136 || isDownloadingSubmissionBool
118137 || isRemovingSubmissionBool
119138 || isRunningTestBool
120- || isRemovingReviewSummationsBool ) && (
139+ || isRemovingReviewSummationsBool
140+ || isReprocessingSubmissionBool ) && (
121141 < ActionLoading />
122142 ) }
123143 </ div >
0 commit comments