mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -9,6 +9,7 @@ import { T, Icon, Choose, If } from '@/components';
|
||||
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
||||
import { AbilitySubject, BillAction } from '@/constants/abilityOption';
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Universal search bill item select action.
|
||||
@@ -23,7 +24,7 @@ function BillUniversalSearchSelectComponent({
|
||||
openDrawer,
|
||||
}) {
|
||||
if (resourceType === RESOURCES_TYPES.BILL) {
|
||||
openDrawer('bill-drawer', { billId: resourceId });
|
||||
openDrawer(DRAWERS.BILL_DETAILS, { billId: resourceId });
|
||||
onAction && onAction();
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -24,6 +24,7 @@ import { useBillsListContext } from './BillsListProvider';
|
||||
import { useMemorizedColumnsWidths } from '@/hooks';
|
||||
|
||||
import { compose } from '@/utils';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Bills transactions datatable.
|
||||
@@ -99,12 +100,12 @@ function BillsDataTable({
|
||||
|
||||
// Handle view detail bill.
|
||||
const handleViewDetailBill = ({ id }) => {
|
||||
openDrawer('bill-drawer', { billId: id });
|
||||
openDrawer(DRAWERS.BILL_DETAILS, { billId: id });
|
||||
};
|
||||
|
||||
// Handle cell click.
|
||||
const handleCellClick = (cell, event) => {
|
||||
openDrawer('bill-drawer', { billId: cell.row.original.id });
|
||||
openDrawer(DRAWERS.BILL_DETAILS, { billId: cell.row.original.id });
|
||||
};
|
||||
|
||||
// Local storage memorizing columns widths.
|
||||
|
||||
Reference in New Issue
Block a user