| @@ -14,10 +14,12 @@ import { | |||||
| testDetailedSchedule, | testDetailedSchedule, | ||||
| } from "@/app/api/scheduling/actions"; | } from "@/app/api/scheduling/actions"; | ||||
| import { defaultPagingController } from "../SearchResults/SearchResults"; | import { defaultPagingController } from "../SearchResults/SearchResults"; | ||||
| import { arrayToDateString, decimalFormatter } from "@/app/utils/formatUtil"; | |||||
| import { arrayToDateString, arrayToDayjs, decimalFormatter } from "@/app/utils/formatUtil"; | |||||
| import dayjs from "dayjs"; | import dayjs from "dayjs"; | ||||
| import { orderBy, uniqBy } from "lodash"; | import { orderBy, uniqBy } from "lodash"; | ||||
| import { Button, Stack } from "@mui/material"; | import { Button, Stack } from "@mui/material"; | ||||
| import isToday from 'dayjs/plugin/isToday'; | |||||
| dayjs.extend(isToday); | |||||
| // may need move to "index" or "actions" | // may need move to "index" or "actions" | ||||
| // type RecordStructure = { | // type RecordStructure = { | ||||
| @@ -299,6 +301,7 @@ const DSOverview: React.FC<Props> = ({ type, defaultInputs }) => { | |||||
| <Button | <Button | ||||
| variant="contained" | variant="contained" | ||||
| onClick={testDetailedScheduleClick} | onClick={testDetailedScheduleClick} | ||||
| disabled={filteredSchedules.some(ele => arrayToDayjs(ele.scheduleAt).isToday())} | |||||
| > | > | ||||
| {t("Test Detailed Schedule")} | {t("Test Detailed Schedule")} | ||||
| </Button> | </Button> | ||||