mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
BIG-94: handle estimate converted to invoice.
This commit is contained in:
@@ -46,7 +46,24 @@ function EstimateDeleteAlert({
|
||||
});
|
||||
closeDrawer('estimate-detail-drawer');
|
||||
})
|
||||
.catch(({ errors }) => {})
|
||||
.catch(
|
||||
({
|
||||
response: {
|
||||
data: { errors },
|
||||
},
|
||||
}) => {
|
||||
if (
|
||||
errors.find((e) => e.type === 'SALE_ESTIMATE_CONVERTED_TO_INVOICE')
|
||||
) {
|
||||
AppToaster.show({
|
||||
intent: Intent.DANGER,
|
||||
message: intl.get(
|
||||
'estimate.delete.error.estimate_converted_to_invoice',
|
||||
),
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.finally(() => {
|
||||
closeAlert(name);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user