diff --git a/client/src/containers/Entries/components.js b/client/src/containers/Entries/components.js index 44cb44d11..a9c53596e 100644 --- a/client/src/containers/Entries/components.js +++ b/client/src/containers/Entries/components.js @@ -1,7 +1,7 @@ import React from 'react'; import { FormattedMessage as T } from 'components'; import intl from 'react-intl-universal'; -import { Tooltip, Button, Intent, Position } from '@blueprintjs/core'; +import { Tooltip, Button, Checkbox, Intent, Position } from '@blueprintjs/core'; import { Hint, Icon } from 'components'; import { formattedAmount, safeSumBy } from 'utils'; import { @@ -28,7 +28,11 @@ export function ItemHeaderCell() { * Item column footer cell. */ export function ItemFooterCell() { - return ; + return ( + + + + ); } /** @@ -86,12 +90,35 @@ export function IndexTableCell({ row: { index } }) { return {index + 1}; } +/** + * Landed cost cell. + */ +const LandedCostCell = ({ + row: { index }, + column: { id }, + cell: { value: initialValue }, + data, + payload, +}) => { + return ; +}; + +/** + * Landed cost header cell. + */ +const LandedCostHeaderCell = () => { + return ( + <> + + + + ); +}; + /** * Retrieve editable items entries columns. */ export function useEditableItemsEntriesColumns() { - - return React.useMemo( () => [ { @@ -155,6 +182,14 @@ export function useEditableItemsEntriesColumns() { width: 100, className: 'total', }, + { + Header: '', + accessor: 'landed_cost', + Cell: LandedCostCell, + width: 70, + disableSortBy: true, + disableResizing: true, + }, { Header: '', accessor: 'action', diff --git a/client/src/containers/Expenses/ExpenseForm/components.js b/client/src/containers/Expenses/ExpenseForm/components.js index 0ed35114c..b60949896 100644 --- a/client/src/containers/Expenses/ExpenseForm/components.js +++ b/client/src/containers/Expenses/ExpenseForm/components.js @@ -59,11 +59,7 @@ const LandedCostCell = ({ data, payload, }) => { - return ( - - - - ); + return ; }; /**