import React from 'react'; import { NavbarDivider, NavbarGroup, Classes, Button, Popover, PopoverInteractionKind, Position, } from '@blueprintjs/core'; import { FormattedMessage as T } from 'components'; import classNames from 'classnames'; import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'; import { Icon } from 'components'; import NumberFormatDropdown from 'components/NumberFormatDropdown'; import { useAPAgingSummaryContext } from './APAgingSummaryProvider'; import withAPAgingSummary from './withAPAgingSummary'; import withAPAgingSummaryActions from './withAPAgingSummaryActions'; import { saveInvoke, compose } from 'utils'; /** * AP Aging summary sheet - Actions bar. */ function APAgingSummaryActionsBar({ // #withPayableAgingSummary isFilterDrawerOpen, // #withARAgingSummaryActions toggleAPAgingSummaryFilterDrawer: toggleFilterDrawerDisplay, //#ownProps numberFormat, onNumberFormatSubmit, }) { const { isAPAgingFetching, refetch } = useAPAgingSummaryContext(); const handleFilterToggleClick = () => { toggleFilterDrawerDisplay(); } // handle recalculate report button. const handleRecalculateReport = () => { refetch(); } // handle number format submit. const handleNumberFormatSubmit = (numberFormat) => { saveInvoke(onNumberFormatSubmit, numberFormat); } return (