mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-22 15:50:32 +00:00
fix: re-structure the system tables reports.
This commit is contained in:
9
src/components/FinancialSheet/ReportDataTable.js
Normal file
9
src/components/FinancialSheet/ReportDataTable.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
import { DataTable } from 'components';
|
||||||
|
|
||||||
|
export const ReportDataTable = styled(DataTable)`
|
||||||
|
.table .tbody .tr.no-results:last-of-type .td {
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
`;
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
export * from './FinancialSheet';
|
export * from './FinancialSheet';
|
||||||
export * from './FinancialSheetSkeleton';
|
export * from './FinancialSheetSkeleton';
|
||||||
|
export * from './ReportDataTable';
|
||||||
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { DataTable, FinancialSheet } from 'components';
|
import { ReportDataTable, FinancialSheet } from 'components';
|
||||||
import { TableStyle } from 'common';
|
import { TableStyle } from 'common';
|
||||||
|
|
||||||
import { useAPAgingSummaryContext } from './APAgingSummaryProvider';
|
import { useAPAgingSummaryContext } from './APAgingSummaryProvider';
|
||||||
@@ -45,7 +45,7 @@ export default function APAgingSummaryTable({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const APAgingSummaryDataTable = styled(DataTable)`
|
const APAgingSummaryDataTable = styled(ReportDataTable)`
|
||||||
.table {
|
.table {
|
||||||
.tbody .tr {
|
.tbody .tr {
|
||||||
.td {
|
.td {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { DataTable, FinancialSheet } from 'components';
|
import { ReportDataTable, FinancialSheet } from 'components';
|
||||||
import { TableStyle } from 'common';
|
import { TableStyle } from 'common';
|
||||||
|
|
||||||
import { useARAgingSummaryContext } from './ARAgingSummaryProvider';
|
import { useARAgingSummaryContext } from './ARAgingSummaryProvider';
|
||||||
@@ -26,7 +26,6 @@ export default function ReceivableAgingSummaryTable({
|
|||||||
return (
|
return (
|
||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={organizationName}
|
companyName={organizationName}
|
||||||
name={'receivable-aging-summary'}
|
|
||||||
sheetType={intl.get('receivable_aging_summary')}
|
sheetType={intl.get('receivable_aging_summary')}
|
||||||
asDate={new Date()}
|
asDate={new Date()}
|
||||||
loading={isARAgingLoading}
|
loading={isARAgingLoading}
|
||||||
@@ -43,7 +42,7 @@ export default function ReceivableAgingSummaryTable({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ARAgingSummaryDataTable = styled(DataTable)`
|
const ARAgingSummaryDataTable = styled(ReportDataTable)`
|
||||||
.table {
|
.table {
|
||||||
.tbody .tr {
|
.tbody .tr {
|
||||||
.td {
|
.td {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import { DataTable, FinancialSheet } from 'components';
|
import { ReportDataTable, FinancialSheet } from 'components';
|
||||||
|
|
||||||
import { useBalanceSheetContext } from './BalanceSheetProvider';
|
import { useBalanceSheetContext } from './BalanceSheetProvider';
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ export default function BalanceSheetTable({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const BalanceSheetDataTable = styled(DataTable)`
|
const BalanceSheetDataTable = styled(ReportDataTable)`
|
||||||
.table {
|
.table {
|
||||||
.tbody .tr {
|
.tbody .tr {
|
||||||
.td {
|
.td {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { DataTable, FinancialSheet } from 'components';
|
import { ReportDataTable, FinancialSheet } from 'components';
|
||||||
|
|
||||||
import { useCustomersBalanceSummaryContext } from './CustomersBalanceSummaryProvider';
|
import { useCustomersBalanceSummaryContext } from './CustomersBalanceSummaryProvider';
|
||||||
import { useCustomersSummaryColumns } from './components';
|
import { useCustomersSummaryColumns } from './components';
|
||||||
@@ -41,7 +41,7 @@ export default function CustomersBalanceSummaryTable({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const CustomerBalanceDataTable = styled(DataTable)`
|
const CustomerBalanceDataTable = styled(ReportDataTable)`
|
||||||
.table {
|
.table {
|
||||||
.tbody {
|
.tbody {
|
||||||
.tr:not(.no-results) {
|
.tr:not(.no-results) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import styled from 'styled-components';
|
|||||||
|
|
||||||
import { defaultExpanderReducer, tableRowTypesToClassnames } from 'utils';
|
import { defaultExpanderReducer, tableRowTypesToClassnames } from 'utils';
|
||||||
|
|
||||||
import { FinancialSheet, DataTable } from 'components';
|
import { FinancialSheet, ReportDataTable } from 'components';
|
||||||
import TableVirtualizedListRows from 'components/Datatable/TableVirtualizedRows';
|
import TableVirtualizedListRows from 'components/Datatable/TableVirtualizedRows';
|
||||||
import TableFastCell from 'components/Datatable/TableFastCell';
|
import TableFastCell from 'components/Datatable/TableFastCell';
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ export default function GeneralLedgerTable({ companyName }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const GeneralLedgerDataTable = styled(DataTable)`
|
const GeneralLedgerDataTable = styled(ReportDataTable)`
|
||||||
.tbody {
|
.tbody {
|
||||||
.tr .td {
|
.tr .td {
|
||||||
padding-top: 0.2rem;
|
padding-top: 0.2rem;
|
||||||
@@ -97,7 +97,6 @@ const GeneralLedgerDataTable = styled(DataTable)`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(:first-child).is-expanded .td {
|
&:not(:first-child).is-expanded .td {
|
||||||
border-top: 1px solid #ddd;
|
border-top: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
@@ -109,7 +108,6 @@ const GeneralLedgerDataTable = styled(DataTable)`
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--CLOSING_BALANCE {
|
&--CLOSING_BALANCE {
|
||||||
.name {
|
.name {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|||||||
@@ -2,12 +2,11 @@ import React, { useMemo } from 'react';
|
|||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { DataTable, FinancialSheet } from 'components';
|
import { ReportDataTable, FinancialSheet } from 'components';
|
||||||
import { useInventoryItemDetailsColumns } from './components';
|
import { useInventoryItemDetailsColumns } from './components';
|
||||||
import { useInventoryItemDetailsContext } from './InventoryItemDetailsProvider';
|
import { useInventoryItemDetailsContext } from './InventoryItemDetailsProvider';
|
||||||
|
|
||||||
import { defaultExpanderReducer, tableRowTypesToClassnames } from 'utils';
|
import { defaultExpanderReducer, tableRowTypesToClassnames } from 'utils';
|
||||||
|
|
||||||
import { TableStyle } from 'common';
|
import { TableStyle } from 'common';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,7 +53,7 @@ export function InventoryItemDetailsTable({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const InventoryItemDetailsDataTable = styled(DataTable)`
|
const InventoryItemDetailsDataTable = styled(ReportDataTable)`
|
||||||
.table {
|
.table {
|
||||||
.tbody {
|
.tbody {
|
||||||
.tr .td {
|
.tr .td {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { DataTable, FinancialSheet } from 'components';
|
import { ReportDataTable, FinancialSheet } from 'components';
|
||||||
|
|
||||||
import { useInventoryValuationContext } from './InventoryValuationProvider';
|
import { useInventoryValuationContext } from './InventoryValuationProvider';
|
||||||
import { useInventoryValuationTableColumns } from './components';
|
import { useInventoryValuationTableColumns } from './components';
|
||||||
@@ -54,7 +54,7 @@ const InventoryValuationSheet = styled(FinancialSheet)`
|
|||||||
min-width: 850px;
|
min-width: 850px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const InventoryValuationDataTable = styled(DataTable)`
|
const InventoryValuationDataTable = styled(ReportDataTable)`
|
||||||
.table {
|
.table {
|
||||||
.tbody {
|
.tbody {
|
||||||
.tr .td {
|
.tr .td {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, { useMemo } from 'react';
|
|||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { DataTable, FinancialSheet } from 'components';
|
import { ReportDataTable, FinancialSheet } from 'components';
|
||||||
import TableVirtualizedListRows from 'components/Datatable/TableVirtualizedRows';
|
import TableVirtualizedListRows from 'components/Datatable/TableVirtualizedRows';
|
||||||
import TableFastCell from 'components/Datatable/TableFastCell';
|
import TableFastCell from 'components/Datatable/TableFastCell';
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ export function JournalTable({ companyName }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const JournalDataTable = styled(DataTable)`
|
const JournalDataTable = styled(ReportDataTable)`
|
||||||
.table {
|
.table {
|
||||||
.tbody {
|
.tbody {
|
||||||
.tr:not(.no-results) .td {
|
.tr:not(.no-results) .td {
|
||||||
|
|||||||
@@ -2,7 +2,11 @@ import React from 'react';
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { TableStyle } from 'common';
|
import { TableStyle } from 'common';
|
||||||
import { DataTable, FinancialSheet, FormattedMessage as T } from 'components';
|
import {
|
||||||
|
ReportDataTable,
|
||||||
|
FinancialSheet,
|
||||||
|
FormattedMessage as T,
|
||||||
|
} from 'components';
|
||||||
|
|
||||||
import { tableRowTypesToClassnames, defaultExpanderReducer } from 'utils';
|
import { tableRowTypesToClassnames, defaultExpanderReducer } from 'utils';
|
||||||
import { useProfitLossSheetColumns } from './hooks';
|
import { useProfitLossSheetColumns } from './hooks';
|
||||||
@@ -49,7 +53,7 @@ export default function ProfitLossSheetTable({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ProfitLossDataTable = styled(DataTable)`
|
const ProfitLossDataTable = styled(ReportDataTable)`
|
||||||
.table {
|
.table {
|
||||||
.tbody .tr {
|
.tbody .tr {
|
||||||
.td {
|
.td {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { DataTable, FinancialSheet } from 'components';
|
import { ReportDataTable, FinancialSheet } from 'components';
|
||||||
|
|
||||||
import { usePurchaseByItemsContext } from './PurchasesByItemsProvider';
|
import { usePurchaseByItemsContext } from './PurchasesByItemsProvider';
|
||||||
import { usePurchasesByItemsTableColumns } from './components';
|
import { usePurchasesByItemsTableColumns } from './components';
|
||||||
@@ -50,7 +50,7 @@ const PurchasesByItemsSheet = styled(FinancialSheet)`
|
|||||||
min-width: 850px;
|
min-width: 850px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const PurchasesByItemsDataTable = styled(DataTable)`
|
const PurchasesByItemsDataTable = styled(ReportDataTable)`
|
||||||
.table {
|
.table {
|
||||||
.tbody {
|
.tbody {
|
||||||
.tr .td {
|
.tr .td {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { DataTable, FinancialSheet } from 'components';
|
import { ReportDataTable, FinancialSheet } from 'components';
|
||||||
|
|
||||||
import { useSalesByItemsContext } from './SalesByItemProvider';
|
import { useSalesByItemsContext } from './SalesByItemProvider';
|
||||||
import { useSalesByItemsTableColumns } from './components';
|
import { useSalesByItemsTableColumns } from './components';
|
||||||
@@ -52,7 +52,7 @@ const SalesByItemsSheet = styled(FinancialSheet)`
|
|||||||
min-width: 850px;
|
min-width: 850px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const SalesByItemsDataTable = styled(DataTable)`
|
const SalesByItemsDataTable = styled(ReportDataTable)`
|
||||||
.table {
|
.table {
|
||||||
.tbody {
|
.tbody {
|
||||||
.tr .td {
|
.tr .td {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { DataTable, FinancialSheet } from 'components';
|
import { ReportDataTable, FinancialSheet } from 'components';
|
||||||
|
|
||||||
import { useTrialBalanceSheetContext } from './TrialBalanceProvider';
|
import { useTrialBalanceSheetContext } from './TrialBalanceProvider';
|
||||||
import { useTrialBalanceTableColumns } from './components';
|
import { useTrialBalanceTableColumns } from './components';
|
||||||
@@ -47,7 +47,7 @@ export default function TrialBalanceSheetTable({ companyName }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const TrialBalanceDataTable = styled(DataTable)`
|
const TrialBalanceDataTable = styled(ReportDataTable)`
|
||||||
.table {
|
.table {
|
||||||
.tbody {
|
.tbody {
|
||||||
.tr .td {
|
.tr .td {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { DataTable, FinancialSheet } from 'components';
|
import { ReportDataTable, FinancialSheet } from 'components';
|
||||||
|
|
||||||
import { useVendorsBalanceColumns } from './components';
|
import { useVendorsBalanceColumns } from './components';
|
||||||
import { useVendorsBalanceSummaryContext } from './VendorsBalanceSummaryProvider';
|
import { useVendorsBalanceSummaryContext } from './VendorsBalanceSummaryProvider';
|
||||||
@@ -43,7 +43,7 @@ export default function VendorsBalanceSummaryTable({
|
|||||||
|
|
||||||
const VendorBalanceFinancialSheet = styled(FinancialSheet)``;
|
const VendorBalanceFinancialSheet = styled(FinancialSheet)``;
|
||||||
|
|
||||||
const VendorBalanceDataTable = styled(DataTable)`
|
const VendorBalanceDataTable = styled(ReportDataTable)`
|
||||||
.table {
|
.table {
|
||||||
.tbody {
|
.tbody {
|
||||||
.tr:not(.no-results) {
|
.tr:not(.no-results) {
|
||||||
|
|||||||
Reference in New Issue
Block a user