diff --git a/src/containers/Dialogs/AllocateLandedCostDialog/utils.js b/src/containers/Dialogs/AllocateLandedCostDialog/utils.js index e3fb5ac3b..0cf420992 100644 --- a/src/containers/Dialogs/AllocateLandedCostDialog/utils.js +++ b/src/containers/Dialogs/AllocateLandedCostDialog/utils.js @@ -89,11 +89,14 @@ export const useAllocateLandedCostEntriesTableColumns = () => { accessor: 'rate', disableSortBy: true, width: '100', + align: 'right', + }, { Header: intl.get('amount'), accessor: 'amount', disableSortBy: true, + align: 'right', width: '100', }, { diff --git a/src/containers/Drawers/BillDrawer/BillDetailActionsBar.js b/src/containers/Drawers/BillDrawer/BillDetailActionsBar.js index 0db244234..7f78410b5 100644 --- a/src/containers/Drawers/BillDrawer/BillDetailActionsBar.js +++ b/src/containers/Drawers/BillDrawer/BillDetailActionsBar.js @@ -69,6 +69,11 @@ function BillDetailActionsBar({ openDialog('quick-payment-made', { billId }); }; + // Handle allocate landed cost button click. + const handleAllocateCostClick = () => { + openDialog('allocate-landed-cost', { billId }); + }; + return ( @@ -106,6 +111,7 @@ function BillDetailActionsBar({ diff --git a/src/containers/Drawers/BillDrawer/BillPaymentTransactions/BillPaymentTransactionTable.js b/src/containers/Drawers/BillDrawer/BillPaymentTransactions/BillPaymentTransactionTable.js index 8ef93e23b..f19c23bd4 100644 --- a/src/containers/Drawers/BillDrawer/BillPaymentTransactions/BillPaymentTransactionTable.js +++ b/src/containers/Drawers/BillDrawer/BillPaymentTransactions/BillPaymentTransactionTable.js @@ -40,15 +40,15 @@ function BillPaymentTransactionTable({ }); // Handles delete bill payment transactions. - const handleDeleteBillPaymentTransactons = ({ bill_id }) => { - openAlert('bill-delete', { - billId: bill_id, + const handleDeleteBillPaymentTransactons = ({ bill_payment_id }) => { + openAlert('payment-made-delete', { + paymentMadeId: bill_payment_id, }); }; // Handles edit bill payment transactions. - const handleEditBillPaymentTransactions = ({ bill_id }) => { - history.push(`/bills/${bill_id}/edit`); + const handleEditBillPaymentTransactions = ({ bill_payment_id }) => { + history.push(`/payment-mades/${bill_payment_id}/edit`); closeDrawer('bill-drawer'); }; diff --git a/src/containers/Drawers/BillDrawer/LocatedLandedCostTable.js b/src/containers/Drawers/BillDrawer/LocatedLandedCostTable.js index fa536fa92..300928a4d 100644 --- a/src/containers/Drawers/BillDrawer/LocatedLandedCostTable.js +++ b/src/containers/Drawers/BillDrawer/LocatedLandedCostTable.js @@ -1,6 +1,5 @@ import React from 'react'; import { DataTable, Card, FormattedMessage as T } from 'components'; -import { Button, Classes, NavbarGroup } from '@blueprintjs/core'; import { useLocatedLandedCostColumns, ActionsMenu } from './components'; import { useBillDrawerContext } from './BillDrawerProvider'; @@ -13,8 +12,7 @@ import { TableStyle } from '../../../common'; import TableSkeletonRows from 'components/Datatable/TableSkeletonRows'; import { compose } from 'utils'; -import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'; -import Icon from 'components/Icon'; + /** * Located landed cost table. @@ -32,10 +30,7 @@ function LocatedLandedCostTable({ const columns = useLocatedLandedCostColumns(); const { transactions, billId } = useBillDrawerContext(); - // Handle allocate landed cost button click. - const handleAllocateCostClick = () => { - openDialog('allocate-landed-cost', { billId }); - }; + // Handle the transaction delete action. const handleDeleteTransaction = ({ id }) => { @@ -60,17 +55,6 @@ function LocatedLandedCostTable({ return (
- - -