| | |
| | | SelectColumnsButton, |
| | | EditButton, |
| | | FilterButton, |
| | | CreateButton, |
| | | ExportButton, |
| | | BulkDeleteButton, |
| | | WrapperField, |
| | | useRecordContext, |
| | | useTranslate, |
| | | useNotify, |
| | | useListContext, |
| | | FunctionField, |
| | | TextField, |
| | | NumberField, |
| | | DateField, |
| | | BooleanField, |
| | | ReferenceField, |
| | | TextInput, |
| | | DateTimeInput, |
| | | DateInput, |
| | | SelectInput, |
| | | NumberInput, |
| | | ReferenceInput, |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | useRefresh, |
| | | useRedirect, |
| | | Button, |
| | | } from 'react-admin'; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import PlayArrowOutlinedIcon from '@mui/icons-material/PlayArrowOutlined'; |
| | | import PauseCircleOutlineIcon from '@mui/icons-material/PauseCircleOutline'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import ConfirmButton from "../../components/ConfirmButton"; |
| | | import PageDrawer from "../../components/PageDrawer"; |
| | |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <BulkStartButton /> |
| | | <BulkPauseButton /> |
| | | <FilterButton /> |
| | | <SelectColumnsButton preferenceKey='wave' /> |
| | | </TopToolbar> |
| | |
| | | return ( |
| | | record?.exceStatus == 0 ? <ConfirmButton label={"toolbar.createTask"} startIcon={<PublicIcon />} onConfirm={pubClick} size='small' /> : <></> |
| | | ); |
| | | } |
| | | |
| | | const BulkStartButton = () => { |
| | | const { data, selectedIds, onUnselectItems } = useListContext(); |
| | | |
| | | const startClick = () => { |
| | | onUnselectItems() |
| | | } |
| | | return ( |
| | | <Button label="toolbar.start" onClick={startClick} startIcon={<PlayArrowOutlinedIcon />} /> |
| | | ) |
| | | } |
| | | |
| | | const BulkPauseButton = () => { |
| | | const { data, selectedIds, onUnselectItems } = useListContext(); |
| | | |
| | | const pauseClick = () => { |
| | | onUnselectItems() |
| | | } |
| | | return ( |
| | | <Button label="toolbar.pause" onClick={pauseClick} startIcon={<PauseCircleOutlineIcon />} /> |
| | | ) |
| | | } |