mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// @ts-nocheck
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
|
||||
@@ -14,7 +15,7 @@ function ExpenseUniversalSearchItemSelectComponent({
|
||||
openDrawer,
|
||||
}) {
|
||||
if (resourceType === RESOURCES_TYPES.EXPENSE) {
|
||||
openDrawer('expense-drawer', { expenseId: resourceId });
|
||||
openDrawer(DRAWERS.EXPENSE_DETAILS, { expenseId: resourceId });
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
import withSettings from '@/containers/Settings/withSettings';
|
||||
|
||||
import { ActionsMenu, useExpensesTableColumns } from './components';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Expenses datatable.
|
||||
@@ -87,14 +88,14 @@ function ExpensesDataTable({
|
||||
|
||||
// Handle view detail expense.
|
||||
const handleViewDetailExpense = ({ id }) => {
|
||||
openDrawer('expense-drawer', {
|
||||
openDrawer(DRAWERS.EXPENSE_DETAILS, {
|
||||
expenseId: id,
|
||||
});
|
||||
};
|
||||
|
||||
// Handle cell click.
|
||||
const handleCellClick = (cell, event) => {
|
||||
openDrawer('expense-drawer', { expenseId: cell.row.original.id });
|
||||
openDrawer(DRAWERS.EXPENSE_DETAILS, { expenseId: cell.row.original.id });
|
||||
};
|
||||
|
||||
// Display empty status instead of the table.
|
||||
|
||||
Reference in New Issue
Block a user