Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | import { css } from '@emotion/react'; import { IconPlus, IconUserPlus } from '@tabler/icons-react'; import { memo } from 'react'; import { FormattedMessage } from 'react-intl'; import { Button, EmptyStateFigure, Stack, Typography } from '@allshares/studio-design-system'; import { useBoolState } from '@amalia/ext/react/hooks'; import { type Plan } from '@amalia/payout-definition/plans/types'; import { CreatePlanAssignmentsFormModal } from '../components/forms/create-plan-assignments/modal/CreatePlanAssignmentsFormModal'; interface PlanEmptyAssignmentsProps { readonly plan?: Plan; } export const PlanEmptyAssignments = memo(function PlanEmptyAssignments({ plan }: PlanEmptyAssignmentsProps) { const { isAssignUsersToPlanModalOpen, setAssignUsersToPlanModalOpenTrue, setAssignUsersToPlanModalOpenFalse } = useBoolState(false, 'assignUsersToPlanModalOpen'); return ( <Stack align="center" gap={56} css={css` margin-top: 8px; `} > <EmptyStateFigure primaryIcon={<IconUserPlus />} secondaryIcon={<IconPlus />} variant="primary" css={css` width: 384px; `} /> <Stack align="center" gap={24} > <Typography variant="heading2Medium"> <FormattedMessage defaultMessage="Start by assigning users to plan" /> </Typography> <Button icon={<IconPlus />} size="large" variant="primary" onClick={setAssignUsersToPlanModalOpenTrue} > <FormattedMessage defaultMessage="Add users" /> </Button> </Stack> {!!plan && ( <CreatePlanAssignmentsFormModal isOpen={isAssignUsersToPlanModalOpen} plan={plan} onClose={setAssignUsersToPlanModalOpenFalse} /> )} </Stack> ); }); |