mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14: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;
|
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(
|
return getColumnWidth(
|
||||||
data,
|
data,
|
||||||
accessor,
|
accessor,
|
||||||
{ magicSpacing: 9, minWidth: 100 },
|
{ magicSpacing: 10, minWidth: 100 },
|
||||||
headerText,
|
headerText,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import moment from 'moment';
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import * as R from 'ramda';
|
import * as R from 'ramda';
|
||||||
import Currencies from 'js-money/lib/currency';
|
import Currencies from 'js-money/lib/currency';
|
||||||
|
import clsx from 'classnames';
|
||||||
|
|
||||||
import { Intent } from '@blueprintjs/core';
|
import { Intent } from '@blueprintjs/core';
|
||||||
import Currency from 'js-money/lib/currency';
|
import Currency from 'js-money/lib/currency';
|
||||||
@@ -439,11 +440,11 @@ export const getColumnWidth = (
|
|||||||
rows,
|
rows,
|
||||||
accessor,
|
accessor,
|
||||||
{ maxWidth, minWidth, magicSpacing = 14 },
|
{ maxWidth, minWidth, magicSpacing = 14 },
|
||||||
headerText = ''
|
headerText = '',
|
||||||
) => {
|
) => {
|
||||||
const cellLength = Math.max(
|
const cellLength = Math.max(
|
||||||
...rows.map((row) => (`${_.get(row, accessor)}` || '').length),
|
...rows.map((row) => (`${_.get(row, accessor)}` || '').length),
|
||||||
headerText.length
|
headerText.length,
|
||||||
);
|
);
|
||||||
let result = cellLength * magicSpacing;
|
let result = cellLength * magicSpacing;
|
||||||
|
|
||||||
@@ -903,14 +904,12 @@ export function ignoreEventFromSelectors(event, selectors) {
|
|||||||
.some((element) => !!element);
|
.some((element) => !!element);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const tableRowTypesToClassnames = ({ original }) => {
|
export const tableRowTypesToClassnames = ({ original }) => {
|
||||||
const rowTypes = _.castArray(original.row_types);
|
const rowTypes = _.castArray(original.row_types);
|
||||||
|
const rowId = original.id;
|
||||||
|
|
||||||
return rowTypes.reduce((acc, rowType) => {
|
const rowTypesClsx = rowTypes.map((t) => `row_type--${t}`);
|
||||||
acc[`row_type--${rowType}`] = rowType;
|
const rowIdClsx = `row-id--${original.id}`;
|
||||||
|
|
||||||
return acc;
|
return clsx(rowTypesClsx, { [`${rowIdClsx}`]: rowId });
|
||||||
}, {});
|
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user