Merge pull request #457 from automatisch/issue-454

feat: add status in flow row
This commit is contained in:
Ömer Faruk Aydın
2022-08-25 00:34:07 +03:00
committed by GitHub
4 changed files with 15 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import { Link } from 'react-router-dom';
import Card from '@mui/material/Card';
import IconButton from '@mui/material/IconButton';
import CardActionArea from '@mui/material/CardActionArea';
import Chip from '@mui/material/Chip';
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
import { DateTime } from 'luxon';
@@ -65,6 +66,13 @@ export default function FlowRow(props: FlowRowProps): React.ReactElement {
</Title>
<ContextMenu>
<Chip
size="small"
color={flow?.active ? 'success' : 'info'}
variant={flow?.active ? 'filled': 'outlined'}
label={formatMessage(flow?.active ? 'flow.published' : 'flow.draft')}
/>
<IconButton
size="large"
edge="start"

View File

@@ -31,6 +31,10 @@ export const Title = styled(MuiStack)(() => ({
}));
export const ContextMenu = styled(MuiBox)(() => ({
flexDirection: 'row',
display: 'flex',
alignItems: 'center',
gap: 10,
gridArea: 'menu',
}));
export const Typography = styled(MuiTypography)(() => ({

View File

@@ -13,6 +13,7 @@ export const GET_FLOWS = gql`
name
createdAt
updatedAt
active
steps {
iconUrl
}

View File

@@ -40,6 +40,8 @@
"createFlow.creating": "Creating a flow...",
"flow.active": "ON",
"flow.inactive": "OFF",
"flow.published": "Published",
"flow.draft": "Draft",
"flowEditor.publish": "PUBLISH",
"flowEditor.unpublish": "UNPUBLISH",
"flowEditor.publishFlowCannotBeUpdated": "To edit this flow, you must first unpublish it.",