| | |
| | | Button, |
| | | useRedirect, |
| | | useUnselectAll, |
| | | useRecordSelection, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack, Drawer } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | import AddTaskIcon from '@mui/icons-material/AddTask'; |
| | | import PageEditDrawer from "../../components/PageEditDrawer"; |
| | | import OutStockPublic from "./OutStockPublic"; |
| | | import OutOrderPreview from "./OutOrderPreview"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | const translate = useTranslate(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [manualDialog, setManualDialog] = useState(false); |
| | | const [preview, setPreview] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const [modalType, setmodalType] = useState(0); |
| | | const [select, setSelect] = useState(0); |
| | |
| | | <MyCreateButton onClick={() => { setManualDialog(true); setmodalType(0) }} /> |
| | | <SelectColumnsButton preferenceKey='outStock' /> |
| | | <ImportButton value={'outStockItem'} /> |
| | | {/* <MyExportButton /> */} |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | |
| | | <OutOrderModal |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | preview={preview} |
| | | setPreview={setPreview} |
| | | /> |
| | | <OutOrderPreview open={preview} setOpen={setPreview} /> |
| | | <PageEditDrawer |
| | | title={"toolbar.publicWorking"} |
| | | drawerVal={drawerVal} |
| | | setDrawerVal={setDrawerVal} |
| | | > |
| | | <OutStockPublic record={select} open={drawerVal} setOpen={setDrawerVal}/> |
| | | <OutStockPublic record={select} open={drawerVal} setOpen={setDrawerVal} /> |
| | | </PageEditDrawer> |
| | | </Box > |
| | | ) |
| | |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | |
| | | const createByOrder = async (event) => { |
| | | event.stopPropagation(); |
| | | setCreateDialog(true); |
| | |
| | | } |
| | | |
| | | return ( |
| | | record.workQty < record.anfme ? <ConfirmButton label={"toolbar.publicWorking"} startIcon={<AddTaskIcon />} onConfirm={taskEvent} size={"small"} /> : <></> |
| | | record.workQty < record.anfme ? <Button label={"toolbar.publicWorking"} startIcon={<AddTaskIcon />} onClick={taskEvent} size={"small"} /> : <></> |
| | | ) |
| | | } |