fix(webapp): use all drawers name from common enum object

This commit is contained in:
Ahmed Bouhuolia
2023-06-14 19:51:14 +02:00
parent 01c27b56ef
commit d1a09e3b15
99 changed files with 286 additions and 186 deletions

View File

@@ -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.