mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -5,6 +5,7 @@ import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
|
||||
import { AbilitySubject, AccountAction } from '@/constants/abilityOption';
|
||||
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
function AccountUniversalSearchItemSelectComponent({
|
||||
// #ownProps
|
||||
@@ -16,7 +17,7 @@ function AccountUniversalSearchItemSelectComponent({
|
||||
openDrawer,
|
||||
}) {
|
||||
if (resourceType === RESOURCES_TYPES.ACCOUNT) {
|
||||
openDrawer('account-drawer', { accountId: resourceId });
|
||||
openDrawer(DRAWERS.ACCOUNT_DETAILS, { accountId: resourceId });
|
||||
onAction && onAction();
|
||||
}
|
||||
return null;
|
||||
@@ -28,8 +29,8 @@ export const AccountUniversalSearchItemSelect = withDrawerActions(
|
||||
|
||||
/**
|
||||
* Transformes account item to search item.
|
||||
* @param {*} account
|
||||
* @returns
|
||||
* @param {*} account
|
||||
* @returns
|
||||
*/
|
||||
const accountToSearch = (account) => ({
|
||||
id: account.id,
|
||||
|
||||
@@ -23,6 +23,7 @@ import withAlertsActions from '@/containers/Alert/withAlertActions';
|
||||
import withDialogActions from '@/containers/Dialog/withDialogActions';
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
import { compose } from '@/utils';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Accounts data-table.
|
||||
@@ -71,7 +72,7 @@ function AccountsDataTable({
|
||||
|
||||
// Handle view detail account.
|
||||
const handleViewDetailAccount = ({ id }) => {
|
||||
openDrawer('account-drawer', { accountId: id });
|
||||
openDrawer(DRAWERS.ACCOUNT_DETAILS, { accountId: id });
|
||||
};
|
||||
|
||||
// Handle new child button click.
|
||||
@@ -84,7 +85,7 @@ function AccountsDataTable({
|
||||
};
|
||||
// Handle cell click.
|
||||
const handleCellClick = (cell, event) => {
|
||||
openDrawer('account-drawer', { accountId: cell.row.original.id });
|
||||
openDrawer(DRAWERS.ACCOUNT_DETAILS, { accountId: cell.row.original.id });
|
||||
};
|
||||
// Local storage memorizing columns widths.
|
||||
const [initialColumnsWidths, , handleColumnResizing] =
|
||||
|
||||
Reference in New Issue
Block a user