mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -9,6 +9,7 @@ import { highlightText } from '@/utils';
|
||||
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
||||
import { AbilitySubject, SaleInvoiceAction } from '@/constants/abilityOption';
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Universal search invoice item select action.
|
||||
@@ -22,7 +23,7 @@ function InvoiceUniversalSearchSelectComponent({
|
||||
openDrawer,
|
||||
}) {
|
||||
if (resourceType === RESOURCES_TYPES.INVOICE) {
|
||||
openDrawer('invoice-detail-drawer', { invoiceId: resourceId });
|
||||
openDrawer(DRAWERS.INVOICE_DETAILS, { invoiceId: resourceId });
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import { useInvoicesTableColumns, ActionsMenu } from './components';
|
||||
import { useInvoicesListContext } from './InvoicesListProvider';
|
||||
|
||||
import { compose } from '@/utils';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Invoices datatable.
|
||||
@@ -89,7 +90,7 @@ function InvoicesDataTable({
|
||||
|
||||
// Handle view detail invoice.
|
||||
const handleViewDetailInvoice = ({ id }) => {
|
||||
openDrawer('invoice-detail-drawer', { invoiceId: id });
|
||||
openDrawer(DRAWERS.INVOICE_DETAILS, { invoiceId: id });
|
||||
};
|
||||
|
||||
// Handle print invoices.
|
||||
@@ -99,7 +100,7 @@ function InvoicesDataTable({
|
||||
|
||||
// Handle cell click.
|
||||
const handleCellClick = (cell, event) => {
|
||||
openDrawer('invoice-detail-drawer', { invoiceId: cell.row.original.id });
|
||||
openDrawer(DRAWERS.INVOICE_DETAILS, { invoiceId: cell.row.original.id });
|
||||
};
|
||||
|
||||
// Local storage memorizing columns widths.
|
||||
|
||||
Reference in New Issue
Block a user