mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feature/ allocate landed cost.
This commit is contained in:
@@ -34,13 +34,8 @@ function BillsDataTable({
|
||||
openDialog,
|
||||
}) {
|
||||
// Bills list context.
|
||||
const {
|
||||
bills,
|
||||
pagination,
|
||||
isBillsLoading,
|
||||
isBillsFetching,
|
||||
isEmptyStatus,
|
||||
} = useBillsListContext();
|
||||
const { bills, pagination, isBillsLoading, isBillsFetching, isEmptyStatus } =
|
||||
useBillsListContext();
|
||||
|
||||
const history = useHistory();
|
||||
|
||||
@@ -78,6 +73,11 @@ function BillsDataTable({
|
||||
openDialog('quick-payment-made', { billId: id });
|
||||
};
|
||||
|
||||
// handle allocate landed cost.
|
||||
const handleAllocateLandedCost = ({ id }) => {
|
||||
openDialog('allocate-landed-cost', { billId: id });
|
||||
};
|
||||
|
||||
if (isEmptyStatus) {
|
||||
return <BillsEmptyStatus />;
|
||||
}
|
||||
@@ -105,6 +105,7 @@ function BillsDataTable({
|
||||
onEdit: handleEditBill,
|
||||
onOpen: handleOpenBill,
|
||||
onQuick: handleQuickPaymentMade,
|
||||
onAllocateLandedCost: handleAllocateLandedCost,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -20,7 +20,7 @@ import moment from 'moment';
|
||||
* Actions menu.
|
||||
*/
|
||||
export function ActionsMenu({
|
||||
payload: { onEdit, onOpen, onDelete, onQuick },
|
||||
payload: { onEdit, onOpen, onDelete, onQuick, onAllocateLandedCost },
|
||||
row: { original },
|
||||
}) {
|
||||
return (
|
||||
@@ -50,7 +50,11 @@ export function ActionsMenu({
|
||||
onClick={safeCallback(onQuick, original)}
|
||||
/>
|
||||
</If>
|
||||
|
||||
<MenuItem
|
||||
// icon={<Icon icon="quick-payment-16" iconSize={16} />}
|
||||
text={intl.get('allocate_landed_coast')}
|
||||
onClick={safeCallback(onAllocateLandedCost, original)}
|
||||
/>
|
||||
<MenuItem
|
||||
text={intl.get('delete_bill')}
|
||||
intent={Intent.DANGER}
|
||||
|
||||
Reference in New Issue
Block a user