mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
feat (lang): preference.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { Menu, MenuItem, MenuDivider } from '@blueprintjs/core';
|
||||
import { useHistory, useLocation } from 'react-router-dom';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import preferencesMenu from 'config/preferencesMenu';
|
||||
import PreferencesSidebarContainer from './PreferencesSidebarContainer';
|
||||
|
||||
@@ -32,7 +33,7 @@ export default function PreferencesSidebar() {
|
||||
return (
|
||||
<PreferencesSidebarContainer>
|
||||
<div class="preferences-sidebar__head">
|
||||
<h2>Preferences</h2>
|
||||
<h2>{<T id={'preferences'} />}</h2>
|
||||
</div>
|
||||
|
||||
<Menu className="preferences-sidebar__menu">{items}</Menu>
|
||||
|
||||
@@ -48,7 +48,11 @@ export default function AccountantForm() {
|
||||
<FormGroup inline={true}>
|
||||
<Checkbox
|
||||
inline={true}
|
||||
label={'Make account code required when create a new accounts.'}
|
||||
label={
|
||||
<T
|
||||
id={'make_account_code_required_when_create_a_new_accounts'}
|
||||
/>
|
||||
}
|
||||
name={'account_code_required'}
|
||||
{...field}
|
||||
/>
|
||||
@@ -62,7 +66,11 @@ export default function AccountantForm() {
|
||||
<Checkbox
|
||||
inline={true}
|
||||
label={
|
||||
'Should account code be unique when create a new account.'
|
||||
<T
|
||||
id={
|
||||
'should_account_code_be_unique_when_create_a_new_account'
|
||||
}
|
||||
/>
|
||||
}
|
||||
name={'account_code_unique'}
|
||||
{...field}
|
||||
@@ -115,7 +123,11 @@ export default function AccountantForm() {
|
||||
</strong>
|
||||
}
|
||||
helperText={
|
||||
'Select a preferred account to deposit into it after customer make payment.'
|
||||
<T
|
||||
id={
|
||||
'select_a_preferred_account_to_deposit_into_it_after_customer_make_payment'
|
||||
}
|
||||
/>
|
||||
}
|
||||
labelInfo={<FieldRequiredHint />}
|
||||
intent={inputIntent({ error, touched })}
|
||||
@@ -147,7 +159,11 @@ export default function AccountantForm() {
|
||||
</strong>
|
||||
}
|
||||
helperText={
|
||||
'Select a preferred account to deposit into it after customer make payment.'
|
||||
<T
|
||||
id={
|
||||
'select_a_preferred_account_to_deposit_into_it_after_customer_make_payment'
|
||||
}
|
||||
/>
|
||||
}
|
||||
labelInfo={<FieldRequiredHint />}
|
||||
intent={inputIntent({ error, touched })}
|
||||
@@ -178,7 +194,11 @@ export default function AccountantForm() {
|
||||
</strong>
|
||||
}
|
||||
helperText={
|
||||
'Select a preferred account to deposit into it vendor advanced deposits.'
|
||||
<T
|
||||
id={
|
||||
'select_a_preferred_account_to_deposit_into_it_vendor_advanced_deposits'
|
||||
}
|
||||
/>
|
||||
}
|
||||
labelInfo={<FieldRequiredHint />}
|
||||
intent={inputIntent({ error, touched })}
|
||||
|
||||
@@ -44,7 +44,7 @@ export default function PreferencesGeneralForm({}) {
|
||||
inline={true}
|
||||
intent={inputIntent({ error, touched })}
|
||||
className={'form-group--org-name'}
|
||||
helperText={'Shown on sales forms and purchase orders.'}
|
||||
helperText={<T id={'shown_on_sales_forms_and_purchase_orders'} />}
|
||||
>
|
||||
<InputGroup medium={'true'} {...field} />
|
||||
</FormGroup>
|
||||
@@ -59,9 +59,7 @@ export default function PreferencesGeneralForm({}) {
|
||||
inline={true}
|
||||
intent={inputIntent({ error, touched })}
|
||||
className={classNames('form-group--select-list', CLASSES.FILL)}
|
||||
helperText={
|
||||
'For reporting, you can specify any month as the start of your financial year (also called your financial reporting year or accounting year).'
|
||||
}
|
||||
helperText={<T id={'for_reporting_you_can_specify_any_month'} />}
|
||||
>
|
||||
<DateInput
|
||||
{...momentFormatter('MMMM Do YYYY')}
|
||||
@@ -125,7 +123,11 @@ export default function PreferencesGeneralForm({}) {
|
||||
inline={true}
|
||||
intent={inputIntent({ error, touched })}
|
||||
helperText={
|
||||
"You can't change the base currency as there are transactions recorded in your organization."
|
||||
<T
|
||||
id={
|
||||
'you_can_t_change_the_base_currency_as_there_are_transactions'
|
||||
}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<ListSelect
|
||||
|
||||
@@ -38,7 +38,11 @@ export default function ItemForm() {
|
||||
</strong>
|
||||
}
|
||||
helperText={
|
||||
'Select a preferred account to deposit into it after customer make payment.'
|
||||
<T
|
||||
id={
|
||||
'select_a_preferred_account_to_deposit_into_it_after_customer_make_payment'
|
||||
}
|
||||
/>
|
||||
}
|
||||
labelInfo={<FieldRequiredHint />}
|
||||
intent={inputIntent({ error, touched })}
|
||||
@@ -70,7 +74,11 @@ export default function ItemForm() {
|
||||
</strong>
|
||||
}
|
||||
helperText={
|
||||
'Select a preferred account to deposit into it after customer make payment.'
|
||||
<T
|
||||
id={
|
||||
'select_a_preferred_account_to_deposit_into_it_after_customer_make_payment'
|
||||
}
|
||||
/>
|
||||
}
|
||||
labelInfo={<FieldRequiredHint />}
|
||||
intent={inputIntent({ error, touched })}
|
||||
@@ -102,7 +110,11 @@ export default function ItemForm() {
|
||||
</strong>
|
||||
}
|
||||
helperText={
|
||||
'Select a preferred account to deposit into it vendor advanced deposits.'
|
||||
<T
|
||||
id={
|
||||
'select_a_preferred_account_to_deposit_into_it_vendor_advanced_deposits'
|
||||
}
|
||||
/>
|
||||
}
|
||||
labelInfo={<FieldRequiredHint />}
|
||||
intent={inputIntent({ error, touched })}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import React from 'react';
|
||||
import { Tabs, Tab } from '@blueprintjs/core';
|
||||
import { formatMessage } from 'services/intl';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import 'style/pages/Preferences/Users.scss'
|
||||
import 'style/pages/Preferences/Users.scss';
|
||||
|
||||
import { CLASSES } from 'common/classes';
|
||||
import PreferencesSubContent from 'components/Preferences/PreferencesSubContent';
|
||||
@@ -16,15 +17,17 @@ function UsersPreferences({ openDialog }) {
|
||||
const onChangeTabs = (currentTabId) => {};
|
||||
|
||||
return (
|
||||
<div className={classNames(
|
||||
CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT,
|
||||
CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT_USERS,
|
||||
)}>
|
||||
<div
|
||||
className={classNames(
|
||||
CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT,
|
||||
CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT_USERS,
|
||||
)}
|
||||
>
|
||||
<div className={classNames(CLASSES.CARD)}>
|
||||
<div className={classNames(CLASSES.PREFERENCES_PAGE_TABS)}>
|
||||
<Tabs animate={true} onChange={onChangeTabs}>
|
||||
<Tab id="users" title="Users" />
|
||||
<Tab id="roles" title="Roles" />
|
||||
<Tab id="users" title={formatMessage({ id: 'users' })} />
|
||||
<Tab id="roles" title={formatMessage({ id: 'roles' })} />
|
||||
</Tabs>
|
||||
</div>
|
||||
<PreferencesSubContent preferenceTab="users" />
|
||||
|
||||
@@ -973,6 +973,14 @@
|
||||
"summerize_how_much_each_customer_owes_your_business":"Summarize how much each customer owes your business.",
|
||||
"duplicate_customer":"Duplicate customer",
|
||||
"duplicate_vendor":"Duplicate vendor",
|
||||
"new_billing":"New Billing"
|
||||
"new_billing":"New Billing",
|
||||
"shown_on_sales_forms_and_purchase_orders":"Shown on sales forms and purchase orders.",
|
||||
"for_reporting_you_can_specify_any_month":"For reporting, you can specify any month as the start of your financial year (also called your financial reporting year or accounting year).",
|
||||
"you_can_t_change_the_base_currency_as_there_are_transactions":"You can't change the base currency as there are transactions recorded in your organization.",
|
||||
"make_account_code_required_when_create_a_new_accounts":"Make account code required when create a new accounts.",
|
||||
"should_account_code_be_unique_when_create_a_new_account":"Should account code be unique when create a new account.",
|
||||
"select_a_preferred_account_to_deposit_into_it_after_customer_make_payment":"Select a preferred account to deposit into it after customer make payment.",
|
||||
"select_a_preferred_account_to_deposit_into_it_vendor_advanced_deposits":"Select a preferred account to deposit into it vendor advanced deposits.",
|
||||
"roles":"Roles"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user