mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat: wip send estimate mail preview
This commit is contained in:
@@ -5,20 +5,18 @@ import { InvoiceSendMailForm } from './InvoiceSendMailForm';
|
||||
import { InvoiceSendMailPreview } from './InvoiceSendMailPreview';
|
||||
import { InvoiceSendMailFields } from './InvoiceSendMailFields';
|
||||
import { SendMailViewHeader } from '../../Estimates/SendMailViewDrawer/SendMailViewHeader';
|
||||
import { SendMailViewLayout } from '../../Estimates/SendMailViewDrawer/SendMailViewLayout';
|
||||
|
||||
export function InvoiceSendMailContent() {
|
||||
return (
|
||||
<Stack className={Classes.DRAWER_BODY}>
|
||||
<InvoiceSendMailBoot>
|
||||
<InvoiceSendMailForm>
|
||||
<Stack spacing={0} flex={1} overflow="hidden">
|
||||
<SendMailViewHeader label={'Send Invoice Mail'} />
|
||||
|
||||
<Group flex={1} overflow="auto" spacing={0} alignItems={'stretch'}>
|
||||
<InvoiceSendMailFields />
|
||||
<InvoiceSendMailPreview />
|
||||
</Group>
|
||||
</Stack>
|
||||
<SendMailViewLayout
|
||||
header={<SendMailViewHeader label={'Send Invoice Mail'} />}
|
||||
fields={<InvoiceSendMailFields />}
|
||||
preview={<InvoiceSendMailPreview />}
|
||||
/>
|
||||
</InvoiceSendMailForm>
|
||||
</InvoiceSendMailBoot>
|
||||
</Stack>
|
||||
|
||||
@@ -1,34 +1,19 @@
|
||||
// @ts-nocheck
|
||||
import { Button, Intent, MenuItem, Position } from '@blueprintjs/core';
|
||||
import { useRef, useState, useMemo, useCallback } from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useFormikContext } from 'formik';
|
||||
import { SelectOptionProps } from '@blueprintjs-formik/select';
|
||||
import { css } from '@emotion/css';
|
||||
import {
|
||||
FCheckbox,
|
||||
FFormGroup,
|
||||
FInputGroup,
|
||||
Group,
|
||||
Stack,
|
||||
} from '@/components';
|
||||
import { FCheckbox, FFormGroup, FInputGroup, Group, Stack } from '@/components';
|
||||
import { useDrawerContext } from '@/components/Drawer/DrawerProvider';
|
||||
import { useDrawerActions } from '@/hooks/state';
|
||||
import { useInvoiceMailItems, } from './_hooks';
|
||||
import { useInvoiceMailItems, useSendInvoiceFormatArgsOptions } from './_hooks';
|
||||
import { SendMailViewToAddressField } from '../../Estimates/SendMailViewDrawer/SendMailViewToAddressField';
|
||||
import { SendMailViewMessageField } from '../../Estimates/SendMailViewDrawer/SendMailViewMessageField';
|
||||
|
||||
export function InvoiceSendMailFields() {
|
||||
const items = useInvoiceMailItems();
|
||||
const argsOptions = useSendInvoiceFormatArgsOptions();
|
||||
|
||||
return (
|
||||
<Stack
|
||||
bg="white"
|
||||
flex={'1'}
|
||||
maxWidth="720px"
|
||||
maxHeight="100%"
|
||||
spacing={0}
|
||||
borderRight="1px solid #dcdcdd"
|
||||
>
|
||||
<Stack>
|
||||
<Stack spacing={0} overflow="auto" flex="1" p={'30px'}>
|
||||
<SendMailViewToAddressField
|
||||
toMultiSelectProps={{ items }}
|
||||
@@ -39,7 +24,7 @@ export function InvoiceSendMailFields() {
|
||||
<FInputGroup name={'subject'} large fastField />
|
||||
</FFormGroup>
|
||||
|
||||
<SendMailViewMessageField />
|
||||
<SendMailViewMessageField argsOptions={argsOptions} />
|
||||
|
||||
<Group>
|
||||
<FCheckbox name={'attachPdf'} label={'Attach PDF'} />
|
||||
|
||||
Reference in New Issue
Block a user