Bläddra i källkod

update

master
cyril.tsui 1 månad sedan
förälder
incheckning
5a0680a0fa
1 ändrade filer med 25 tillägg och 1 borttagningar
  1. +25
    -1
      src/components/RoughSchedule/RoughSchedileSearchView.tsx

+ 25
- 1
src/components/RoughSchedule/RoughSchedileSearchView.tsx Visa fil

@@ -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}
/>
</>
);


Laddar…
Avbryt
Spara