This commit is contained in:
phanphan 2024-05-24 13:20:59 +07:00
parent f8232bdb5b
commit 32a79f0bc4

View File

@ -60,7 +60,6 @@ const ReviewPage = () => {
const [selectedFileData, setSelectedFileData] = useState(null);
const [selectedFileDataSource, setSelectedFileDataSource] = useState({});
const [selectedFileName, setSelectedFileName] = useState(null);
const [disableUpdateFileBtn, setDisableUpdateFileBtn] = useState(false);
// Default date range: 1 month ago to today
const [filterDateRange, setFilterDateRange] = useState(['', '']);
@ -114,6 +113,7 @@ const ReviewPage = () => {
updateSelectedFileDataSource(fileDataSource);
let reason = fileDataSource.Reason;
let solution = fileDataSource['Counter Measures'];
console.log("🚀 ~ setAndLoadSelectedFile ~ solution:", reason, solution)
if (!reason) {
setReason(null);
@ -155,8 +155,6 @@ const ReviewPage = () => {
filterAccuracy,
)
.then((data) => {
// setRequests(data?.subscription_requests);
// setHasNextRequest(data?.subscription_requests.length > 1);
setTotalPages(data?.page?.total_requests);
setHasNextRequest(requestIndex < data?.page?.total_requests);
const requestData = fetchRequest(
@ -206,8 +204,6 @@ const ReviewPage = () => {
filterAccuracy,
).then((data) => {
setTotalPages(data?.page?.total_requests);
// setRequests(data?.subscription_requests);
// setHasNextRequest(data?.subscription_requests.length > 1);
setHasNextRequest(1 < data?.page?.total_requests);
const firstRequest = fetchRequest(
data?.subscription_requests[0].RequestID,
@ -234,7 +230,6 @@ const ReviewPage = () => {
filterAccuracy,
).then((data) => {
setTotalPages(data?.page?.total_requests);
// setRequests(data?.subscription_requests);
setHasNextRequest(1 < data?.page?.total_requests);
const firstRequest = fetchRequest(
data?.subscription_requests[0].RequestID,
@ -628,6 +623,7 @@ const ReviewPage = () => {
type='primary'
shape='default'
size='middle'
disabled={currentRequest && currentRequest['Is Reviewed'] }
style={{ minWidth: '120px', alignSelf: 'flex-end' }}
onClick={handleConfirmReview}
>