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

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