mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: trial balance sheet. feat: general ledger report. feat: journal report. feat: profit/loss report.
98 lines
2.4 KiB
JavaScript
98 lines
2.4 KiB
JavaScript
import React from 'react';
|
|
import {
|
|
NavbarGroup,
|
|
Button,
|
|
Classes,
|
|
NavbarDivider,
|
|
Popover,
|
|
PopoverInteractionKind,
|
|
Position,
|
|
} from '@blueprintjs/core';
|
|
import { FormattedMessage as T } from 'react-intl';
|
|
import Icon from 'components/Icon';
|
|
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
|
|
import classNames from 'classnames';
|
|
|
|
import withJournalActions from './withJournalActions';
|
|
import withJournal from './withJournal';
|
|
|
|
import { compose } from 'utils';
|
|
|
|
/**
|
|
* Journal sheeet - Actions bar.
|
|
*/
|
|
function JournalActionsBar({
|
|
// #withJournal
|
|
journalSheetFilter,
|
|
|
|
// #withJournalActions
|
|
toggleJournalSheetFilter,
|
|
refreshJournalSheet,
|
|
}) {
|
|
const handleFilterToggleClick = () => {
|
|
toggleJournalSheetFilter();
|
|
};
|
|
|
|
const handleRecalcReport = () => {
|
|
refreshJournalSheet(true);
|
|
};
|
|
|
|
return (
|
|
<DashboardActionsBar>
|
|
<NavbarGroup>
|
|
<Button
|
|
className={classNames(Classes.MINIMAL, 'button--gray-highlight')}
|
|
text={<T id={'recalc_report'} />}
|
|
onClick={handleRecalcReport}
|
|
icon={<Icon icon="refresh-16" iconSize={16} />}
|
|
/>
|
|
<NavbarDivider />
|
|
|
|
<Button
|
|
className={classNames(Classes.MINIMAL, 'button--table-views')}
|
|
icon={<Icon icon="cog-16" iconSize={16} />}
|
|
text={
|
|
(journalSheetFilter) ? (
|
|
<T id={'hide_customizer'} />
|
|
) : (
|
|
<T id={'customize_report'} />
|
|
)
|
|
}
|
|
active={journalSheetFilter}
|
|
onClick={handleFilterToggleClick}
|
|
/>
|
|
<NavbarDivider />
|
|
|
|
<Popover
|
|
interactionKind={PopoverInteractionKind.CLICK}
|
|
position={Position.BOTTOM_LEFT}
|
|
>
|
|
<Button
|
|
className={classNames(Classes.MINIMAL, 'button--filter')}
|
|
text={<T id={'filter'} />}
|
|
icon={<Icon icon="filter-16" iconSize={16} />}
|
|
/>
|
|
</Popover>
|
|
|
|
<NavbarDivider />
|
|
|
|
<Button
|
|
className={Classes.MINIMAL}
|
|
icon={<Icon icon="print-16" iconSize={16} />}
|
|
text={<T id={'print'} />}
|
|
/>
|
|
<Button
|
|
className={Classes.MINIMAL}
|
|
icon={<Icon icon="file-export-16" iconSize={16} />}
|
|
text={<T id={'export'} />}
|
|
/>
|
|
</NavbarGroup>
|
|
</DashboardActionsBar>
|
|
);
|
|
}
|
|
|
|
export default compose(
|
|
withJournal(({ journalSheetFilter }) => ({ journalSheetFilter })),
|
|
withJournalActions,
|
|
)(JournalActionsBar);
|