mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 23:30:32 +00:00
wip
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
Intent,
|
||||
Alignment,
|
||||
} from '@blueprintjs/core';
|
||||
import { isEmpty } from 'lodash';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import {
|
||||
Icon,
|
||||
@@ -43,6 +44,7 @@ function ManualJournalActionsBar({
|
||||
|
||||
// #withManualJournals
|
||||
manualJournalsFilterConditions,
|
||||
manualJournalsSelectedRows,
|
||||
|
||||
// #withSettings
|
||||
manualJournalsTableSize,
|
||||
@@ -70,7 +72,7 @@ function ManualJournalActionsBar({
|
||||
history.push('/make-journal-entry');
|
||||
};
|
||||
// Handle delete button click.
|
||||
const handleBulkDelete = () => {};
|
||||
const handleBulkDelete = () => { };
|
||||
|
||||
// Handle tab change.
|
||||
const handleTabChange = (view) => {
|
||||
@@ -100,6 +102,22 @@ function ManualJournalActionsBar({
|
||||
downloadExportPdf({ resource: 'ManualJournal' });
|
||||
};
|
||||
|
||||
if (!isEmpty(manualJournalsSelectedRows)) {
|
||||
return (
|
||||
<DashboardActionsBar>
|
||||
<NavbarGroup>
|
||||
<Button
|
||||
className={Classes.MINIMAL}
|
||||
icon={<Icon icon="trash-16" iconSize={16} />}
|
||||
text={<T id={'delete'} />}
|
||||
intent={Intent.DANGER}
|
||||
onClick={handleBulkDelete}
|
||||
/>
|
||||
</NavbarGroup>
|
||||
</DashboardActionsBar>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<DashboardActionsBar>
|
||||
<NavbarGroup>
|
||||
@@ -184,8 +202,9 @@ export default compose(
|
||||
withDialogActions,
|
||||
withManualJournalsActions,
|
||||
withSettingsActions,
|
||||
withManualJournals(({ manualJournalsTableState }) => ({
|
||||
withManualJournals(({ manualJournalsTableState, manualJournalsSelectedRows }) => ({
|
||||
manualJournalsFilterConditions: manualJournalsTableState.filterRoles,
|
||||
manualJournalsSelectedRows,
|
||||
})),
|
||||
withSettings(({ manualJournalsSettings }) => ({
|
||||
manualJournalsTableSize: manualJournalsSettings?.tableSize,
|
||||
|
||||
Reference in New Issue
Block a user