fix: logo style.

fix: page forms style.
feat: auto-fill items entries from item details.
fix: hiding dashboard copyright bar.
This commit is contained in:
a.bouhuolia
2021-02-25 10:51:27 +02:00
parent 5a58e9bafd
commit 9e2c995813
84 changed files with 1019 additions and 682 deletions

View File

@@ -4,55 +4,57 @@ import { FormattedMessage as T } from 'react-intl';
import { FastField } from 'formik';
import classNames from 'classnames';
import { CLASSES } from 'common/classes';
import { Row, Col } from 'components';
import { Row, Col, Postbox } from 'components';
import Dragzone from 'components/Dragzone';
import { inputIntent } from 'utils';
/**
* Estimate form footer.
*/
*/
export default function EstiamteFormFooter({}) {
return (
<div class={classNames(CLASSES.PAGE_FORM_FOOTER)}>
<Row>
<Col md={8}>
{/* --------- Customer Note --------- */}
<FastField name={'note'}>
{({ form, field, meta: { error, touched } }) => (
<FormGroup
label={<T id={'customer_note'} />}
className={'form-group--customer_note'}
intent={inputIntent({ error, touched })}
>
<TextArea growVertically={true} {...field} />
</FormGroup>
)}
</FastField>
<Postbox title={'Estimate details'} defaultOpen={false}>
<Row>
<Col md={8}>
{/* --------- Customer Note --------- */}
<FastField name={'note'}>
{({ form, field, meta: { error, touched } }) => (
<FormGroup
label={<T id={'customer_note'} />}
className={'form-group--customer_note'}
intent={inputIntent({ error, touched })}
>
<TextArea growVertically={true} {...field} />
</FormGroup>
)}
</FastField>
{/* --------- Terms and conditions --------- */}
<FastField name={'terms_conditions'}>
{({ field, meta: { error, touched } }) => (
<FormGroup
label={<T id={'terms_conditions'} />}
className={'form-group--terms_conditions'}
intent={inputIntent({ error, touched })}
>
<TextArea growVertically={true} {...field} />
</FormGroup>
)}
</FastField>
</Col>
{/* --------- Terms and conditions --------- */}
<FastField name={'terms_conditions'}>
{({ field, meta: { error, touched } }) => (
<FormGroup
label={<T id={'terms_conditions'} />}
className={'form-group--terms_conditions'}
intent={inputIntent({ error, touched })}
>
<TextArea growVertically={true} {...field} />
</FormGroup>
)}
</FastField>
</Col>
<Col md={4}>
<Dragzone
initialFiles={[]}
// onDrop={handleDropFiles}
// onDeleteFile={handleDeleteFile}
hint={'Attachments: Maxiumum size: 20MB'}
/>
</Col>
</Row>
<Col md={4}>
<Dragzone
initialFiles={[]}
// onDrop={handleDropFiles}
// onDeleteFile={handleDeleteFile}
hint={'Attachments: Maxiumum size: 20MB'}
/>
</Col>
</Row>
</Postbox>
</div>
);
}

View File

@@ -7,8 +7,8 @@ export const defaultEstimateEntry = {
index: 0,
item_id: '',
rate: '',
discount: 0,
quantity: 1,
discount: '',
quantity: '',
description: '',
};

View File

@@ -49,7 +49,7 @@ export const statusAccessor = (row) => (
*/
export function ActionsMenu({
row: { original },
payload: { onEdit, onDeliver, onReject, onApprove, onDelete ,onDrawer },
payload: { onEdit, onDeliver, onReject, onApprove, onDelete, onDrawer },
}) {
const { formatMessage } = useIntl();
@@ -101,9 +101,10 @@ export function ActionsMenu({
</Choose.When>
</Choose>
<MenuItem
text={formatMessage({ id: 'estimate_paper' })}
onClick={() => onDrawer()}
/>
icon={<Icon icon={'receipt-24'} iconSize={16} />}
text={formatMessage({ id: 'estimate_paper' })}
onClick={() => onDrawer()}
/>
<MenuItem
text={formatMessage({ id: 'delete_estimate' })}
intent={Intent.DANGER}