mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -24,6 +24,7 @@ import { useCustomersListContext } from './CustomersListProvider';
|
||||
import { useMemorizedColumnsWidths } from '@/hooks';
|
||||
|
||||
import { compose } from '@/utils';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Customers table.
|
||||
@@ -108,12 +109,12 @@ function CustomersTable({
|
||||
|
||||
// Handle view detail contact.
|
||||
const handleViewDetailCustomer = ({ id }) => {
|
||||
openDrawer('customer-detail-drawer', { customerId: id });
|
||||
openDrawer(DRAWERS.CUSTOMER_DETAILS, { customerId: id });
|
||||
};
|
||||
|
||||
// Handle cell click.
|
||||
const handleCellClick = (cell, event) => {
|
||||
openDrawer('customer-detail-drawer', { customerId: cell.row.original.id });
|
||||
openDrawer(DRAWERS.CUSTOMER_DETAILS, { customerId: cell.row.original.id });
|
||||
};
|
||||
|
||||
if (isEmptyStatus) {
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
import intl from 'react-intl-universal';
|
||||
import { AbilitySubject, CustomerAction } from '@/constants/abilityOption';
|
||||
|
||||
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
|
||||
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
function CustomerUniversalSearchSelectComponent({
|
||||
resourceType,
|
||||
resourceId,
|
||||
@@ -14,7 +16,7 @@ function CustomerUniversalSearchSelectComponent({
|
||||
openDrawer,
|
||||
}) {
|
||||
if (resourceType === RESOURCES_TYPES.CUSTOMER) {
|
||||
openDrawer('customer-detail-drawer', { customerId: resourceId });
|
||||
openDrawer(DRAWERS.CUSTOMER_DETAILS, { customerId: resourceId });
|
||||
onAction && onAction();
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user