feat: add project invoicing cell.

This commit is contained in:
elforjani13
2022-09-08 21:44:16 +02:00
parent c75f46d8a4
commit 2ae720821e
4 changed files with 62 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ import {
PercentFieldCell,
NumericInputCell,
CheckBoxFieldCell,
ProjectInvoicingCell,
} from '@/components/DataTableCells';
/**
@@ -152,6 +153,15 @@ export function useEditableItemsEntriesColumns({ landedCost }) {
},
]
: []),
{
Header: '',
accessor: 'invoicing',
Cell: ProjectInvoicingCell,
disableSortBy: true,
disableResizing: true,
width: 45,
align: Align.Center,
},
{
Header: '',
accessor: 'action',

View File

@@ -40,6 +40,9 @@ function ProjectDetailActionsBar({
// Handle new transaction button click.
const handleNewTransactionBtnClick = ({ path }) => {
switch (path) {
case 'invoincing':
openDialog('project-invoicing-form');
break;
case 'expense':
openDialog('project-expense-form', { projectId });
break;