|
|
@@ -28,6 +28,7 @@ import dayjs from "dayjs"; |
|
|
|
import { defaultPagingController } from "../SearchResults/SearchResults"; |
|
|
|
import { ScheduleType } from "@/app/api/scheduling"; |
|
|
|
import { Button, Stack } from "@mui/material"; |
|
|
|
import useUploadContext from "../UploadProvider/useUploadContext"; |
|
|
|
|
|
|
|
// type RecordStructure ={ |
|
|
|
// id: number, |
|
|
@@ -59,6 +60,7 @@ const RSOverview: React.FC<Props> = ({ type, defaultInputs }) => { |
|
|
|
); |
|
|
|
const [totalCount, setTotalCount] = useState(0); |
|
|
|
const [inputs, setInputs] = useState(defaultInputs); |
|
|
|
const { setIsUploading } = useUploadContext(); |
|
|
|
|
|
|
|
const searchCriteria: Criterion<SearchParamNames>[] = useMemo(() => { |
|
|
|
const searchCriteria: Criterion<SearchParamNames>[] = [ |
|
|
@@ -254,10 +256,16 @@ const RSOverview: React.FC<Props> = ({ type, defaultInputs }) => { |
|
|
|
}, []); |
|
|
|
|
|
|
|
const testRoughScheduleClick = useCallback(async () => { |
|
|
|
const response = await testRoughSchedule() |
|
|
|
|
|
|
|
if (response) { |
|
|
|
refetchData(inputs, "paging"); |
|
|
|
try { |
|
|
|
setIsUploading(true) |
|
|
|
const response = await testRoughSchedule() |
|
|
|
if (response) { |
|
|
|
refetchData(inputs, "paging"); |
|
|
|
} |
|
|
|
} catch(e) { |
|
|
|
console.log(e) |
|
|
|
} finally { |
|
|
|
setIsUploading(false) |
|
|
|
} |
|
|
|
}, []); |
|
|
|
|
|
|
|