feat(leng): add leng.

This commit is contained in:
elforjani3
2021-06-06 19:14:23 +02:00
parent 7773ba3cb3
commit 366404e1d6
25 changed files with 217 additions and 133 deletions

View File

@@ -15,7 +15,7 @@ import { inputIntent } from 'utils';
export default function EstiamteFormFooter({}) {
return (
<div class={classNames(CLASSES.PAGE_FORM_FOOTER)}>
<Postbox title={'Estimate details'} defaultOpen={false}>
<Postbox title={<T id={'estimate_details'} />} defaultOpen={false}>
<Row>
<Col md={8}>
{/* --------- Customer Note --------- */}
@@ -50,7 +50,7 @@ export default function EstiamteFormFooter({}) {
initialFiles={[]}
// onDrop={handleDropFiles}
// onDeleteFile={handleDeleteFile}
hint={'Attachments: Maxiumum size: 20MB'}
hint={<T id={'attachments_maximum'} />}
/>
</Col>
</Row>

View File

@@ -2,6 +2,7 @@ import React, { useMemo } from 'react';
import classNames from 'classnames';
import { sumBy } from 'lodash';
import { useFormikContext } from 'formik';
import { formatMessage } from 'services/intl';
import { CLASSES } from 'common/classes';
@@ -18,15 +19,16 @@ function EstimateFormHeader({
const { values } = useFormikContext();
// Calculate the total due amount of bill entries.
const totalDueAmount = useMemo(() => sumBy(values.entries, 'total'), [
values.entries,
]);
const totalDueAmount = useMemo(
() => sumBy(values.entries, 'total'),
[values.entries],
);
return (
<div className={classNames(CLASSES.PAGE_FORM_HEADER)}>
<EstimateFormHeaderFields />
<PageFormBigNumber
label={'Amount'}
label={formatMessage({ id: 'amount' })}
amount={totalDueAmount}
currencyCode={baseCurrency}
/>

View File

@@ -170,7 +170,7 @@ function EstimateFormHeader({
}}
tooltip={true}
tooltipProps={{
content: 'Setting your auto-generated estimate number',
content: <T id={'setting_your_auto_generated_estimate_number'}/>,
position: Position.BOTTOM_LEFT,
}}
/>

View File

@@ -2,17 +2,17 @@ import React from 'react';
import { Button, Intent } from '@blueprintjs/core';
import { useHistory } from 'react-router-dom';
import { EmptyStatus } from 'components';
import { FormattedMessage as T } from 'react-intl';
export default function EstimatesEmptyStatus() {
const history = useHistory();
return (
<EmptyStatus
title={"It's time to send estimates to your customers."}
title={<T id={'it_s_time_to_send_estimates_to_your_customers'} />}
description={
<p>
It is a long established fact that a reader will be distracted by the
readable content of a page when looking at its layout.
<T id={'it_is_a_long_established_fact_that_a_reader'} />
</p>
}
action={
@@ -24,10 +24,10 @@ export default function EstimatesEmptyStatus() {
history.push('/estimates/new');
}}
>
New sale estimate
<T id={'new_sale_estimate'} />
</Button>
<Button intent={Intent.NONE} large={true}>
Learn more
<T id={'learn_more'} />
</Button>
</>
}