mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
fix(BalanceSheet): highlight total assets and libaiities.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -14,7 +14,7 @@ const getReportColWidth = (data, accessor, headerText) => {
|
||||
return getColumnWidth(
|
||||
data,
|
||||
accessor,
|
||||
{ magicSpacing: 9, minWidth: 100 },
|
||||
{ magicSpacing: 10, minWidth: 100 },
|
||||
headerText,
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}, {});
|
||||
};
|
||||
return clsx(rowTypesClsx, { [`${rowIdClsx}`]: rowId });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user