mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
feature : Puschases & Sales / fix : tasks
This commit is contained in:
@@ -11,6 +11,7 @@ import moment from 'moment';
|
||||
import { Intent, FormGroup, TextArea, Button } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { pick } from 'lodash';
|
||||
import { Row, Col } from 'react-grid-system';
|
||||
|
||||
import InvoiceFormHeader from './InvoiceFormHeader';
|
||||
import EstimatesItemsTable from 'containers/Sales/Estimate/EntriesItemsTable';
|
||||
@@ -162,7 +163,7 @@ function InvoiceForm({
|
||||
index: index + 1,
|
||||
}));
|
||||
};
|
||||
// debugger;
|
||||
|
||||
const initialValues = useMemo(
|
||||
() => ({
|
||||
...(invoice
|
||||
@@ -186,14 +187,6 @@ function InvoiceForm({
|
||||
[invoice, defaultInitialValues, defaultInvoice],
|
||||
);
|
||||
|
||||
// const initialValues = useMemo(
|
||||
// () => ({
|
||||
// ...defaultInitialValues,
|
||||
// entries: orderingIndex(defaultInitialValues.entries),
|
||||
// }),
|
||||
// [defaultInvoice, defaultInitialValues, invoice],
|
||||
// );
|
||||
|
||||
const initialAttachmentFiles = useMemo(() => {
|
||||
return invoice && invoice.media
|
||||
? invoice.media.map((attach) => ({
|
||||
@@ -308,31 +301,39 @@ function InvoiceForm({
|
||||
onClickClearAllLines={handleClearAllLines}
|
||||
formik={formik}
|
||||
/>
|
||||
<FormGroup
|
||||
label={<T id={'invoice_message'} />}
|
||||
className={'form-group--customer_note'}
|
||||
>
|
||||
<TextArea
|
||||
growVertically={true}
|
||||
{...formik.getFieldProps('invoice_message')}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
label={<T id={'terms_conditions'} />}
|
||||
className={'form-group--terms_conditions'}
|
||||
>
|
||||
<TextArea
|
||||
growVertically={true}
|
||||
{...formik.getFieldProps('terms_conditions')}
|
||||
/>
|
||||
</FormGroup>
|
||||
<Dragzone
|
||||
initialFiles={initialAttachmentFiles}
|
||||
onDrop={handleDropFiles}
|
||||
onDeleteFile={handleDeleteFile}
|
||||
hint={'Attachments: Maxiumum size: 20MB'}
|
||||
/>
|
||||
<Row>
|
||||
<Col>
|
||||
<FormGroup
|
||||
label={<T id={'invoice_message'} />}
|
||||
className={'form-group--customer_note'}
|
||||
>
|
||||
<TextArea
|
||||
growVertically={true}
|
||||
{...formik.getFieldProps('invoice_message')}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
label={<T id={'terms_conditions'} />}
|
||||
className={'form-group--terms_conditions'}
|
||||
>
|
||||
<TextArea
|
||||
growVertically={true}
|
||||
{...formik.getFieldProps('terms_conditions')}
|
||||
/>
|
||||
</FormGroup>
|
||||
</Col>
|
||||
|
||||
<Col>
|
||||
<Dragzone
|
||||
initialFiles={initialAttachmentFiles}
|
||||
onDrop={handleDropFiles}
|
||||
onDeleteFile={handleDeleteFile}
|
||||
hint={'Attachments: Maxiumum size: 20MB'}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
</form>
|
||||
|
||||
<InvoiceFormFooter
|
||||
formik={formik}
|
||||
onSubmitClick={handleSubmitClick}
|
||||
|
||||
Reference in New Issue
Block a user