|
|
@@ -19,12 +19,15 @@ import { |
|
|
|
ProdScheduleResultByPage, |
|
|
|
SearchProdSchedule, |
|
|
|
fetchProdSchedules, |
|
|
|
testDetailedSchedule, |
|
|
|
testRoughSchedule, |
|
|
|
} from "@/app/api/scheduling/actions"; |
|
|
|
import { arrayToDateString, decimalFormatter } from "@/app/utils/formatUtil"; |
|
|
|
import { isEqual, uniqBy } from "lodash"; |
|
|
|
import dayjs from "dayjs"; |
|
|
|
import { defaultPagingController } from "../SearchResults/SearchResults"; |
|
|
|
import { ScheduleType } from "@/app/api/scheduling"; |
|
|
|
import { Button, Stack } from "@mui/material"; |
|
|
|
|
|
|
|
// type RecordStructure ={ |
|
|
|
// id: number, |
|
|
@@ -248,8 +251,29 @@ const RSOverview: React.FC<Props> = ({ type, defaultInputs }) => { |
|
|
|
refetchData(defaultInputs, "reset"); |
|
|
|
}, []); |
|
|
|
|
|
|
|
const testRoughScheduleClick = useCallback(async () => { |
|
|
|
const response = await testRoughSchedule() |
|
|
|
|
|
|
|
if (response) { |
|
|
|
refetchData(inputs, "paging"); |
|
|
|
} |
|
|
|
}, []); |
|
|
|
|
|
|
|
return ( |
|
|
|
<> |
|
|
|
<Stack |
|
|
|
direction="row" |
|
|
|
justifyContent="flex-end" |
|
|
|
flexWrap="wrap" |
|
|
|
rowGap={2} |
|
|
|
> |
|
|
|
<Button |
|
|
|
variant="contained" |
|
|
|
onClick={testRoughScheduleClick} |
|
|
|
> |
|
|
|
{t("Test Rough Schedule")} |
|
|
|
</Button> |
|
|
|
</Stack> |
|
|
|
<SearchBox |
|
|
|
criteria={searchCriteria} |
|
|
|
onSearch={(query) => { |
|
|
@@ -273,7 +297,7 @@ const RSOverview: React.FC<Props> = ({ type, defaultInputs }) => { |
|
|
|
setPagingController={setPagingController} |
|
|
|
pagingController={pagingController} |
|
|
|
totalCount={totalCount} |
|
|
|
// isAutoPaging={false} |
|
|
|
// isAutoPaging={false} |
|
|
|
/> |
|
|
|
</> |
|
|
|
); |
|
|
|