mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +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`);
|
history.push(`/estimates/${estimateId}/edit`);
|
||||||
closeDrawer(DRAWERS.ESTIMATE_DETAILS);
|
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.
|
// Handle delete sale estimate.
|
||||||
const handleDeleteEstimate = () => {
|
const handleDeleteEstimate = () => {
|
||||||
openAlert('estimate-delete', { estimateId });
|
openAlert('estimate-delete', { estimateId });
|
||||||
@@ -84,6 +93,12 @@ function EstimateDetailActionsBar({
|
|||||||
</Can>
|
</Can>
|
||||||
|
|
||||||
<Can I={SaleEstimateAction.View} a={AbilitySubject.Estimate}>
|
<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
|
<Button
|
||||||
className={Classes.MINIMAL}
|
className={Classes.MINIMAL}
|
||||||
icon={<Icon icon="envelope" />}
|
icon={<Icon icon="envelope" />}
|
||||||
|
|||||||
Reference in New Issue
Block a user