| | |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | useGetRecordId, |
| | | useGetOne, |
| | | Button, |
| | | } from "react-admin"; |
| | | import { Box, Typography, Card, Stack } from "@mui/material"; |
| | |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const [select, setSelect] = useState({}); |
| | | const ruleId = useGetRecordId(); |
| | | |
| | | const { data: dicts, isPending, error } = useGetOne('serialRule', { id: ruleId }); |
| | | return ( |
| | | <> |
| | | <Box display="flex"> |
| | |
| | | /> |
| | | <WrapperField cellClassName="opt" label="common.field.opt"> |
| | | <Button onClick={() => { |
| | | setSelect(re) |
| | | setSelect(record) |
| | | setEditDialog(true) |
| | | }} label={'ra.action.edit'} |
| | | > </Button> |
| | |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | | <SerialRuleItemCreate open={createDialog} setOpen={setCreateDialog} /> |
| | | <SerialRuleItemCreate open={createDialog} setOpen={setCreateDialog} record={dicts} /> |
| | | <SerialRuleItemEdit open={editDialog} setOpen={setEditDialog} record={select} /> |
| | | <PageDrawer |
| | | title="SerialRuleItem Detail" |