| | |
| | | DateField, |
| | | BooleanField, |
| | | ReferenceField, |
| | | useListContext, |
| | | ListContextProvider, |
| | | useList, |
| | | useGetList, |
| | | } from 'react-admin'; |
| | | import PanelTypography from "../../components/PanelTypography"; |
| | | import * as Common from '@/utils/common' |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import { styled } from '@mui/material/styles'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | |
| | | const translate = useTranslate(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | const { data, total, isPending, error, refetch, meta } = useGetList('/waveOrderRela', { filter: { waveId: record?.id } }); |
| | | const listContext = useList({ data, isPending }); |
| | | |
| | | if (data == null || data == undefined) { |
| | | return |
| | | } |
| | | |
| | | return ( |
| | | <> |
| | | <Box display="flex"> |
| | | <List resource="waveOrderRela" |
| | | <ListContextProvider |
| | | value={listContext} |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | filter={{ waveId: record.id }} |
| | | pagination={false} |
| | | empty={false} |
| | | actions={false} |
| | |
| | | <TextField source="stockUnit" label="table.field.asnOrderItem.stockUnit" /> |
| | | <TextField source="splrName" label="table.field.asnOrderItem.splrName" /> |
| | | </StyledDatagrid> |
| | | </List> |
| | | </ListContextProvider> |
| | | </Box> |
| | | </> |
| | | ); |