mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat(webapp): add convert to invoice on estimate drawer toolbar
This commit is contained in:
@@ -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({
|
||||
</Can>
|
||||
|
||||
<Can I={SaleEstimateAction.View} a={AbilitySubject.Estimate}>
|
||||
<Button
|
||||
className={Classes.MINIMAL}
|
||||
icon={<Icon icon="convert_to" />}
|
||||
text={<T id={'convert_to_invoice'} />}
|
||||
onClick={handleConvertEstimate}
|
||||
/>
|
||||
<Button
|
||||
className={Classes.MINIMAL}
|
||||
icon={<Icon icon="envelope" />}
|
||||
|
||||
Reference in New Issue
Block a user