| | |
| | | required, |
| | | useRecordContext, |
| | | DeleteButton, |
| | | SelectArrayInput, |
| | | } from 'react-admin'; |
| | | import { useWatch, useFormContext } from "react-hook-form"; |
| | | import { Stack, Grid, Box, Typography } from '@mui/material'; |
| | |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.taskPathTemplateMerge.conditionExpression" |
| | | source="conditionExpression" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | <ReferenceArrayInput source="conditionExpression" reference="taskPathTemplate"> |
| | | <SelectArrayInput |
| | | label="table.field.taskPathTemplateMerge.conditionExpression" |
| | | optionText="templateName" |
| | | optionValue="id" |
| | | fullWidth |
| | | validate={(value) => { |
| | | if (value && value.length > 1) { |
| | | return '只能选择一个模板'; |
| | | } |
| | | return undefined; |
| | | }} |
| | | /> |
| | | </ReferenceArrayInput> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |