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:
@@ -23,6 +23,7 @@ import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
import withSettings from '@/containers/Settings/withSettings';
|
||||
|
||||
import { compose } from '@/utils';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Vendors table.
|
||||
@@ -93,12 +94,12 @@ function VendorsTable({
|
||||
|
||||
// Handle view detail item.
|
||||
const handleViewDetailVendor = ({ id }) => {
|
||||
openDrawer('vendor-detail-drawer', { vendorId: id });
|
||||
openDrawer(DRAWERS.VENDOR_DETAILS, { vendorId: id });
|
||||
};
|
||||
|
||||
// Handle cell click.
|
||||
const handleCellClick = (cell, event) => {
|
||||
openDrawer('vendor-detail-drawer', { vendorId: cell.row.original.id });
|
||||
openDrawer(DRAWERS.VENDOR_DETAILS, { vendorId: cell.row.original.id });
|
||||
};
|
||||
|
||||
// Local storage memorizing columns widths.
|
||||
|
||||
@@ -4,6 +4,7 @@ import intl from 'react-intl-universal';
|
||||
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
||||
import { AbilitySubject, VendorAction } from '@/constants/abilityOption';
|
||||
import withDrawerActions from '../Drawer/withDrawerActions';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Vendor univesal search item select action.
|
||||
@@ -17,7 +18,7 @@ function VendorUniversalSearchSelectComponent({
|
||||
openDrawer,
|
||||
}) {
|
||||
if (resourceType === RESOURCES_TYPES.VENDOR) {
|
||||
openDrawer('vendor-detail-drawer', { vendorId: resourceId });
|
||||
openDrawer(DRAWERS.VENDOR_DETAILS, { vendorId: resourceId });
|
||||
onAction && onAction();
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user