mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
Merge branch 'master' of https://github.com/abouolia/Ratteb
This commit is contained in:
@@ -13,7 +13,6 @@ import withDrawerActions from 'containers/Drawer/withDrawerActions';
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import withReceipts from './withReceipts';
|
||||
import withReceiptsActions from './withReceiptsActions';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
|
||||
import { useReceiptsListContext } from './ReceiptsListProvider';
|
||||
import { useReceiptsTableColumns, ActionsMenu } from './components';
|
||||
@@ -28,9 +27,6 @@ function ReceiptsDataTable({
|
||||
// #withReceipts
|
||||
receiptTableState,
|
||||
|
||||
// #withSettings
|
||||
baseCurrency,
|
||||
|
||||
// #withAlertsActions
|
||||
openAlert,
|
||||
|
||||
@@ -99,6 +95,10 @@ function ReceiptsDataTable({
|
||||
if (isEmptyStatus) {
|
||||
return <ReceiptsEmptyStatus />;
|
||||
}
|
||||
// Handle cell click.
|
||||
const handleCellClick = (cell, event) => {
|
||||
openDrawer('receipt-detail-drawer', { receiptId: cell.row.original.id });
|
||||
};
|
||||
|
||||
return (
|
||||
<DashboardContentTable>
|
||||
@@ -122,6 +122,7 @@ function ReceiptsDataTable({
|
||||
TableLoadingRenderer={TableSkeletonRows}
|
||||
TableHeaderSkeletonRenderer={TableSkeletonHeader}
|
||||
ContextMenu={ActionsMenu}
|
||||
onCellClick={handleCellClick}
|
||||
payload={{
|
||||
onEdit: handleEditReceipt,
|
||||
onDelete: handleDeleteReceipt,
|
||||
@@ -129,7 +130,6 @@ function ReceiptsDataTable({
|
||||
onDrawer: handleDrawerReceipt,
|
||||
onViewDetails: handleViewDetailReceipt,
|
||||
onPrint: handlePrintInvoice,
|
||||
baseCurrency,
|
||||
}}
|
||||
/>
|
||||
</DashboardContentTable>
|
||||
@@ -144,7 +144,4 @@ export default compose(
|
||||
withReceipts(({ receiptTableState }) => ({
|
||||
receiptTableState,
|
||||
})),
|
||||
withSettings(({ organizationSettings }) => ({
|
||||
baseCurrency: organizationSettings?.baseCurrency,
|
||||
})),
|
||||
)(ReceiptsDataTable);
|
||||
|
||||
Reference in New Issue
Block a user