Merge pull request #457 from automatisch/issue-454
feat: add status in flow row
This commit is contained in:
@@ -3,6 +3,7 @@ import { Link } from 'react-router-dom';
|
|||||||
import Card from '@mui/material/Card';
|
import Card from '@mui/material/Card';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import CardActionArea from '@mui/material/CardActionArea';
|
import CardActionArea from '@mui/material/CardActionArea';
|
||||||
|
import Chip from '@mui/material/Chip';
|
||||||
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
|
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
|
||||||
import { DateTime } from 'luxon';
|
import { DateTime } from 'luxon';
|
||||||
|
|
||||||
@@ -65,6 +66,13 @@ export default function FlowRow(props: FlowRowProps): React.ReactElement {
|
|||||||
</Title>
|
</Title>
|
||||||
|
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
|
<Chip
|
||||||
|
size="small"
|
||||||
|
color={flow?.active ? 'success' : 'info'}
|
||||||
|
variant={flow?.active ? 'filled': 'outlined'}
|
||||||
|
label={formatMessage(flow?.active ? 'flow.published' : 'flow.draft')}
|
||||||
|
/>
|
||||||
|
|
||||||
<IconButton
|
<IconButton
|
||||||
size="large"
|
size="large"
|
||||||
edge="start"
|
edge="start"
|
||||||
|
@@ -31,6 +31,10 @@ export const Title = styled(MuiStack)(() => ({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
export const ContextMenu = styled(MuiBox)(() => ({
|
export const ContextMenu = styled(MuiBox)(() => ({
|
||||||
|
flexDirection: 'row',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: 10,
|
||||||
gridArea: 'menu',
|
gridArea: 'menu',
|
||||||
}));
|
}));
|
||||||
export const Typography = styled(MuiTypography)(() => ({
|
export const Typography = styled(MuiTypography)(() => ({
|
||||||
|
@@ -13,6 +13,7 @@ export const GET_FLOWS = gql`
|
|||||||
name
|
name
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
updatedAt
|
||||||
|
active
|
||||||
steps {
|
steps {
|
||||||
iconUrl
|
iconUrl
|
||||||
}
|
}
|
||||||
|
@@ -40,6 +40,8 @@
|
|||||||
"createFlow.creating": "Creating a flow...",
|
"createFlow.creating": "Creating a flow...",
|
||||||
"flow.active": "ON",
|
"flow.active": "ON",
|
||||||
"flow.inactive": "OFF",
|
"flow.inactive": "OFF",
|
||||||
|
"flow.published": "Published",
|
||||||
|
"flow.draft": "Draft",
|
||||||
"flowEditor.publish": "PUBLISH",
|
"flowEditor.publish": "PUBLISH",
|
||||||
"flowEditor.unpublish": "UNPUBLISH",
|
"flowEditor.unpublish": "UNPUBLISH",
|
||||||
"flowEditor.publishFlowCannotBeUpdated": "To edit this flow, you must first unpublish it.",
|
"flowEditor.publishFlowCannotBeUpdated": "To edit this flow, you must first unpublish it.",
|
||||||
|
Reference in New Issue
Block a user