| | |
| | | import DialogCloseButton from "../components/DialogCloseButton"; |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | import { compDirectChoices } from "../loc/compDirect"; |
| | | |
| | | const StaCreate = (props) => { |
| | | const { open, setOpen } = props; |
| | |
| | | /> |
| | | </ReferenceInput> |
| | | </Grid> |
| | | <Grid item xs={4} display="flex" gap={1}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.sta.capacity" |
| | | source="capacity" |
| | |
| | | validate={required()} |
| | | /> |
| | | </Grid> */} |
| | | <Grid item xs={4} display="flex" gap={1}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.sta.height" |
| | | source="height" |
| | |
| | | validate={[required(), greaterThanZero]} |
| | | /> |
| | | </Grid> */} |
| | | <Grid item xs={4} display="flex" gap={1}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.sta.angle" |
| | | source="angle" |
| | | validate={[required(), greaterThanZero]} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={4} display="flex" gap={1}> |
| | | <NumberInput |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <SelectInput |
| | | label="table.field.sta.actDir" |
| | | source="actDir" |
| | | validate={greaterThanZero} |
| | | choices={compDirectChoices} |
| | | translateChoice |
| | | validate={[required(), greaterThanZero]} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | import CustomerTopToolBar from "../components/EditTopToolBar"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | import { compDirectChoices } from "../loc/compDirect"; |
| | | |
| | | const FormToolbar = () => { |
| | | const { getValues } = useFormContext(); |
| | |
| | | validate={[required(), greaterThanZero]} |
| | | /> |
| | | <NumberInput |
| | | label="table.field.sta.angle" |
| | | source="angle" |
| | | validate={[required(), greaterThanZero]} |
| | | /> |
| | | <NumberInput |
| | | label="table.field.sta.actDir" |
| | | source="actDir" |
| | | validate={greaterThanZero} |
| | | /> |
| | | {/* <NumberInput |
| | | label="table.field.sta.offset" |
| | | source="offset" |
| | | validate={required()} |
| | | /> */} |
| | | <NumberInput |
| | | label="table.field.sta.height" |
| | | source="height" |
| | | validate={[required(), greaterThanZero]} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | {/* <NumberInput |
| | | label="table.field.sta.depth" |
| | | source="depth" |
| | |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.sta.angle" |
| | | source="angle" |
| | | validate={[required(), greaterThanZero]} |
| | | /> |
| | | <SelectInput |
| | | label="table.field.sta.actDir" |
| | | source="actDir" |
| | | choices={compDirectChoices} |
| | | translateChoice |
| | | validate={[required(), greaterThanZero]} |
| | | /> |
| | | {/* <NumberInput |
| | | label="table.field.sta.offset" |
| | | source="offset" |
| | | validate={required()} |
| | | /> */} |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.sta.inboundWait" |
| | | source="inboundWait" |
| | | validate={greaterThanZero} |
| | |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | FunctionField, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import rowSx from "./rowSx"; |
| | | import { getCompDirectLabel } from "../loc/compDirect"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | <NumberField source="height" label="table.field.sta.height" /> |
| | | <NumberField source="depth" label="table.field.sta.depth" /> |
| | | <NumberField source="angle" label="table.field.sta.angle" /> |
| | | <NumberField source="actDir" label="table.field.sta.actDir" /> |
| | | <FunctionField |
| | | label="table.field.sta.actDir" |
| | | render={(record) => getCompDirectLabel(translate, record?.actDir)} |
| | | /> |
| | | <NumberField source="inboundWait" label="table.field.sta.inboundWait" /> |
| | | <NumberField source="outboundWait" label="table.field.sta.outboundWait" /> |
| | | {/* <TextField source="autoing" label="table.field.sta.autoing" /> |
| | |
| | | } from 'react-admin'; |
| | | import { format } from 'date-fns'; |
| | | import * as Common from '@/utils/common' |
| | | import { getCompDirectLabel } from "../loc/compDirect"; |
| | | |
| | | const STATUS_FIELDS = [ |
| | | { key: 'autoing', labelKey: 'table.field.sta.autoing' }, |
| | |
| | | { labelKey: 'table.field.sta.rsvInCnt', valueKey: 'rsvInCnt' }, |
| | | { labelKey: 'table.field.sta.rsvOutCnt', valueKey: 'rsvOutCnt' }, |
| | | { labelKey: 'table.field.sta.angle', valueKey: 'angle' }, |
| | | { labelKey: 'table.field.sta.actDir', valueKey: 'actDir' }, |
| | | { |
| | | labelKey: 'table.field.sta.actDir', |
| | | getValue: (record, translate) => getCompDirectLabel(translate, record?.actDir), |
| | | }, |
| | | // { labelKey: 'table.field.sta.offset', valueKey: 'offset' }, |
| | | { labelKey: 'table.field.sta.height', valueKey: 'height' }, |
| | | { labelKey: 'table.field.sta.depth', valueKey: 'depth' }, |
| | |
| | | <Box height={12}> </Box> |
| | | |
| | | <Grid container spacing={2}> |
| | | {INFO_FIELDS.map(({ labelKey, valueKey }) => ( |
| | | {INFO_FIELDS.map(({ labelKey, valueKey, getValue }) => ( |
| | | <Grid item xs={12} sm={6} md={4} key={labelKey}> |
| | | <InfoItem |
| | | labelKey={labelKey} |
| | | value={getRecordValue(record, valueKey)} |
| | | value={getValue ? getValue(record, translate) : getRecordValue(record, valueKey)} |
| | | /> |
| | | </Grid> |
| | | ))} |