import React, { useState, useRef, useEffect, useMemo } from "react";
|
import { Box, Card, CardContent, Grid, Typography, Tooltip } from '@mui/material';
|
import {
|
useTranslate,
|
useRecordContext,
|
} from 'react-admin';
|
import PanelTypography from "../components/PanelTypography";
|
import * as Common from '@/utils/common'
|
|
const TaskPathTemplateNodePanel = () => {
|
const record = useRecordContext();
|
if (!record) return null;
|
const translate = useTranslate();
|
return (
|
<>
|
<Card sx={{ width: { xs: 300, sm: 500, md: 600, lg: 800 }, margin: 'auto' }}>
|
<CardContent>
|
<Grid container spacing={2}>
|
<Grid item xs={12} sx={{ display: 'flex', justifyContent: 'space-between' }}>
|
<Typography variant="h6" gutterBottom align="left" sx={{
|
maxWidth: { xs: '100px', sm: '180px', md: '260px', lg: '360px' },
|
whiteSpace: 'nowrap',
|
overflow: 'hidden',
|
textOverflow: 'ellipsis',
|
}}>
|
{Common.camelToPascalWithSpaces(translate('table.field.taskPathTemplateNode.id'))}: {record.id}
|
</Typography>
|
{/* inherit, primary, secondary, textPrimary, textSecondary, error */}
|
<Typography variant="h6" gutterBottom align="right" >
|
ID: {record.id}
|
</Typography>
|
</Grid>
|
</Grid>
|
<Grid container spacing={2}>
|
<Grid item xs={12} container alignContent="flex-end">
|
<Typography variant="caption" color="textSecondary" sx={{ wordWrap: 'break-word', wordBreak: 'break-all' }}>
|
{Common.camelToPascalWithSpaces(translate('common.field.memo'))}:{record.memo}
|
</Typography>
|
</Grid>
|
</Grid>
|
<Box height={20}> </Box>
|
<Grid container spacing={2}>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.templateId"
|
property={record.templateId}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.templateCode"
|
property={record.templateCode}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.nodeOrder"
|
property={record.nodeOrder}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.nodeCode"
|
property={record.nodeCode}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.nodeName"
|
property={record.nodeName}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.nodeType"
|
property={record.nodeType}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.systemCode"
|
property={record.systemCode}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.systemName"
|
property={record.systemName}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.executeParams"
|
property={record.executeParams}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.resultSchema"
|
property={record.resultSchema}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.timeoutMinutes"
|
property={record.timeoutMinutes}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.mandatory"
|
property={record.mandatory}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.parallelExecutable"
|
property={record.parallelExecutable}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.preCondition"
|
property={record.preCondition}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.postCondition"
|
property={record.postCondition}
|
/>
|
</Grid>
|
<Grid item xs={6}>
|
<PanelTypography
|
title="table.field.taskPathTemplateNode.nextNodeRules"
|
property={record.nextNodeRules}
|
/>
|
</Grid>
|
|
</Grid>
|
</CardContent>
|
</Card >
|
</>
|
);
|
};
|
|
export default TaskPathTemplateNodePanel;
|