diff --git a/src/containers/FinancialStatements/BalanceSheet/BalanceSheetTable.js b/src/containers/FinancialStatements/BalanceSheet/BalanceSheetTable.js index 86174e62d..224448b8a 100644 --- a/src/containers/FinancialStatements/BalanceSheet/BalanceSheetTable.js +++ b/src/containers/FinancialStatements/BalanceSheet/BalanceSheetTable.js @@ -76,9 +76,15 @@ const BalanceSheetDataTable = styled(DataTable)` } } - &:last-of-type .td{ + &:last-of-type .td { border-bottom: 1px solid #bbb; } + &.row_type--TOTAL.row-id--ASSETS, + &.row_type--TOTAL.row-id--LIABILITY_EQUITY { + .td{ + border-bottom: 3px double #000; + } + } } } `; diff --git a/src/containers/FinancialStatements/BalanceSheet/utils.js b/src/containers/FinancialStatements/BalanceSheet/utils.js index c89f2651f..bf61bce57 100644 --- a/src/containers/FinancialStatements/BalanceSheet/utils.js +++ b/src/containers/FinancialStatements/BalanceSheet/utils.js @@ -14,7 +14,7 @@ const getReportColWidth = (data, accessor, headerText) => { return getColumnWidth( data, accessor, - { magicSpacing: 9, minWidth: 100 }, + { magicSpacing: 10, minWidth: 100 }, headerText, ); }; diff --git a/src/utils/index.js b/src/utils/index.js index d1957f2df..123967ffe 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -3,6 +3,7 @@ import moment from 'moment'; import _ from 'lodash'; import * as R from 'ramda'; import Currencies from 'js-money/lib/currency'; +import clsx from 'classnames'; import { Intent } from '@blueprintjs/core'; import Currency from 'js-money/lib/currency'; @@ -439,11 +440,11 @@ export const getColumnWidth = ( rows, accessor, { maxWidth, minWidth, magicSpacing = 14 }, - headerText = '' + headerText = '', ) => { const cellLength = Math.max( ...rows.map((row) => (`${_.get(row, accessor)}` || '').length), - headerText.length + headerText.length, ); let result = cellLength * magicSpacing; @@ -903,14 +904,12 @@ export function ignoreEventFromSelectors(event, selectors) { .some((element) => !!element); } - - export const tableRowTypesToClassnames = ({ original }) => { const rowTypes = _.castArray(original.row_types); + const rowId = original.id; - return rowTypes.reduce((acc, rowType) => { - acc[`row_type--${rowType}`] = rowType; + const rowTypesClsx = rowTypes.map((t) => `row_type--${t}`); + const rowIdClsx = `row-id--${original.id}`; - return acc; - }, {}); -}; \ No newline at end of file + return clsx(rowTypesClsx, { [`${rowIdClsx}`]: rowId }); +};