diff --git a/src/containers/Dialogs/AllocateLandedCostDialog/AllocateLandedCostFormFields.js b/src/containers/Dialogs/AllocateLandedCostDialog/AllocateLandedCostFormFields.js index 4861a65eb..ccc45719b 100644 --- a/src/containers/Dialogs/AllocateLandedCostDialog/AllocateLandedCostFormFields.js +++ b/src/containers/Dialogs/AllocateLandedCostDialog/AllocateLandedCostFormFields.js @@ -90,8 +90,10 @@ export default function AllocateLandedCostFormFields() { selectedItem={value} selectedItemProp={'id'} textProp={'name'} - labelProp={'id'} - defaultText={intl.get('Select transaction')} + labelProp={'formatted_unallocated_cost_amount'} + defaultText={intl.get( + 'landed_cost.dialog.label_select_transaction', + )} popoverProps={{ minimal: true }} /> @@ -129,7 +131,10 @@ export default function AllocateLandedCostFormFields() { selectedItem={value} selectedItemProp={'id'} textProp={'name'} - defaultText={intl.get('Select transaction entry')} + labelProp={'formatted_unallocated_cost_amount'} + defaultText={intl.get( + 'landed_cost.dialog.label_select_transaction_entry', + )} popoverProps={{ minimal: true }} /> diff --git a/src/containers/Drawers/BillDrawer/components.js b/src/containers/Drawers/BillDrawer/components.js index 2a4d29f93..184a120f0 100644 --- a/src/containers/Drawers/BillDrawer/components.js +++ b/src/containers/Drawers/BillDrawer/components.js @@ -1,5 +1,6 @@ import React from 'react'; import intl from 'react-intl-universal'; +import styled from 'styled-components'; import { Intent, MenuItem, Menu } from '@blueprintjs/core'; import { safeCallback } from 'utils'; import { Icon } from 'components'; @@ -24,7 +25,7 @@ export function ActionsMenu({ row: { original }, payload: { onDelete } }) { */ export function FromTransactionCell({ row: { original }, - payload: { onFromTranscationClick } + payload: { onFromTranscationClick }, }) { // Handle the link click const handleAnchorClick = () => { @@ -38,6 +39,18 @@ export function FromTransactionCell({ ); } +/** + * Name accessor. + */ +export const NameAccessor = (row) => { + return ( + + {row.name} + {row.description} + + ); +}; + /** * Retrieve bill located landed cost table columns. */ @@ -46,7 +59,7 @@ export function useLocatedLandedCostColumns() { () => [ { Header: intl.get('name'), - accessor: 'description', + accessor: NameAccessor, width: 150, className: 'name', }, @@ -65,7 +78,7 @@ export function useLocatedLandedCostColumns() { }, { Header: intl.get('allocation_method'), - accessor: 'allocation_method_formatted', + accessor: 'allocation_method', width: 100, className: 'allocation-method', }, @@ -73,3 +86,12 @@ export function useLocatedLandedCostColumns() { [], ); } + +const LabelName = styled.div``; + +const LabelDescription = styled.div` + font-size: 12px; + margin-top: 6px; + display: block; + opacity: 0.75; +`; diff --git a/src/lang/en/index.json b/src/lang/en/index.json index a95e38c2e..a61e77cee 100644 --- a/src/lang/en/index.json +++ b/src/lang/en/index.json @@ -1536,5 +1536,7 @@ "vendor_credit.drawer.label_vendor_credit_date":"Vendor Credit Date", "vendor_credit.drawer.label_create_at":"Create at", "vendor_credit.drawer.label_total": "TOTAL", - "vendor_credit.drawer.label_subtotal": "Subtotal" + "vendor_credit.drawer.label_subtotal": "Subtotal", + "landed_cost.dialog.label_select_transaction":"Select transaction", + "landed_cost.dialog.label_select_transaction_entry":"Select transaction entry" } \ No newline at end of file diff --git a/src/style/pages/AllocateLandedCost/AllocateLandedCostForm.scss b/src/style/pages/AllocateLandedCost/AllocateLandedCostForm.scss index 1040746e2..d0b23d633 100644 --- a/src/style/pages/AllocateLandedCost/AllocateLandedCostForm.scss +++ b/src/style/pages/AllocateLandedCost/AllocateLandedCostForm.scss @@ -8,7 +8,7 @@ } .bp3-form-group.bp3-inline { .bp3-label { - min-width: 150px; + min-width: 165px; } .bp3-form-content { width: 300px;