mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
WIP: Arabic localization.|
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useIntl } from 'react-intl';
|
||||
import intl from 'react-intl-universal';
|
||||
import { Button } from '@blueprintjs/core';
|
||||
import { getColumnWidth } from 'utils';
|
||||
import { If, Icon } from 'components';
|
||||
@@ -11,7 +11,7 @@ import FinancialLoadingBar from '../FinancialLoadingBar';
|
||||
* Retrieve trial balance sheet table columns.
|
||||
*/
|
||||
export const useTrialBalanceTableColumns = () => {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
|
||||
// Trial balance sheet context.
|
||||
const {
|
||||
@@ -21,14 +21,14 @@ export const useTrialBalanceTableColumns = () => {
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: formatMessage({ id: 'account_name' }),
|
||||
Header: intl.get('account_name'),
|
||||
accessor: (row) => (row.code ? `${row.name} - ${row.code}` : row.name),
|
||||
className: 'name',
|
||||
width: 180,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'credit' }),
|
||||
Header: intl.get('credit'),
|
||||
Cell: CellTextSpan,
|
||||
accessor: 'formatted_credit',
|
||||
className: 'credit',
|
||||
@@ -37,13 +37,13 @@ export const useTrialBalanceTableColumns = () => {
|
||||
}),
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'debit' }),
|
||||
Header: intl.get('debit'),
|
||||
Cell: CellTextSpan,
|
||||
accessor: 'formatted_debit',
|
||||
width: getColumnWidth(tableRows, `debit`, { minWidth: 80 }),
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'balance' }),
|
||||
Header: intl.get('balance'),
|
||||
Cell: CellTextSpan,
|
||||
accessor: 'formatted_balance',
|
||||
className: 'balance',
|
||||
@@ -52,7 +52,7 @@ export const useTrialBalanceTableColumns = () => {
|
||||
}),
|
||||
},
|
||||
],
|
||||
[tableRows, formatMessage],
|
||||
[tableRows],
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user