|  |  | 
 |  |  |     useNotify, | 
 |  |  |     Form, | 
 |  |  |     useCreateController, | 
 |  |  |     ReferenceField, | 
 |  |  | } from 'react-admin'; | 
 |  |  | import { | 
 |  |  |     Dialog, | 
 |  |  | 
 |  |  |     Stack, | 
 |  |  |     Grid, | 
 |  |  |     Box, | 
 |  |  |     TextField, | 
 |  |  | } from '@mui/material'; | 
 |  |  | import DialogCloseButton from "../../components/DialogCloseButton"; | 
 |  |  | import StatusSelectInput from "../../components/StatusSelectInput"; | 
 |  |  | 
 |  |  |     return ( | 
 |  |  |         <> | 
 |  |  |             <CreateBase | 
 |  |  |                 resource="deliveryItem" | 
 |  |  |                 record={{}} | 
 |  |  |                 transform={(data) => { | 
 |  |  |                     return data; | 
 |  |  | 
 |  |  |                         </DialogTitle> | 
 |  |  |                         <DialogContent sx={{ mt: 2 }}> | 
 |  |  |                             <Grid container rowSpacing={2} columnSpacing={2}> | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1} sx={{display : "none"}}> | 
 |  |  |                                     <NumberInput  | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1} sx={{ display: "none" }}> | 
 |  |  |                                     <NumberInput | 
 |  |  |                                         label="table.field.deliveryItem.deliveryId" | 
 |  |  |                                         source="deliveryId" | 
 |  |  |                                         defaultValue={record?.id} | 
 |  |  |                                         readOnly | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1}> | 
 |  |  |                                 <Grid item xs={12} display="flex" gap={1}> | 
 |  |  |                                     <TextInput | 
 |  |  |                                         label="table.field.deliveryItem.platItemId" | 
 |  |  |                                         source="platItemId" | 
 |  |  |                                         parse={v => v} | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1}> | 
 |  |  |                                     <TextInput | 
 |  |  |                                         label="table.field.deliveryItem.matnrCode" | 
 |  |  |                                         source="matnrCode" | 
 |  |  |                                         parse={v => v} | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1}> | 
 |  |  |                                     <TextInput | 
 |  |  |                                         label="table.field.deliveryItem.matnrName" | 
 |  |  |                                         source="matnrName" | 
 |  |  |                                         parse={v => v} | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1}> | 
 |  |  |                                     <TextInput | 
 |  |  |                                         label="table.field.deliveryItem.fieldsIndex" | 
 |  |  |                                         source="fieldsIndex" | 
 |  |  |                                         parse={v => v} | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1}> | 
 |  |  |                                 <Grid item xs={12} display="flex" gap={1}> | 
 |  |  |                                     <TextInput | 
 |  |  |                                         label="table.field.deliveryItem.unit" | 
 |  |  |                                         source="unit" | 
 |  |  |                                         parse={v => v} | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1}> | 
 |  |  |                                     <NumberInput | 
 |  |  |                                         label="table.field.deliveryItem.anfme" | 
 |  |  |                                         source="anfme" | 
 |  |  |                                         validate={required()} | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1}> | 
 |  |  |                                     <NumberInput | 
 |  |  |                                         label="table.field.deliveryItem.qty" | 
 |  |  |                                         source="qty" | 
 |  |  |                                         validate={required()} | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1}> | 
 |  |  |                                     <NumberInput | 
 |  |  |                                         label="table.field.deliveryItem.nromQty" | 
 |  |  |                                         source="nromQty" | 
 |  |  |                                         validate={required()} | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1}> | 
 |  |  |                                 <Grid item xs={12} display="flex" gap={1}> | 
 |  |  |                                     <NumberInput | 
 |  |  |                                         label="table.field.deliveryItem.printQty" | 
 |  |  |                                         source="printQty" | 
 |  |  |                                         validate={required()} | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1}> | 
 |  |  |                                     <TextInput | 
 |  |  |                                         label="table.field.deliveryItem.splrName" | 
 |  |  |                                         source="splrName" | 
 |  |  |                                         parse={v => v} | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1}> | 
 |  |  |                                     <TextInput | 
 |  |  |                                     <ReferenceInput source="splrName" reference="companys" label="table.field.deliveryItem.splrName" queryOptions={{ type: 'supplier' }}> | 
 |  |  |                                         <AutocompleteInput | 
 |  |  |                                             label="table.field.deliveryItem.splrName" | 
 |  |  |                                             optionText="name" | 
 |  |  |                                             source="splrCode" | 
 |  |  |                                         /> | 
 |  |  |                                     </ReferenceInput> | 
 |  |  |                                     {/* <TextInput | 
 |  |  |                                         label="table.field.deliveryItem.splrCode" | 
 |  |  |                                         source="splrCode" | 
 |  |  |                                         parse={v => v} | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1}> | 
 |  |  |                                     /> */} | 
 |  |  |                                     <TextInput | 
 |  |  |                                         label="table.field.deliveryItem.splrBatch" | 
 |  |  |                                         source="splrBatch" | 
 |  |  |                                         parse={v => v} | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |  | 
 |  |  |                                 <Grid item xs={6} display="flex" gap={1}> | 
 |  |  |                                     <StatusSelectInput /> | 
 |  |  |                                 </Grid> |