| | |
| | | loadMore: 'Load More Data', |
| | | complete: 'Complete', |
| | | deprecate: 'Deprecate', |
| | | resend: 'RESEND', |
| | | }, |
| | | msg: { |
| | | confirm: { |
| | |
| | | loadMore: '加载更多', |
| | | complete: '完成', |
| | | deprecate: '废弃', |
| | | resend: '重发', |
| | | }, |
| | | msg: { |
| | | confirm: { |
| | |
| | | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; |
| | | import { |
| | | DeleteButton, |
| | | useTranslate, |
| | | EditButton, |
| | | ReferenceArrayField, |
| | | ReferenceField, |
| | |
| | | Divider, |
| | | Stack, |
| | | Typography, |
| | | Avatar, |
| | | } from '@mui/material'; |
| | | import DialogCloseButton from "../components/DialogCloseButton"; |
| | | import { blueGrey } from '@mui/material/colors'; |
| | | import MoveToInboxIcon from '@mui/icons-material/MoveToInbox'; |
| | | |
| | | const MissionShow = ({ open, id }) => { |
| | | const redirect = useRedirect(); |
| | |
| | | ) |
| | | } |
| | | |
| | | const CLOSE_TOP_WITH_ARCHIVED = 14; |
| | | const MissionShowContent = ({ handleClose }) => { |
| | | const record = useRecordContext(); |
| | | if (!record) return null; |
| | |
| | | <> |
| | | <DialogCloseButton |
| | | onClose={handleClose} |
| | | top={12} |
| | | /> |
| | | <Stack gap={1}> |
| | | <Box display="flex" p={2}> |
| | |
| | | mb={4} |
| | | > |
| | | <Stack direction="row" alignItems="center" gap={2}> |
| | | <Avatar |
| | | sx={{ |
| | | width: 30, |
| | | height: 30, |
| | | bgcolor: blueGrey[500], |
| | | }} |
| | | > |
| | | {record.agv} |
| | | </Avatar> |
| | | <Typography variant="h5"> |
| | | {record.name} |
| | | {record.groupNo} |
| | | </Typography> |
| | | </Stack> |
| | | <Stack |
| | | gap={1} |
| | | direction="row" |
| | | pr={record.archived_at ? 0 : 6} |
| | | pr={6} |
| | | > |
| | | <ResendButton record={record} /> |
| | | </Stack> |
| | | </Stack> |
| | | |
| | |
| | | </Stack> |
| | | </> |
| | | ) |
| | | } |
| | | }; |
| | | |
| | | const ResendButton = ({ record }) => { |
| | | const dataProvider = useDataProvider(); |
| | | const redirect = useRedirect(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const translate = useTranslate(); |
| | | |
| | | const handleClick = () => { |
| | | alert(1); |
| | | }; |
| | | |
| | | return ( |
| | | <Button |
| | | onClick={handleClick} |
| | | startIcon={<MoveToInboxIcon />} |
| | | size="small" |
| | | > |
| | | {translate('common.action.resend')} |
| | | </Button> |
| | | ); |
| | | }; |
| | | |
| | | export default MissionShow; |