mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
Revert "feat(BS|PL): sticky columns in RTL mode."
This reverts commit 200a59d6da.
This commit is contained in:
@@ -295,7 +295,7 @@ const totalColumnCompose = R.curry((data, column) => {
|
||||
/**
|
||||
* Account name column mapper.
|
||||
*/
|
||||
const accountNameColumn = R.curry((direction, data, column) => {
|
||||
const accountNameColumn = R.curry((data, column) => {
|
||||
const accessor = getTableCellValueAccessor(column.cell_index);
|
||||
const width = getReportColWidth(data, accessor, column.label);
|
||||
|
||||
@@ -306,7 +306,7 @@ const accountNameColumn = R.curry((direction, data, column) => {
|
||||
className: column.key,
|
||||
textOverview: true,
|
||||
width: Math.max(width, 300),
|
||||
sticky: direction === 'rtl' ? Align.Right : Align.Left,
|
||||
sticky: Align.Left,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -360,9 +360,9 @@ const isMatchesDateRange = (r) => R.match(/^date-range/g, r).length > 0;
|
||||
* @param {} data
|
||||
* @param {} column
|
||||
*/
|
||||
const dynamicColumnMapper = R.curry((direction, data, column) => {
|
||||
const dynamicColumnMapper = R.curry((data, column) => {
|
||||
const indexTotalColumn = totalColumnCompose(data);
|
||||
const indexAccountNameColumn = accountNameColumn(direction, data);
|
||||
const indexAccountNameColumn = accountNameColumn(data);
|
||||
const indexDatePeriodMapper = dateRangeColumn(data);
|
||||
|
||||
return R.compose(
|
||||
@@ -373,8 +373,11 @@ const dynamicColumnMapper = R.curry((direction, data, column) => {
|
||||
});
|
||||
|
||||
/**
|
||||
* Retrieves the dynamic columns of profit/loss sheet.
|
||||
*
|
||||
* @param {*} columns
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
export const dynamicColumns = (direction, columns, data) => {
|
||||
return R.map(dynamicColumnMapper(direction, data), columns);
|
||||
export const dynamicColumns = (columns, data) => {
|
||||
return R.map(dynamicColumnMapper(data), columns);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user