feat (lang): preference.

This commit is contained in:
elforjani3
2021-06-07 11:58:48 +02:00
parent 05528395c1
commit c6eadaca09
6 changed files with 68 additions and 22 deletions

View File

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

View File

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

View File

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

View File

@@ -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" />