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

@@ -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}