| | |
| | | import { Draggable } from '@hello-pangea/dnd'; |
| | | import { Box, Card, Typography } from '@mui/material'; |
| | | import { Box, Card, Typography, Avatar, Divider } from '@mui/material'; |
| | | import { ReferenceField, useRedirect } from 'react-admin'; |
| | | import { blueGrey } from '@mui/material/colors'; |
| | | |
| | | export const MissionCard = ({ mission, index }) => { |
| | | if (!mission) return null; |
| | |
| | | }} |
| | | elevation={snapshot?.isDragging ? 3 : 1} |
| | | > |
| | | <Box padding={1} display="flex"> |
| | | <ReferenceField |
| | | source="company_id" |
| | | record={mission} |
| | | reference="companies" |
| | | link={false} |
| | | <Box padding={1} display="flex" flexDirection="column"> |
| | | <Box display="flex" flexDirection="row"> |
| | | <Avatar |
| | | sx={{ |
| | | '& img': { objectFit: 'contain' }, |
| | | width: 20, |
| | | height: 20, |
| | | fontSize: '.8rem', |
| | | bgcolor: blueGrey[500] |
| | | }} |
| | | > |
| | | </ReferenceField> |
| | | <Box sx={{ marginLeft: 1 }}> |
| | | <Typography variant="body2" gutterBottom> |
| | | {mission.agv} |
| | | </Avatar> |
| | | <Divider /> |
| | | <Typography variant="body2" > |
| | | {mission.groupNo} |
| | | </Typography> |
| | | </Box> |
| | | |
| | | <Box sx={{ marginLeft: 1 }}> |
| | | <Typography variant="body2" gutterBottom> |
| | | groupNo {mission.groupNo} |
| | | </Typography> |
| | | <Typography variant="caption" color="textSecondary"> |
| | | {mission.posType} |
| | | posType {mission.posType} |
| | | </Typography> |
| | | </Box> |
| | | <Box sx={{ marginLeft: 1 }}> |
| | | <Typography variant="body2" gutterBottom> |
| | | taskNos {mission.taskNos} |
| | | </Typography> |
| | | <Typography variant="caption" color="textSecondary"> |
| | | backpack{mission.backpack} |
| | | </Typography> |
| | | </Box> |
| | | <Box sx={{ marginLeft: 1 }}> |
| | | <Typography variant="body2" gutterBottom> |
| | | destCode {mission.destCode} |
| | | </Typography> |
| | | <Typography variant="caption" color="textSecondary"> |
| | | agv {mission.agv} |
| | | </Typography> |
| | | </Box> |
| | | </Box> |