| | |
| | | FunctionField, |
| | | Pagination, |
| | | useNotify, |
| | | useRefresh, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Button, Chip } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | minWidth: '16em', |
| | | }, |
| | | '& .column-tasksNum': { |
| | | maxWidth: '8em', |
| | | }, |
| | | '& .column-tasksNumTotal': { |
| | | maxWidth: '8em', |
| | | }, |
| | | '& .column-memo': { |
| | |
| | | const BusList = () => { |
| | | 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 } }); |
| | | } |
| | |
| | | )} /> |
| | | {/* <TextField source="name" /> */} |
| | | </ReferenceField> |
| | | <NumberField source="tasksNum" label="table.field.bus.tasksNum" sortable={false} /> |
| | | <NumberField source="tasksNum" label="table.field.bus.tasksNum" sortable={false} sx={{ fontWeight: 'bold' }} /> |
| | | <NumberField source="tasksNumTotal" label="table.field.bus.tasksNumTotal" sortable={false} sx={{ fontWeight: 'bold' }} /> |
| | | <DateField source="startTime" label="table.field.bus.startTime" showTime /> |
| | | <DateField source="endTime" label="table.field.bus.endTime" showTime emptyText="-" /> |
| | | <TextField source="phase" label="table.field.bus.phase" sortable={false} /> |
| | |
| | | {/* <BooleanField source="statusBool" label="common.field.status" sortable={false} /> */} |
| | | <TextField source="memo" label="common.field.memo" sortable={false} emptyText="-" /> |
| | | <FunctionField label="common.field.opt" cellClassName="opt" render={record => ( |
| | | (record.busSts === 15 || true) && ( |
| | | (record.busSts === 15) && ( |
| | | <ConfirmButton |
| | | label="ra.action.cancel" |
| | | size="small" |