mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
feat: Optimize SCSS architecture.
This commit is contained in:
@@ -25,6 +25,11 @@ import withAccounts from 'containers/Accounts/withAccounts';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
import 'style/pages/Accounts/List.scss';
|
||||
|
||||
/**
|
||||
* Accounts chart list.
|
||||
*/
|
||||
function AccountsChart({
|
||||
// #withDashboardActions
|
||||
changePageTitle,
|
||||
|
||||
@@ -27,6 +27,7 @@ import withAccounts from 'containers/Accounts/withAccounts';
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import withCurrentView from 'containers/Views/withCurrentView';
|
||||
|
||||
import { accountNameAccessor } from './utils';
|
||||
|
||||
function AccountsDataTable({
|
||||
// #withDashboardActions
|
||||
@@ -135,7 +136,7 @@ function AccountsDataTable({
|
||||
{
|
||||
id: 'name',
|
||||
Header: formatMessage({ id: 'account_name' }),
|
||||
accessor: 'name',
|
||||
accessor: accountNameAccessor,
|
||||
className: 'account_name',
|
||||
width: 220,
|
||||
},
|
||||
|
||||
13
client/src/containers/Accounts/utils.js
Normal file
13
client/src/containers/Accounts/utils.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
import { If } from 'components';
|
||||
|
||||
export const accountNameAccessor = (account) => {
|
||||
return (
|
||||
<span>
|
||||
<If condition={account.name}>
|
||||
<span class={'account-name'}>{ account.name }</span>
|
||||
</If>
|
||||
<span class={'account-desc'}>{ account.description }</span>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user