fix: BIG-196 Bill landed cost transactions formatted allocate type.

This commit is contained in:
a.bouhuolia
2022-01-01 18:06:46 +02:00
parent cdb8ea6721
commit e0c565388a
2 changed files with 14 additions and 10 deletions

View File

@@ -27,11 +27,12 @@ function LocatedLandedCostTable({
// #withDrawerActions
openDrawer,
}) {
// Located landed cost table columns.
const columns = useLocatedLandedCostColumns();
// Bill drawer context.
const { transactions, billId } = useBillDrawerContext();
// Handle the transaction delete action.
const handleDeleteTransaction = ({ id }) => {
openAlert('bill-located-cost-delete', { BillId: id });

View File

@@ -1,10 +1,11 @@
import React from 'react';
import intl from 'react-intl-universal';
import styled from 'styled-components';
import clsx from 'classnames';
import { Intent, MenuItem, Menu } from '@blueprintjs/core';
import { safeCallback } from 'utils';
import { Can, Icon } from 'components';
import { BillAction, AbilitySubject } from '../../../common/abilityOption';
import { CLASSES } from 'common/classes';
import { Icon } from 'components';
/**
* Actions menu.
@@ -63,26 +64,28 @@ export function useLocatedLandedCostColumns() {
Header: intl.get('name'),
accessor: NameAccessor,
width: 150,
className: 'name',
textOverview: true,
},
{
Header: intl.get('amount'),
accessor: 'formatted_amount',
width: 100,
className: 'amount',
align: 'right',
textOverview: true,
className: clsx(CLASSES.FONT_BOLD),
},
{
id: 'from_transaction',
Header: intl.get('From transaction'),
Cell: FromTransactionCell,
width: 100,
className: 'from-transaction',
textOverview: true,
},
{
Header: intl.get('allocation_method'),
accessor: 'allocation_method',
accessor: 'allocation_method_formatted',
width: 100,
className: 'allocation-method',
textOverview: true,
},
],
[],
@@ -93,7 +96,7 @@ const LabelName = styled.div``;
const LabelDescription = styled.div`
font-size: 12px;
margin-top: 6px;
margin-top: 2px;
display: block;
opacity: 0.75;
`;