mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
Merge branch 'master' of https://github.com/abouolia/Bigcapital
This commit is contained in:
@@ -2,6 +2,8 @@ import React from 'react';
|
||||
import { Switch, Route } from 'react-router';
|
||||
import { useQuery } from 'react-query';
|
||||
|
||||
import 'style/pages/Dashboard/Dashboard.scss';
|
||||
|
||||
import DashboardLoadingIndicator from './DashboardLoadingIndicator';
|
||||
|
||||
import Sidebar from 'components/Sidebar/Sidebar';
|
||||
@@ -15,8 +17,6 @@ import withSettingsActions from 'containers/Settings/withSettingsActions';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
import 'style/pages/Dashboard/Dashboard.scss';
|
||||
|
||||
/**
|
||||
* Dashboard page.
|
||||
*/
|
||||
|
||||
@@ -191,7 +191,7 @@ export default function DataTable({
|
||||
|
||||
// Renders table cell.
|
||||
const RenderCell = useCallback(
|
||||
({ row, cell, index }) => (
|
||||
({ row, cell, column, index }) => (
|
||||
<ConditionalWrapper
|
||||
condition={expandToggleColumn === index && expandable}
|
||||
wrapper={(children) => (
|
||||
@@ -199,6 +199,7 @@ export default function DataTable({
|
||||
style={{
|
||||
'padding-left': `${row.depth * expandColumnSpace}rem`,
|
||||
}}
|
||||
className={'expend-padding'}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
@@ -224,7 +225,14 @@ export default function DataTable({
|
||||
/>
|
||||
</span>
|
||||
</If>
|
||||
{cell.render('Cell')}
|
||||
|
||||
<ConditionalWrapper
|
||||
condition={cell.column.textOverview}
|
||||
wrapper={(children) => (
|
||||
<span class="text-overview">{ children }</span>
|
||||
)}>
|
||||
{cell.render('Cell')}
|
||||
</ConditionalWrapper>
|
||||
</ConditionalWrapper>
|
||||
),
|
||||
[expandable, expandToggleColumn, expandColumnSpace],
|
||||
@@ -276,7 +284,13 @@ export default function DataTable({
|
||||
return (
|
||||
<div
|
||||
{...cell.getCellProps({
|
||||
className: classnames(cell.column.className || '', 'td'),
|
||||
className: classnames(
|
||||
cell.column.className,
|
||||
'td',
|
||||
{
|
||||
'is-text-overview': cell.column.textOverview,
|
||||
}
|
||||
),
|
||||
})}
|
||||
onContextMenu={handleRowContextMenu(cell, row)}
|
||||
>
|
||||
|
||||
5
client/src/components/Datatable/Cells.js
Normal file
5
client/src/components/Datatable/Cells.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import React from 'react';
|
||||
|
||||
export function CellTextSpan({ cell: { value } }) {
|
||||
return (<span class="cell-text">{ value }</span>)
|
||||
}
|
||||
@@ -3,9 +3,10 @@ import moment from 'moment';
|
||||
import classnames from 'classnames';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
import 'style/pages/FinancialStatements/FinancialSheet.scss';
|
||||
|
||||
import { If, LoadingIndicator, MODIFIER } from 'components';
|
||||
|
||||
import 'style/pages/FinancialStatements/FinancialSheet.scss';
|
||||
|
||||
export default function FinancialSheet({
|
||||
companyName,
|
||||
@@ -20,7 +21,8 @@ export default function FinancialSheet({
|
||||
className,
|
||||
basis,
|
||||
minimal = false,
|
||||
fullWidth = false
|
||||
fullWidth = false,
|
||||
currentDate = true,
|
||||
}) {
|
||||
const { formatMessage } = useIntl();
|
||||
const format = 'DD MMMM YYYY';
|
||||
@@ -84,11 +86,19 @@ export default function FinancialSheet({
|
||||
<div class="financial-sheet__table">{children}</div>
|
||||
<div class="financial-sheet__accounting-basis">{accountingBasis}</div>
|
||||
|
||||
{basisLabel && (
|
||||
<div class="financial-sheet__basis">
|
||||
<T id={'accounting_basis'} /> {basisLabel}
|
||||
</div>
|
||||
)}
|
||||
<div class="financial-sheet__footer">
|
||||
<If condition={basisLabel}>
|
||||
<span class="financial-sheet__basis">
|
||||
<T id={'accounting_basis'} /> {basisLabel}
|
||||
</span>
|
||||
</If>
|
||||
|
||||
<If condition={currentDate}>
|
||||
<span class="financial-sheet__current-date">
|
||||
{moment().format('YYYY MMM DD HH:MM')}
|
||||
</span>
|
||||
</If>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user