BIG-94: handle estimate converted to invoice.

This commit is contained in:
elforjani13
2021-09-23 13:02:50 +02:00
parent d1cb7eb51b
commit cd70bf1d80
3 changed files with 22 additions and 6 deletions

View File

@@ -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);
});

View File

@@ -1109,10 +1109,7 @@
"filter_": "البحث...",
"all_rights_reserved": "© {pre}-{current} كل الحقوق محفوظة.",
"congrats_your_account_has_been_created_and_invited": "مبروك! تم إنشاء حسابك ودعوتك إلى <strong>{organization_name} </strong> بنجاح.",
"while_we_set_up_your_account_please_remember_to_verify_your_account": "أثناء قيامنا بإعداد حسابك ، يرجى تذكر التحقق من حسابك بالنقر فوق الارتباط الذي أرسلناه إلى عنوان بريدك الإلكتروني المسجل",
"blog": "المدونة",
"support": "الدعم النفي",
"service_status": "حالة الخدمة",
@@ -1371,7 +1368,8 @@
"filter.select_option": "اختر خيار",
"filter.enter_date": "أدخل تاريخ",
"filter.value": "قيمة",
"payment_made.empty_status.title": "المنشأة لم تدفع اي اموال إلي الموردين ، إلي حد الأن!."
"payment_made.empty_status.title": "المنشأة لم تدفع اي اموال إلي الموردين ، إلي حد الأن!.",
"estimate.delete.error.estimate_converted_to_invoice":"لا يمكن حذف عملية عرض اسعار الذي تم تحويلها إلي فاتورة بيع."
}

View File

@@ -1341,5 +1341,6 @@
"filter.select_option": "Select an option",
"filter.enter_date": "Enter date",
"filter.value": "Value",
"payment_made.empty_status.title": "The organization doesn't pay to vendors, yet!"
"payment_made.empty_status.title": "The organization doesn't pay to vendors, yet!",
"estimate.delete.error.estimate_converted_to_invoice":"Could not delete sale estimate that converted to invoice"
}