Skip to content

Commit

Permalink
Link to engagement workflow from update dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonF committed Jul 8, 2024
1 parent 2fe3f8f commit 764a1a8
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions src/scenes/Engagement/EditEngagement/EngagementWorkflowDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useMutation } from '@apollo/client';
import { Grid, Tooltip, Typography } from '@mui/material';
import { InfoOutlined as InfoIcon } from '@mui/icons-material';
import { Grid, IconButton, Stack, Tooltip, Typography } from '@mui/material';
import { makeStyles } from 'tss-react/mui';
import { Except } from 'type-fest';
import {
Expand All @@ -20,6 +21,7 @@ import {
SubmitError,
} from '../../../components/form';
import { AutocompleteField } from '../../../components/form/AutocompleteField';
import { Link } from '../../../components/Routing';
import { Engagement } from './EditEngagementDialog';
import {
UpdateInternshipEngagementDocument,
Expand Down Expand Up @@ -68,9 +70,28 @@ export const EngagementWorkflowDialog = ({

const { canBypassTransitions, transitions } = engagement.status;

const status = engagement.status.value;
return (
<DialogForm
title="Update Engagement"
title={
<Stack
direction="row"
gap={1}
alignItems="center"
justifyContent="space-between"
sx={{ mr: -1 }}
>
<span>Update Engagement</span>
<Tooltip title="View Workflow">
<IconButton
component={Link}
to={`/engagements/workflow${status ? `?state=${status}` : ''}`}
>
<InfoIcon />
</IconButton>
</Tooltip>
</Stack>
}
closeLabel="Close"
{...props}
submitLabel={canBypassTransitions ? undefined : false}
Expand Down

0 comments on commit 764a1a8

Please sign in to comment.