diff --git a/src/containers/FinancialStatements/ProfitLossSheet/ProfitLossSheet.js b/src/containers/FinancialStatements/ProfitLossSheet/ProfitLossSheet.js index 67244362f..70bbcb4cf 100644 --- a/src/containers/FinancialStatements/ProfitLossSheet/ProfitLossSheet.js +++ b/src/containers/FinancialStatements/ProfitLossSheet/ProfitLossSheet.js @@ -12,7 +12,6 @@ import withDashboardActions from 'containers/Dashboard/withDashboardActions'; import withProfitLossActions from './withProfitLossActions'; import withCurrentOrganization from '../../Organization/withCurrentOrganization'; -import 'style/pages/FinancialStatements/ProfitLossSheet.scss'; import { ProfitLossSheetProvider } from './ProfitLossProvider'; import { ProfitLossSheetLoadingBar, ProfitLossSheetAlerts } from './components'; diff --git a/src/containers/FinancialStatements/ProfitLossSheet/utils.js b/src/containers/FinancialStatements/ProfitLossSheet/utils.js index aee0c6008..bd8ad6990 100644 --- a/src/containers/FinancialStatements/ProfitLossSheet/utils.js +++ b/src/containers/FinancialStatements/ProfitLossSheet/utils.js @@ -10,7 +10,7 @@ const getReportColWidth = (data, accessor, labelText) => { return getColumnWidth( data, accessor, - { magicSpacing: 9, minWidth: 100 }, + { magicSpacing: 10, minWidth: 100 }, labelText, ); }; @@ -260,7 +260,7 @@ const assocColumnsToTotalColumn = R.curry((data, column, columnAccessor) => { }); /** - * + * Retrieves the total column. */ const totalColumn = R.curry((data, column) => { const hasChildren = isNodeHasChildren(column); @@ -275,7 +275,7 @@ const totalColumn = R.curry((data, column) => { Cell: CellTextSpan, width, disableSortBy: true, - align: hasChildren ? 'center' : 'right', + align: hasChildren ? Align.Center : Align.Right, }; }); @@ -323,6 +323,9 @@ const dateRangeSoloColumnAttrs = (data, column) => { }; }; +/** + * Retrieves date range column. + */ const dateRangeColumn = R.curry((data, column) => { const isDateColumnHasColumns = isNodeHasChildren(column); @@ -331,7 +334,7 @@ const dateRangeColumn = R.curry((data, column) => { key: column.key, disableSortBy: true, textOverview: true, - align: Align.Center, + align: isDateColumnHasColumns ? Align.Center : Align.Center, }; return R.compose( R.when( @@ -374,5 +377,6 @@ const dynamicColumnMapper = R.curry((data, column) => { * @returns */ export const dynamicColumns = (columns, data) => { + debugger; return R.map(dynamicColumnMapper(data), columns); }; diff --git a/src/style/pages/FinancialStatements/ProfitLossSheet.scss b/src/style/pages/FinancialStatements/ProfitLossSheet.scss deleted file mode 100644 index 44e394406..000000000 --- a/src/style/pages/FinancialStatements/ProfitLossSheet.scss +++ /dev/null @@ -1,42 +0,0 @@ - -.financial-sheet{ - &--profit-loss-sheet{ - .financial-sheet__table{ - .thead, - .tbody{ - .tr .td:not(:first-child), - .tr .th:not(:first-child) { - text-align: right; - } - } - .tbody{ - .tr .td{ - border-bottom: 0; - padding-top: 0.4rem; - padding-bottom: 0.4rem; - } - .tr.row_type--total{ - font-weight: 500; - } - .tr.row_type--section_total .td{ - border-top: 1px solid #BBB - } - .tr.row_type--section_total + .tr .td{ - border-top: 1px solid #666; - } - .tr.row_type--net_income_total.row_type--total .td{ - border-bottom: 3px double #333; - } - - .tr.is-expanded{ - .td.total, - .td.total-period{ - .cell-text{ - display: none; - } - } - } - } - } - } -} \ No newline at end of file