diff --git a/client/src/containers/Sales/Estimate/EstimateActionsBar.js b/client/src/containers/Sales/Estimate/EstimateActionsBar.js index 7f6c6abbc..bf767328e 100644 --- a/client/src/containers/Sales/Estimate/EstimateActionsBar.js +++ b/client/src/containers/Sales/Estimate/EstimateActionsBar.js @@ -3,8 +3,6 @@ import Icon from 'components/Icon'; import { Button, Classes, - Menu, - MenuItem, Popover, NavbarDivider, NavbarGroup, @@ -38,7 +36,7 @@ function EstimateActionsBar({ // #withEstimateActions addEstimatesTableQueries, - + changeEstimateView, // #own Porps onFilterChanged, selectedRows = [], @@ -52,48 +50,25 @@ function EstimateActionsBar({ history.push('/estimates/new'); }, [history]); - // const filterDropdown = FilterDropdown({ - // fields: resourceFields, - // initialCondition: { - // fieldKey: 'estimate_number', - // compatator: 'contains', - // value: '', - // }, - // onFilterChange: (filterConditions) => { - // setFilterCount(filterConditions.length || 0); - // addEstimatesTableQueries({ - // filter_roles: filterConditions || '', - // }); - // onFilterChanged && onFilterChanged(filterConditions); - // }, - // }); - const hasSelectedRows = useMemo(() => selectedRows.length > 0, [ selectedRows, ]); - const viewsMenuItems = estimateViews.map((view) => { - return ( - - ); - }); - + const handleTabChange = (viewId) => { + changeEstimateView(viewId.id || -1); + addEstimatesTableQueries({ + custom_view_id: viewId.id || null, + }); + }; + return ( - {viewsMenuItems}} - minimal={true} - interactionKind={PopoverInteractionKind.HOVER} - position={Position.BOTTOM_LEFT} - > -