import React from 'react'; import { NavbarGroup, NavbarDivider, Button, Classes, Popover, PopoverInteractionKind, Position, } from '@blueprintjs/core'; import { DashboardActionsBar, FormattedMessage as T, Icon } from '@/components'; import classNames from 'classnames'; import NumberFormatDropdown from '@/components/NumberFormatDropdown'; import { compose, saveInvoke } from '@/utils'; import { useProjectProfitabilitySummaryContext } from './ProjectProfitabilitySummaryProvider'; import withProjectProfitabilitySummary from './withProjectProfitabilitySummary'; import withProjectProfitabilitySummaryActions from './withProjectProfitabilitySummaryActions'; /** * Project profitability summary actions bar. */ function ProjectProfitabilitySummaryActionsBar({ // #withProjectProfitabilitySummary isFilterDrawerOpen, // #withProjectProfitabilitySummaryActions toggleProjectProfitabilitySummaryFilterDrawer: toggleFilterDrawer, // #ownProps numberFormat, onNumberFormatSubmit, }) { const { isLoading, refetchProjectProfitabilitySummary } = useProjectProfitabilitySummaryContext(); // Handle filter toggle click. const handleFilterToggleClick = () => { toggleFilterDrawer(); }; // Handle recalculate the report button. const handleRecalcReport = () => { refetchProjectProfitabilitySummary(); }; // Handle number format form submit. const handleNumberFormatSubmit = (values) => { saveInvoke(onNumberFormatSubmit, values); }; return (