From ab7eb40ea95d84de4c196f549105efed2af85e2d Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Mon, 26 Feb 2024 15:29:51 +0200 Subject: [PATCH] feat(webapp): add icon to convert to invoice button --- .../EstimateDetailActionsBar.tsx | 29 ++++++++++++------- packages/webapp/src/static/json/icons.tsx | 6 ++++ .../src/style/pages/Dashboard/Dashboard.scss | 10 +++++++ 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/packages/webapp/src/containers/Drawers/EstimateDetailDrawer/EstimateDetailActionsBar.tsx b/packages/webapp/src/containers/Drawers/EstimateDetailDrawer/EstimateDetailActionsBar.tsx index 02ebed97c..a01be889d 100644 --- a/packages/webapp/src/containers/Drawers/EstimateDetailDrawer/EstimateDetailActionsBar.tsx +++ b/packages/webapp/src/containers/Drawers/EstimateDetailDrawer/EstimateDetailActionsBar.tsx @@ -14,14 +14,18 @@ import { useEstimateDetailDrawerContext } from './EstimateDetailDrawerProvider'; import withDialogActions from '@/containers/Dialog/withDialogActions'; import withAlertsActions from '@/containers/Alert/withAlertActions'; import withDrawerActions from '@/containers/Drawer/withDrawerActions'; -import { SaleEstimateAction, AbilitySubject } from '@/constants/abilityOption'; +import { + SaleEstimateAction, + AbilitySubject, + SaleInvoiceAction, +} from '@/constants/abilityOption'; import { EstimateMoreMenuItems } from './components'; import { DrawerActionsBar, Icon, FormattedMessage as T, Can, - Choose, + If, } from '@/components'; import { compose } from '@/utils'; @@ -42,7 +46,7 @@ function EstimateDetailActionsBar({ closeDrawer, }) { // Estimate details drawer context. - const { estimateId } = useEstimateDetailDrawerContext(); + const { estimateId, estimate } = useEstimateDetailDrawerContext(); // History. const history = useHistory(); @@ -91,14 +95,19 @@ function EstimateDetailActionsBar({ /> - + + +