fix: close btn in invoice delete.

This commit is contained in:
elforjani3
2021-01-08 17:47:46 +02:00
parent 4d939d6120
commit a2a8e22270
2 changed files with 4 additions and 3 deletions

View File

@@ -97,9 +97,10 @@ function InvoiceList({
const handleConfirmInvoiceDelete = useCallback(() => { const handleConfirmInvoiceDelete = useCallback(() => {
requestDeleteInvoice(deleteInvoice.id) requestDeleteInvoice(deleteInvoice.id)
.then(() => { .then(() => {
setDeleteInvoice(false);
AppToaster.show({ AppToaster.show({
message: formatMessage({ message: formatMessage({
id: 'the_invocie_has_been_successfully_deleted', id: 'the_invoice_has_been_successfully_deleted',
}), }),
intent: Intent.SUCCESS, intent: Intent.SUCCESS,
}); });
@@ -109,7 +110,7 @@ function InvoiceList({
setDeleteInvoice(false); setDeleteInvoice(false);
}); });
}, [deleteInvoice, requestDeleteInvoice, formatMessage]); }, [deleteInvoice, requestDeleteInvoice, formatMessage]);
// Handle cancel/confirm invoice deliver. // Handle cancel/confirm invoice deliver.
const handleDeliverInvoice = useCallback((invoice) => { const handleDeliverInvoice = useCallback((invoice) => {
setDeliverInvoice(invoice); setDeliverInvoice(invoice);

View File

@@ -635,7 +635,7 @@ export default {
'The invoice #{number} has been successfully edited.', 'The invoice #{number} has been successfully edited.',
the_invocie_has_been_successfully_created: the_invocie_has_been_successfully_created:
'The invoice #{number} has been successfully created.', 'The invoice #{number} has been successfully created.',
the_invocie_has_been_successfully_deleted: the_invoice_has_been_successfully_deleted:
'The invoice has been successfully deleted.', 'The invoice has been successfully deleted.',
once_delete_this_invoice_you_will_able_to_restore_it: `Once you delete this invoice, you won\'t be able to restore it later. Are you sure you want to delete this invoice?`, once_delete_this_invoice_you_will_able_to_restore_it: `Once you delete this invoice, you won\'t be able to restore it later. Are you sure you want to delete this invoice?`,
receipt_list: 'Receipt List', receipt_list: 'Receipt List',