瀏覽代碼

update

master
cyril.tsui 1 月之前
父節點
當前提交
2079118721
共有 1 個檔案被更改,包括 4 行新增1 行删除
  1. +4
    -1
      src/components/DetailedSchedule/DetailedScheduleSearchView.tsx

+ 4
- 1
src/components/DetailedSchedule/DetailedScheduleSearchView.tsx 查看文件

@@ -14,10 +14,12 @@ import {
testDetailedSchedule,
} from "@/app/api/scheduling/actions";
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 { orderBy, uniqBy } from "lodash";
import { Button, Stack } from "@mui/material";
import isToday from 'dayjs/plugin/isToday';
dayjs.extend(isToday);

// may need move to "index" or "actions"
// type RecordStructure = {
@@ -299,6 +301,7 @@ const DSOverview: React.FC<Props> = ({ type, defaultInputs }) => {
<Button
variant="contained"
onClick={testDetailedScheduleClick}
disabled={filteredSchedules.some(ele => arrayToDayjs(ele.scheduleAt).isToday())}
>
{t("Test Detailed Schedule")}
</Button>


Loading…
取消
儲存