mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
WIP feature/breadcrumb/fix_localize
This commit is contained in:
@@ -51,7 +51,7 @@ function AccountsActionsBar({
|
||||
const onClickNewAccount = () => { openDialog('account-form', {}); };
|
||||
const onClickViewItem = (view) => {
|
||||
history.push(view
|
||||
? `/dashboard/accounts/${view.id}/custom_view` : '/dashboard/accounts');
|
||||
? `/accounts/${view.id}/custom_view` : '/accounts');
|
||||
};
|
||||
|
||||
const viewsMenuItems = accountsViews.map((view) => {
|
||||
|
||||
@@ -96,7 +96,7 @@ function AccountsChart({
|
||||
}
|
||||
if (errors.find((e) => e.type === 'ACCOUNT.HAS.ASSOCIATED.TRANSACTIONS')) {
|
||||
AppToaster.show({
|
||||
message: 'cannot_delete_account_has_associated_transactions'
|
||||
message: formatMessage({id:'cannot_delete_account_has_associated_transactions'})
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -250,8 +250,8 @@ function AccountsChart({
|
||||
<Route
|
||||
exact={true}
|
||||
path={[
|
||||
'/dashboard/accounts/:custom_view_id/custom_view',
|
||||
'/dashboard/accounts',
|
||||
'/accounts/:custom_view_id/custom_view',
|
||||
'/accounts',
|
||||
]}
|
||||
>
|
||||
<AccountsViewsTabs onViewChanged={handleViewChanged} />
|
||||
@@ -310,8 +310,8 @@ function AccountsChart({
|
||||
</Alert>
|
||||
|
||||
<Alert
|
||||
cancelButtonText="Cancel"
|
||||
confirmButtonText={`Delete (${selectedRowsCount})`}
|
||||
cancelButtonText={<T id={'cancel'}/>}
|
||||
confirmButtonText={`${formatMessage({id:'delete'})} (${selectedRowsCount})`}
|
||||
icon="trash"
|
||||
intent={Intent.DANGER}
|
||||
isOpen={bulkDelete}
|
||||
|
||||
@@ -72,12 +72,12 @@ function AccountsDataTable({
|
||||
<MenuDivider />
|
||||
<If condition={account.active}>
|
||||
<MenuItem
|
||||
text='Inactivate Account'
|
||||
text={<T id={'inactivate_account'}/>}
|
||||
onClick={() => onInactiveAccount(account)} />
|
||||
</If>
|
||||
<If condition={!account.active}>
|
||||
<MenuItem
|
||||
text='Activate Account'
|
||||
text={<T id={'activate_account'}/>}
|
||||
onClick={() => onActivateAccount(account)} />
|
||||
</If>
|
||||
<MenuItem
|
||||
|
||||
@@ -19,7 +19,7 @@ import withDashboard from 'containers/Dashboard/withDashboard';
|
||||
import withAccounts from 'containers/Accounts/withAccounts';
|
||||
import withAccountsTableActions from 'containers/Accounts/withAccountsTableActions';
|
||||
import withViewDetail from 'containers/Views/withViewDetails';
|
||||
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
function AccountsViewsTabs({
|
||||
// #withViewDetail
|
||||
@@ -67,7 +67,7 @@ function AccountsViewsTabs({
|
||||
// Handle click a new view tab.
|
||||
const handleClickNewView = () => {
|
||||
setTopbarEditView(null);
|
||||
history.push('/dashboard/custom_views/accounts/new');
|
||||
history.push('/custom_views/accounts/new');
|
||||
};
|
||||
|
||||
// Handle view tab link click.
|
||||
@@ -76,7 +76,7 @@ function AccountsViewsTabs({
|
||||
};
|
||||
|
||||
const tabs = accountsViews.map((view) => {
|
||||
const baseUrl = '/dashboard/accounts';
|
||||
const baseUrl = '/accounts';
|
||||
|
||||
const link = (
|
||||
<Link
|
||||
@@ -98,7 +98,7 @@ function AccountsViewsTabs({
|
||||
>
|
||||
<Tab
|
||||
id={'all'}
|
||||
title={<Link to={`/dashboard/accounts`}>All</Link>}
|
||||
title={<Link to={`/accounts`}><T id={'all'}/></Link>}
|
||||
onClick={handleViewLinkClick}
|
||||
/>
|
||||
{ tabs }
|
||||
|
||||
Reference in New Issue
Block a user