mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -7,6 +7,7 @@ import { Icon, Choose, T } from '@/components';
|
||||
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
||||
import { AbilitySubject, SaleReceiptAction } from '@/constants/abilityOption';
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Receipt universal search item select action.
|
||||
@@ -21,7 +22,7 @@ function ReceiptUniversalSearchSelectComponent({
|
||||
openDrawer,
|
||||
}) {
|
||||
if (resourceType === RESOURCES_TYPES.RECEIPT) {
|
||||
openDrawer('receipt-detail-drawer', { receiptId: resourceId });
|
||||
openDrawer(DRAWERS.RECEIPT_DETAILS, { receiptId: resourceId });
|
||||
onAction && onAction();
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -23,6 +23,7 @@ import withSettings from '@/containers/Settings/withSettings';
|
||||
import { useReceiptsListContext } from './ReceiptsListProvider';
|
||||
import { useReceiptsTableColumns, ActionsMenu } from './components';
|
||||
import { useMemorizedColumnsWidths } from '@/hooks';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Sale receipts datatable.
|
||||
@@ -77,7 +78,7 @@ function ReceiptsDataTable({
|
||||
|
||||
// Handle view detail receipt.
|
||||
const handleViewDetailReceipt = ({ id }) => {
|
||||
openDrawer('receipt-detail-drawer', { receiptId: id });
|
||||
openDrawer(DRAWERS.RECEIPT_DETAILS, { receiptId: id });
|
||||
};
|
||||
|
||||
// Handle print receipt.
|
||||
@@ -106,7 +107,7 @@ function ReceiptsDataTable({
|
||||
}
|
||||
// Handle cell click.
|
||||
const handleCellClick = (cell, event) => {
|
||||
openDrawer('receipt-detail-drawer', { receiptId: cell.row.original.id });
|
||||
openDrawer(DRAWERS.RECEIPT_DETAILS, { receiptId: cell.row.original.id });
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user