|  |  |  | 
|---|
|  |  |  | <MyButton setCreateDialog={setCreateDialog} setmodalType={setmodalType} /> | 
|---|
|  |  |  | <InspectionButton /> | 
|---|
|  |  |  | <CompleteButton /> | 
|---|
|  |  |  | <DeleteButton mutationMode="pessimistic" /> | 
|---|
|  |  |  | <ODeleteButton  /> | 
|---|
|  |  |  | {/* <CloseButton /> */} | 
|---|
|  |  |  | </WrapperField> | 
|---|
|  |  |  | </StyledDatagrid> | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | export default AsnOrderList; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const ODeleteButton = () => { | 
|---|
|  |  |  | const record = useRecordContext(); | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | record.exceStatus === 0 ? <DeleteButton  mutationMode="pessimistic"/> : <></> | 
|---|
|  |  |  | ) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const MyButton = ({ setCreateDialog, setmodalType }) => { | 
|---|
|  |  |  | const record = useRecordContext(); | 
|---|
|  |  |  | const handleEditClick = (btn) => { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | record.exceStatus === 1 || record.exceStatus === 0 ? | 
|---|
|  |  |  | <Button | 
|---|
|  |  |  | color="primary" | 
|---|
|  |  |  | startIcon={<EditIcon />} | 
|---|
|  |  |  | 
|---|
|  |  |  | label={'ra.action.edit'} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </Button> | 
|---|
|  |  |  | : <></> | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | <ConfirmButton label={"toolbar.inspection"} color="secondary" startIcon={<ConstructionIcon />} onConfirm={inspection} /> | 
|---|
|  |  |  | <ConfirmButton label={"toolbar.inspection"} color="secondary" startIcon={<ConstructionIcon />} onConfirm={inspection} /> | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | // record.exceStatus === 1 && (record.anfme === record.qty ? <Button onClick={requestComplete} label={"toolbar.complete"} color="secondary"> | 
|---|
|  |  |  | //   <TaskIcon /> | 
|---|
|  |  |  | // </Button> : ) | 
|---|
|  |  |  | <ConfirmButton label={"toolbar.complete"} color="secondary"  startIcon={<TaskIcon />} onConfirm={requestComplete} /> | 
|---|
|  |  |  | record.exceStatus === 1 ? <ConfirmButton label={"toolbar.complete"} color="secondary"  startIcon={<TaskIcon />} onConfirm={requestComplete} /> : <></> | 
|---|
|  |  |  | ) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|