feat (lang) : add Contacts & Sales & Purchases.

This commit is contained in:
elforjani3
2021-06-06 20:32:55 +02:00
parent 366404e1d6
commit a70fd300f2
26 changed files with 161 additions and 122 deletions

View File

@@ -10,7 +10,7 @@ import { inputIntent } from 'utils';
export default function ReceiptFormFooter({}) {
return (
<div className={classNames(CLASSES.PAGE_FORM_FOOTER)}>
<Postbox title={'Invoice details'} defaultOpen={false}>
<Postbox title={<T id={'receipt_details'}/>} defaultOpen={false}>
<Row>
<Col md={8}>
{/* --------- Receipt message --------- */}
@@ -45,7 +45,8 @@ export default function ReceiptFormFooter({}) {
initialFiles={[]}
// onDrop={handleDropFiles}
// onDeleteFile={handleDeleteFile}
hint={'Attachments: Maxiumum size: 20MB'}
hint={<T id={'attachments_maximum'} />}
/>
</Col>
</Row>

View File

@@ -7,6 +7,8 @@ import { CLASSES } from 'common/classes';
import ReceiptFormHeaderFields from './ReceiptFormHeaderFields';
import { PageFormBigNumber } from 'components';
import { formatMessage } from 'services/intl';
import withSettings from 'containers/Settings/withSettings';
import { compose } from 'redux';
@@ -22,9 +24,10 @@ function ReceiptFormHeader({
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)}>
@@ -32,7 +35,7 @@ function ReceiptFormHeader({
onReceiptNumberChanged={onReceiptNumberChanged}
/>
<PageFormBigNumber
label={'Due Amount'}
label={formatMessage({ id: 'due_amount' })}
amount={totalDueAmount}
currencyCode={baseCurrency}
/>

View File

@@ -2,16 +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 ReceiptsEmptyStatus() {
const history = useHistory();
return (
<EmptyStatus
title={'Manage the organizations services and products.'}
title={<T id={'manage_the_organization_s_services_and_products'} />}
description={
<p>
Here a list of your organization products and services, to be used when you create invoices or bills to your customers or vendors.
<T id={'here_a_list_of_your_organization_products_and_services'} />
</p>
}
action={
@@ -23,11 +24,11 @@ export default function ReceiptsEmptyStatus() {
history.push('/receipts/new');
}}
>
New receipt
<T id={'new_receipt'} />
</Button>
<Button intent={Intent.NONE} large={true}>
Learn more
<T id={'learn_more'}/>
</Button>
</>
}