mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
feat (lang) : add Contacts & Sales & Purchases.
This commit is contained in:
@@ -6,6 +6,7 @@ import React, {
|
||||
useCallback,
|
||||
} from 'react';
|
||||
import Dragzone from 'components/Dragzone';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
|
||||
function CustomerAttachmentTabs() {
|
||||
return (
|
||||
@@ -14,7 +15,7 @@ function CustomerAttachmentTabs() {
|
||||
initialFiles={[]}
|
||||
onDrop={null}
|
||||
onDeleteFile={[]}
|
||||
hint={'Attachments: Maxiumum size: 20MB'}
|
||||
hint={<T id={'attachments_maximum'} />}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import React from 'react';
|
||||
import { FormGroup, InputGroup, ControlGroup } from '@blueprintjs/core';
|
||||
import { FastField, ErrorMessage } from 'formik';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { inputIntent } from 'utils';
|
||||
|
||||
export default function CustomerFormAfterPrimarySection({}) {
|
||||
const { formatMessage } = useIntl();
|
||||
return (
|
||||
<div class="customer-form__after-primary-section-content">
|
||||
{/*------------ Customer email -----------*/}
|
||||
@@ -33,7 +34,7 @@ export default function CustomerFormAfterPrimarySection({}) {
|
||||
{({ field, meta: { error, touched } }) => (
|
||||
<InputGroup
|
||||
intent={inputIntent({ error, touched })}
|
||||
placeholder={'Work'}
|
||||
placeholder={formatMessage({ id: 'work' })}
|
||||
{...field}
|
||||
/>
|
||||
)}
|
||||
@@ -43,7 +44,7 @@ export default function CustomerFormAfterPrimarySection({}) {
|
||||
{({ field, meta: { error, touched } }) => (
|
||||
<InputGroup
|
||||
intent={inputIntent({ error, touched })}
|
||||
placeholder={'Mobile'}
|
||||
placeholder={formatMessage({id:'Mobile'})}
|
||||
{...field}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -2,7 +2,8 @@ import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { FormGroup, InputGroup, ControlGroup } from '@blueprintjs/core';
|
||||
import { FastField, Field, ErrorMessage } from 'formik';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import {
|
||||
Hint,
|
||||
FieldRequiredHint,
|
||||
@@ -19,7 +20,8 @@ import { useAutofocus } from 'hooks';
|
||||
*/
|
||||
export default function CustomerFormPrimarySection({}) {
|
||||
const firstNameFieldRef = useAutofocus();
|
||||
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
return (
|
||||
<div className={'customer-form__primary-section-content'}>
|
||||
{/**-----------Customer type. -----------*/}
|
||||
@@ -53,7 +55,7 @@ export default function CustomerFormPrimarySection({}) {
|
||||
<FastField name={'first_name'}>
|
||||
{({ field, meta: { error, touched } }) => (
|
||||
<InputGroup
|
||||
placeholder={'First Name'}
|
||||
placeholder={formatMessage({ id: 'first_name' })}
|
||||
intent={inputIntent({ error, touched })}
|
||||
className={classNames('input-group--first-name')}
|
||||
inputRef={(ref) => (firstNameFieldRef.current = ref)}
|
||||
@@ -65,7 +67,7 @@ export default function CustomerFormPrimarySection({}) {
|
||||
<FastField name={'last_name'}>
|
||||
{({ field, meta: { error, touched } }) => (
|
||||
<InputGroup
|
||||
placeholder={'Last Name'}
|
||||
placeholder={formatMessage({ id: 'last_name' })}
|
||||
intent={inputIntent({ error, touched })}
|
||||
className={classNames('input-group--last-name')}
|
||||
{...field}
|
||||
|
||||
@@ -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 CustomersEmptyStatus() {
|
||||
const history = useHistory();
|
||||
|
||||
return (
|
||||
<EmptyStatus
|
||||
title={"Create and manage your organization's customers."}
|
||||
title={<T id={'create_and_manage_your_organization_s_customers'} />}
|
||||
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={
|
||||
@@ -24,11 +24,11 @@ export default function CustomersEmptyStatus() {
|
||||
history.push('/customers/new');
|
||||
}}
|
||||
>
|
||||
New customer
|
||||
<T id={'new_customer'} />
|
||||
</Button>
|
||||
|
||||
<Button intent={Intent.NONE} large={true}>
|
||||
Learn more
|
||||
<T id={'learn_more'} />
|
||||
</Button>
|
||||
</>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user