mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
refactor(webapp): AR/AP aging summary table columns
This commit is contained in:
@@ -12,8 +12,13 @@ import {
|
||||
import { tableRowMapper } from '@/utils';
|
||||
import AgingReport from './AgingReport';
|
||||
import { AgingSummaryRowType } from './_constants';
|
||||
import { FinancialTable } from '../FinancialTable';
|
||||
import { FinancialSheetStructure } from '../FinancialSheetStructure';
|
||||
|
||||
export default abstract class AgingSummaryTable extends AgingReport {
|
||||
export default abstract class AgingSummaryTable extends R.compose(
|
||||
FinancialSheetStructure,
|
||||
FinancialTable
|
||||
)(AgingReport) {
|
||||
protected readonly report: IAgingSummaryData;
|
||||
protected readonly query: IAgingSummaryQuery;
|
||||
protected readonly agingPeriods: IAgingPeriod[];
|
||||
@@ -193,11 +198,11 @@ export default abstract class AgingSummaryTable extends AgingReport {
|
||||
* @returns {ITableColumn}
|
||||
*/
|
||||
public tableColumns = (): ITableColumn[] => {
|
||||
return [
|
||||
return R.compose(this.tableColumnsCellIndexing)([
|
||||
this.contactNameTableColumn(),
|
||||
{ label: 'Current', key: 'current' },
|
||||
...this.agingTableColumns(),
|
||||
{ label: 'Total', key: 'total' },
|
||||
];
|
||||
]);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export const FinancialTable = (Base) =>
|
||||
* @param {ITableColumn[]} columns
|
||||
* @returns {ITableColumn[]}
|
||||
*/
|
||||
protected tableColumnsCellIndexing = (
|
||||
public tableColumnsCellIndexing = (
|
||||
columns: ITableColumn[]
|
||||
): ITableColumn[] => {
|
||||
const cellIndex = increment(-1);
|
||||
|
||||
Reference in New Issue
Block a user