mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -22,6 +22,7 @@ import { useItemsListContext } from './ItemsListProvider';
|
||||
import { useItemsTableColumns, ItemsActionMenuList } from './components';
|
||||
import { useMemorizedColumnsWidths } from '@/hooks';
|
||||
import { compose } from '@/utils';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Items datatable.
|
||||
@@ -108,7 +109,7 @@ function ItemsDataTable({
|
||||
|
||||
// Handle view detail item.
|
||||
const handleViewDetailItem = ({ id }) => {
|
||||
openDrawer('item-detail-drawer', { itemId: id });
|
||||
openDrawer(DRAWERS.ITEM_DETAILS, { itemId: id });
|
||||
};
|
||||
|
||||
// Cannot continue in case the items has empty status.
|
||||
@@ -118,7 +119,7 @@ function ItemsDataTable({
|
||||
|
||||
// Handle cell click.
|
||||
const handleCellClick = (cell, event) => {
|
||||
openDrawer('item-detail-drawer', { itemId: cell.row.original.id });
|
||||
openDrawer(DRAWERS.ITEM_DETAILS, { itemId: cell.row.original.id });
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -4,6 +4,8 @@ import intl from 'react-intl-universal';
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
|
||||
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
import { AbilitySubject, ItemAction } from '@/constants/abilityOption';
|
||||
|
||||
/**
|
||||
@@ -19,7 +21,7 @@ function ItemUniversalSearchSelectComponent({
|
||||
openDrawer,
|
||||
}) {
|
||||
if (resourceType === RESOURCES_TYPES.ITEM) {
|
||||
openDrawer('item-detail-drawer', { itemId: resourceId });
|
||||
openDrawer(DRAWERS.ITEM_DETAILS, { itemId: resourceId });
|
||||
onAction && onAction();
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user