Merge pull request #162 from SDSRV-IDP/feature/add_filter_review2
Feature/add filter review2
This commit is contained in:
commit
5fb227b2f2
@ -1,4 +1,4 @@
|
||||
import { AppstoreOutlined, BarChartOutlined, RotateRightOutlined, FileSearchOutlined } from '@ant-design/icons';
|
||||
import { AppstoreOutlined, BarChartOutlined, RotateRightOutlined } from '@ant-design/icons';
|
||||
import { t } from '@lingui/macro';
|
||||
import { Menu, MenuProps } from 'antd';
|
||||
import React from 'react';
|
||||
|
@ -4,7 +4,6 @@ export function GlobalSpin() {
|
||||
return (
|
||||
<Spin
|
||||
size='large'
|
||||
tip='Loading ...'
|
||||
style={{
|
||||
position: 'fixed',
|
||||
top: '50%',
|
||||
|
@ -105,7 +105,7 @@ export const fetchRequest = async (id: string) => {
|
||||
});
|
||||
return await (
|
||||
await response.json()
|
||||
).subscription_requests[0];
|
||||
).subscription_requests?.[0] || null;
|
||||
};
|
||||
|
||||
export const addRecentRequest = (
|
||||
|
@ -172,7 +172,7 @@ const ReviewPage = () => {
|
||||
|
||||
const setAndLoadSelectedFile = async (requestData, index) => {
|
||||
setSelectedFileId(index);
|
||||
if (!requestData['Files'][index]) {
|
||||
if (!requestData?.['Files'][index]) {
|
||||
setSelectedFileData('FAILED_TO_LOAD_FILE');
|
||||
setImageLoading(false);
|
||||
return;
|
||||
@ -578,17 +578,17 @@ const ReviewPage = () => {
|
||||
overflow: 'auto',
|
||||
}}
|
||||
>
|
||||
<Viewer
|
||||
{selectedFileData && <Viewer
|
||||
plugins={[defaultLayoutPluginInstance]}
|
||||
fileUrl={selectedFileData}
|
||||
onDocumentLoad={() => setImageLoading(false)}
|
||||
/>
|
||||
/>}
|
||||
</div>
|
||||
) : (
|
||||
<div
|
||||
style={{
|
||||
flexGrow: 1,
|
||||
overflow: 'auto',
|
||||
overflowY: 'auto',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
@ -756,8 +756,7 @@ const ReviewPage = () => {
|
||||
>
|
||||
<Input
|
||||
size='middle'
|
||||
value={`Sub: ${filterSubsidiaries}, Date:${
|
||||
filterDateRange[0]
|
||||
value={`Sub: ${filterSubsidiaries}, Date:${filterDateRange[0]
|
||||
? filterDateRange[0] + ' to ' + filterDateRange[1]
|
||||
: 'All'
|
||||
}, Reviewed: ${filterReviewState}, Tests: ${filterIncludeTests}`}
|
||||
@ -781,7 +780,7 @@ const ReviewPage = () => {
|
||||
let shouldRevised = false;
|
||||
try {
|
||||
if (
|
||||
selectedFileDataSource[data]?.[FEEDBACK_ACCURACY].length > 0
|
||||
selectedFileDataSource[data]?.[FEEDBACK_ACCURACY]?.length > 0
|
||||
) {
|
||||
shouldRevised =
|
||||
selectedFileDataSource[data][FEEDBACK_ACCURACY][0] < 1;
|
||||
|
Loading…
Reference in New Issue
Block a user