+
+
+
+
+
+
+ {totalRequests ? (
+ <>
+ Request ID: {currentRequest?.RequestID}
+ >
+ ) : (
+ ''
+ )}
+
+
+
+
+
+
+
+
+ {totalRequests > 0 && (
+
+ )}
+
+
+
+ {selectedFileData === 'FAILED_TO_LOAD_FILE' ? (
+
Failed to load file.
+ ) : fileExtension === 'pdf' ? (
+
+ ) : (
+ <>
+
setLightBox(true)}
+ />
+
+ {lightBox && (
+
setLightBox(false)}
+ >
+ )}
+ >
+ )}
+
+
+
+
+
+ {totalRequests
+ ? 'Request: ' + currentRequestIndex + '/' + totalRequests
+ : 'No Request. Adjust your search criteria to see more results.'}
+
+ {currentRequest &&
+ (currentRequest['Is Reviewed'] ? (
+ }
+ color='success'
+ style={{ padding: '4px 16px' }}
+ >
+ Reviewed
+
+ ) : (
+ }
+ color='warning'
+ style={{ padding: '4px 16px' }}
+ >
+ Not Reviewed
+
+ ))}
+
+
+
+
+
+
{
+ if (pageIndexToGoto > totalRequests) {
+ message.error('RequestID is out of range.');
+ return;
+ }
+ if (pageIndexToGoto < 1) {
+ message.error('RequestID is out of range.');
+ return;
+ }
+ setCurrentRequestIndex(pageIndexToGoto);
+ loadCurrentRequest(pageIndexToGoto);
+ }}
+ >
+ Go to
+
+ }
+ value={pageIndexToGoto}
+ onChange={(e) => {
+ setPageIndexToGoto(parseInt(e.target.value));
+ }}
+ />
+
+
+
+
+
+ {/*
+
+
+ */}
+ {/*
+
+ {totalRequests
+ ? 'Request: ' + currentRequestIndex + '/' + totalRequests
+ : 'No Request. Adjust your search criteria to see more results.'}
+
+ {currentRequest &&
+ (currentRequest['Is Reviewed'] ? (
+ }
+ color='success'
+ style={{ padding: '4px 16px' }}
+ >
+ Reviewed
+
+ ) : (
+ }
+ color='warning'
+ style={{ padding: '4px 16px' }}
+ >
+ Not Reviewed
+
+ ))}
+
+
+
+
+
+
{
+ if (pageIndexToGoto > totalRequests) {
+ message.error('RequestID is out of range.');
+ return;
+ }
+ if (pageIndexToGoto < 1) {
+ message.error('RequestID is out of range.');
+ return;
+ }
+ setCurrentRequestIndex(pageIndexToGoto);
+ loadCurrentRequest(pageIndexToGoto);
+ }}
+ >
+ Go to
+
+ }
+ value={pageIndexToGoto}
+ onChange={(e) => {
+ setPageIndexToGoto(parseInt(e.target.value));
+ }}
+ />
+
+
*/}
+
+ {dataSource?.map((data) => {
+ return (
+
+ );
+ })}
+
+
+
+
{
+ setIsModalOpen(false);
+ reloadFilters();
+ }}
+ onCancel={() => {
+ setIsModalOpen(false);
+ }}
+ >
+
+ {
+ setFilterDateRange(dateString);
+ }}
+ style={{ width: 200 }}
+ />
+
+
+
+
+
+
+
+ setFilterAccuracy(value)}
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ // call submit api
+ if (!reason || !solution) {
+ notification.warning({
+ message: 'Please select a reason or a solution',
+ });
+ } else {
+ const params = {
+ request_id: currentRequest?.RequestID,
+ request_image_id: selectedFileName.replace(/\.[^/.]+$/, ''),
+ };
+
+ let submitReason = reason;
+ let submitSolution = solution;
+
+ if (reason === 'other') {
+ if (!otherReason) {
+ notification.warning({
+ message: 'Please input other reason',
+ });
+ return;
+ }
+ submitReason = otherReason;
+ }
+ if (solution === 'other') {
+ if (!otherSolution) {
+ notification.warning({
+ message: 'Please input other solution',
+ });
+ return;
+ }
+ submitSolution = otherSolution;
+ }
+
+ const res = await badQualityReasonSubmit(
+ params,
+ submitReason,
+ submitSolution,
+ );
+
+ if (res.message) {
+ notification.success({ message: 'Update reason success' });
+ setIsReasonModalOpen(false);
+ }
+ }
+ }}
+ onCancel={() => {
+ setIsReasonModalOpen(false);
+ }}
+ >
+
+
+
+
+
+ {reason === 'other' && (
+ {
+ setOtherReason(e.target.value);
+ }}
+ style={{
+ width: 200,
+ marginTop: 30,
+ marginBottom: 24,
+ marginLeft: 10,
+ }}
+ />
+ )}
+
+
+
+
+ {counter_measure_map[reason]}
+
+
+
+
+ {solution === 'other' && (
+ {
+ setOtherSolution(e.target.value);
+ }}
+ style={{
+ width: 200,
+ marginBottom: 24,
+ marginLeft: 10,
+ }}
+ />
+ )}
+
+
+ {/* {totalRequests > 0 && (
+
+ 'editable-row'}
+ bordered
+ dataSource={dataSource}
+ columns={columns}
+ />
+
+ )} */}
+
+ );
+};
+
+export default ReviewPage;
diff --git a/cope2n-fe/src/routes/useAppRouter.tsx b/cope2n-fe/src/routes/useAppRouter.tsx
index 3e1419b..899824f 100644
--- a/cope2n-fe/src/routes/useAppRouter.tsx
+++ b/cope2n-fe/src/routes/useAppRouter.tsx
@@ -12,6 +12,7 @@ const DashboardPage = React.lazy(() => import('pages/dashboard'));
const InferencePage = React.lazy(() => import('pages/inference/index'));
const ReviewsPage = React.lazy(() => import('pages/reviews'));
+const ReviewsPage2 = React.lazy(() => import('pages/reviews2'));
const ReportsPage = React.lazy(() => import('pages/reports'));
const ReportDetailPage = React.lazy(
() => import('pages/reports/report_detail'),
@@ -65,6 +66,11 @@ export function useAppRouter() {
path: '/reviews',
element: