| | |
| | | import DialogCloseButton from "../components/DialogCloseButton"; |
| | | import { blueGrey } from '@mui/material/colors'; |
| | | import MoveToInboxIcon from '@mui/icons-material/MoveToInbox'; |
| | | import { format } from 'date-fns'; |
| | | |
| | | const MissionShow = ({ open, id }) => { |
| | | const redirect = useRedirect(); |
| | |
| | | |
| | | const MissionShowContent = ({ handleClose }) => { |
| | | const record = useRecordContext(); |
| | | const translate = useTranslate(); |
| | | if (!record) return null; |
| | | console.log(record); |
| | | |
| | |
| | | color="textSecondary" |
| | | variant="caption" |
| | | > |
| | | Expected closing date |
| | | Last sending date |
| | | </Typography> |
| | | <Stack |
| | | direction="row" |
| | |
| | | gap={1} |
| | | > |
| | | <Typography variant="body2"> |
| | | {format(record.sendTime, 'yyyy-MM-dd HH:mm:ss')} |
| | | </Typography> |
| | | {new Date(record.expected_closing_date) < |
| | | new Date() ? ( |
| | | <Chip |
| | | label="Past" |
| | | color="error" |
| | | size="small" |
| | | /> |
| | | ) : null} |
| | | </Stack> |
| | | </Box> |
| | | |
| | |
| | | color="textSecondary" |
| | | variant="caption" |
| | | > |
| | | Budget |
| | | Bus No |
| | | </Typography> |
| | | <Typography variant="body2"> |
| | | {record.busNo} |
| | | </Typography> |
| | | </Box> |
| | | |
| | | {record.category && ( |
| | | <Box |
| | | display="flex" |
| | | mr={5} |
| | | flexDirection="column" |
| | | > |
| | | <Typography |
| | | color="textSecondary" |
| | | variant="caption" |
| | | > |
| | | Category |
| | | </Typography> |
| | | <Typography variant="body2"> |
| | | {record.category} |
| | | </Typography> |
| | | </Box> |
| | | )} |
| | | |
| | | <Box display="flex" mr={5} flexDirection="column"> |
| | | <Typography |
| | | color="textSecondary" |
| | | variant="caption" |
| | | > |
| | | Stage |
| | | {translate('table.field.segment.posType')} |
| | | </Typography> |
| | | <Typography variant="body2"> |
| | | {translate(`page.mission.enums.posType.${record.posType}`)} |
| | | </Typography> |
| | | </Box> |
| | | |
| | | <Box display="flex" mr={5} flexDirection="column"> |
| | | <Typography |
| | | color="textSecondary" |
| | | variant="caption" |
| | | > |
| | | Action Count |
| | | </Typography> |
| | | <Typography variant="body2"> |
| | | {record.actionCount || 'unknown'} |
| | | </Typography> |
| | | </Box> |
| | | </Box> |