From a8671a8d999a9d7882f2f3a5419b310947fadd45 Mon Sep 17 00:00:00 2001 From: "a.nasouf" Date: Sat, 10 Feb 2024 22:18:13 +0200 Subject: [PATCH] feat(webapp): add convert to invoice on estimate drawer toolbar --- .../EstimateDetailActionsBar.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/webapp/src/containers/Drawers/EstimateDetailDrawer/EstimateDetailActionsBar.tsx b/packages/webapp/src/containers/Drawers/EstimateDetailDrawer/EstimateDetailActionsBar.tsx index 3ac2b1b75..02ebed97c 100644 --- a/packages/webapp/src/containers/Drawers/EstimateDetailDrawer/EstimateDetailActionsBar.tsx +++ b/packages/webapp/src/containers/Drawers/EstimateDetailDrawer/EstimateDetailActionsBar.tsx @@ -52,6 +52,15 @@ function EstimateDetailActionsBar({ history.push(`/estimates/${estimateId}/edit`); closeDrawer(DRAWERS.ESTIMATE_DETAILS); }; + + // Handle convert to invoice. + const handleConvertEstimate = () => { + history.push(`/invoices/new?from_estimate_id=${estimateId}`, { + action: estimateId, + }); + closeDrawer(DRAWERS.ESTIMATE_DETAILS); + }; + // Handle delete sale estimate. const handleDeleteEstimate = () => { openAlert('estimate-delete', { estimateId }); @@ -84,6 +93,12 @@ function EstimateDetailActionsBar({ +