| | |
| | | FunctionField, |
| | | Pagination, |
| | | useNotify, |
| | | useRefresh, |
| | | } from 'react-admin'; |
| | | import { Box, Chip, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | const TaskList = () => { |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | notify(msg || 'common.response.success', { type: 'success', messageArgs: { _: msg } }); |
| | | refresh(); |
| | | } else { |
| | | notify(msg || 'common.response.fail', { type: 'error', messageArgs: { _: msg } }); |
| | | } |
| | |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | notify(msg || 'common.response.success', { type: 'success', messageArgs: { _: msg } }); |
| | | refresh(); |
| | | } else { |
| | | notify(msg || 'common.response.fail', { type: 'error', messageArgs: { _: msg } }); |
| | | } |